modifyWorkspaceProperties method

Future<void> modifyWorkspaceProperties({
  1. required String workspaceId,
  2. DataReplication? dataReplication,
  3. WorkspaceProperties? workspaceProperties,
})

Modifies the specified WorkSpace properties. For important information about how to modify the size of the root and user volumes, see Modify a WorkSpace.

May throw AccessDeniedException. May throw InvalidParameterValuesException. May throw InvalidResourceStateException. May throw OperationInProgressException. May throw ResourceNotFoundException. May throw ResourceUnavailableException. May throw UnsupportedWorkspaceConfigurationException.

Parameter workspaceId : The identifier of the WorkSpace.

Parameter dataReplication : Indicates the data replication status.

Parameter workspaceProperties : The properties of the WorkSpace.

Implementation

Future<void> modifyWorkspaceProperties({
  required String workspaceId,
  DataReplication? dataReplication,
  WorkspaceProperties? workspaceProperties,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'WorkspacesService.ModifyWorkspaceProperties'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'WorkspaceId': workspaceId,
      if (dataReplication != null) 'DataReplication': dataReplication.value,
      if (workspaceProperties != null)
        'WorkspaceProperties': workspaceProperties,
    },
  );
}