Skip to content
v2.278.0

OAuthConfiguration Struct ​

OAuth configuration.

Example ​

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
# 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
// 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();
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" }
    }
};
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 ​

customParametersoptional{ [key: string]: string }custom_parametersoptionaltyping.Mapping[str, str]customParametersoptionalMap<String, String>CustomParametersoptionalIDictionary<string, string>CustomParametersoptional*map[string]*string #
Custom parameters for the OAuth flow.

Default: No custom parameters

providerArnstringprovider_arnstrproviderArnStringProviderArnstringProviderArn*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

scopesstring[]scopestyping.List[str]scopesList<String>Scopesstring[]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

secretArnstringsecret_arnstrsecretArnStringSecretArnstringSecretArn*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㊙️name Required: Yes