createUseCase method
Creates a use case for an integration association.
May throw DuplicateResourceException.
May throw InternalServiceException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter instanceId :
The identifier of the Connect Customer instance. You can find
the instance ID in the Amazon Resource Name (ARN) of the instance.
Parameter integrationAssociationId :
The identifier for the integration association.
Parameter useCaseType :
The type of use case to associate to the integration association. Each
integration association can have only one of each use case type.
Parameter tags :
The tags used to organize, track, or control access for this resource. For
example, { "Tags": {"key1":"value1", "key2":"value2"} }.
Implementation
Future<CreateUseCaseResponse> createUseCase({
required String instanceId,
required String integrationAssociationId,
required UseCaseType useCaseType,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'UseCaseType': useCaseType.value,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/instance/${Uri.encodeComponent(instanceId)}/integration-associations/${Uri.encodeComponent(integrationAssociationId)}/use-cases',
exceptionFnMap: _exceptionFns,
);
return CreateUseCaseResponse.fromJson(response);
}