We are excited to announce our new API Documentation.
Protected
Returns a list of all CloudWatch Logs account policies in the account.
Use a bare-bones client and the command you need to make an API call.
import { CloudWatchLogsClient, DescribeAccountPoliciesCommand } from "@aws-sdk/client-cloudwatch-logs"; // ES Modules import// const { CloudWatchLogsClient, DescribeAccountPoliciesCommand } = require("@aws-sdk/client-cloudwatch-logs"); // CommonJS importconst client = new CloudWatchLogsClient(config);const input = { // DescribeAccountPoliciesRequest policyType: "DATA_PROTECTION_POLICY", // required policyName: "STRING_VALUE", accountIdentifiers: [ // AccountIds "STRING_VALUE", ],};const command = new DescribeAccountPoliciesCommand(input);const response = await client.send(command);// { // DescribeAccountPoliciesResponse// accountPolicies: [ // AccountPolicies// { // AccountPolicy// policyName: "STRING_VALUE",// policyDocument: "STRING_VALUE",// lastUpdatedTime: Number("long"),// policyType: "DATA_PROTECTION_POLICY",// scope: "ALL",// accountId: "STRING_VALUE",// },// ],// };
DescribeAccountPoliciesCommandInput
DescribeAccountPoliciesCommandOutput
input
response
config
InvalidParameterException (client fault)
A parameter is specified incorrectly.
OperationAbortedException (client fault)
Multiple concurrent requests to update the same resource were in conflict.
ResourceNotFoundException (client fault)
The specified resource does not exist.
ServiceUnavailableException (server fault)
The service cannot complete the request.
CloudWatchLogsServiceException
Base exception class for all service exceptions from CloudWatchLogs service.
Readonly
Static
Returns a list of all CloudWatch Logs account policies in the account.
Example
Use a bare-bones client and the command you need to make an API call.
Param
DescribeAccountPoliciesCommandInput
Returns
DescribeAccountPoliciesCommandOutput
See
input
shape.response
shape.config
shape.Throws
InvalidParameterException (client fault)
A parameter is specified incorrectly.
Throws
OperationAbortedException (client fault)
Multiple concurrent requests to update the same resource were in conflict.
Throws
ResourceNotFoundException (client fault)
The specified resource does not exist.
Throws
ServiceUnavailableException (server fault)
The service cannot complete the request.
Throws
CloudWatchLogsServiceException
Base exception class for all service exceptions from CloudWatchLogs service.