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/macie2.py
| def list_classification_scopes(
self,
*,
config_overrides: Optional[Macie2ClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_macie2.types.list_classification_scopes_request.ListClassificationScopesRequest]",
) -> OperationResponse[
"capo_macie2.types.list_classification_scopes_response.ListClassificationScopesResponse"
]:
import capo_macie2._operations.macie2.list_classification_scopes
output, http_response = (
capo_macie2._operations.macie2.list_classification_scopes.list_classification_scopes(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|