Skip to content

CloudWatchLogsClient.delete_account_policy

rboto-cloudwatch-logs==0.4.0 · Service index · Types

Model summary (excerpt): Deletes a CloudWatch Logs account policy. This stops the account-wide policy from applying to log groups or data sources in the account. If you delete a data protection policy or subscription filter policy, any log-group level policies of those types remain in effect. If you delete a retention policy, the log groups that it applied to use their own retention setting, unless another retention...

Install and imports

python -m pip install "rboto[cloudwatch-logs]==0.4.0"
from rboto import CloudWatchLogsClient
from rboto_cloudwatch_logs.types import (
    DeleteAccountPolicyOutput,
    PolicyType,
)

Signature

async def delete_account_policy(
    *,
    policy_name: str,
    policy_type: PolicyType,
    dry_run: bool | None = None,
) -> DeleteAccountPolicyOutput: ...

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)
policy_name Yes The name of the policy to delete.
policy_type Yes The type of policy to delete.
dry_run No Specifies whether to preview the impact of deleting the policy without deleting it. If you specify true , CloudWatch Logs does not delete the policy and returns the estimated impact in dryRunResult . The default is false . Specifying dryRun is valid only when you specify RETENTION_POLICY for policyType . Only one dry run can be in progress for an account at a time.

Output

DeleteAccountPolicyOutput.

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
dry_run_result DryRunResultOutput | None Always present DryRunResultOutput

| 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.

DeleteAccountPolicyOutput, PolicyType

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, OperationAbortedError, ResourceNotFoundError, ServiceUnavailableError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model