createOauth2CredentialProvider method
Creates a new OAuth2 credential provider.
May throw AccessDeniedException.
May throw ConflictException.
May throw DecryptionFailure.
May throw EncryptionFailure.
May throw InternalServerException.
May throw ResourceLimitExceededException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw UnauthorizedException.
May throw ValidationException.
Parameter credentialProviderVendor :
The vendor of the OAuth2 credential provider. This specifies which OAuth2
implementation to use.
Parameter name :
The name of the OAuth2 credential provider. The name must be unique within
your account.
Parameter oauth2ProviderConfigInput :
The configuration settings for the OAuth2 provider, including client ID,
client secret, and other vendor-specific settings.
Parameter tags :
A map of tag keys and values to assign to the OAuth2 credential provider.
Tags enable you to categorize your resources in different ways, for
example, by purpose, owner, or environment.
Implementation
Future<CreateOauth2CredentialProviderResponse>
createOauth2CredentialProvider({
required CredentialProviderVendorType credentialProviderVendor,
required String name,
required Oauth2ProviderConfigInput oauth2ProviderConfigInput,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'credentialProviderVendor': credentialProviderVendor.value,
'name': name,
'oauth2ProviderConfigInput': oauth2ProviderConfigInput,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/identities/CreateOauth2CredentialProvider',
exceptionFnMap: _exceptionFns,
);
return CreateOauth2CredentialProviderResponse.fromJson(response);
}