- 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.
CreateWorkspaceBundleCommand
Creates the specified WorkSpace bundle. For more information about creating WorkSpace bundles, see Create a Custom WorkSpaces Image and Bundle .
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { WorkSpacesClient, CreateWorkspaceBundleCommand } from "@aws-sdk/client-workspaces"; // ES Modules import
// const { WorkSpacesClient, CreateWorkspaceBundleCommand } = require("@aws-sdk/client-workspaces"); // CommonJS import
const client = new WorkSpacesClient(config);
const input = { // CreateWorkspaceBundleRequest
BundleName: "STRING_VALUE", // required
BundleDescription: "STRING_VALUE", // required
ImageId: "STRING_VALUE", // required
ComputeType: { // ComputeType
Name: "VALUE" || "STANDARD" || "PERFORMANCE" || "POWER" || "GRAPHICS" || "POWERPRO" || "GENERALPURPOSE_4XLARGE" || "GENERALPURPOSE_8XLARGE" || "GRAPHICSPRO" || "GRAPHICS_G4DN" || "GRAPHICSPRO_G4DN",
},
UserStorage: { // UserStorage
Capacity: "STRING_VALUE", // required
},
RootStorage: { // RootStorage
Capacity: "STRING_VALUE", // required
},
Tags: [ // TagList
{ // Tag
Key: "STRING_VALUE", // required
Value: "STRING_VALUE",
},
],
};
const command = new CreateWorkspaceBundleCommand(input);
const response = await client.send(command);
// { // CreateWorkspaceBundleResult
// WorkspaceBundle: { // WorkspaceBundle
// BundleId: "STRING_VALUE",
// Name: "STRING_VALUE",
// Owner: "STRING_VALUE",
// Description: "STRING_VALUE",
// ImageId: "STRING_VALUE",
// RootStorage: { // RootStorage
// Capacity: "STRING_VALUE", // required
// },
// UserStorage: { // UserStorage
// Capacity: "STRING_VALUE", // required
// },
// ComputeType: { // ComputeType
// Name: "VALUE" || "STANDARD" || "PERFORMANCE" || "POWER" || "GRAPHICS" || "POWERPRO" || "GENERALPURPOSE_4XLARGE" || "GENERALPURPOSE_8XLARGE" || "GRAPHICSPRO" || "GRAPHICS_G4DN" || "GRAPHICSPRO_G4DN",
// },
// LastUpdatedTime: new Date("TIMESTAMP"),
// CreationTime: new Date("TIMESTAMP"),
// State: "AVAILABLE" || "PENDING" || "ERROR",
// BundleType: "REGULAR" || "STANDBY",
// },
// };
CreateWorkspaceBundleCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
BundleDescription Required | string | undefined | The description of the bundle. |
BundleName Required | string | undefined | The name of the bundle. |
ComputeType Required | ComputeType | undefined | Describes the compute type of the bundle. |
ImageId Required | string | undefined | The identifier of the image that is used to create the bundle. |
UserStorage Required | UserStorage | undefined | Describes the user volume for a WorkSpace bundle. |
RootStorage | RootStorage | undefined | Describes the root volume for a WorkSpace bundle. |
Tags | Tag[] | undefined | The tags associated with the bundle. To add tags at the same time when you're creating the bundle, you must create an IAM policy that grants your IAM user permissions to use |
CreateWorkspaceBundleCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
WorkspaceBundle | WorkspaceBundle | undefined | Describes a WorkSpace bundle. |
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. |
ResourceAlreadyExistsException | client | The specified resource already exists. |
ResourceLimitExceededException | client | Your resource limits have been exceeded. |
ResourceNotFoundException | client | The resource could not be found. |
ResourceUnavailableException | client | The specified resource is not available. |
WorkSpacesServiceException | Base exception class for all service exceptions from WorkSpaces service. |