Updates the classification scope settings for an account.
Parameters:
-
id
(__string)
–
The unique identifier for the Amazon Macie resource that the request applies to.
-
s3
(Optional[S3ClassificationScopeUpdate], default:
None
)
–
The S3 buckets to add or remove from the exclusion list defined by the classification scope.
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 update_classification_scope(
self,
id: "capo_macie2.types.__string.__string",
*,
config_overrides: Optional[AsyncMacie2ClientConfig] = None,
s3: Optional[
"capo_macie2.types.s3_classification_scope_update.S3ClassificationScopeUpdate"
] = None,
) -> "capo_macie2.types.update_classification_scope_response.UpdateClassificationScopeResponse":
"""<p>Updates the classification scope settings for an account.</p>
Args:
id: <p>The unique identifier for the Amazon Macie resource that the request applies to.</p>
s3: <p>The S3 buckets to add or remove from the exclusion list defined by the classification scope.</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.update_classification_scope_request.UpdateClassificationScopeRequest]",
) -> AsyncOperationResponse[
"capo_macie2.types.update_classification_scope_response.UpdateClassificationScopeResponse"
]:
import capo_macie2._operations.macie2.update_classification_scope
(
output,
http_response,
) = await capo_macie2._operations.macie2.update_classification_scope.async_update_classification_scope(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateClassificationScope")
)
input_: capo_macie2.types.update_classification_scope_request.UpdateClassificationScopeRequest = {
"id": id
}
if s3 is not None:
input_["s3"] = s3
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|