createUserSettings method
- required EnabledType copyAllowed,
- required EnabledType downloadAllowed,
- required EnabledType pasteAllowed,
- required EnabledType printAllowed,
- required EnabledType uploadAllowed,
- Map<
String, String> ? additionalEncryptionContext, - BrandingConfigurationCreateInput? brandingConfigurationInput,
- String? clientToken,
- CookieSynchronizationConfiguration? cookieSynchronizationConfiguration,
- String? customerManagedKey,
- EnabledType? deepLinkAllowed,
- int? disconnectTimeoutInMinutes,
- int? idleDisconnectTimeoutInMinutes,
- List<
Tag> ? tags, - ToolbarConfiguration? toolbarConfiguration,
- EnabledType? webAuthnAllowed,
Creates a user settings resource that can be associated with a web portal. Once associated with a web portal, user settings control how users can transfer data between a streaming session and the their local devices.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter copyAllowed :
Specifies whether the user can copy text from the streaming session to the
local device.
Parameter downloadAllowed :
Specifies whether the user can download files from the streaming session
to the local device.
Parameter pasteAllowed :
Specifies whether the user can paste text from the local device to the
streaming session.
Parameter printAllowed :
Specifies whether the user can print to the local device.
Parameter uploadAllowed :
Specifies whether the user can upload files from the local device to the
streaming session.
Parameter additionalEncryptionContext :
The additional encryption context of the user settings.
Parameter brandingConfigurationInput :
The branding configuration input that customizes the appearance of the web
portal for end users. This includes a custom logo, favicon, localized
strings, color theme, and optionally a wallpaper and terms of service.
Parameter clientToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request. Idempotency ensures that an API request
completes only once. With an idempotent request, if the original request
completes successfully, subsequent retries with the same client token
returns the result from the original successful request.
If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.
Parameter cookieSynchronizationConfiguration :
The configuration that specifies which cookies should be synchronized from
the end user's local browser to the remote browser.
Parameter customerManagedKey :
The customer managed key used to encrypt sensitive information in the user
settings.
Parameter deepLinkAllowed :
Specifies whether the user can use deep links that open automatically when
connecting to a session.
Parameter disconnectTimeoutInMinutes :
The amount of time that a streaming session remains active after users
disconnect.
Parameter idleDisconnectTimeoutInMinutes :
The amount of time that users can be idle (inactive) before they are
disconnected from their streaming session and the disconnect timeout
interval begins.
Parameter tags :
The tags to add to the user settings resource. A tag is a key-value pair.
Parameter toolbarConfiguration :
The configuration of the toolbar. This allows administrators to select the
toolbar type and visual mode, set maximum display resolution for sessions,
and choose which items are visible to end users during their sessions. If
administrators do not modify these settings, end users retain control over
their toolbar preferences.
Parameter webAuthnAllowed :
Specifies whether the user can use WebAuthn redirection for passwordless
login to websites within the streaming session.
Implementation
Future<CreateUserSettingsResponse> createUserSettings({
required EnabledType copyAllowed,
required EnabledType downloadAllowed,
required EnabledType pasteAllowed,
required EnabledType printAllowed,
required EnabledType uploadAllowed,
Map<String, String>? additionalEncryptionContext,
BrandingConfigurationCreateInput? brandingConfigurationInput,
String? clientToken,
CookieSynchronizationConfiguration? cookieSynchronizationConfiguration,
String? customerManagedKey,
EnabledType? deepLinkAllowed,
int? disconnectTimeoutInMinutes,
int? idleDisconnectTimeoutInMinutes,
List<Tag>? tags,
ToolbarConfiguration? toolbarConfiguration,
EnabledType? webAuthnAllowed,
}) async {
_s.validateNumRange(
'disconnectTimeoutInMinutes',
disconnectTimeoutInMinutes,
1,
600,
);
_s.validateNumRange(
'idleDisconnectTimeoutInMinutes',
idleDisconnectTimeoutInMinutes,
0,
60,
);
final $payload = <String, dynamic>{
'copyAllowed': copyAllowed.value,
'downloadAllowed': downloadAllowed.value,
'pasteAllowed': pasteAllowed.value,
'printAllowed': printAllowed.value,
'uploadAllowed': uploadAllowed.value,
if (additionalEncryptionContext != null)
'additionalEncryptionContext': additionalEncryptionContext,
if (brandingConfigurationInput != null)
'brandingConfigurationInput': brandingConfigurationInput,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (cookieSynchronizationConfiguration != null)
'cookieSynchronizationConfiguration':
cookieSynchronizationConfiguration,
if (customerManagedKey != null) 'customerManagedKey': customerManagedKey,
if (deepLinkAllowed != null) 'deepLinkAllowed': deepLinkAllowed.value,
if (disconnectTimeoutInMinutes != null)
'disconnectTimeoutInMinutes': disconnectTimeoutInMinutes,
if (idleDisconnectTimeoutInMinutes != null)
'idleDisconnectTimeoutInMinutes': idleDisconnectTimeoutInMinutes,
if (tags != null) 'tags': tags,
if (toolbarConfiguration != null)
'toolbarConfiguration': toolbarConfiguration,
if (webAuthnAllowed != null) 'webAuthnAllowed': webAuthnAllowed.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/userSettings',
exceptionFnMap: _exceptionFns,
);
return CreateUserSettingsResponse.fromJson(response);
}