Skip to content

start_assessment_report_export async

start_assessment_report_export(
    environment_arn: EnvironmentArn,
    project: ProjectName,
    framework: FrameworkName,
    framework_version: FrameworkVersion,
    *,
    config_overrides: Optional[AsyncAssuranceClientConfig] = None,
    control_ids: Optional[AssessmentReportControlIdList] = None,
) -> StartAssessmentReportExportOutput

Starts preparing an assessment report for a framework in a project. To check progress, call GetAssessmentReportExport until the export status is COMPLETED. Then call GetAssessmentReportContent to get the report.

If an export for the same scope is already in progress, this operation returns the identifier of that export instead of starting a new one.

Parameters:

Raises:

Examples:

Start an assessment report export

>>> await client.start_assessment_report_export(environment_arn='arn:aws:assurance:us-east-1:111122223333:environment/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111', project='payments-prod', framework='AWS:PCI-DSS', framework_version='4', control_ids=['8.2.1'])
Source code in docs_src/capo_assurance/_services/async_assurance.py
async def start_assessment_report_export(
    self,
    environment_arn: "capo_assurance.types.environment_arn.EnvironmentArn",
    project: "capo_assurance.types.project_name.ProjectName",
    framework: "capo_assurance.types.framework_name.FrameworkName",
    framework_version: "capo_assurance.types.framework_version.FrameworkVersion",
    *,
    config_overrides: Optional[AsyncAssuranceClientConfig] = None,
    control_ids: Optional[
        "capo_assurance.types.assessment_report_control_id_list.AssessmentReportControlIdList"
    ] = None,
) -> "capo_assurance.types.start_assessment_report_export_output.StartAssessmentReportExportOutput":
    """<p>Starts preparing an assessment report for a framework in a project. To check progress, call <code>GetAssessmentReportExport</code> until the export status is <code>COMPLETED</code>. Then call <code>GetAssessmentReportContent</code> to get the report.</p> <p>If an export for the same scope is already in progress, this operation returns the identifier of that export instead of starting a new one.</p>

    Args:
        environment_arn: <p>The ARN of the environment.</p>
        project: <p>The project the request is scoped to.</p>
        framework: <p>The name of the framework to report on.</p>
        framework_version: <p>The version of the framework.</p>
        control_ids: <p>The control to include in the report. To report on the whole framework, omit this parameter.</p>

    Raises:
        capo_assurance.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action. This error occurs when the request is unauthenticated, or is authenticated but lacks permission to invoke the operation.</p>
        capo_assurance.errors.conflict_exception.ConflictException: <p>A conflict occurred (for example, resource already exists).</p>
        capo_assurance.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred.</p>
        capo_assurance.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</p>
        capo_assurance.errors.throttling_exception.ThrottlingException: <p>The request was throttled.</p>
        capo_assurance.errors.validation_exception.ValidationException: <p>The request failed validation.</p>
        capo_assurance.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Start an assessment report export

        >>> await client.start_assessment_report_export(environment_arn='arn:aws:assurance:us-east-1:111122223333:environment/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111', project='payments-prod', framework='AWS:PCI-DSS', framework_version='4', control_ids=['8.2.1'])
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_assurance.types.start_assessment_report_export_input.StartAssessmentReportExportInput]",
    ) -> AsyncOperationResponse[
        "capo_assurance.types.start_assessment_report_export_output.StartAssessmentReportExportOutput"
    ]:
        import capo_assurance._operations.assurance.start_assessment_report_export

        (
            output,
            http_response,
        ) = await capo_assurance._operations.assurance.start_assessment_report_export.async_start_assessment_report_export(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartAssessmentReportExport")
    )
    input_: capo_assurance.types.start_assessment_report_export_input.StartAssessmentReportExportInput = {
        "environment_arn": environment_arn,
        "project": project,
        "framework": framework,
        "framework_version": framework_version,
    }
    if control_ids is not None:
        input_["control_ids"] = control_ids

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output