createApplication method
Creates an OAuth 2.0 customer managed application in IAM Identity Center for the given application provider.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter applicationProviderArn :
The ARN of the application provider under which the operation will run.
Parameter instanceArn :
The ARN of the instance of IAM Identity Center under which the operation
will run. For more information about ARNs, see Amazon Resource
Names (ARNs) and Amazon Web Services Service Namespaces in the
Amazon Web Services General Reference.
Parameter name :
The name of the .
Parameter clientToken :
Specifies a unique, case-sensitive ID that you provide to ensure the
idempotency of the request. This lets you safely retry the request without
accidentally performing the same operation a second time. Passing the same
value to a later call to an operation requires that you also pass the same
value for all other parameters. We recommend that you use a UUID type
of value.
If you don't provide this value, then Amazon Web Services generates a random one for you.
If you retry the operation with the same ClientToken, but
with different parameters, the retry fails with an
IdempotentParameterMismatch error.
Parameter description :
The description of the .
Parameter portalOptions :
A structure that describes the options for the portal associated with an
application.
Parameter status :
Specifies whether the application is enabled or disabled.
Parameter tags :
Specifies tags to be attached to the application.
Implementation
Future<CreateApplicationResponse> createApplication({
required String applicationProviderArn,
required String instanceArn,
required String name,
String? clientToken,
String? description,
PortalOptions? portalOptions,
ApplicationStatus? status,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SWBExternalService.CreateApplication'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ApplicationProviderArn': applicationProviderArn,
'InstanceArn': instanceArn,
'Name': name,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (description != null) 'Description': description,
if (portalOptions != null) 'PortalOptions': portalOptions,
if (status != null) 'Status': status.value,
if (tags != null) 'Tags': tags,
},
);
return CreateApplicationResponse.fromJson(jsonResponse.body);
}