updateUserSettings method
- required String userSettingsArn,
- BrandingConfigurationUpdateInput? brandingConfigurationInput,
- String? clientToken,
- CookieSynchronizationConfiguration? cookieSynchronizationConfiguration,
- EnabledType? copyAllowed,
- EnabledType? deepLinkAllowed,
- int? disconnectTimeoutInMinutes,
- EnabledType? downloadAllowed,
- int? idleDisconnectTimeoutInMinutes,
- EnabledType? pasteAllowed,
- EnabledType? printAllowed,
- ToolbarConfiguration? toolbarConfiguration,
- EnabledType? uploadAllowed,
- EnabledType? webAuthnAllowed,
Updates the user settings.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter userSettingsArn :
The ARN of the user settings.
Parameter brandingConfigurationInput :
The branding configuration that customizes the appearance of the web
portal for end users. When updating user settings without an existing
branding configuration, all fields (logo, favicon, localized strings, and
color theme) are required except for wallpaper and terms of service. When
updating user settings with an existing branding configuration, all fields
are optional.
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
return 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.
If the allowlist and blocklist are empty, the configuration becomes null.
Parameter copyAllowed :
Specifies whether the user can copy text from the streaming session to the
local device.
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 downloadAllowed :
Specifies whether the user can download files from the streaming session
to the local device.
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 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 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 uploadAllowed :
Specifies whether the user can upload files from the local device to the
streaming session.
Parameter webAuthnAllowed :
Specifies whether the user can use WebAuthn redirection for passwordless
login to websites within the streaming session.
Implementation
Future<UpdateUserSettingsResponse> updateUserSettings({
required String userSettingsArn,
BrandingConfigurationUpdateInput? brandingConfigurationInput,
String? clientToken,
CookieSynchronizationConfiguration? cookieSynchronizationConfiguration,
EnabledType? copyAllowed,
EnabledType? deepLinkAllowed,
int? disconnectTimeoutInMinutes,
EnabledType? downloadAllowed,
int? idleDisconnectTimeoutInMinutes,
EnabledType? pasteAllowed,
EnabledType? printAllowed,
ToolbarConfiguration? toolbarConfiguration,
EnabledType? uploadAllowed,
EnabledType? webAuthnAllowed,
}) async {
_s.validateNumRange(
'disconnectTimeoutInMinutes',
disconnectTimeoutInMinutes,
1,
600,
);
_s.validateNumRange(
'idleDisconnectTimeoutInMinutes',
idleDisconnectTimeoutInMinutes,
0,
60,
);
final $payload = <String, dynamic>{
if (brandingConfigurationInput != null)
'brandingConfigurationInput': brandingConfigurationInput,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (cookieSynchronizationConfiguration != null)
'cookieSynchronizationConfiguration':
cookieSynchronizationConfiguration,
if (copyAllowed != null) 'copyAllowed': copyAllowed.value,
if (deepLinkAllowed != null) 'deepLinkAllowed': deepLinkAllowed.value,
if (disconnectTimeoutInMinutes != null)
'disconnectTimeoutInMinutes': disconnectTimeoutInMinutes,
if (downloadAllowed != null) 'downloadAllowed': downloadAllowed.value,
if (idleDisconnectTimeoutInMinutes != null)
'idleDisconnectTimeoutInMinutes': idleDisconnectTimeoutInMinutes,
if (pasteAllowed != null) 'pasteAllowed': pasteAllowed.value,
if (printAllowed != null) 'printAllowed': printAllowed.value,
if (toolbarConfiguration != null)
'toolbarConfiguration': toolbarConfiguration,
if (uploadAllowed != null) 'uploadAllowed': uploadAllowed.value,
if (webAuthnAllowed != null) 'webAuthnAllowed': webAuthnAllowed.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/userSettings/${userSettingsArn.split('/').map(Uri.encodeComponent).join('/')}',
exceptionFnMap: _exceptionFns,
);
return UpdateUserSettingsResponse.fromJson(response);
}