BedrockAgentCoreControlPlaneFrontingLayer / Client / create_oauth2_credential_provider
create_oauth2_credential_provider¶
- BedrockAgentCoreControlPlaneFrontingLayer.Client.create_oauth2_credential_provider(**kwargs)¶
Creates a new OAuth2 credential provider.
See also: AWS API Documentation
Request Syntax
response = client.create_oauth2_credential_provider( name='string', credentialProviderVendor='GoogleOauth2'|'GithubOauth2'|'SlackOauth2'|'SalesforceOauth2'|'MicrosoftOauth2'|'CustomOauth2', oauth2ProviderConfigInput={ 'customOauth2ProviderConfig': { 'oauthDiscovery': { 'discoveryUrl': 'string', 'authorizationServerMetadata': { 'issuer': 'string', 'authorizationEndpoint': 'string', 'tokenEndpoint': 'string', 'responseTypes': [ 'string', ] } }, 'clientId': 'string', 'clientSecret': 'string' }, 'googleOauth2ProviderConfig': { 'clientId': 'string', 'clientSecret': 'string' }, 'githubOauth2ProviderConfig': { 'clientId': 'string', 'clientSecret': 'string' }, 'slackOauth2ProviderConfig': { 'clientId': 'string', 'clientSecret': 'string' }, 'salesforceOauth2ProviderConfig': { 'clientId': 'string', 'clientSecret': 'string' }, 'microsoftOauth2ProviderConfig': { 'clientId': 'string', 'clientSecret': 'string' } } )
- Parameters:
name (string) –
[REQUIRED]
The name of the OAuth2 credential provider. The name must be unique within your account.
credentialProviderVendor (string) –
[REQUIRED]
The vendor of the OAuth2 credential provider. This specifies which OAuth2 implementation to use.
oauth2ProviderConfigInput (dict) –
[REQUIRED]
The configuration settings for the OAuth2 provider, including client ID, client secret, and other vendor-specific settings.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
customOauth2ProviderConfig
,googleOauth2ProviderConfig
,githubOauth2ProviderConfig
,slackOauth2ProviderConfig
,salesforceOauth2ProviderConfig
,microsoftOauth2ProviderConfig
.customOauth2ProviderConfig (dict) –
The configuration for a custom OAuth2 provider.
oauthDiscovery (dict) – [REQUIRED]
The OAuth2 discovery information for the custom provider.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
discoveryUrl
,authorizationServerMetadata
.discoveryUrl (string) –
The discovery URL for the OAuth2 provider.
authorizationServerMetadata (dict) –
The authorization server metadata for the OAuth2 provider.
issuer (string) – [REQUIRED]
The issuer URL for the OAuth2 authorization server.
authorizationEndpoint (string) – [REQUIRED]
The authorization endpoint URL for the OAuth2 authorization server.
tokenEndpoint (string) – [REQUIRED]
The token endpoint URL for the OAuth2 authorization server.
responseTypes (list) –
The supported response types for the OAuth2 authorization server.
(string) –
clientId (string) – [REQUIRED]
The client ID for the custom OAuth2 provider.
clientSecret (string) – [REQUIRED]
The client secret for the custom OAuth2 provider.
googleOauth2ProviderConfig (dict) –
The configuration for a Google OAuth2 provider.
clientId (string) – [REQUIRED]
The client ID for the Google OAuth2 provider.
clientSecret (string) – [REQUIRED]
The client secret for the Google OAuth2 provider.
githubOauth2ProviderConfig (dict) –
The configuration for a GitHub OAuth2 provider.
clientId (string) – [REQUIRED]
The client ID for the GitHub OAuth2 provider.
clientSecret (string) – [REQUIRED]
The client secret for the GitHub OAuth2 provider.
slackOauth2ProviderConfig (dict) –
The configuration for a Slack OAuth2 provider.
clientId (string) – [REQUIRED]
The client ID for the Slack OAuth2 provider.
clientSecret (string) – [REQUIRED]
The client secret for the Slack OAuth2 provider.
salesforceOauth2ProviderConfig (dict) –
The configuration for a Salesforce OAuth2 provider.
clientId (string) – [REQUIRED]
The client ID for the Salesforce OAuth2 provider.
clientSecret (string) – [REQUIRED]
The client secret for the Salesforce OAuth2 provider.
microsoftOauth2ProviderConfig (dict) –
The configuration for a Microsoft OAuth2 provider.
clientId (string) – [REQUIRED]
The client ID for the Microsoft OAuth2 provider.
clientSecret (string) – [REQUIRED]
The client secret for the Microsoft OAuth2 provider.
- Return type:
dict
- Returns:
Response Syntax
{ 'clientSecretArn': { 'secretArn': 'string' }, 'name': 'string', 'credentialProviderArn': 'string' }
Response Structure
(dict) –
clientSecretArn (dict) –
The Amazon Resource Name (ARN) of the client secret in AWS Secrets Manager.
secretArn (string) –
The Amazon Resource Name (ARN) of the secret in AWS Secrets Manager.
name (string) –
The name of the OAuth2 credential provider.
credentialProviderArn (string) –
The Amazon Resource Name (ARN) of the OAuth2 credential provider.
Exceptions
BedrockAgentCoreControlPlaneFrontingLayer.Client.exceptions.ServiceQuotaExceededException
BedrockAgentCoreControlPlaneFrontingLayer.Client.exceptions.UnauthorizedException
BedrockAgentCoreControlPlaneFrontingLayer.Client.exceptions.ResourceLimitExceededException
BedrockAgentCoreControlPlaneFrontingLayer.Client.exceptions.ValidationException
BedrockAgentCoreControlPlaneFrontingLayer.Client.exceptions.ConflictException
BedrockAgentCoreControlPlaneFrontingLayer.Client.exceptions.AccessDeniedException
BedrockAgentCoreControlPlaneFrontingLayer.Client.exceptions.DecryptionFailure
BedrockAgentCoreControlPlaneFrontingLayer.Client.exceptions.ResourceNotFoundException
BedrockAgentCoreControlPlaneFrontingLayer.Client.exceptions.ThrottlingException
BedrockAgentCoreControlPlaneFrontingLayer.Client.exceptions.InternalServerException
BedrockAgentCoreControlPlaneFrontingLayer.Client.exceptions.EncryptionFailure