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 set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is 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.InternalServerException

  • ResilienceHubV2.Client.exceptions.ResourceNotFoundException

  • ResilienceHubV2.Client.exceptions.ValidationException

  • ResilienceHubV2.Client.exceptions.ConflictException

  • ResilienceHubV2.Client.exceptions.ThrottlingException

  • ResilienceHubV2.Client.exceptions.AccessDeniedException