updateInstanceStorageConfig method

Future<void> updateInstanceStorageConfig({
  1. required String associationId,
  2. required String instanceId,
  3. required InstanceStorageResourceType resourceType,
  4. required InstanceStorageConfig storageConfig,
})

This API is in preview release for Amazon Connect and is subject to change.

Updates an existing configuration for a resource type. This API is idempotent.

May throw ResourceNotFoundException. May throw InternalServiceException. May throw InvalidRequestException. May throw InvalidParameterException. 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 Amazon Connect instance.

Parameter resourceType : A valid resource type.

Implementation

Future<void> updateInstanceStorageConfig({
  required String associationId,
  required String instanceId,
  required InstanceStorageResourceType resourceType,
  required InstanceStorageConfig storageConfig,
}) async {
  ArgumentError.checkNotNull(associationId, 'associationId');
  _s.validateStringLength(
    'associationId',
    associationId,
    1,
    100,
    isRequired: true,
  );
  ArgumentError.checkNotNull(instanceId, 'instanceId');
  _s.validateStringLength(
    'instanceId',
    instanceId,
    1,
    100,
    isRequired: true,
  );
  ArgumentError.checkNotNull(resourceType, 'resourceType');
  ArgumentError.checkNotNull(storageConfig, 'storageConfig');
  final $query = <String, List<String>>{
    'resourceType': [resourceType.toValue()],
  };
  final $payload = <String, dynamic>{
    'StorageConfig': storageConfig,
  };
  await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/instance/${Uri.encodeComponent(instanceId)}/storage-config/${Uri.encodeComponent(associationId)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}