# OAuthConfiguration

OAuth configuration.

Used as argument in: [GatewayCredentialProvider.fromOauthIdentityArn](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.GatewayCredentialProvider.html#fromoauthidentityarn)

- Source: [`lib/gateway/outbound-auth/oauth.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-bedrock-agentcore-alpha/lib/gateway/outbound-auth/oauth.ts#L16)

## 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 oAuthConfiguration: bedrock_agentcore_alpha.OAuthConfiguration = {
  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

o_auth_configuration = bedrock_agentcore_alpha.OAuthConfiguration(
    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.*;

OAuthConfiguration oAuthConfiguration = OAuthConfiguration.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 oAuthConfiguration = new OAuthConfiguration {
    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"

oAuthConfiguration := &OAuthConfiguration{
	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 } — Custom parameters for the OAuth flow.

  **Default:** No custom parameters

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

  This is returned when creating the OAuth credential provider via Console or API.
  Format: arn:aws:bedrock-agentcore:region:account:token-vault/id/oauth2credentialprovider/name
  Required: Yes

- `scopes`: string[] (required) — The OAuth scopes for the credential provider. These scopes define the level of access requested from the OAuth provider.

  Array Members: Minimum number of 0 items. Maximum number of 100 items.
  Length Constraints: Minimum length of 1. Maximum length of 64.
  Required: Yes

- `secretArn`: string (required) — The ARN of the Secrets Manager secret containing OAuth credentials (client ID and secret).

  This is returned when creating the OAuth credential provider via Console or API.
  Format: arn:aws:secretsmanager:region:account:secret:name
  Required: Yes
