Skip to content
v2.278.0

OAuth2ClientCredentials Struct ​

OAuth2 client identifier and secret registered with the identity provider (all vendors).

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';
import * as cdk from 'aws-cdk-lib';

declare const secretValue: cdk.SecretValue;
const oAuth2ClientCredentials: bedrock_agentcore_alpha.OAuth2ClientCredentials = {
  clientId: 'clientId',
  clientSecret: secretValue,
};
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
import aws_cdk as cdk

# secret_value: cdk.SecretValue

o_auth2_client_credentials = bedrock_agentcore_alpha.OAuth2ClientCredentials(
    client_id="clientId",
    client_secret=secret_value
)
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.*;
import software.amazon.awscdk.*;

SecretValue secretValue;

OAuth2ClientCredentials oAuth2ClientCredentials = OAuth2ClientCredentials.builder()
        .clientId("clientId")
        .clientSecret(secretValue)
        .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;
using Amazon.CDK;

SecretValue secretValue;

var oAuth2ClientCredentials = new OAuth2ClientCredentials {
    ClientId = "clientId",
    ClientSecret = secretValue
};
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"
import cdk "github.com/aws/aws-cdk-go/awscdk"

var secretValue SecretValue

oAuth2ClientCredentials := &OAuth2ClientCredentials{
	ClientId: jsii.String("clientId"),
	ClientSecret: secretValue,
}

Properties ​

clientIdstringclient_idstrclientIdStringClientIdstringClientId*string required #
OAuth2 client identifier.
clientSecretSecretValueclient_secretSecretValueclientSecretSecretValueClientSecretSecretValueClientSecretSecretValue required #
OAuth2 client secret.
notes

NOTE: The client secret will be included in the CloudFormation template as part of synthesis. The service stores the secret in Secrets Manager after creation, but the value is visible in the template and deployment history. Use SecretValue.unsafePlainText() to explicitly acknowledge plaintext, or pass a reference from another construct to avoid embedding the literal value.