createWorkspacesPool method
Creates a pool of WorkSpaces.
May throw AccessDeniedException.
May throw InvalidParameterValuesException.
May throw OperationNotSupportedException.
May throw ResourceAlreadyExistsException.
May throw ResourceLimitExceededException.
May throw ResourceNotFoundException.
Parameter bundleId :
The identifier of the bundle for the pool.
Parameter capacity :
The user capacity of the pool.
Parameter description :
The pool description.
Parameter directoryId :
The identifier of the directory for the pool.
Parameter poolName :
The name of the pool.
Parameter applicationSettings :
Indicates the application settings of the pool.
Parameter runningMode :
The running mode for the pool.
Parameter tags :
The tags for the pool.
Parameter timeoutSettings :
Indicates the timeout settings of the pool.
Implementation
Future<CreateWorkspacesPoolResult> createWorkspacesPool({
required String bundleId,
required Capacity capacity,
required String description,
required String directoryId,
required String poolName,
ApplicationSettingsRequest? applicationSettings,
PoolsRunningMode? runningMode,
List<Tag>? tags,
TimeoutSettings? timeoutSettings,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'WorkspacesService.CreateWorkspacesPool'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'BundleId': bundleId,
'Capacity': capacity,
'Description': description,
'DirectoryId': directoryId,
'PoolName': poolName,
if (applicationSettings != null)
'ApplicationSettings': applicationSettings,
if (runningMode != null) 'RunningMode': runningMode.value,
if (tags != null) 'Tags': tags,
if (timeoutSettings != null) 'TimeoutSettings': timeoutSettings,
},
);
return CreateWorkspacesPoolResult.fromJson(jsonResponse.body);
}