Skip to content

delete_allow_list async

delete_allow_list(
    id: __string,
    *,
    config_overrides: Optional[AsyncMacie2ClientConfig] = None,
    ignore_job_checks: Optional[__string] = None,
) -> DeleteAllowListResponse

Deletes an allow list.

Parameters:

  • id (__string) –

    The unique identifier for the Amazon Macie resource that the request applies to.

  • ignore_job_checks (Optional[__string], default: None ) –

    Specifies whether to force deletion of the allow list, even if active classification jobs are configured to use the list.

    When you try to delete an allow list, Amazon Macie checks for classification jobs that use the list and have a status other than COMPLETE or CANCELLED. By default, Macie rejects your request if any jobs meet these criteria. To skip these checks and delete the list, set this value to true. To delete the list only if no active jobs are configured to use it, set this value to false.

Raises:

  • AccessDeniedException –

    Provides information about an error that occurred due to insufficient access to a specified resource.

  • InternalServerException –

    Provides information about an error that occurred due to an unknown internal server error, exception, or failure.

  • ResourceNotFoundException –

    Provides information about an error that occurred because a specified resource wasn't found.

  • ThrottlingException –

    Provides information about an error that occurred because too many requests were sent during a certain amount of time.

  • ValidationException –

    Provides information about an error that occurred due to a syntax error in a request.

  • UnknownServiceError –

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

Source code in docs_src/capo_macie2/_services/async_macie2.py
async def delete_allow_list(
    self,
    id: "capo_macie2.types.__string.__string",
    *,
    config_overrides: Optional[AsyncMacie2ClientConfig] = None,
    ignore_job_checks: Optional["capo_macie2.types.__string.__string"] = None,
) -> "capo_macie2.types.delete_allow_list_response.DeleteAllowListResponse":
    """<p>Deletes an allow list.</p>

    Args:
        id: <p>The unique identifier for the Amazon Macie resource that the request applies to.</p>
        ignore_job_checks: <p>Specifies whether to force deletion of the allow list, even if active classification jobs are configured to use the list.</p> <p>When you try to delete an allow list, Amazon Macie checks for classification jobs that use the list and have a status other than COMPLETE or CANCELLED. By default, Macie rejects your request if any jobs meet these criteria. To skip these checks and delete the list, set this value to true. To delete the list only if no active jobs are configured to use it, set this value to false.</p>

    Raises:
        capo_macie2.errors.access_denied_exception.AccessDeniedException: <p>Provides information about an error that occurred due to insufficient access to a specified resource.</p>
        capo_macie2.errors.internal_server_exception.InternalServerException: <p>Provides information about an error that occurred due to an unknown internal server error, exception, or failure.</p>
        capo_macie2.errors.resource_not_found_exception.ResourceNotFoundException: <p>Provides information about an error that occurred because a specified resource wasn't found.</p>
        capo_macie2.errors.throttling_exception.ThrottlingException: <p>Provides information about an error that occurred because too many requests were sent during a certain amount of time.</p>
        capo_macie2.errors.validation_exception.ValidationException: <p>Provides information about an error that occurred due to a syntax error in a request.</p>
        capo_macie2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_macie2.types.delete_allow_list_request.DeleteAllowListRequest]",
    ) -> AsyncOperationResponse[
        "capo_macie2.types.delete_allow_list_response.DeleteAllowListResponse"
    ]:
        import capo_macie2._operations.macie2.delete_allow_list

        (
            output,
            http_response,
        ) = await capo_macie2._operations.macie2.delete_allow_list.async_delete_allow_list(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteAllowList")
    )
    input_: capo_macie2.types.delete_allow_list_request.DeleteAllowListRequest = {
        "id": id
    }
    if ignore_job_checks is not None:
        input_["ignore_job_checks"] = ignore_job_checks

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