createApplication method
Creates a new application for the workspace and IdC application provided
May throw AccessDeniedException.
May throw ConflictingOperationException.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter idcInstanceArn :
Identity Center Instance ARN to create the application in
Parameter name :
Name of the application
Parameter workspaceName :
Name of the workspace to associate with the underlying Application
Parameter clientToken :
Unique client token for idempotent request handling
Parameter description :
Description of the application
Parameter tags :
A list of key-value pairs that contain metadata for the application.
Implementation
Future<CreateApplicationResponse> createApplication({
required String idcInstanceArn,
required String name,
required String workspaceName,
String? clientToken,
String? description,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'idcInstanceArn': idcInstanceArn,
'name': name,
'workspaceName': workspaceName,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (description != null) 'description': description,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/applications',
hostPrefix: 'api.',
exceptionFnMap: _exceptionFns,
);
return CreateApplicationResponse.fromJson(response);
}