- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DescribeWorkspaceImagePermissionsCommand
Describes the permissions that the owner of an image has granted to other Amazon Web Services accounts for an image.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { WorkSpacesClient, DescribeWorkspaceImagePermissionsCommand } from "@aws-sdk/client-workspaces"; // ES Modules import
// const { WorkSpacesClient, DescribeWorkspaceImagePermissionsCommand } = require("@aws-sdk/client-workspaces"); // CommonJS import
const client = new WorkSpacesClient(config);
const input = { // DescribeWorkspaceImagePermissionsRequest
ImageId: "STRING_VALUE", // required
NextToken: "STRING_VALUE",
MaxResults: Number("int"),
};
const command = new DescribeWorkspaceImagePermissionsCommand(input);
const response = await client.send(command);
// { // DescribeWorkspaceImagePermissionsResult
// ImageId: "STRING_VALUE",
// ImagePermissions: [ // ImagePermissions
// { // ImagePermission
// SharedAccountId: "STRING_VALUE",
// },
// ],
// NextToken: "STRING_VALUE",
// };
DescribeWorkspaceImagePermissionsCommand Input
See DescribeWorkspaceImagePermissionsCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ImageId Required | string | undefined | The identifier of the image. |
MaxResults | number | undefined | The maximum number of items to return. |
NextToken | string | undefined | If you received a |
DescribeWorkspaceImagePermissionsCommand Output
See DescribeWorkspaceImagePermissionsCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
ImageId | string | undefined | The identifier of the image. |
ImagePermissions | ImagePermission[] | undefined | The identifiers of the Amazon Web Services accounts that the image has been shared with. |
NextToken | string | undefined | The token to use to retrieve the next page of results. This value is null when there are no more results to return. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | The user is not authorized to access a resource. |
InvalidParameterValuesException | client | One or more parameter values are not valid. |
ResourceNotFoundException | client | The resource could not be found. |
WorkSpacesServiceException | Base exception class for all service exceptions from WorkSpaces service. |