Skip to content

list_classification_scopes async

list_classification_scopes(
    *,
    config_overrides: Optional[AsyncMacie2ClientConfig] = None,
    name: Optional[__string] = None,
    next_token: Optional[__string] = None,
) -> ListClassificationScopesResponse

Retrieves a subset of information about the classification scope for an account.

Parameters:

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

    The name of the classification scope to retrieve the unique identifier for.

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

    The nextToken string that specifies which page of results to return in a paginated response.

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.

  • 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 list_classification_scopes(
    self,
    *,
    config_overrides: Optional[AsyncMacie2ClientConfig] = None,
    name: Optional["capo_macie2.types.__string.__string"] = None,
    next_token: Optional["capo_macie2.types.__string.__string"] = None,
) -> "capo_macie2.types.list_classification_scopes_response.ListClassificationScopesResponse":
    """<p>Retrieves a subset of information about the classification scope for an account.</p>

    Args:
        name: <p>The name of the classification scope to retrieve the unique identifier for.</p>
        next_token: <p>The nextToken string that specifies which page of results to return in a paginated response.</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.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.list_classification_scopes_request.ListClassificationScopesRequest]",
    ) -> AsyncOperationResponse[
        "capo_macie2.types.list_classification_scopes_response.ListClassificationScopesResponse"
    ]:
        import capo_macie2._operations.macie2.list_classification_scopes

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListClassificationScopes")
    )
    input_: capo_macie2.types.list_classification_scopes_request.ListClassificationScopesRequest = {}
    if name is not None:
        input_["name"] = name
    if next_token is not None:
        input_["next_token"] = next_token

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