describe_account_policies
¶
describe_account_policies(
policy_type: PolicyType,
*,
config_overrides: Optional[CloudWatchLogsClientConfig] = None,
policy_name: Optional[PolicyName] = None,
account_identifiers: Optional[AccountIds] = None,
next_token: Optional[NextToken] = None,
) -> DescribeAccountPoliciesResponse
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:GetDataProtectionPolicyandlogs:DescribeAccountPoliciespermissions. -
To see subscription filter policies, you must have the
logs:DescribeSubscriptionFiltersandlogs:DescribeAccountPoliciespermissions. -
To see transformer policies, you must have the
logs:GetTransformerandlogs:DescribeAccountPoliciespermissions. -
To see field index policies, you must have the
logs:DescribeIndexPoliciesandlogs:DescribeAccountPoliciespermissions.
Parameters:
-
policy_type(PolicyType) –Use this parameter to limit the returned policies to only the policies that match the policy type that you specify.
-
policy_name(Optional[PolicyName], default:None) –Use this parameter to limit the returned policies to only the policy with the name that you specify.
-
account_identifiers(Optional[AccountIds], default:None) –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.
-
next_token(Optional[NextToken], default:None) –The token for the next set of items to return. (You received this token from a previous call.)
Raises:
-
InvalidParameterException–A parameter is specified incorrectly.
-
OperationAbortedException–Multiple concurrent requests to update the same resource were in conflict.
-
ResourceNotFoundException–The specified resource does not exist.
-
ServiceUnavailableException–The service cannot complete the request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_cloudwatch_logs/_services/cloud_watch_logs.py
2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 | |