CreateWorkspaceImage - Amazon WorkSpaces Service

CreateWorkspaceImage

Creates a new WorkSpace image from an existing WorkSpace.

Request Syntax

{ "Description": "string", "Name": "string", "Tags": [ { "Key": "string", "Value": "string" } ], "WorkspaceId": "string" }

Request Parameters

The request accepts the following data in JSON format.

Description

The description of the new WorkSpace image.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: ^[a-zA-Z0-9_./() -]+$

Required: Yes

Name

The name of the new WorkSpace image.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[a-zA-Z0-9_./()\\-]+$

Required: Yes

Tags

The tags that you want to add to the new WorkSpace image. To add tags when you're creating the image, you must create an IAM policy that grants your IAM user permission to use workspaces:CreateTags.

Type: Array of Tag objects

Required: No

WorkspaceId

The identifier of the source WorkSpace

Type: String

Pattern: ^ws-[0-9a-z]{8,63}$

Required: Yes

Response Syntax

{ "Created": number, "Description": "string", "ImageId": "string", "Name": "string", "OperatingSystem": { "Type": "string" }, "OwnerAccountId": "string", "RequiredTenancy": "string", "State": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Created

The date when the image was created.

Type: Timestamp

Description

The description of the image.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: ^[a-zA-Z0-9_./() -]+$

ImageId

The identifier of the new WorkSpace image.

Type: String

Pattern: wsi-[0-9a-z]{9,63}$

Name

The name of the image.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[a-zA-Z0-9_./()\\-]+$

OperatingSystem

The operating system that the image is running.

Type: OperatingSystem object

OwnerAccountId

The identifier of the AWS account that owns the image.

Type: String

Pattern: ^\d{12}$

RequiredTenancy

Specifies whether the image is running on dedicated hardware. When Bring Your Own License (BYOL) is enabled, this value is set to DEDICATED. For more information, see Bring Your Own Windows Desktop Images..

Type: String

Valid Values: DEFAULT | DEDICATED

State

The availability status of the image.

Type: String

Valid Values: AVAILABLE | PENDING | ERROR

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

The user is not authorized to access a resource.

HTTP Status Code: 400

InvalidParameterValuesException

One or more parameter values are not valid.

HTTP Status Code: 400

InvalidResourceStateException

The state of the resource is not valid for this operation.

HTTP Status Code: 400

OperationNotSupportedException

This operation is not supported.

HTTP Status Code: 400

ResourceAlreadyExistsException

The specified resource already exists.

HTTP Status Code: 400

ResourceLimitExceededException

Your resource limits have been exceeded.

HTTP Status Code: 400

ResourceNotFoundException

The resource could not be found.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: