diff --git a/clients/client-workspaces/src/WorkSpaces.ts b/clients/client-workspaces/src/WorkSpaces.ts index b028159d6fd4..4255286e5bfd 100644 --- a/clients/client-workspaces/src/WorkSpaces.ts +++ b/clients/client-workspaces/src/WorkSpaces.ts @@ -47,6 +47,11 @@ import { CreateWorkspaceBundleCommandInput, CreateWorkspaceBundleCommandOutput, } from "./commands/CreateWorkspaceBundleCommand"; +import { + CreateWorkspaceImageCommand, + CreateWorkspaceImageCommandInput, + CreateWorkspaceImageCommandOutput, +} from "./commands/CreateWorkspaceImageCommand"; import { CreateWorkspacesCommand, CreateWorkspacesCommandInput, @@ -687,6 +692,38 @@ export class WorkSpaces extends WorkSpacesClient { } } + /** + *
Creates a new WorkSpace image from an existing WorkSpace.
+ */ + public createWorkspaceImage( + args: CreateWorkspaceImageCommandInput, + options?: __HttpHandlerOptions + ): PromiseCreates one or more WorkSpaces.
*This operation is asynchronous and returns before the WorkSpaces are created.
diff --git a/clients/client-workspaces/src/WorkSpacesClient.ts b/clients/client-workspaces/src/WorkSpacesClient.ts index 1f095f2d82be..57f986a9849b 100644 --- a/clients/client-workspaces/src/WorkSpacesClient.ts +++ b/clients/client-workspaces/src/WorkSpacesClient.ts @@ -78,6 +78,10 @@ import { CreateWorkspaceBundleCommandInput, CreateWorkspaceBundleCommandOutput, } from "./commands/CreateWorkspaceBundleCommand"; +import { + CreateWorkspaceImageCommandInput, + CreateWorkspaceImageCommandOutput, +} from "./commands/CreateWorkspaceImageCommand"; import { CreateWorkspacesCommandInput, CreateWorkspacesCommandOutput } from "./commands/CreateWorkspacesCommand"; import { DeleteClientBrandingCommandInput, @@ -250,6 +254,7 @@ export type ServiceInputTypes = | CreateTagsCommandInput | CreateUpdatedWorkspaceImageCommandInput | CreateWorkspaceBundleCommandInput + | CreateWorkspaceImageCommandInput | CreateWorkspacesCommandInput | DeleteClientBrandingCommandInput | DeleteConnectClientAddInCommandInput @@ -313,6 +318,7 @@ export type ServiceOutputTypes = | CreateTagsCommandOutput | CreateUpdatedWorkspaceImageCommandOutput | CreateWorkspaceBundleCommandOutput + | CreateWorkspaceImageCommandOutput | CreateWorkspacesCommandOutput | DeleteClientBrandingCommandOutput | DeleteConnectClientAddInCommandOutput diff --git a/clients/client-workspaces/src/commands/CreateWorkspaceImageCommand.ts b/clients/client-workspaces/src/commands/CreateWorkspaceImageCommand.ts new file mode 100644 index 000000000000..1cbc12b346ce --- /dev/null +++ b/clients/client-workspaces/src/commands/CreateWorkspaceImageCommand.ts @@ -0,0 +1,101 @@ +// smithy-typescript generated code +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + CreateWorkspaceImageRequest, + CreateWorkspaceImageRequestFilterSensitiveLog, + CreateWorkspaceImageResult, + CreateWorkspaceImageResultFilterSensitiveLog, +} from "../models/models_0"; +import { + deserializeAws_json1_1CreateWorkspaceImageCommand, + serializeAws_json1_1CreateWorkspaceImageCommand, +} from "../protocols/Aws_json1_1"; +import { ServiceInputTypes, ServiceOutputTypes, WorkSpacesClientResolvedConfig } from "../WorkSpacesClient"; + +export interface CreateWorkspaceImageCommandInput extends CreateWorkspaceImageRequest {} +export interface CreateWorkspaceImageCommandOutput extends CreateWorkspaceImageResult, __MetadataBearer {} + +/** + *Creates a new WorkSpace image from an existing WorkSpace.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WorkSpacesClient, CreateWorkspaceImageCommand } from "@aws-sdk/client-workspaces"; // ES Modules import + * // const { WorkSpacesClient, CreateWorkspaceImageCommand } = require("@aws-sdk/client-workspaces"); // CommonJS import + * const client = new WorkSpacesClient(config); + * const command = new CreateWorkspaceImageCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateWorkspaceImageCommandInput} for command's `input` shape. + * @see {@link CreateWorkspaceImageCommandOutput} for command's `response` shape. + * @see {@link WorkSpacesClientResolvedConfig | config} for WorkSpacesClient's `config` shape. + * + */ +export class CreateWorkspaceImageCommand extends $Command< + CreateWorkspaceImageCommandInput, + CreateWorkspaceImageCommandOutput, + WorkSpacesClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateWorkspaceImageCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackThe name of the new WorkSpace image.
+ */ + Name: string | undefined; + + /** + *The description of the new WorkSpace image.
+ */ + Description: string | undefined; + + /** + *The identifier of the source WorkSpace
+ */ + WorkspaceId: string | undefined; + + /** + *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
.
The operating system that the image is running.
+ */ +export interface OperatingSystem { + /** + *The operating system.
+ */ + Type?: OperatingSystemType | string; +} + +export enum WorkspaceImageRequiredTenancy { + DEDICATED = "DEDICATED", + DEFAULT = "DEFAULT", +} + +export enum WorkspaceImageState { + AVAILABLE = "AVAILABLE", + ERROR = "ERROR", + PENDING = "PENDING", +} + +export interface CreateWorkspaceImageResult { + /** + *The identifier of the new WorkSpace image.
+ */ + ImageId?: string; + + /** + *The name of the image.
+ */ + Name?: string; + + /** + *The description of the image.
+ */ + Description?: string; + + /** + *The operating system that the image is running.
+ */ + OperatingSystem?: OperatingSystem; + + /** + *The availability status of the image.
+ */ + State?: WorkspaceImageState | 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. + *
+ */ + RequiredTenancy?: WorkspaceImageRequiredTenancy | string; + + /** + *The date when the image was created.
+ */ + Created?: Date; + + /** + *The identifier of the AWS account that owns the image.
+ */ + OwnerAccountId?: string; +} + export enum RunningMode { ALWAYS_ON = "ALWAYS_ON", AUTO_STOP = "AUTO_STOP", @@ -1109,8 +1206,7 @@ export enum DedicatedTenancySupportEnum { */ export interface DefaultClientBrandingAttributes { /** - *The logo URL. The only image
- * format accepted is a binary data object that is converted from a .png
file.
The logo. The only image format accepted is a binary data object that is converted from a .png
file.
The login message. Specified as a key value pair, in which the key is a locale and the
* value is the localized message for that locale. The only key supported is
- * en_US
.
en_US
. The HTML tags supported include the following: a, b, blockquote, br, cite, code, dd, dl, dt, div, em,
+ * i, li, ol, p, pre, q, small, span, strike, strong, sub, sup, u, ul
.
*/
LoginMessage?: RecordThe logo. The only image
- * format accepted is a binary data object that is converted from a .png
file.
The logo. The only image format accepted is a binary data object that is converted from a .png
file.
The login message. Specified as a key value pair, in which the key is a locale and the
* value is the localized message for that locale. The only key supported is
- * en_US
.
en_US
. The HTML tags supported include the following: a, b, blockquote, br, cite, code, dd, dl, dt, div, em,
+ * i, li, ol, p, pre, q, small, span, strike, strong, sub, sup, u, ul
.
*/
LoginMessage?: RecordThe logo. This is the - * standard-resolution display that has a 1:1 pixel density (or @1x), where one pixel is equal + *
The logo. This is the standard-resolution display that has a 1:1 pixel density
+ * (or @1x), where one pixel is equal
* to one point. The only image format accepted is a binary data object that is converted from
* a .png
file.
The login message. Specified as a key value pair, in which the key is a locale and the
* value is the localized message for that locale. The only key supported is
- * en_US
.
en_US
. The HTML tags supported include the following: a, b, blockquote, br, cite, code, dd, dl, dt, div, em,
+ * i, li, ol, p, pre, q, small, span, strike, strong, sub, sup, u, ul
.
*/
LoginMessage?: RecordThe operating system that the image is running.
- */ -export interface OperatingSystem { - /** - *The operating system.
- */ - Type?: OperatingSystemType | string; -} - -export enum WorkspaceImageRequiredTenancy { - DEDICATED = "DEDICATED", - DEFAULT = "DEFAULT", -} - -export enum WorkspaceImageState { - AVAILABLE = "AVAILABLE", - ERROR = "ERROR", - PENDING = "PENDING", -} - /** *Describes whether a WorkSpace image needs to be updated with the latest drivers and * other components required by Amazon WorkSpaces.
@@ -2449,7 +2521,8 @@ export interface IosImportClientBrandingAttributes { /** *The login message. Specified as a key value pair, in which the key is a locale and the
* value is the localized message for that locale. The only key supported is
- * en_US
.
en_US
. The HTML tags supported include the following: a, b, blockquote, br, cite, code, dd, dl, dt, div, em,
+ * i, li, ol, p, pre, q, small, span, strike, strong, sub, sup, u, ul
.
*/
LoginMessage?: RecordCreates a new WorkSpace image from an existing WorkSpace.
" + } + }, + "com.amazonaws.workspaces#CreateWorkspaceImageRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.workspaces#WorkspaceImageName", + "traits": { + "smithy.api#documentation": "The name of the new WorkSpace image.
", + "smithy.api#required": {} + } + }, + "Description": { + "target": "com.amazonaws.workspaces#WorkspaceImageDescription", + "traits": { + "smithy.api#documentation": "The description of the new WorkSpace image.
", + "smithy.api#required": {} + } + }, + "WorkspaceId": { + "target": "com.amazonaws.workspaces#WorkspaceId", + "traits": { + "smithy.api#documentation": "The identifier of the source WorkSpace
", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.workspaces#TagList", + "traits": { + "smithy.api#documentation": "The tags that you want to add to the new WorkSpace image. \n To add tags when you're creating the image, you must create an IAM policy that grants \n your IAM user permission to use workspaces:CreateTags
.
The identifier of the new WorkSpace image.
" + } + }, + "Name": { + "target": "com.amazonaws.workspaces#WorkspaceImageName", + "traits": { + "smithy.api#documentation": "The name of the image.
" + } + }, + "Description": { + "target": "com.amazonaws.workspaces#WorkspaceImageDescription", + "traits": { + "smithy.api#documentation": "The description of the image.
" + } + }, + "OperatingSystem": { + "target": "com.amazonaws.workspaces#OperatingSystem", + "traits": { + "smithy.api#documentation": "The operating system that the image is running.
" + } + }, + "State": { + "target": "com.amazonaws.workspaces#WorkspaceImageState", + "traits": { + "smithy.api#documentation": "The availability status of the image.
" + } + }, + "RequiredTenancy": { + "target": "com.amazonaws.workspaces#WorkspaceImageRequiredTenancy", + "traits": { + "smithy.api#documentation": "Specifies whether the image is running on dedicated hardware. \n When Bring Your Own License (BYOL) is enabled, this value is set \n to DEDICATED. For more information, see \n \n Bring Your Own Windows Desktop Images.\n
" + } + }, + "Created": { + "target": "com.amazonaws.workspaces#Timestamp", + "traits": { + "smithy.api#documentation": "The date when the image was created.
" + } + }, + "OwnerAccountId": { + "target": "com.amazonaws.workspaces#AwsAccount", + "traits": { + "smithy.api#documentation": "The identifier of the AWS account that owns the image.
" + } + } + } + }, "com.amazonaws.workspaces#CreateWorkspaces": { "type": "operation", "input": { @@ -1440,7 +1560,7 @@ "LogoUrl": { "target": "com.amazonaws.workspaces#ClientUrl", "traits": { - "smithy.api#documentation": "The logo URL. The only image \n format accepted is a binary data object that is converted from a .png
file.
The logo. The only image format accepted is a binary data object that is converted from a .png
file.
The login message. Specified as a key value pair, in which the key is a locale and the\n value is the localized message for that locale. The only key supported is\n en_US
.
The login message. Specified as a key value pair, in which the key is a locale and the\n value is the localized message for that locale. The only key supported is\n en_US
. The HTML tags supported include the following: a, b, blockquote, br, cite, code, dd, dl, dt, div, em, \n i, li, ol, p, pre, q, small, span, strike, strong, sub, sup, u, ul
.
The logo. The only image \n format accepted is a binary data object that is converted from a .png
file.
The logo. The only image format accepted is a binary data object that is converted from a .png
file.
The login message. Specified as a key value pair, in which the key is a locale and the\n value is the localized message for that locale. The only key supported is\n en_US
.
The login message. Specified as a key value pair, in which the key is a locale and the\n value is the localized message for that locale. The only key supported is\n en_US
. The HTML tags supported include the following: a, b, blockquote, br, cite, code, dd, dl, dt, div, em, \n i, li, ol, p, pre, q, small, span, strike, strong, sub, sup, u, ul
.
The logo. This is the\n standard-resolution display that has a 1:1 pixel density (or @1x), where one pixel is equal\n to one point. The only image format accepted is a binary data object that is converted from \n a .png
file.
The logo. This is the standard-resolution display that has a 1:1 pixel density \n (or @1x), where one pixel is equal\n to one point. The only image format accepted is a binary data object that is converted from \n a .png
file.
The login message. Specified as a key value pair, in which the key is a locale and the\n value is the localized message for that locale. The only key supported is\n en_US
.
The login message. Specified as a key value pair, in which the key is a locale and the\n value is the localized message for that locale. The only key supported is\n en_US
. The HTML tags supported include the following: a, b, blockquote, br, cite, code, dd, dl, dt, div, em, \n i, li, ol, p, pre, q, small, span, strike, strong, sub, sup, u, ul
.
The login message. Specified as a key value pair, in which the key is a locale and the\n value is the localized message for that locale. The only key supported is\n en_US
.
The login message. Specified as a key value pair, in which the key is a locale and the\n value is the localized message for that locale. The only key supported is\n en_US
. The HTML tags supported include the following: a, b, blockquote, br, cite, code, dd, dl, dt, div, em, \n i, li, ol, p, pre, q, small, span, strike, strong, sub, sup, u, ul
.