createAppInstance method
Creates an Amazon Chime SDK messaging AppInstance under an
AWS account. Only SDK messaging customers use this API.
CreateAppInstance supports idempotency behavior as described
in the AWS API Standard.
identity
May throw BadRequestException.
May throw ConflictException.
May throw ForbiddenException.
May throw ResourceLimitExceededException.
May throw ServiceFailureException.
May throw ServiceUnavailableException.
May throw ThrottledClientException.
May throw UnauthorizedClientException.
Parameter name :
The name of the AppInstance.
Parameter clientRequestToken :
The unique ID of the request. Use different tokens to create different
AppInstances.
Parameter metadata :
The metadata of the AppInstance. Limited to a 1KB string in
UTF-8.
Parameter tags :
Tags assigned to the AppInstance.
Implementation
Future<CreateAppInstanceResponse> createAppInstance({
required String name,
String? clientRequestToken,
String? metadata,
List<Tag>? tags,
}) async {
final $payload = <String, dynamic>{
'Name': name,
'ClientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
if (metadata != null) 'Metadata': metadata,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/app-instances',
exceptionFnMap: _exceptionFns,
);
return CreateAppInstanceResponse.fromJson(response);
}