ResilienceHubV2 / Client / create_report
create_report¶
- ResilienceHubV2.Client.create_report(**kwargs)¶
On-demand report creation. Idempotent — duplicate requests with same clientToken return existing result.
See also: AWS API Documentation
Request Syntax
response = client.create_report( serviceArn='string', reportType='FAILURE_MODE', clientToken='string' )
- Parameters:
serviceArn (string) –
[REQUIRED]
ARN identifier.
reportType (string) –
[REQUIRED]
The type of report to generate.
clientToken (string) –
Idempotency token.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'reportGenerationResult': { 'reportType': 'FAILURE_MODE', 'status': 'PENDING'|'SUCCEEDED'|'FAILED', 'serviceArn': 'string', 'assessmentId': 'string', 'createdAt': datetime(2015, 1, 1), 'reportOutput': { 's3ReportOutput': { 's3ObjectKey': 'string' }, 'failedReportOutput': { 'errorCode': 'INSUFFICIENT_PERMISSIONS'|'CONFIGURATION_ERROR'|'INTERNAL_ERROR', 'errorMessage': 'string' } } } }
Response Structure
(dict) –
reportGenerationResult (dict) –
The result of the report generation request.
reportType (string) –
The type of the generated report.
status (string) –
The status of the report generation.
serviceArn (string) –
The service this report was generated for.
assessmentId (string) –
Present for FAILURE_MODE reports.
createdAt (datetime) –
The timestamp when the report was created.
reportOutput (dict) –
Present when status is SUCCEEDED or FAILED.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
s3ReportOutput,failedReportOutput. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
s3ReportOutput (dict) –
The S3 location where the report was written.
s3ObjectKey (string) –
The S3 object key for the generated report.
failedReportOutput (dict) –
Details when report generation failed.
errorCode (string) –
The error code describing why the report generation failed.
errorMessage (string) –
The error message describing why the report generation failed.
Exceptions
ResilienceHubV2.Client.exceptions.InternalServerExceptionResilienceHubV2.Client.exceptions.ResourceNotFoundExceptionResilienceHubV2.Client.exceptions.ValidationExceptionResilienceHubV2.Client.exceptions.ConflictExceptionResilienceHubV2.Client.exceptions.ThrottlingExceptionResilienceHubV2.Client.exceptions.AccessDeniedException