- 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.
CreateConnectionAliasCommand
Creates the specified connection alias for use with cross-Region redirection. For more information, see Cross-Region Redirection for Amazon WorkSpaces .
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { WorkSpacesClient, CreateConnectionAliasCommand } from "@aws-sdk/client-workspaces"; // ES Modules import
// const { WorkSpacesClient, CreateConnectionAliasCommand } = require("@aws-sdk/client-workspaces"); // CommonJS import
const client = new WorkSpacesClient(config);
const input = { // CreateConnectionAliasRequest
ConnectionString: "STRING_VALUE", // required
Tags: [ // TagList
{ // Tag
Key: "STRING_VALUE", // required
Value: "STRING_VALUE",
},
],
};
const command = new CreateConnectionAliasCommand(input);
const response = await client.send(command);
// { // CreateConnectionAliasResult
// AliasId: "STRING_VALUE",
// };
CreateConnectionAliasCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ConnectionString Required | string | undefined | A connection string in the form of a fully qualified domain name (FQDN), such as After you create a connection string, it is always associated to your Amazon Web Services account. You cannot recreate the same connection string with a different account, even if you delete all instances of it from the original account. The connection string is globally reserved for your account. |
Tags | Tag[] | undefined | The tags to associate with the connection alias. |
CreateConnectionAliasCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
AliasId | string | undefined | The identifier of the connection alias. |
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. |
InvalidResourceStateException | client | The state of the resource is not valid for this operation. |
OperationNotSupportedException | client | This operation is not supported. |
ResourceAlreadyExistsException | client | The specified resource already exists. |
ResourceLimitExceededException | client | Your resource limits have been exceeded. |
WorkSpacesServiceException | Base exception class for all service exceptions from WorkSpaces service. |