Skip to content

update_dlp_setting

update_dlp_setting(
    aws_account_id: AwsAccountId,
    dlp_setting_id: DlpSettingId,
    *,
    config_overrides: Optional[QuickSightClientConfig] = None,
    name: Optional[DlpSettingName] = None,
    provider_type: Optional[DlpProviderType] = None,
    provider_config: Optional[ProviderConfig] = None,
    provider_outage_action: Optional[DlpAction] = None,
    enabled: Optional[Boolean] = None,
) -> UpdateDlpSettingResponse

Updates an existing DLP setting configuration in an Amazon Web Services account. Fields that are omitted from the request retain their current values.

Parameters:

  • aws_account_id (AwsAccountId) –

    The ID of the Amazon Web Services account that contains the DLP setting that you want to update.

  • dlp_setting_id (DlpSettingId) –

    The ID of the DLP setting that you want to update.

  • name (Optional[DlpSettingName], default: None ) –

    An updated display name for the DLP setting.

  • provider_type (Optional[DlpProviderType], default: None ) –

    An updated DLP provider type. Currently, the only supported value is MICROSOFT_PURVIEW.

  • provider_config (Optional[ProviderConfig], default: None ) –

    An updated provider-specific configuration for the DLP integration. This is a union type structure. For this structure to be valid, only one of the attributes can be defined.

  • provider_outage_action (Optional[DlpAction], default: None ) –

    An updated behavior to apply when the DLP provider is unreachable. Valid values are ALLOW, WARN, and BLOCK.

  • enabled (Optional[Boolean], default: None ) –

    Specifies whether DLP enforcement is active for this setting. Set to true to enable enforcement, or false to disable it.

Raises:

  • AccessDeniedException –

    You don't have access to this item. The provided credentials couldn't be validated. You might not be authorized to carry out the request. Make sure that your account is authorized to use the Amazon Quick Sight service, that your policies have the correct permissions, and that you are using the correct credentials.

  • ConflictException –

    Updating or deleting a resource can cause an inconsistent state.

  • InternalFailureException –

    An internal failure occurred.

  • InvalidRequestException –

    You don't have this feature activated for your account. To fix this issue, contact Amazon Web Services support.

  • ResourceNotFoundException –

    One or more resources can't be found.

  • ThrottlingException –

    Access is throttled.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_quicksight/_services/quick_sight.py
def update_dlp_setting(
    self,
    aws_account_id: "capo_quicksight.types.aws_account_id.AwsAccountId",
    dlp_setting_id: "capo_quicksight.types.dlp_setting_id.DlpSettingId",
    *,
    config_overrides: Optional[QuickSightClientConfig] = None,
    name: Optional["capo_quicksight.types.dlp_setting_name.DlpSettingName"] = None,
    provider_type: Optional[
        "capo_quicksight.types.dlp_provider_type.DlpProviderType"
    ] = None,
    provider_config: Optional[
        "capo_quicksight.types.provider_config.ProviderConfig"
    ] = None,
    provider_outage_action: Optional[
        "capo_quicksight.types.dlp_action.DlpAction"
    ] = None,
    enabled: Optional["capo_quicksight.types.boolean.Boolean"] = None,
) -> "capo_quicksight.types.update_dlp_setting_response.UpdateDlpSettingResponse":
    """<p>Updates an existing DLP setting configuration in an Amazon Web Services account. Fields that are omitted from the request retain their current values.</p>

    Args:
        aws_account_id: <p>The ID of the Amazon Web Services account that contains the DLP setting that you want to update.</p>
        dlp_setting_id: <p>The ID of the DLP setting that you want to update.</p>
        name: <p>An updated display name for the DLP setting.</p>
        provider_type: <p>An updated DLP provider type. Currently, the only supported value is <code>MICROSOFT_PURVIEW</code>.</p>
        provider_config: <p>An updated provider-specific configuration for the DLP integration. This is a union type structure. For this structure to be valid, only one of the attributes can be defined.</p>
        provider_outage_action: <p>An updated behavior to apply when the DLP provider is unreachable. Valid values are <code>ALLOW</code>, <code>WARN</code>, and <code>BLOCK</code>.</p>
        enabled: <p>Specifies whether DLP enforcement is active for this setting. Set to <code>true</code> to enable enforcement, or <code>false</code> to disable it.</p>

    Raises:
        capo_quicksight.errors.access_denied_exception.AccessDeniedException: <p>You don't have access to this item. The provided credentials couldn't be validated. You might not be authorized to carry out the request. Make sure that your account is authorized to use the Amazon Quick Sight service, that your policies have the correct permissions, and that you are using the correct credentials.</p>
        capo_quicksight.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_quicksight.errors.internal_failure_exception.InternalFailureException: <p>An internal failure occurred.</p>
        capo_quicksight.errors.invalid_request_exception.InvalidRequestException: <p>You don't have this feature activated for your account. To fix this issue, contact Amazon Web Services support.</p>
        capo_quicksight.errors.resource_not_found_exception.ResourceNotFoundException: <p>One or more resources can't be found.</p>
        capo_quicksight.errors.throttling_exception.ThrottlingException: <p>Access is throttled.</p>
        capo_quicksight.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_quicksight.types.update_dlp_setting_request.UpdateDlpSettingRequest]",
    ) -> OperationResponse[
        "capo_quicksight.types.update_dlp_setting_response.UpdateDlpSettingResponse"
    ]:
        import capo_quicksight._operations.quick_sight_20180401.update_dlp_setting

        output, http_response = (
            capo_quicksight._operations.quick_sight_20180401.update_dlp_setting.update_dlp_setting(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateDlpSetting")
    )
    input_: capo_quicksight.types.update_dlp_setting_request.UpdateDlpSettingRequest = {
        "aws_account_id": aws_account_id,
        "dlp_setting_id": dlp_setting_id,
    }
    if name is not None:
        input_["name"] = name
    if provider_type is not None:
        input_["provider_type"] = provider_type
    if provider_config is not None:
        input_["provider_config"] = provider_config
    if provider_outage_action is not None:
        input_["provider_outage_action"] = provider_outage_action
    if enabled is not None:
        input_["enabled"] = enabled

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