createStack method
- required String name,
- List<
AccessEndpoint> ? accessEndpoints, - ApplicationSettings? applicationSettings,
- String? description,
- String? displayName,
- List<
String> ? embedHostDomains, - String? feedbackURL,
- String? redirectURL,
- List<
StorageConnector> ? storageConnectors, - Map<
String, String> ? tags, - List<
UserSetting> ? userSettings,
Creates a stack to start streaming applications to users. A stack consists of an associated fleet, user access policies, and storage configurations.
May throw LimitExceededException. May throw InvalidAccountStatusException. May throw ResourceAlreadyExistsException. May throw ConcurrentModificationException. May throw InvalidRoleException. May throw ResourceNotFoundException. May throw InvalidParameterCombinationException.
Parameter name
:
The name of the stack.
Parameter accessEndpoints
:
The list of interface VPC endpoint (interface endpoint) objects. Users of
the stack can connect to AppStream 2.0 only through the specified
endpoints.
Parameter applicationSettings
:
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.
Parameter description
:
The description to display.
Parameter displayName
:
The stack name to display.
Parameter embedHostDomains
:
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.
Parameter feedbackURL
:
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.
Parameter redirectURL
:
The URL that users are redirected to after their streaming session ends.
Parameter storageConnectors
:
The storage connectors to enable.
Parameter tags
:
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.
Parameter userSettings
:
The actions that are enabled or disabled for users during their streaming
sessions. By default, these actions are enabled.
Implementation
Future<CreateStackResult> createStack({
required String name,
List<AccessEndpoint>? accessEndpoints,
ApplicationSettings? applicationSettings,
String? description,
String? displayName,
List<String>? embedHostDomains,
String? feedbackURL,
String? redirectURL,
List<StorageConnector>? storageConnectors,
Map<String, String>? tags,
List<UserSetting>? userSettings,
}) async {
ArgumentError.checkNotNull(name, 'name');
_s.validateStringLength(
'description',
description,
0,
256,
);
_s.validateStringLength(
'displayName',
displayName,
0,
100,
);
_s.validateStringLength(
'feedbackURL',
feedbackURL,
0,
1000,
);
_s.validateStringLength(
'redirectURL',
redirectURL,
0,
1000,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'PhotonAdminProxyService.CreateStack'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Name': name,
if (accessEndpoints != null) 'AccessEndpoints': accessEndpoints,
if (applicationSettings != null)
'ApplicationSettings': applicationSettings,
if (description != null) 'Description': description,
if (displayName != null) 'DisplayName': displayName,
if (embedHostDomains != null) 'EmbedHostDomains': embedHostDomains,
if (feedbackURL != null) 'FeedbackURL': feedbackURL,
if (redirectURL != null) 'RedirectURL': redirectURL,
if (storageConnectors != null) 'StorageConnectors': storageConnectors,
if (tags != null) 'Tags': tags,
if (userSettings != null) 'UserSettings': userSettings,
},
);
return CreateStackResult.fromJson(jsonResponse.body);
}