Changes the status of automated sensitive data discovery for one or more accounts.
Parameters:
-
accounts
(Optional[__listOfAutomatedDiscoveryAccountUpdate], default:
None
)
–
An array of objects, one for each account to change the status of automated sensitive data discovery for. Each object specifies the Amazon Web Services account ID for an account and a new status for that account.
Raises:
-
AccessDeniedException
–
Provides information about an error that occurred due to insufficient access to a specified resource.
-
ConflictException
–
Provides information about an error that occurred due to a versioning conflict for 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 batch_update_automated_discovery_accounts(
self,
*,
config_overrides: Optional[AsyncMacie2ClientConfig] = None,
accounts: Optional[
"capo_macie2.types.__list_of_automated_discovery_account_update.__listOfAutomatedDiscoveryAccountUpdate"
] = None,
) -> "capo_macie2.types.batch_update_automated_discovery_accounts_response.BatchUpdateAutomatedDiscoveryAccountsResponse":
"""<p>Changes the status of automated sensitive data discovery for one or more accounts.</p>
Args:
accounts: <p>An array of objects, one for each account to change the status of automated sensitive data discovery for. Each object specifies the Amazon Web Services account ID for an account and a new status for that account.</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.conflict_exception.ConflictException: <p>Provides information about an error that occurred due to a versioning conflict for 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.batch_update_automated_discovery_accounts_request.BatchUpdateAutomatedDiscoveryAccountsRequest]",
) -> AsyncOperationResponse[
"capo_macie2.types.batch_update_automated_discovery_accounts_response.BatchUpdateAutomatedDiscoveryAccountsResponse"
]:
import capo_macie2._operations.macie2.batch_update_automated_discovery_accounts
(
output,
http_response,
) = await capo_macie2._operations.macie2.batch_update_automated_discovery_accounts.async_batch_update_automated_discovery_accounts(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("BatchUpdateAutomatedDiscoveryAccounts")
)
input_: capo_macie2.types.batch_update_automated_discovery_accounts_request.BatchUpdateAutomatedDiscoveryAccountsRequest = {}
if accounts is not None:
input_["accounts"] = accounts
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|