Skip to content

get_sensitive_data_occurrences_availability async

get_sensitive_data_occurrences_availability(
    finding_id: __string, *, config_overrides: Optional[AsyncMacie2ClientConfig] = None
) -> GetSensitiveDataOccurrencesAvailabilityResponse

Checks whether occurrences of sensitive data can be retrieved for a finding.

Parameters:

  • finding_id (__string) –

    The unique identifier for the finding.

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.

  • 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 get_sensitive_data_occurrences_availability(
    self,
    finding_id: "capo_macie2.types.__string.__string",
    *,
    config_overrides: Optional[AsyncMacie2ClientConfig] = None,
) -> "capo_macie2.types.get_sensitive_data_occurrences_availability_response.GetSensitiveDataOccurrencesAvailabilityResponse":
    """<p>Checks whether occurrences of sensitive data can be retrieved for a finding.</p>

    Args:
        finding_id: <p>The unique identifier for the finding.</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.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_macie2.types.get_sensitive_data_occurrences_availability_request.GetSensitiveDataOccurrencesAvailabilityRequest]",
    ) -> AsyncOperationResponse[
        "capo_macie2.types.get_sensitive_data_occurrences_availability_response.GetSensitiveDataOccurrencesAvailabilityResponse"
    ]:
        import capo_macie2._operations.macie2.get_sensitive_data_occurrences_availability

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

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetSensitiveDataOccurrencesAvailability"),
    )
    input_: capo_macie2.types.get_sensitive_data_occurrences_availability_request.GetSensitiveDataOccurrencesAvailabilityRequest = {
        "finding_id": finding_id
    }

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