Class OAuth2CredentialProvider

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.bedrockagentcore.OAuth2CredentialProvider
All Implemented Interfaces:
IOAuth2CredentialProviderRef, IEnvironmentAware, IResource, IOAuth2CredentialProvider, IGrantable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.129.0 (build eaca441)", date="2026-05-19T08:18:44.469Z") @Stability(Stable) public class OAuth2CredentialProvider extends Resource implements IOAuth2CredentialProvider
L2 construct for AWS::BedrockAgentCore::OAuth2CredentialProvider.

Prefer the static factories (for example

invalid reference
OAuth2CredentialProvider.usingSlack
) so you only pass the OAuth2 settings that apply to that vendor. To attach the identity to a gateway target, use
invalid reference
GatewayCredentialProvider.fromOauthIdentity
with this construct, or
invalid reference
OAuth2CredentialProvider.bindForGatewayOAuthTarget
with
invalid reference
GatewayCredentialProvider.fromOauthIdentityArn
.

Example:

 OAuth2CredentialProvider.usingCustom(this, "CustomOAuthMeta", CustomOAuth2CredentialProviderProps.builder()
         .clientId("your-client-id")
         .clientSecret(SecretValue.unsafePlainText("your-client-secret"))
         .authorizationServerMetadata(OAuth2AuthorizationServerMetadata.builder()
                 .issuer("https://idp.example.com")
                 .authorizationEndpoint("https://idp.example.com/oauth2/authorize")
                 .tokenEndpoint("https://idp.example.com/oauth2/token")
                 .build())
         .build());
 

See Also: