Skip to content

create_user_settings

create_user_settings(
    copy_allowed: EnabledType,
    paste_allowed: EnabledType,
    download_allowed: EnabledType,
    upload_allowed: EnabledType,
    print_allowed: EnabledType,
    *,
    config_overrides: Optional[WorkSpacesWebClientConfig] = None,
    tags: Optional[TagList] = 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,
    customer_managed_key: Optional[keyArn] = None,
    additional_encryption_context: Optional[EncryptionContextMap] = None,
    deep_link_allowed: Optional[EnabledType] = None,
    toolbar_configuration: Optional[ToolbarConfiguration] = None,
    branding_configuration_input: Optional[BrandingConfigurationCreateInput] = None,
    web_authn_allowed: Optional[EnabledType] = None,
) -> CreateUserSettingsResponse

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.

Parameters:

  • copy_allowed (EnabledType) –

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

  • paste_allowed (EnabledType) –

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

  • download_allowed (EnabledType) –

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

  • upload_allowed (EnabledType) –

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

  • print_allowed (EnabledType) –

    Specifies whether the user can print to the local device.

  • tags (Optional[TagList], default: None ) –

    The tags to add to the user settings resource. A tag is a key-value pair.

  • 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 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.

  • 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.

  • customer_managed_key (Optional[keyArn], default: None ) –

    The customer managed key used to encrypt sensitive information in the user settings.

  • additional_encryption_context (Optional[EncryptionContextMap], default: None ) –

    The additional encryption context of the user settings.

  • 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[BrandingConfigurationCreateInput], default: None ) –

    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.

  • 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 create_user_settings(
    self,
    copy_allowed: "capo_workspaces_web.types.enabled_type.EnabledType",
    paste_allowed: "capo_workspaces_web.types.enabled_type.EnabledType",
    download_allowed: "capo_workspaces_web.types.enabled_type.EnabledType",
    upload_allowed: "capo_workspaces_web.types.enabled_type.EnabledType",
    print_allowed: "capo_workspaces_web.types.enabled_type.EnabledType",
    *,
    config_overrides: Optional[WorkSpacesWebClientConfig] = None,
    tags: Optional["capo_workspaces_web.types.tag_list.TagList"] = 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,
    customer_managed_key: Optional[
        "capo_workspaces_web.types.key_arn.keyArn"
    ] = None,
    additional_encryption_context: Optional[
        "capo_workspaces_web.types.encryption_context_map.EncryptionContextMap"
    ] = 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_create_input.BrandingConfigurationCreateInput"
    ] = None,
    web_authn_allowed: Optional[
        "capo_workspaces_web.types.enabled_type.EnabledType"
    ] = None,
) -> "capo_workspaces_web.types.create_user_settings_response.CreateUserSettingsResponse":
    """<p>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. </p>

    Args:
        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>
        tags: <p>The tags to add to the user settings resource. A tag is a key-value pair.</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 returns 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>
        customer_managed_key: <p>The customer managed key used to encrypt sensitive information in the user settings.</p>
        additional_encryption_context: <p>The additional encryption context of the user settings.</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 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.</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.conflict_exception.ConflictException: <p>There is a conflict.</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.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The service quota has been exceeded.</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.create_user_settings_request.CreateUserSettingsRequest]",
    ) -> OperationResponse[
        "capo_workspaces_web.types.create_user_settings_response.CreateUserSettingsResponse"
    ]:
        import capo_workspaces_web._operations.aws_ermine_control_plane_service.create_user_settings

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

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

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

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateUserSettings", redact_input=_redact_input),
    )
    input_: capo_workspaces_web.types.create_user_settings_request.CreateUserSettingsRequest = {
        "copy_allowed": copy_allowed,
        "paste_allowed": paste_allowed,
        "download_allowed": download_allowed,
        "upload_allowed": upload_allowed,
        "print_allowed": print_allowed,
    }
    if tags is not None:
        input_["tags"] = tags
    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 customer_managed_key is not None:
        input_["customer_managed_key"] = customer_managed_key
    if additional_encryption_context is not None:
        input_["additional_encryption_context"] = additional_encryption_context
    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