FromOauthIdentityOptions

class aws_cdk.aws_bedrock_agentcore_alpha.FromOauthIdentityOptions(*, scopes, custom_parameters=None)

Bases: object

(experimental) OAuth scopes (and optional custom parameters) when binding an {@link IOAuth2CredentialProvider} to a gateway target.

Parameters:
  • scopes (Sequence[str]) – (experimental) OAuth scopes the gateway should request for this target.

  • custom_parameters (Optional[Mapping[str, str]]) – (experimental) Additional OAuth parameters for the provider. Default: - none

Stability:

experimental

ExampleMetadata:

fixture=default infused

Example:

gateway = agentcore.Gateway(self, "MyGateway",
    gateway_name="my-gateway"
)

oauth = agentcore.OAuth2CredentialProvider.using_github(self, "GhOAuth",
    o_auth2_credential_provider_name="github-oauth",
    client_id="your-client-id",
    client_secret=cdk.SecretValue.unsafe_plain_text("your-client-secret")
)

gateway.add_mcp_server_target("Mcp",
    gateway_target_name="mcp-server",
    description="MCP with GitHub OAuth",
    endpoint="https://my-mcp-server.example.com",
    credential_provider_configurations=[
        agentcore.GatewayCredentialProvider.from_oauth_identity(oauth,
            scopes=["read:user"]
        )
    ]
)

Attributes

custom_parameters

(experimental) Additional OAuth parameters for the provider.

Default:
  • none

Stability:

experimental

scopes

(experimental) OAuth scopes the gateway should request for this target.

Stability:

experimental