Skip to content

update_user_settings

update_user_settings(
    user_settings_arn: ARN,
    *,
    config_overrides: Optional[WorkSpacesWebClientConfig] = None,
    copy_allowed: Optional[EnabledType] = None,
    paste_allowed: Optional[EnabledType] = None,
    download_allowed: Optional[EnabledType] = None,
    upload_allowed: Optional[EnabledType] = None,
    print_allowed: Optional[EnabledType] = None,
    disconnect_timeout_in_minutes: Optional[DisconnectTimeoutInMinutes] = None,
    idle_disconnect_timeout_in_minutes: Optional[IdleDisconnectTimeoutInMinutes] = None,
    client_token: Optional[ClientToken] = None,
    cookie_synchronization_configuration: Optional[
        CookieSynchronizationConfiguration
    ] = None,
    deep_link_allowed: Optional[EnabledType] = None,
    toolbar_configuration: Optional[ToolbarConfiguration] = None,
    branding_configuration_input: Optional[BrandingConfigurationUpdateInput] = None,
    web_authn_allowed: Optional[EnabledType] = None,
) -> UpdateUserSettingsResponse

Updates the user settings.

Parameters:

  • user_settings_arn (ARN) –

    The ARN of the user settings.

  • copy_allowed (Optional[EnabledType], default: None ) –

    Specifies whether the user can copy text from the streaming session to the local device.

  • paste_allowed (Optional[EnabledType], default: None ) –

    Specifies whether the user can paste text from the local device to the streaming session.

  • download_allowed (Optional[EnabledType], default: None ) –

    Specifies whether the user can download files from the streaming session to the local device.

  • upload_allowed (Optional[EnabledType], default: None ) –

    Specifies whether the user can upload files from the local device to the streaming session.

  • print_allowed (Optional[EnabledType], default: None ) –

    Specifies whether the user can print to the local device.

  • disconnect_timeout_in_minutes (Optional[DisconnectTimeoutInMinutes], default: None ) –

    The amount of time that a streaming session remains active after users disconnect.

  • idle_disconnect_timeout_in_minutes (Optional[IdleDisconnectTimeoutInMinutes], default: None ) –

    The amount of time that users can be idle (inactive) before they are disconnected from their streaming session and the disconnect timeout interval begins.

  • client_token (Optional[ClientToken], default: None ) –

    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.

  • cookie_synchronization_configuration (Optional[CookieSynchronizationConfiguration], default: None ) –

    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.

  • deep_link_allowed (Optional[EnabledType], default: None ) –

    Specifies whether the user can use deep links that open automatically when connecting to a session.

  • toolbar_configuration (Optional[ToolbarConfiguration], default: None ) –

    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.

  • branding_configuration_input (Optional[BrandingConfigurationUpdateInput], default: None ) –

    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.

  • web_authn_allowed (Optional[EnabledType], default: None ) –

    Specifies whether the user can use WebAuthn redirection for passwordless login to websites within the streaming session.

Raises:

Source code in docs_src/capo_workspaces_web/_services/work_spaces_web.py
def update_user_settings(
    self,
    user_settings_arn: "capo_workspaces_web.types.arn.ARN",
    *,
    config_overrides: Optional[WorkSpacesWebClientConfig] = None,
    copy_allowed: Optional[
        "capo_workspaces_web.types.enabled_type.EnabledType"
    ] = None,
    paste_allowed: Optional[
        "capo_workspaces_web.types.enabled_type.EnabledType"
    ] = None,
    download_allowed: Optional[
        "capo_workspaces_web.types.enabled_type.EnabledType"
    ] = None,
    upload_allowed: Optional[
        "capo_workspaces_web.types.enabled_type.EnabledType"
    ] = None,
    print_allowed: Optional[
        "capo_workspaces_web.types.enabled_type.EnabledType"
    ] = None,
    disconnect_timeout_in_minutes: Optional[
        "capo_workspaces_web.types.disconnect_timeout_in_minutes.DisconnectTimeoutInMinutes"
    ] = None,
    idle_disconnect_timeout_in_minutes: Optional[
        "capo_workspaces_web.types.idle_disconnect_timeout_in_minutes.IdleDisconnectTimeoutInMinutes"
    ] = None,
    client_token: Optional[
        "capo_workspaces_web.types.client_token.ClientToken"
    ] = None,
    cookie_synchronization_configuration: Optional[
        "capo_workspaces_web.types.cookie_synchronization_configuration.CookieSynchronizationConfiguration"
    ] = None,
    deep_link_allowed: Optional[
        "capo_workspaces_web.types.enabled_type.EnabledType"
    ] = None,
    toolbar_configuration: Optional[
        "capo_workspaces_web.types.toolbar_configuration.ToolbarConfiguration"
    ] = None,
    branding_configuration_input: Optional[
        "capo_workspaces_web.types.branding_configuration_update_input.BrandingConfigurationUpdateInput"
    ] = None,
    web_authn_allowed: Optional[
        "capo_workspaces_web.types.enabled_type.EnabledType"
    ] = None,
) -> "capo_workspaces_web.types.update_user_settings_response.UpdateUserSettingsResponse":
    """<p>Updates the user settings.</p>

    Args:
        user_settings_arn: <p>The ARN of the user settings.</p>
        copy_allowed: <p>Specifies whether the user can copy text from the streaming session to the local device.</p>
        paste_allowed: <p>Specifies whether the user can paste text from the local device to the streaming session.</p>
        download_allowed: <p>Specifies whether the user can download files from the streaming session to the local device.</p>
        upload_allowed: <p>Specifies whether the user can upload files from the local device to the streaming session.</p>
        print_allowed: <p>Specifies whether the user can print to the local device.</p>
        disconnect_timeout_in_minutes: <p>The amount of time that a streaming session remains active after users disconnect.</p>
        idle_disconnect_timeout_in_minutes: <p>The amount of time that users can be idle (inactive) before they are disconnected from their streaming session and the disconnect timeout interval begins.</p>
        client_token: <p>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. </p> <p>If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.</p>
        cookie_synchronization_configuration: <p>The configuration that specifies which cookies should be synchronized from the end user's local browser to the remote browser.</p> <p>If the allowlist and blocklist are empty, the configuration becomes null.</p>
        deep_link_allowed: <p>Specifies whether the user can use deep links that open automatically when connecting to a session.</p>
        toolbar_configuration: <p>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.</p>
        branding_configuration_input: <p>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.</p>
        web_authn_allowed: <p>Specifies whether the user can use WebAuthn redirection for passwordless login to websites within the streaming session.</p>

    Raises:
        capo_workspaces_web.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p>
        capo_workspaces_web.errors.internal_server_exception.InternalServerException: <p>There is an internal server error.</p>
        capo_workspaces_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource cannot be found.</p>
        capo_workspaces_web.errors.throttling_exception.ThrottlingException: <p>There is a throttling error.</p>
        capo_workspaces_web.errors.validation_exception.ValidationException: <p>There is a validation error.</p>
        capo_workspaces_web.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_workspaces_web.types.update_user_settings_request.UpdateUserSettingsRequest]",
    ) -> OperationResponse[
        "capo_workspaces_web.types.update_user_settings_response.UpdateUserSettingsResponse"
    ]:
        import capo_workspaces_web._operations.aws_ermine_control_plane_service.update_user_settings

        output, http_response = (
            capo_workspaces_web._operations.aws_ermine_control_plane_service.update_user_settings.update_user_settings(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_workspaces_web.types.update_user_settings_request.UpdateUserSettingsRequest",
    ) -> dict[str, Any]:
        import capo_workspaces_web.types.update_user_settings_request

        return (
            capo_workspaces_web.types.update_user_settings_request.redact_sensitive(
                input_
            )
        )

    def _redact_output(
        output: "capo_workspaces_web.types.update_user_settings_response.UpdateUserSettingsResponse",
    ) -> dict[str, Any]:
        import capo_workspaces_web.types.update_user_settings_response

        return capo_workspaces_web.types.update_user_settings_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateUserSettings",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_workspaces_web.types.update_user_settings_request.UpdateUserSettingsRequest = {
        "user_settings_arn": user_settings_arn
    }
    if copy_allowed is not None:
        input_["copy_allowed"] = copy_allowed
    if paste_allowed is not None:
        input_["paste_allowed"] = paste_allowed
    if download_allowed is not None:
        input_["download_allowed"] = download_allowed
    if upload_allowed is not None:
        input_["upload_allowed"] = upload_allowed
    if print_allowed is not None:
        input_["print_allowed"] = print_allowed
    if disconnect_timeout_in_minutes is not None:
        input_["disconnect_timeout_in_minutes"] = disconnect_timeout_in_minutes
    if idle_disconnect_timeout_in_minutes is not None:
        input_["idle_disconnect_timeout_in_minutes"] = (
            idle_disconnect_timeout_in_minutes
        )
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if cookie_synchronization_configuration is not None:
        input_["cookie_synchronization_configuration"] = (
            cookie_synchronization_configuration
        )
    if deep_link_allowed is not None:
        input_["deep_link_allowed"] = deep_link_allowed
    if toolbar_configuration is not None:
        input_["toolbar_configuration"] = toolbar_configuration
    if branding_configuration_input is not None:
        input_["branding_configuration_input"] = branding_configuration_input
    if web_authn_allowed is not None:
        input_["web_authn_allowed"] = web_authn_allowed

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output