Skip to content

update_data_protection_settings

update_data_protection_settings(
    data_protection_settings_arn: ARN,
    *,
    config_overrides: Optional[WorkSpacesWebClientConfig] = None,
    inline_redaction_configuration: Optional[InlineRedactionConfiguration] = None,
    display_name: Optional[DisplayNameSafe] = None,
    description: Optional[DescriptionSafe] = None,
    client_token: Optional[ClientToken] = None,
) -> UpdateDataProtectionSettingsResponse

Updates data protection settings.

Parameters:

  • data_protection_settings_arn (ARN) –

    The ARN of the data protection settings.

  • inline_redaction_configuration (Optional[InlineRedactionConfiguration], default: None ) –

    The inline redaction configuration of the data protection settings that will be applied to all sessions.

  • display_name (Optional[DisplayNameSafe], default: None ) –

    The display name of the data protection settings.

  • description (Optional[DescriptionSafe], default: None ) –

    The description of the data protection settings.

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

Raises:

Source code in docs_src/capo_workspaces_web/_services/work_spaces_web.py
def update_data_protection_settings(
    self,
    data_protection_settings_arn: "capo_workspaces_web.types.arn.ARN",
    *,
    config_overrides: Optional[WorkSpacesWebClientConfig] = None,
    inline_redaction_configuration: Optional[
        "capo_workspaces_web.types.inline_redaction_configuration.InlineRedactionConfiguration"
    ] = None,
    display_name: Optional[
        "capo_workspaces_web.types.display_name_safe.DisplayNameSafe"
    ] = None,
    description: Optional[
        "capo_workspaces_web.types.description_safe.DescriptionSafe"
    ] = None,
    client_token: Optional[
        "capo_workspaces_web.types.client_token.ClientToken"
    ] = None,
) -> "capo_workspaces_web.types.update_data_protection_settings_response.UpdateDataProtectionSettingsResponse":
    """<p>Updates data protection settings.</p>

    Args:
        data_protection_settings_arn: <p>The ARN of the data protection settings.</p>
        inline_redaction_configuration: <p>The inline redaction configuration of the data protection settings that will be applied to all sessions.</p>
        display_name: <p>The display name of the data protection settings.</p>
        description: <p>The description of the data protection settings.</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>

    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_data_protection_settings_request.UpdateDataProtectionSettingsRequest]",
    ) -> OperationResponse[
        "capo_workspaces_web.types.update_data_protection_settings_response.UpdateDataProtectionSettingsResponse"
    ]:
        import capo_workspaces_web._operations.aws_ermine_control_plane_service.update_data_protection_settings

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

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

        return capo_workspaces_web.types.update_data_protection_settings_request.redact_sensitive(
            input_
        )

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

        return capo_workspaces_web.types.update_data_protection_settings_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateDataProtectionSettings",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_workspaces_web.types.update_data_protection_settings_request.UpdateDataProtectionSettingsRequest = {
        "data_protection_settings_arn": data_protection_settings_arn
    }
    if inline_redaction_configuration is not None:
        input_["inline_redaction_configuration"] = inline_redaction_configuration
    if display_name is not None:
        input_["display_name"] = display_name
    if description is not None:
        input_["description"] = description
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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