Describe Account Policies
cloudwatchlogs_describe_account_policies | R Documentation |
Returns a list of all CloudWatch Logs account policies in the account¶
Description¶
Returns a list of all CloudWatch Logs account policies in the account.
To use this operation, you must be signed on with the correct permissions depending on the type of policy that you are retrieving information for.
-
To see data protection policies, you must have the
logs:GetDataProtectionPolicy
andlogs:DescribeAccountPolicies
permissions. -
To see subscription filter policies, you must have the
logs:DescrubeSubscriptionFilters
andlogs:DescribeAccountPolicies
permissions. -
To see transformer policies, you must have the
logs:GetTransformer
andlogs:DescribeAccountPolicies
permissions. -
To see field index policies, you must have the
logs:DescribeIndexPolicies
andlogs:DescribeAccountPolicies
permissions.
Usage¶
Arguments¶
policyType
[required] Use this parameter to limit the returned policies to only the policies that match the policy type that you specify.
policyName
Use this parameter to limit the returned policies to only the policy with the name that you specify.
accountIdentifiers
If you are using an account that is set up as a monitoring account for CloudWatch unified cross-account observability, you can use this to specify the account ID of a source account. If you do, the operation returns the account policy for the specified account. Currently, you can specify only one account ID in this parameter.
If you omit this parameter, only the policy in the current account is returned.
nextToken
The token for the next set of items to return. (You received this token from a previous call.)
Value¶
A list with the following syntax:
list(
accountPolicies = list(
list(
policyName = "string",
policyDocument = "string",
lastUpdatedTime = 123,
policyType = "DATA_PROTECTION_POLICY"|"SUBSCRIPTION_FILTER_POLICY"|"FIELD_INDEX_POLICY"|"TRANSFORMER_POLICY",
scope = "ALL",
selectionCriteria = "string",
accountId = "string"
)
),
nextToken = "string"
)