importWorkspaceMedia method
Imports a media asset (such as a logo) for use in a workspace.
May throw InternalServiceException.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter instanceId :
The identifier of the Amazon Connect instance. You can find
the instance ID in the Amazon Resource Name (ARN) of the instance.
Parameter mediaSource :
The media source. Can be an S3 presigned URL or a base64-encoded string.
Parameter mediaType :
The type of media. Valid values are: IMAGE_LOGO_FAVICON and
IMAGE_LOGO_HORIZONTAL.
Parameter workspaceId :
The identifier of the workspace.
Implementation
Future<void> importWorkspaceMedia({
required String instanceId,
required String mediaSource,
required MediaType mediaType,
required String workspaceId,
}) async {
final $payload = <String, dynamic>{
'MediaSource': mediaSource,
'MediaType': mediaType.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/workspaces/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(workspaceId)}/media',
exceptionFnMap: _exceptionFns,
);
}