createWorkspaces method
Creates one or more WorkSpaces.
This operation is asynchronous and returns before the WorkSpaces are created.
May throw ResourceLimitExceededException. May throw InvalidParameterValuesException.
Parameter workspaces
:
The WorkSpaces to create. You can specify up to 25 WorkSpaces.
Implementation
Future<CreateWorkspacesResult> createWorkspaces({
required List<WorkspaceRequest> workspaces,
}) async {
ArgumentError.checkNotNull(workspaces, 'workspaces');
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);
}