Skip to content

create_dlp_setting async

create_dlp_setting(
    aws_account_id: AwsAccountId,
    dlp_setting_id: DlpSettingId,
    name: DlpSettingName,
    provider_type: DlpProviderType,
    provider_config: ProviderConfig,
    provider_outage_action: DlpAction,
    enabled: Boolean,
    *,
    config_overrides: Optional[AsyncQuickSightClientConfig] = None,
    tags: Optional[TagList] = None,
) -> CreateDlpSettingResponse

Creates a data loss prevention (DLP) setting configuration for an Amazon Web Services account. A DLP setting defines the DLP provider, the enforcement behavior, and the Quick capabilities that the setting applies to.

Parameters:

  • aws_account_id (AwsAccountId) –

    The ID of the Amazon Web Services account in which to create the DLP setting.

  • dlp_setting_id (DlpSettingId) –

    A unique identifier for the DLP setting.

  • name (DlpSettingName) –

    A human-readable display name for the DLP setting.

  • provider_type (DlpProviderType) –

    The type of external DLP provider to use for sensitivity label classification. Currently, the only supported value is MICROSOFT_PURVIEW.

  • provider_config (ProviderConfig) –

    The 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 (DlpAction) –

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

  • enabled (Boolean) –

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

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

    A list of resource tags to apply to the DLP setting. You can use tags to manage access to your Amazon Web Services resources.

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.

  • LimitExceededException –

    A limit is exceeded.

  • ResourceExistsException –

    The resource specified already exists.

  • ThrottlingException –

    Access is throttled.

  • UnknownServiceError –

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

Source code in docs_src/capo_quicksight/_services/async_quick_sight.py
async def create_dlp_setting(
    self,
    aws_account_id: "capo_quicksight.types.aws_account_id.AwsAccountId",
    dlp_setting_id: "capo_quicksight.types.dlp_setting_id.DlpSettingId",
    name: "capo_quicksight.types.dlp_setting_name.DlpSettingName",
    provider_type: "capo_quicksight.types.dlp_provider_type.DlpProviderType",
    provider_config: "capo_quicksight.types.provider_config.ProviderConfig",
    provider_outage_action: "capo_quicksight.types.dlp_action.DlpAction",
    enabled: "capo_quicksight.types.boolean.Boolean",
    *,
    config_overrides: Optional[AsyncQuickSightClientConfig] = None,
    tags: Optional["capo_quicksight.types.tag_list.TagList"] = None,
) -> "capo_quicksight.types.create_dlp_setting_response.CreateDlpSettingResponse":
    """<p>Creates a data loss prevention (DLP) setting configuration for an Amazon Web Services account. A DLP setting defines the DLP provider, the enforcement behavior, and the Quick capabilities that the setting applies to.</p>

    Args:
        aws_account_id: <p>The ID of the Amazon Web Services account in which to create the DLP setting.</p>
        dlp_setting_id: <p>A unique identifier for the DLP setting.</p>
        name: <p>A human-readable display name for the DLP setting.</p>
        provider_type: <p>The type of external DLP provider to use for sensitivity label classification. Currently, the only supported value is <code>MICROSOFT_PURVIEW</code>.</p>
        provider_config: <p>The 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>The 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 at time of setting creation.</p>
        tags: <p>A list of resource tags to apply to the DLP setting. You can use tags to manage access to your Amazon Web Services resources.</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.limit_exceeded_exception.LimitExceededException: <p>A limit is exceeded.</p>
        capo_quicksight.errors.resource_exists_exception.ResourceExistsException: <p>The resource specified already exists. </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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_quicksight.types.create_dlp_setting_request.CreateDlpSettingRequest]",
    ) -> AsyncOperationResponse[
        "capo_quicksight.types.create_dlp_setting_response.CreateDlpSettingResponse"
    ]:
        import capo_quicksight._operations.quick_sight_20180401.create_dlp_setting

        (
            output,
            http_response,
        ) = await capo_quicksight._operations.quick_sight_20180401.create_dlp_setting.async_create_dlp_setting(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

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

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