Skip to content

update_browser_settings async

update_browser_settings(
    browser_settings_arn: ARN,
    *,
    config_overrides: Optional[AsyncWorkSpacesWebClientConfig] = None,
    browser_policy: Optional[BrowserPolicy] = None,
    client_token: Optional[ClientToken] = None,
    web_content_filtering_policy: Optional[WebContentFilteringPolicy] = None,
) -> UpdateBrowserSettingsResponse

Updates browser settings.

Parameters:

  • browser_settings_arn (ARN) –

    The ARN of the browser settings.

  • browser_policy (Optional[BrowserPolicy], default: None ) –

    A JSON string containing Chrome Enterprise policies that will be applied to all streaming sessions.

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

  • web_content_filtering_policy (Optional[WebContentFilteringPolicy], default: None ) –

    The policy that specifies which URLs end users are allowed to access or which URLs or domain categories they are restricted from accessing for enhanced security.

Raises:

Source code in docs_src/capo_workspaces_web/_services/async_work_spaces_web.py
async def update_browser_settings(
    self,
    browser_settings_arn: "capo_workspaces_web.types.arn.ARN",
    *,
    config_overrides: Optional[AsyncWorkSpacesWebClientConfig] = None,
    browser_policy: Optional[
        "capo_workspaces_web.types.browser_policy.BrowserPolicy"
    ] = None,
    client_token: Optional[
        "capo_workspaces_web.types.client_token.ClientToken"
    ] = None,
    web_content_filtering_policy: Optional[
        "capo_workspaces_web.types.web_content_filtering_policy.WebContentFilteringPolicy"
    ] = None,
) -> "capo_workspaces_web.types.update_browser_settings_response.UpdateBrowserSettingsResponse":
    """<p>Updates browser settings.</p>

    Args:
        browser_settings_arn: <p>The ARN of the browser settings.</p>
        browser_policy: <p>A JSON string containing Chrome Enterprise policies that will be applied to all streaming sessions. </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>
        web_content_filtering_policy: <p>The policy that specifies which URLs end users are allowed to access or which URLs or domain categories they are restricted from accessing for enhanced security.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_workspaces_web.types.update_browser_settings_request.UpdateBrowserSettingsRequest]",
    ) -> AsyncOperationResponse[
        "capo_workspaces_web.types.update_browser_settings_response.UpdateBrowserSettingsResponse"
    ]:
        import capo_workspaces_web._operations.aws_ermine_control_plane_service.update_browser_settings

        (
            output,
            http_response,
        ) = await capo_workspaces_web._operations.aws_ermine_control_plane_service.update_browser_settings.async_update_browser_settings(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

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

        return capo_workspaces_web.types.update_browser_settings_request.redact_sensitive(
            input_
        )

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

        return capo_workspaces_web.types.update_browser_settings_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateBrowserSettings",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_workspaces_web.types.update_browser_settings_request.UpdateBrowserSettingsRequest = {
        "browser_settings_arn": browser_settings_arn
    }
    if browser_policy is not None:
        input_["browser_policy"] = browser_policy
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if web_content_filtering_policy is not None:
        input_["web_content_filtering_policy"] = web_content_filtering_policy

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output