Retrieves a summary of the account status 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:
-
dry_run
(Optional[Boolean], default:
None
)
–
Checks 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.
-
report_id
(Optional[DeclarativePoliciesReportId], default:
None
)
–
Raises:
Source code in docs_src/capo_ec2/_services/ec2.py
| def get_declarative_policies_report_summary(
self,
*,
config_overrides: Optional[EC2ClientConfig] = None,
dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
report_id: Optional[
"capo_ec2.types.declarative_policies_report_id.DeclarativePoliciesReportId"
] = None,
) -> "capo_ec2.types.get_declarative_policies_report_summary_result.GetDeclarativePoliciesReportSummaryResult":
"""<p>Retrieves a summary of the account status report.</p> <p>To view the full report, download it from the Amazon S3 bucket where it was saved. Reports are accessible only when they have the <code>complete</code> status. Reports with other statuses (<code>running</code>, <code>cancelled</code>, or <code>error</code>) are not available in the S3 bucket. For more information about downloading objects from an S3 bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/download-objects.html">Downloading objects</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative_status-report.html">Generating the account status report for declarative policies</a> in the <i>Amazon Web Services Organizations User Guide</i>.</p>
Args:
dry_run: <p>Checks 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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
report_id: <p>The ID of the report.</p>
Raises:
capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_ec2.types.get_declarative_policies_report_summary_request.GetDeclarativePoliciesReportSummaryRequest]",
) -> OperationResponse[
"capo_ec2.types.get_declarative_policies_report_summary_result.GetDeclarativePoliciesReportSummaryResult"
]:
import capo_ec2._operations.amazon_ec2.get_declarative_policies_report_summary
output, http_response = (
capo_ec2._operations.amazon_ec2.get_declarative_policies_report_summary.get_declarative_policies_report_summary(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetDeclarativePoliciesReportSummary")
)
input_: capo_ec2.types.get_declarative_policies_report_summary_request.GetDeclarativePoliciesReportSummaryRequest = {}
if dry_run is not None:
input_["dry_run"] = dry_run
if report_id is not None:
input_["report_id"] = report_id
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|