# GatewayOAuth2IdentityBinding

Provider ARN, secret ARN, and OAuth scopes for wiring a Token Vault OAuth2 identity into a gateway target.

Returned by: [IOAuth2CredentialProvider.bindForGatewayOAuthTarget](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.IOAuth2CredentialProvider.html#bindforgatewayoauthtarget)

- Source: [`lib/identity/oauth2-credential-provider.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-bedrock-agentcore-alpha/lib/identity/oauth2-credential-provider.ts#L181)

## 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 gatewayOAuth2IdentityBinding: bedrock_agentcore_alpha.GatewayOAuth2IdentityBinding = {
  providerArn: 'providerArn',
  scopes: ['scopes'],
  secretArn: 'secretArn',

  // the properties below are optional
  customParameters: {
    customParametersKey: 'customParameters',
  },
};
```

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

gateway_o_auth2_identity_binding = bedrock_agentcore_alpha.GatewayOAuth2IdentityBinding(
    provider_arn="providerArn",
    scopes=["scopes"],
    secret_arn="secretArn",

    # the properties below are optional
    custom_parameters={
        "custom_parameters_key": "customParameters"
    }
)
```

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.*;

GatewayOAuth2IdentityBinding gatewayOAuth2IdentityBinding = GatewayOAuth2IdentityBinding.builder()
        .providerArn("providerArn")
        .scopes(List.of("scopes"))
        .secretArn("secretArn")

        // the properties below are optional
        .customParameters(Map.of(
                "customParametersKey", "customParameters"))
        .build();
```

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 gatewayOAuth2IdentityBinding = new GatewayOAuth2IdentityBinding {
    ProviderArn = "providerArn",
    Scopes = new [] { "scopes" },
    SecretArn = "secretArn",

    // the properties below are optional
    CustomParameters = new Dictionary<string, string> {
        { "customParametersKey", "customParameters" }
    }
};
```

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 bedrock_agentcore_alpha "github.com/aws/aws-cdk-go/awsbedrockagentcorealpha"

gatewayOAuth2IdentityBinding := &GatewayOAuth2IdentityBinding{
	ProviderArn: jsii.String("providerArn"),
	Scopes: []*string{
		jsii.String("scopes"),
	},
	SecretArn: jsii.String("secretArn"),

	// the properties below are optional
	CustomParameters: map[string]*string{
		"customParametersKey": jsii.String("customParameters"),
	},
}
```

## Properties

- `customParameters`: { [key: string]: string } — Optional custom parameters for the OAuth flow.

  **Default:** no custom parameters

- `providerArn`: string (required) — OAuth2 credential provider ARN.

- `scopes`: string[] (required) — OAuth scopes to request when invoking through the gateway.

- `secretArn`: string (required) — Secrets Manager secret ARN for OAuth2 client credentials.
