updateInstanceStorageConfig method
This API is in preview release for Connect Customer and is subject to change.
Updates an existing configuration for a resource type. This API is idempotent.
May throw InternalServiceException.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter associationId :
The existing association identifier that uniquely identifies the resource
type and storage config for the given instance ID.
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 resourceType :
A valid resource type.
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> updateInstanceStorageConfig({
required String associationId,
required String instanceId,
required InstanceStorageResourceType resourceType,
required InstanceStorageConfig storageConfig,
String? clientToken,
}) async {
final $query = <String, List<String>>{
'resourceType': [resourceType.value],
};
final $payload = <String, dynamic>{
'StorageConfig': storageConfig,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
};
await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/instance/${Uri.encodeComponent(instanceId)}/storage-config/${Uri.encodeComponent(associationId)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
}