Skip to content

Commit

Permalink
feat(client-workspaces): Added APIs that allow you to customize the l…
Browse files Browse the repository at this point in the history
…ogo, login message, and help links in the WorkSpaces client login page. To learn more, visit https://docs.aws.amazon.com/workspaces/latest/adminguide/customize-branding.html
  • Loading branch information
awstools committed Mar 31, 2022
1 parent a83077b commit f7d75a0
Show file tree
Hide file tree
Showing 32 changed files with 8,406 additions and 6,386 deletions.
18 changes: 16 additions & 2 deletions clients/client-workspaces/README.md
Expand Up @@ -9,8 +9,22 @@ AWS SDK for JavaScript WorkSpaces Client for Node.js, Browser and React Native.

<fullname>Amazon WorkSpaces Service</fullname>

<p>Amazon WorkSpaces enables you to provision virtual, cloud-based Microsoft Windows and
Amazon Linux desktops for your users.</p>
<p>Amazon WorkSpaces enables you to provision virtual, cloud-based Microsoft Windows
or Amazon Linux desktops for your users, known as <i>WorkSpaces</i>.
WorkSpaces eliminates the need to procure and deploy hardware or install complex
software. You can quickly add or remove users as your needs change. Users can access their
virtual desktops from multiple devices or web browsers.</p>
<p>This API Reference provides detailed information about the actions, data types,
parameters, and errors of the WorkSpaces service. For more information about the
supported Amazon Web Services Regions, endpoints, and service quotas of the Amazon WorkSpaces service, see <a href="https://docs.aws.amazon.com/general/latest/gr/wsp.html">WorkSpaces endpoints and quotas</a> in the <i>Amazon Web Services
General Reference</i>.</p>
<p>You can also manage your WorkSpaces resources using the WorkSpaces
console, Command Line Interface (CLI), and SDKs. For more information about
administering WorkSpaces, see the <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/">Amazon WorkSpaces Administration Guide</a>.
For more information about using the Amazon WorkSpaces client application or web
browser to access provisioned WorkSpaces, see the <a href="https://docs.aws.amazon.com/workspaces/latest/userguide/">Amazon WorkSpaces User Guide</a>. For more
information about using the CLI to manage your WorkSpaces resources,
see the <a href="https://docs.aws.amazon.com/cli/latest/reference/workspaces/index.html">WorkSpaces section of the CLI Reference</a>.</p>

## Installing

Expand Down
435 changes: 289 additions & 146 deletions clients/client-workspaces/src/WorkSpaces.ts

Large diffs are not rendered by default.

36 changes: 34 additions & 2 deletions clients/client-workspaces/src/WorkSpacesClient.ts
Expand Up @@ -77,6 +77,10 @@ import {
CreateWorkspaceBundleCommandOutput,
} from "./commands/CreateWorkspaceBundleCommand";
import { CreateWorkspacesCommandInput, CreateWorkspacesCommandOutput } from "./commands/CreateWorkspacesCommand";
import {
DeleteClientBrandingCommandInput,
DeleteClientBrandingCommandOutput,
} from "./commands/DeleteClientBrandingCommand";
import {
DeleteConnectClientAddInCommandInput,
DeleteConnectClientAddInCommandOutput,
Expand Down Expand Up @@ -104,6 +108,10 @@ import {
DescribeAccountModificationsCommandInput,
DescribeAccountModificationsCommandOutput,
} from "./commands/DescribeAccountModificationsCommand";
import {
DescribeClientBrandingCommandInput,
DescribeClientBrandingCommandOutput,
} from "./commands/DescribeClientBrandingCommand";
import {
DescribeClientPropertiesCommandInput,
DescribeClientPropertiesCommandOutput,
Expand Down Expand Up @@ -155,6 +163,10 @@ import {
DisassociateIpGroupsCommandInput,
DisassociateIpGroupsCommandOutput,
} from "./commands/DisassociateIpGroupsCommand";
import {
ImportClientBrandingCommandInput,
ImportClientBrandingCommandOutput,
} from "./commands/ImportClientBrandingCommand";
import {
ImportWorkspaceImageCommandInput,
ImportWorkspaceImageCommandOutput,
Expand Down Expand Up @@ -237,6 +249,7 @@ export type ServiceInputTypes =
| CreateUpdatedWorkspaceImageCommandInput
| CreateWorkspaceBundleCommandInput
| CreateWorkspacesCommandInput
| DeleteClientBrandingCommandInput
| DeleteConnectClientAddInCommandInput
| DeleteConnectionAliasCommandInput
| DeleteIpGroupCommandInput
Expand All @@ -246,6 +259,7 @@ export type ServiceInputTypes =
| DeregisterWorkspaceDirectoryCommandInput
| DescribeAccountCommandInput
| DescribeAccountModificationsCommandInput
| DescribeClientBrandingCommandInput
| DescribeClientPropertiesCommandInput
| DescribeConnectClientAddInsCommandInput
| DescribeConnectionAliasPermissionsCommandInput
Expand All @@ -261,6 +275,7 @@ export type ServiceInputTypes =
| DescribeWorkspacesConnectionStatusCommandInput
| DisassociateConnectionAliasCommandInput
| DisassociateIpGroupsCommandInput
| ImportClientBrandingCommandInput
| ImportWorkspaceImageCommandInput
| ListAvailableManagementCidrRangesCommandInput
| MigrateWorkspaceCommandInput
Expand Down Expand Up @@ -297,6 +312,7 @@ export type ServiceOutputTypes =
| CreateUpdatedWorkspaceImageCommandOutput
| CreateWorkspaceBundleCommandOutput
| CreateWorkspacesCommandOutput
| DeleteClientBrandingCommandOutput
| DeleteConnectClientAddInCommandOutput
| DeleteConnectionAliasCommandOutput
| DeleteIpGroupCommandOutput
Expand All @@ -306,6 +322,7 @@ export type ServiceOutputTypes =
| DeregisterWorkspaceDirectoryCommandOutput
| DescribeAccountCommandOutput
| DescribeAccountModificationsCommandOutput
| DescribeClientBrandingCommandOutput
| DescribeClientPropertiesCommandOutput
| DescribeConnectClientAddInsCommandOutput
| DescribeConnectionAliasPermissionsCommandOutput
Expand All @@ -321,6 +338,7 @@ export type ServiceOutputTypes =
| DescribeWorkspacesConnectionStatusCommandOutput
| DisassociateConnectionAliasCommandOutput
| DisassociateIpGroupsCommandOutput
| ImportClientBrandingCommandOutput
| ImportWorkspaceImageCommandOutput
| ListAvailableManagementCidrRangesCommandOutput
| MigrateWorkspaceCommandOutput
Expand Down Expand Up @@ -500,8 +518,22 @@ export interface WorkSpacesClientResolvedConfig extends WorkSpacesClientResolved

/**
* <fullname>Amazon WorkSpaces Service</fullname>
* <p>Amazon WorkSpaces enables you to provision virtual, cloud-based Microsoft Windows and
* Amazon Linux desktops for your users.</p>
* <p>Amazon WorkSpaces enables you to provision virtual, cloud-based Microsoft Windows
* or Amazon Linux desktops for your users, known as <i>WorkSpaces</i>.
* WorkSpaces eliminates the need to procure and deploy hardware or install complex
* software. You can quickly add or remove users as your needs change. Users can access their
* virtual desktops from multiple devices or web browsers.</p>
* <p>This API Reference provides detailed information about the actions, data types,
* parameters, and errors of the WorkSpaces service. For more information about the
* supported Amazon Web Services Regions, endpoints, and service quotas of the Amazon WorkSpaces service, see <a href="https://docs.aws.amazon.com/general/latest/gr/wsp.html">WorkSpaces endpoints and quotas</a> in the <i>Amazon Web Services
* General Reference</i>.</p>
* <p>You can also manage your WorkSpaces resources using the WorkSpaces
* console, Command Line Interface (CLI), and SDKs. For more information about
* administering WorkSpaces, see the <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/">Amazon WorkSpaces Administration Guide</a>.
* For more information about using the Amazon WorkSpaces client application or web
* browser to access provisioned WorkSpaces, see the <a href="https://docs.aws.amazon.com/workspaces/latest/userguide/">Amazon WorkSpaces User Guide</a>. For more
* information about using the CLI to manage your WorkSpaces resources,
* see the <a href="https://docs.aws.amazon.com/cli/latest/reference/workspaces/index.html">WorkSpaces section of the CLI Reference</a>.</p>
*/
export class WorkSpacesClient extends __Client<
__HttpHandlerOptions,
Expand Down
Expand Up @@ -22,13 +22,13 @@ export interface AssociateConnectionAliasCommandInput extends AssociateConnectio
export interface AssociateConnectionAliasCommandOutput extends AssociateConnectionAliasResult, __MetadataBearer {}

/**
* <p>Associates the specified connection alias with the specified directory to enable cross-Region redirection.
* For more information, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html">
* Cross-Region Redirection for Amazon WorkSpaces</a>.</p>
*
* <p>Associates the specified connection alias with the specified directory to enable
* cross-Region redirection. For more information, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html"> Cross-Region
* Redirection for Amazon WorkSpaces</a>.</p>
* <note>
* <p>Before performing this operation, call <a href="https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeConnectionAliases.html">
* DescribeConnectionAliases</a> to make sure that the current state of the connection alias is <code>CREATED</code>.</p>
* DescribeConnectionAliases</a> to make sure that the current state of the
* connection alias is <code>CREATED</code>.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Expand Up @@ -22,19 +22,15 @@ export interface CopyWorkspaceImageCommandInput extends CopyWorkspaceImageReques
export interface CopyWorkspaceImageCommandOutput extends CopyWorkspaceImageResult, __MetadataBearer {}

/**
* <p>Copies the specified image from the specified Region to the current Region.
* For more information about copying images, see
* <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/copy-custom-image.html">
* Copy a Custom WorkSpaces Image</a>.</p>
*
* <p>Copies the specified image from the specified Region to the current Region. For more
* information about copying images, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/copy-custom-image.html"> Copy a Custom WorkSpaces
* Image</a>.</p>
* <p>In the China (Ningxia) Region, you can copy images only within the same Region.</p>
*
* <p>In Amazon Web Services GovCloud (US), to copy images to and from other Regions, contact Amazon Web Services Support.</p>
*
* <important>
* <p>Before copying a shared image, be sure to verify that it has been shared from the
* correct Amazon Web Services account. To determine if an image has been shared and to see the
* ID of the Amazon Web Services account that owns an image, use the <a href="https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaceImages.html">DescribeWorkSpaceImages</a> and <a href="https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaceImagePermissions.html">DescribeWorkspaceImagePermissions</a> API operations. </p>
* correct Amazon Web Services account. To determine if an image has been shared and to see
* the ID of the Amazon Web Services account that owns an image, use the <a href="https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaceImages.html">DescribeWorkSpaceImages</a> and <a href="https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaceImagePermissions.html">DescribeWorkspaceImagePermissions</a> API operations. </p>
* </important>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Expand Up @@ -24,7 +24,6 @@ export interface CreateConnectClientAddInCommandOutput extends CreateConnectClie
/**
* <p>Creates a client-add-in for Amazon Connect within a directory. You can create only
* one Amazon Connect client add-in within a directory.</p>
*
* <p>This client add-in allows WorkSpaces users to seamlessly connect to Amazon Connect.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Expand Up @@ -22,9 +22,9 @@ export interface CreateConnectionAliasCommandInput extends CreateConnectionAlias
export interface CreateConnectionAliasCommandOutput extends CreateConnectionAliasResult, __MetadataBearer {}

/**
* <p>Creates the specified connection alias for use with cross-Region redirection. For more information, see
* <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html">
* Cross-Region Redirection for Amazon WorkSpaces</a>.</p>
* <p>Creates the specified connection alias for use with cross-Region redirection. For more
* information, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html"> Cross-Region
* Redirection for Amazon WorkSpaces</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Expand Up @@ -27,7 +27,6 @@ export interface CreateIpGroupCommandOutput extends CreateIpGroupResult, __Metad
* from which users are allowed to access their WorkSpaces. To specify the CIDR address
* ranges, add rules to your IP access control group and then associate the group with your
* directory. You can add rules when you create the group or at any time using <a>AuthorizeIpRules</a>.</p>
*
* <p>There is a default IP access control group associated with your directory. If you don't
* associate an IP access control group with your directory, the default group is used. The
* default group includes a default rule that allows users to access their WorkSpaces from
Expand Down
Expand Up @@ -22,27 +22,25 @@ export interface CreateUpdatedWorkspaceImageCommandInput extends CreateUpdatedWo
export interface CreateUpdatedWorkspaceImageCommandOutput extends CreateUpdatedWorkspaceImageResult, __MetadataBearer {}

/**
* <p>Creates a new updated WorkSpace image based on the specified source image. The
* new updated WorkSpace image has the latest drivers and other updates required by
* the Amazon WorkSpaces components.</p>
*
* <p>To determine which WorkSpace images need to be updated with the latest Amazon
* WorkSpaces requirements, use
* <a href="https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaceImages.html">
* <p>Creates a new updated WorkSpace image based on the specified source image. The new
* updated WorkSpace image has the latest drivers and other updates required by the Amazon
* WorkSpaces components.</p>
* <p>To determine which WorkSpace images need to be updated with the latest Amazon WorkSpaces
* requirements, use <a href="https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaceImages.html">
* DescribeWorkspaceImages</a>.</p>
*
* <note>
* <ul>
* <li>
* <p>Only Windows 10, Windows Sever 2016, and Windows Server 2019 WorkSpace images can be programmatically updated at this time.</p>
* <p>Only Windows 10, Windows Sever 2016, and Windows Server 2019 WorkSpace images
* can be programmatically updated at this time.</p>
* </li>
* <li>
* <p>Microsoft Windows updates and other application updates are not included
* in the update process.</p>
* <p>Microsoft Windows updates and other application updates are not included in the
* update process.</p>
* </li>
* <li>
* <p>The source WorkSpace image is not deleted. You can delete the source image after you've
* verified your new updated image and created a new bundle. </p>
* <p>The source WorkSpace image is not deleted. You can delete the source image
* after you've verified your new updated image and created a new bundle. </p>
* </li>
* </ul>
* </note>
Expand Down
100 changes: 100 additions & 0 deletions clients/client-workspaces/src/commands/DeleteClientBrandingCommand.ts
@@ -0,0 +1,100 @@
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 { DeleteClientBrandingRequest, DeleteClientBrandingResult } from "../models/models_0";
import {
deserializeAws_json1_1DeleteClientBrandingCommand,
serializeAws_json1_1DeleteClientBrandingCommand,
} from "../protocols/Aws_json1_1";
import { ServiceInputTypes, ServiceOutputTypes, WorkSpacesClientResolvedConfig } from "../WorkSpacesClient";

export interface DeleteClientBrandingCommandInput extends DeleteClientBrandingRequest {}
export interface DeleteClientBrandingCommandOutput extends DeleteClientBrandingResult, __MetadataBearer {}

/**
* <p>Deletes customized client branding. Client branding allows you to customize your
* WorkSpace's client login portal. You can tailor your login portal company logo, the support
* email address, support link, link to reset password, and a custom message for users trying
* to sign in.</p>
* <p>After you delete your customized client branding, your login portal reverts to the
* default client branding.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { WorkSpacesClient, DeleteClientBrandingCommand } from "@aws-sdk/client-workspaces"; // ES Modules import
* // const { WorkSpacesClient, DeleteClientBrandingCommand } = require("@aws-sdk/client-workspaces"); // CommonJS import
* const client = new WorkSpacesClient(config);
* const command = new DeleteClientBrandingCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link DeleteClientBrandingCommandInput} for command's `input` shape.
* @see {@link DeleteClientBrandingCommandOutput} for command's `response` shape.
* @see {@link WorkSpacesClientResolvedConfig | config} for WorkSpacesClient's `config` shape.
*
*/
export class DeleteClientBrandingCommand extends $Command<
DeleteClientBrandingCommandInput,
DeleteClientBrandingCommandOutput,
WorkSpacesClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: DeleteClientBrandingCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: WorkSpacesClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<DeleteClientBrandingCommandInput, DeleteClientBrandingCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "WorkSpacesClient";
const commandName = "DeleteClientBrandingCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: DeleteClientBrandingRequest.filterSensitiveLog,
outputFilterSensitiveLog: DeleteClientBrandingResult.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: DeleteClientBrandingCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1DeleteClientBrandingCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DeleteClientBrandingCommandOutput> {
return deserializeAws_json1_1DeleteClientBrandingCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}

0 comments on commit f7d75a0

Please sign in to comment.