Skip to main content

declarative_policies_reports

Creates, updates, deletes, gets or lists a declarative_policies_reports resource.

Overview

Namedeclarative_policies_reports
TypeResource
Idaws.ec2.declarative_policies_reports

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
end_timestringThe time when the report generation ended.
report_idstringThe ID of the report.
s3_bucketstringThe name of the Amazon S3 bucket where the report is located.
s3_prefixstringThe prefix for your S3 object.
start_timestringThe time when the report generation started.
statusstringThe current status of the report.
tagsstringAny tags assigned to the report.
target_idstringThe root ID, organizational unit ID, or account ID. Format: For root: r-ab12 For OU: ou-ab12-cdef1234 For account: 123456789012

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_declarative_policies_reportsselectregionDryRun, NextToken, MaxResults, ReportIdDescribes the metadata of an account status report, including the status of the report. To view the full report, download it from the Amazon S3 bucket where it was saved. Reports are accessible only when they have the complete status. Reports with other statuses (running, cancelled, or error) are not available in the S3 bucket. For more information about downloading objects from an S3 bucket, see Downloading objects in the Amazon Simple Storage Service User Guide. For more information, see Generating the account status report for declarative policies in the Amazon Web Services Organizations User Guide.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
DryRunbooleanChecks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
MaxResultsintegerThe maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.
NextTokenstringThe token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.
ReportIdarrayOne or more report IDs.

SELECT examples

Describes the metadata of an account status report, including the status of the report. To view the full report, download it from the Amazon S3 bucket where it was saved. Reports are accessible only when they have the complete status. Reports with other statuses (running, cancelled, or error) are not available in the S3 bucket. For more information about downloading objects from an S3 bucket, see Downloading objects in the Amazon Simple Storage Service User Guide. For more information, see Generating the account status report for declarative policies in the Amazon Web Services Organizations User Guide.

SELECT
end_time,
report_id,
s3_bucket,
s3_prefix,
start_time,
status,
tags,
target_id
FROM aws.ec2.declarative_policies_reports
WHERE region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
AND ReportId = '{{ ReportId }}'
;