updateEmailAddressMetadata method
Updates an email address metadata. For more information about email addresses, see Create email addresses in the Connect Customer Administrator Guide.
May throw AccessDeniedException.
May throw IdempotencyException.
May throw InternalServiceException.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter emailAddressId :
The identifier of the email address.
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 clientToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request. If not provided, the Amazon Web Services SDK
populates this field. For more information about idempotency, see Making
retries safe with idempotent APIs.
Parameter description :
The description of the email address.
Parameter displayName :
The display name of email address.
Implementation
Future<UpdateEmailAddressMetadataResponse> updateEmailAddressMetadata({
required String emailAddressId,
required String instanceId,
String? clientToken,
String? description,
String? displayName,
}) async {
final $payload = <String, dynamic>{
if (clientToken != null) 'ClientToken': clientToken,
if (description != null) 'Description': description,
if (displayName != null) 'DisplayName': displayName,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/email-addresses/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(emailAddressId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateEmailAddressMetadataResponse.fromJson(response);
}