createOAuthClientApplication method
- required String awsAccountId,
- required String clientId,
- required String clientSecret,
- required String name,
- required String oAuthClientApplicationId,
- required OAuthClientAuthenticationType oAuthClientAuthenticationType,
- required String oAuthTokenEndpointUrl,
- DataSourceType? dataSourceType,
- VpcConnectionProperties? identityProviderVpcConnectionProperties,
- String? oAuthAuthorizationEndpointUrl,
- String? oAuthScopes,
- List<
Tag> ? tags,
Creates an OAuthClientApplication.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalFailureException.
May throw InvalidParameterValueException.
May throw LimitExceededException.
May throw ResourceExistsException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter awsAccountId :
The Amazon Web Services account ID.
Parameter clientId :
The client ID of the OAuth application that is registered with the
identity provider.
Parameter clientSecret :
The client secret of the OAuth application that is registered with the
identity provider.
Parameter name :
The display name for the OAuthClientApplication.
Parameter oAuthClientApplicationId :
An ID for the OAuthClientApplication that you want to create. This ID is
unique per Amazon Web Services Region for each Amazon Web Services
account.
Parameter oAuthClientAuthenticationType :
The authentication type to use for the OAuthClientApplication. This
determines the OAuth 2.0 grant flow that is used when the data source
connects to the identity provider. Valid values are TOKEN.
Parameter oAuthTokenEndpointUrl :
The token endpoint URL of the identity provider that is used to obtain
access tokens.
Parameter dataSourceType :
The type of data source that the OAuthClientApplication is used with.
Valid values are SNOWFLAKE.
Parameter oAuthAuthorizationEndpointUrl :
The authorization endpoint URL of the identity provider that is used to
obtain authorization codes.
Parameter oAuthScopes :
The OAuth scopes that are requested when the OAuthClientApplication
obtains an access token from the identity provider.
Parameter tags :
Contains a map of the key-value pairs for the resource tag or tags
assigned to the OAuthClientApplication.
Implementation
Future<CreateOAuthClientApplicationResponse> createOAuthClientApplication({
required String awsAccountId,
required String clientId,
required String clientSecret,
required String name,
required String oAuthClientApplicationId,
required OAuthClientAuthenticationType oAuthClientAuthenticationType,
required String oAuthTokenEndpointUrl,
DataSourceType? dataSourceType,
VpcConnectionProperties? identityProviderVpcConnectionProperties,
String? oAuthAuthorizationEndpointUrl,
String? oAuthScopes,
List<Tag>? tags,
}) async {
final $payload = <String, dynamic>{
'ClientId': clientId,
'ClientSecret': clientSecret,
'Name': name,
'OAuthClientApplicationId': oAuthClientApplicationId,
'OAuthClientAuthenticationType': oAuthClientAuthenticationType.value,
'OAuthTokenEndpointUrl': oAuthTokenEndpointUrl,
if (dataSourceType != null) 'DataSourceType': dataSourceType.value,
if (identityProviderVpcConnectionProperties != null)
'IdentityProviderVpcConnectionProperties':
identityProviderVpcConnectionProperties,
if (oAuthAuthorizationEndpointUrl != null)
'OAuthAuthorizationEndpointUrl': oAuthAuthorizationEndpointUrl,
if (oAuthScopes != null) 'OAuthScopes': oAuthScopes,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/oauth-client-applications',
exceptionFnMap: _exceptionFns,
);
return CreateOAuthClientApplicationResponse.fromJson(response);
}