Suspends or re-enables Amazon Macie, or updates the configuration settings for a Macie account.
Parameters:
-
finding_publishing_frequency
(Optional[FindingPublishingFrequency], default:
None
)
–
Specifies how often to publish updates to policy findings for the account. This includes publishing updates to Security Hub and Amazon EventBridge (formerly Amazon CloudWatch Events).
-
status
(Optional[MacieStatus], default:
None
)
–
Specifies a new status for the account. Valid values are: ENABLED, resume all Amazon Macie activities for the account; and, PAUSED, suspend all Macie activities for the 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.
-
ResourceNotFoundException
–
Provides information about an error that occurred because a specified resource wasn't found.
-
ServiceQuotaExceededException
–
Provides information about an error that occurred due to one or more service quotas for an account.
-
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 update_macie_session(
self,
*,
config_overrides: Optional[Macie2ClientConfig] = None,
finding_publishing_frequency: Optional[
"capo_macie2.types.finding_publishing_frequency.FindingPublishingFrequency"
] = None,
status: Optional["capo_macie2.types.macie_status.MacieStatus"] = None,
) -> "capo_macie2.types.update_macie_session_response.UpdateMacieSessionResponse":
"""<p>Suspends or re-enables Amazon Macie, or updates the configuration settings for a Macie account.</p>
Args:
finding_publishing_frequency: <p>Specifies how often to publish updates to policy findings for the account. This includes publishing updates to Security Hub and Amazon EventBridge (formerly Amazon CloudWatch Events).</p>
status: <p>Specifies a new status for the account. Valid values are: ENABLED, resume all Amazon Macie activities for the account; and, PAUSED, suspend all Macie activities for the 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.resource_not_found_exception.ResourceNotFoundException: <p>Provides information about an error that occurred because a specified resource wasn't found.</p>
capo_macie2.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Provides information about an error that occurred due to one or more service quotas for an account.</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.update_macie_session_request.UpdateMacieSessionRequest]",
) -> OperationResponse[
"capo_macie2.types.update_macie_session_response.UpdateMacieSessionResponse"
]:
import capo_macie2._operations.macie2.update_macie_session
output, http_response = (
capo_macie2._operations.macie2.update_macie_session.update_macie_session(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateMacieSession")
)
input_: capo_macie2.types.update_macie_session_request.UpdateMacieSessionRequest = {}
if finding_publishing_frequency is not None:
input_["finding_publishing_frequency"] = finding_publishing_frequency
if status is not None:
input_["status"] = status
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|