updateInstanceAttribute method
This API is in preview release for Connect Customer and is subject to change.
Updates the value for the specified attribute type.
May throw InternalServiceException.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter attributeType :
The type of attribute.
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 value :
The value for the attribute. Maximum character limit is 100.
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.
Implementation
Future<void> updateInstanceAttribute({
required InstanceAttributeType attributeType,
required String instanceId,
required String value,
String? clientToken,
}) async {
final $payload = <String, dynamic>{
'Value': value,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
};
await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/instance/${Uri.encodeComponent(instanceId)}/attribute/${Uri.encodeComponent(attributeType.value)}',
exceptionFnMap: _exceptionFns,
);
}