# RuntimeCustomClaim

Represents a custom claim validation configuration for Runtime JWT authorizers.

Custom claims allow you to validate additional fields in JWT tokens beyond
the standard audience, client, and scope validations.

Obtainable from: RuntimeCustomClaim.withStringArrayValue, RuntimeCustomClaim.withStringValue
Used as argument in: [RuntimeAuthorizerConfiguration.usingCognito](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.RuntimeAuthorizerConfiguration.html#usingcognito), RuntimeAuthorizerConfiguration.usingJWT, RuntimeAuthorizerConfiguration.usingOAuth

- Source: [`lib/runtime/inbound-auth/custom-claim.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-bedrock-agentcore-alpha/lib/runtime/inbound-auth/custom-claim.ts#L26)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as bedrock_agentcore_alpha from '@aws-cdk/aws-bedrock-agentcore-alpha';
const runtimeCustomClaim = bedrock_agentcore_alpha.RuntimeCustomClaim.withStringArrayValue('name', ['values'], /* all optional props */ bedrock_agentcore_alpha.CustomClaimOperator.EQUALS);
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_bedrock_agentcore_alpha as bedrock_agentcore_alpha

runtime_custom_claim = bedrock_agentcore_alpha.RuntimeCustomClaim.with_string_array_value("name", ["values"], bedrock_agentcore_alpha.CustomClaimOperator.EQUALS)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrock.agentcore.alpha.*;

RuntimeCustomClaim runtimeCustomClaim = RuntimeCustomClaim.withStringArrayValue("name", List.of("values"), CustomClaimOperator.EQUALS);
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.Bedrock.Agentcore.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock.Agentcore.Alpha;

var runtimeCustomClaim = RuntimeCustomClaim.WithStringArrayValue("name", new [] { "values" }, CustomClaimOperator.EQUALS);
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awsbedrockagentcorealpha"

runtimeCustomClaim := bedrock_agentcore_alpha.RuntimeCustomClaim_WithStringArrayValue(jsii.String("name"), []*string{
	jsii.String("values"),
}, bedrock_agentcore_alpha.CustomClaimOperator_EQUALS)
```

## Methods

- `withStringArrayValue(name: string, values: string[], operator?: CustomClaimOperator): RuntimeCustomClaim // chainable` (static) — Create a custom claim with a string array value.

  String array claims can use CONTAINS (default) or CONTAINS_ANY operator.

  **Parameters**

  - `name` — The name of the claim in the JWT token.
  - `values` — The array of string values to match.
  - `operator` — The match operator (defaults to CONTAINS).

  **Returns:** A RuntimeCustomClaim configured for string array validation

- `withStringValue(name: string, value: string): RuntimeCustomClaim // chainable` (static) — Create a custom claim with a string value.

  String claims must use the EQUALS operator.

  **Parameters**

  - `name` — The name of the claim in the JWT token.
  - `value` — The string value to match (must exactly equal).

  **Returns:** A RuntimeCustomClaim configured for string validation
