Get the status of an audit

This page describes how to get the status of an in-progress Audit Manager audit. Audits are long-running operations, and it can be helpful to get the status of an audit while the operation is running.

Before you begin

Required IAM roles

To get the status of a in-progress or completed audit, you must be granted the Audit Manager Admin (roles/auditmanager.admin) or Audit Manager Auditor (roles/auditmanager.auditor) role. These roles grant you the ability to generate an audit scope, and to create or view audit reports.

See the IAM documentation for more information about granting roles.

Get the status of an in-progress audit

To get the status of an in-progress audit, complete the following steps.

Console

  1. In the Google Cloud console, go to the Audit Manager page.

    Go to Audit Manager

  2. In the Compliance Audits section, click View Audits.

  3. On the View assessments page, you can view the current status of an in-progress audit or get more information about a completed audit. Click the link the Status column to view more information about the audit.

gcloud

Replace the following placeholder values with your own before you run the command:

  • RESOURCE_TYPE: The type of resource, either a project or a folder. For example: folder
  • RESOURCE_ID: The resource ID of the project or folder. For example: 8767234
  • AUDIT_OPERATION_ID: The unique ID for the in-progress operation, which was included in the response body when you ran the audit. For example: 098234
  • LOCATION: The location of the Audit Manager API endpoint. See Locations for a list of available endpoints. For example: us-central1
gcloud alpha audit-manager operations describe AUDIT_OPERATION_ID \
  --RESOURCE_TYPE=RESOURCE_ID \
  --location=LOCATION

REST

Replace the following placeholder values with your own before you make the request:

  • RESOURCE_TYPE: The type of resource, either a project or a folder. For example: folders
  • RESOURCE_ID: The resource ID of the project or folder. For example: 8767234
  • LOCATION: The location of the Audit Manager API endpoint. See Locations for a list of available endpoints. For example: us-central1
  • AUDIT_OPERATION_ID: The unique ID for the in-progress operation, which was included in the response body when you ran the audit. For example: 098234

HTTP method and URL:

GET: https://auditmanager.googleapis.com/v1alpha/RESOURCE_TYPE/RESOURCE_ID/locations/LOCATION/operationDetails/AUDIT_OPERATION_ID

The request body is blank.

If successful, the response includes the one of the following execution status types:

  • OPERATION_STATE_UNSPECIFIED: An invalid state.
  • OPERATION_STATE_NOT_STARTED: The audit report generation process has not yet started.
  • OPERATION_STATE_EVALUATION_IN_PROGRESS: Audit Manager is evaluating the resources against compliance controls.
  • OPERATION_STATE_EVALUATION_DONE: Audit Manager has completed compliance evaluation.
  • OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS: Audit Manager is creating an audit report from the evaluated data.
  • OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE: Audit Manager has completed the generation of the audit report.
  • OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS: Audit Manager is uploading the audit report and evidence to the customer provided destination.
  • OPERATION_STATE_DONE: The audit report generation process is completed.
  • OPERATION_STATE_FAILED: The audit report generation process has failed.

Additional information may be provided for each of the execution status types, when applicable:

  • failure_reason: If the audit assessment fails for some reason, this field will provide the reason for the failure.
  • evaluation_percent_complete: If evaluation has started, this field provides the percentage of progress made. The field starts at 0 if the process has not started, and will be set to 100 if it has concluded.
  • report_generation_percent_complete: If report generation has started, this field provides percentage of progress made. The field starts at 0 if the process has not started, and will be set to 100 if it has concluded.
  • report_uploading_percent_complete: If report uploading has started, this field provides percentage of progress made. The field starts at 0 if the process has not started, and will be set to 100 if it has concluded.

When an audit report has been completed and uploaded, a link to the report will be returned.

What's next