describe_account_policies
async
¶
describe_account_policies(
policy_type: PolicyType,
*,
config_overrides: Optional[AsyncCloudWatchLogsClientConfig] = 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/async_cloud_watch_logs.py
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 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 | |