CloudWatchLogsClient.put_data_protection_policy
rboto-cloudwatch-logs==0.4.0 · Service index · Types
Model summary (excerpt): Creates a data protection policy for the specified log group. A data protection policy can help safeguard sensitive data that's ingested by the log group by auditing and masking the sensitive log data. Sensitive data is detected and masked when it is ingested into the log group. When you set a data protection policy, log events ingested into the log group before that time are not masked. By...
Install and imports
from rboto import CloudWatchLogsClient
from rboto_cloudwatch_logs.types import (
PutDataProtectionPolicyOutput,
)
Signature
async def put_data_protection_policy(
*,
log_group_identifier: str,
policy_document: str,
) -> PutDataProtectionPolicyOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
log_group_identifier |
Yes | Specify either the log group name or log group ARN. |
policy_document |
Yes | Specify the data protection policy, in JSON. This policy must include two JSON blocks: The first block must include both a DataIdentifer array and an Operation property with an Audit action. The DataIdentifer array lists the types of sensitive data that you want to mask. For more information about the available options, see Types of data that you can mask . The Operation property with an Audit... |
Output
PutDataProtectionPolicyOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
log_group_identifier |
str | None |
Always present | — |
policy_document |
str | None |
Always present | — |
last_updated_time |
int | None |
Always present | — |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_cloudwatch_logs.exceptions:
InvalidParameterError, LimitExceededError, OperationAbortedError, ResourceNotFoundError, ServiceUnavailableError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.