- 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.
CreateStackCommand
Creates a stack to start streaming applications to users. A stack consists of an associated fleet, user access policies, and storage configurations.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { AppStreamClient, CreateStackCommand } from "@aws-sdk/client-appstream"; // ES Modules import
// const { AppStreamClient, CreateStackCommand } = require("@aws-sdk/client-appstream"); // CommonJS import
const client = new AppStreamClient(config);
const input = { // CreateStackRequest
Name: "STRING_VALUE", // required
Description: "STRING_VALUE",
DisplayName: "STRING_VALUE",
StorageConnectors: [ // StorageConnectorList
{ // StorageConnector
ConnectorType: "HOMEFOLDERS" || "GOOGLE_DRIVE" || "ONE_DRIVE", // required
ResourceIdentifier: "STRING_VALUE",
Domains: [ // DomainList
"STRING_VALUE",
],
DomainsRequireAdminConsent: [
"STRING_VALUE",
],
},
],
RedirectURL: "STRING_VALUE",
FeedbackURL: "STRING_VALUE",
UserSettings: [ // UserSettingList
{ // UserSetting
Action: "CLIPBOARD_COPY_FROM_LOCAL_DEVICE" || "CLIPBOARD_COPY_TO_LOCAL_DEVICE" || "FILE_UPLOAD" || "FILE_DOWNLOAD" || "PRINTING_TO_LOCAL_DEVICE" || "DOMAIN_PASSWORD_SIGNIN" || "DOMAIN_SMART_CARD_SIGNIN" || "AUTO_TIME_ZONE_REDIRECTION", // required
Permission: "ENABLED" || "DISABLED", // required
MaximumLength: Number("int"),
},
],
ApplicationSettings: { // ApplicationSettings
Enabled: true || false, // required
SettingsGroup: "STRING_VALUE",
},
Tags: { // Tags
"<keys>": "STRING_VALUE",
},
AccessEndpoints: [ // AccessEndpointList
{ // AccessEndpoint
EndpointType: "STREAMING", // required
VpceId: "STRING_VALUE",
},
],
EmbedHostDomains: [ // EmbedHostDomains
"STRING_VALUE",
],
StreamingExperienceSettings: { // StreamingExperienceSettings
PreferredProtocol: "TCP" || "UDP",
},
};
const command = new CreateStackCommand(input);
const response = await client.send(command);
// { // CreateStackResult
// Stack: { // Stack
// Arn: "STRING_VALUE",
// Name: "STRING_VALUE", // required
// Description: "STRING_VALUE",
// DisplayName: "STRING_VALUE",
// CreatedTime: new Date("TIMESTAMP"),
// StorageConnectors: [ // StorageConnectorList
// { // StorageConnector
// ConnectorType: "HOMEFOLDERS" || "GOOGLE_DRIVE" || "ONE_DRIVE", // required
// ResourceIdentifier: "STRING_VALUE",
// Domains: [ // DomainList
// "STRING_VALUE",
// ],
// DomainsRequireAdminConsent: [
// "STRING_VALUE",
// ],
// },
// ],
// RedirectURL: "STRING_VALUE",
// FeedbackURL: "STRING_VALUE",
// StackErrors: [ // StackErrors
// { // StackError
// ErrorCode: "STORAGE_CONNECTOR_ERROR" || "INTERNAL_SERVICE_ERROR",
// ErrorMessage: "STRING_VALUE",
// },
// ],
// UserSettings: [ // UserSettingList
// { // UserSetting
// Action: "CLIPBOARD_COPY_FROM_LOCAL_DEVICE" || "CLIPBOARD_COPY_TO_LOCAL_DEVICE" || "FILE_UPLOAD" || "FILE_DOWNLOAD" || "PRINTING_TO_LOCAL_DEVICE" || "DOMAIN_PASSWORD_SIGNIN" || "DOMAIN_SMART_CARD_SIGNIN" || "AUTO_TIME_ZONE_REDIRECTION", // required
// Permission: "ENABLED" || "DISABLED", // required
// MaximumLength: Number("int"),
// },
// ],
// ApplicationSettings: { // ApplicationSettingsResponse
// Enabled: true || false,
// SettingsGroup: "STRING_VALUE",
// S3BucketName: "STRING_VALUE",
// },
// AccessEndpoints: [ // AccessEndpointList
// { // AccessEndpoint
// EndpointType: "STREAMING", // required
// VpceId: "STRING_VALUE",
// },
// ],
// EmbedHostDomains: [ // EmbedHostDomains
// "STRING_VALUE",
// ],
// StreamingExperienceSettings: { // StreamingExperienceSettings
// PreferredProtocol: "TCP" || "UDP",
// },
// },
// };
CreateStackCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
Name Required | string | undefined | The name of the stack. |
AccessEndpoints | AccessEndpoint[] | undefined | The list of interface VPC endpoint (interface endpoint) objects. Users of the stack can connect to AppStream 2.0 only through the specified endpoints. |
ApplicationSettings | ApplicationSettings | undefined | The persistent application settings for users of a stack. When these settings are enabled, changes that users make to applications and Windows settings are automatically saved after each session and applied to the next session. |
Description | string | undefined | The description to display. |
DisplayName | string | undefined | The stack name to display. |
EmbedHostDomains | string[] | undefined | The domains where AppStream 2.0 streaming sessions can be embedded in an iframe. You must approve the domains that you want to host embedded AppStream 2.0 streaming sessions. |
FeedbackURL | string | undefined | The URL that users are redirected to after they click the Send Feedback link. If no URL is specified, no Send Feedback link is displayed. |
RedirectURL | string | undefined | The URL that users are redirected to after their streaming session ends. |
StorageConnectors | StorageConnector[] | undefined | The storage connectors to enable. |
StreamingExperienceSettings | StreamingExperienceSettings | undefined | The streaming protocol you want your stack to prefer. This can be UDP or TCP. Currently, UDP is only supported in the Windows native client. |
Tags | Record<string, string> | undefined | The tags to associate with the stack. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=. If you do not specify a value, the value is set to an empty string. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters: _ . : / = + - For more information about tags, see Tagging Your Resources in the Amazon AppStream 2.0 Administration Guide. |
UserSettings | UserSetting[] | undefined | The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled. |
CreateStackCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Stack | Stack | undefined | Information about the stack. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ConcurrentModificationException | client | An API error occurred. Wait a few minutes and try again. |
InvalidAccountStatusException | client | The resource cannot be created because your AWS account is suspended. For assistance, contact AWS Support. |
InvalidParameterCombinationException | client | Indicates an incorrect combination of parameters, or a missing parameter. |
InvalidRoleException | client | The specified role is invalid. |
LimitExceededException | client | The requested limit exceeds the permitted limit for an account. |
OperationNotPermittedException | client | The attempted operation is not permitted. |
ResourceAlreadyExistsException | client | The specified resource already exists. |
ResourceNotFoundException | client | The specified resource was not found. |
AppStreamServiceException | Base exception class for all service exceptions from AppStream service. |