createWorkspaces method
Creates one or more WorkSpaces.
This operation is asynchronous and returns before the WorkSpaces are created.
-
The
MANUALrunning mode value is only supported by Amazon WorkSpaces Core. Contact your account team to be allow-listed to use this value. For more information, see Amazon WorkSpaces Core. -
You don't need to specify the
PCOIPprotocol for Linux bundles becauseDCV(formerly WSP) is the default protocol for those bundles. - User-decoupled WorkSpaces are only supported by Amazon WorkSpaces Core.
- Review your running mode to ensure you are using one that is optimal for your needs and budget. For more information on switching running modes, see Can I switch between hourly and monthly billing?
May throw InvalidParameterValuesException.
May throw ResourceLimitExceededException.
Parameter workspaces :
The WorkSpaces to create. You can specify up to 25 WorkSpaces.
Implementation
Future<CreateWorkspacesResult> createWorkspaces({
required List<WorkspaceRequest> workspaces,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'WorkspacesService.CreateWorkspaces'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Workspaces': workspaces,
},
);
return CreateWorkspacesResult.fromJson(jsonResponse.body);
}