2020/07/23 - Amazon WorkSpaces - 2 new 1 updated api methods
Changes Added UpdateWorkspaceImagePermission API to share Amazon WorkSpaces images across AWS accounts.
Describes the permissions that the owner of an image has granted to other AWS accounts for an image.
See also: AWS API Documentation
Request Syntax
client.describe_workspace_image_permissions( ImageId='string', NextToken='string', MaxResults=123 )
string
[REQUIRED]
The identifier of the image.
string
If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.
integer
The maximum number of items to return.
dict
Response Syntax
{ 'ImageId': 'string', 'ImagePermissions': [ { 'SharedAccountId': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
ImageId (string) --
The identifier of the image.
ImagePermissions (list) --
The identifiers of the AWS accounts that the image has been shared with.
(dict) --
Describes the AWS accounts that have been granted permission to use a shared image.
SharedAccountId (string) --
The identifier of the AWS account that an image has been shared with.
NextToken (string) --
The token to use to retrieve the next set of results, or null if no more results are available.
Shares or unshares an image with one account by specifying whether that account has permission to copy the image. If the copy image permission is granted, the image is shared with that account. If the copy image permission is revoked, the image is unshared with the account.
Note
To delete an image that has been shared, you must unshare the image before you delete it.
Sharing Bring Your Own License (BYOL) images across AWS accounts isn't supported at this time in the AWS GovCloud (US-West) Region. To share BYOL images across accounts in the AWS GovCloud (US-West) Region, contact AWS Support.
See also: AWS API Documentation
Request Syntax
client.update_workspace_image_permission( ImageId='string', AllowCopyImage=True|False, SharedAccountId='string' )
string
[REQUIRED]
The identifier of the image.
boolean
[REQUIRED]
The permission to copy the image. This permission can be revoked only after an image has been shared.
string
[REQUIRED]
The identifier of the AWS account to share or unshare the image with.
dict
Response Syntax
{}
Response Structure
(dict) --
{'ImageType': 'OWNED | SHARED'}Response
{'Images': {'Created': 'timestamp', 'OwnerAccountId': 'string'}}
Retrieves a list that describes one or more specified images, if the image identifiers are provided. Otherwise, all images in the account are described.
See also: AWS API Documentation
Request Syntax
client.describe_workspace_images( ImageIds=[ 'string', ], ImageType='OWNED'|'SHARED', NextToken='string', MaxResults=123 )
list
The identifier of the image.
(string) --
string
The type (owned or shared) of the image.
string
If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.
integer
The maximum number of items to return.
dict
Response Syntax
{ 'Images': [ { 'ImageId': 'string', 'Name': 'string', 'Description': 'string', 'OperatingSystem': { 'Type': 'WINDOWS'|'LINUX' }, 'State': 'AVAILABLE'|'PENDING'|'ERROR', 'RequiredTenancy': 'DEFAULT'|'DEDICATED', 'ErrorCode': 'string', 'ErrorMessage': 'string', 'Created': datetime(2015, 1, 1), 'OwnerAccountId': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Images (list) --
Information about the images.
(dict) --
Describes a WorkSpace image.
ImageId (string) --
The identifier of the image.
Name (string) --
The name of the image.
Description (string) --
The description of the image.
OperatingSystem (dict) --
The operating system that the image is running.
Type (string) --
The operating system.
State (string) --
The status of the image.
RequiredTenancy (string) --
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 .
ErrorCode (string) --
The error code that is returned for the image.
ErrorMessage (string) --
The text of the error message that is returned for the image.
Created (datetime) --
The date when the image was created. If the image has been shared, the AWS account that the image has been shared with sees the original creation date of the image.
OwnerAccountId (string) --
The identifier of the AWS account that owns the image.
NextToken (string) --
The token to use to retrieve the next set of results, or null if no more results are available.