Deletes the data protection policy from the specified log group.
For more information about data protection policies, see PutDataProtectionPolicy.
Parameters:
-
log_group_identifier
(LogGroupIdentifier)
–
The name or ARN of the log group that you want to delete the data protection policy for.
Raises:
Source code in docs_src/capo_cloudwatch_logs/_services/cloud_watch_logs.py
| def delete_data_protection_policy(
self,
log_group_identifier: "capo_cloudwatch_logs.types.log_group_identifier.LogGroupIdentifier",
*,
config_overrides: Optional[CloudWatchLogsClientConfig] = None,
) -> None:
"""<p>Deletes the data protection policy from the specified log group. </p> <p>For more information about data protection policies, see <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html">PutDataProtectionPolicy</a>.</p>
Args:
log_group_identifier: <p>The name or ARN of the log group that you want to delete the data protection policy for.</p>
Raises:
capo_cloudwatch_logs.errors.invalid_parameter_exception.InvalidParameterException: <p>A parameter is specified incorrectly.</p>
capo_cloudwatch_logs.errors.operation_aborted_exception.OperationAbortedException: <p>Multiple concurrent requests to update the same resource were in conflict.</p>
capo_cloudwatch_logs.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
capo_cloudwatch_logs.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service cannot complete the request.</p>
capo_cloudwatch_logs.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_cloudwatch_logs.types.delete_data_protection_policy_request.DeleteDataProtectionPolicyRequest]",
) -> OperationResponse[None]:
import capo_cloudwatch_logs._operations.logs_20140328.delete_data_protection_policy
output, http_response = (
capo_cloudwatch_logs._operations.logs_20140328.delete_data_protection_policy.delete_data_protection_policy(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteDataProtectionPolicy")
)
input_: capo_cloudwatch_logs.types.delete_data_protection_policy_request.DeleteDataProtectionPolicyRequest = {
"log_group_identifier": log_group_identifier
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|