קבלת סטטוס של ביקורת

בדף הזה מוסבר איך מקבלים את הסטטוס של ביקורת בתהליך ב-Audit Manager. ביקורות הן פעולות ממושכות, ולכן כדאי לקבל את הסטטוס של ביקורת בזמן שהפעולה מתבצעת.

לפני שמתחילים

  • מוודאים שיש לכם אחד מהתפקידים הבאים ב-IAM:

  • מאתרים את הביקורת שרוצים לקבל את הסטטוס שלה.

קבלת הסטטוס של ביקורת בתהליך

המסוף

  1. נכנסים לדף כלי לניהול ביקורות במסוף Google Cloud .

    מעבר אל הכלי לניהול ביקורות

  2. בקטע בדיקות תאימות, לוחצים על הצגת הבדיקות.

  3. בדף View assessments (הצגת הערכות) אפשר לראות את הסטטוס הנוכחי של ביקורת שנמצאת בתהליך, או לקבל מידע נוסף על ביקורת שהושלמה.

  4. כדי לראות מידע נוסף על הביקורת, לוחצים על הקישור בעמודה סטטוס.

gcloud

הפקודה gcloud audit-manager operations describe מתארת פעולת ביקורת.

לפני השימוש בנתוני הפקודה הבאים, צריך להחליף את הנתונים הבאים:

  • RESOURCE_TYPE: סוג המשאב, פרויקט או תיקייה. לדוגמה: folder.
  • RESOURCE_ID: מזהה המשאב של הפרויקט או התיקייה. לדוגמה: 8767234.
  • LOCATION: המיקום של נקודת הקצה של Audit Manager API. רשימה של נקודות הקצה הזמינות מופיעה בקטע מיקומים. לדוגמה: us-central1.
  • AUDIT_OPERATION_ID: המזהה הייחודי של הפעולה שנמצאת בתהליך, שנכלל בגוף התגובה כשמריצים את הביקורת. לדוגמה: 098234.

מריצים את הפקודה הבאה:

‫Linux,‏ macOS או Cloud Shell

gcloud audit-manager operations describe AUDIT_OPERATION_ID \
    --RESOURCE_TYPE=RESOURCE_ID \
    --location=LOCATION

‏Windows (PowerShell)

gcloud audit-manager operations describe AUDIT_OPERATION_ID `
    --RESOURCE_TYPE=RESOURCE_ID `
    --location=LOCATION

Windows‏ (cmd.exe)

gcloud audit-manager operations describe AUDIT_OPERATION_ID ^
    --RESOURCE_TYPE=RESOURCE_ID ^
    --location=LOCATION

REST

לפני שמשתמשים בנתוני הבקשה, צריך להחליף את הנתונים הבאים:

  • RESOURCE_TYPE: סוג המשאב, פרויקט או תיקייה. לדוגמה: folder.
  • RESOURCE_ID: מזהה המשאב של הפרויקט או התיקייה. לדוגמה: 8767234.
  • LOCATION: המיקום של נקודת הקצה של Audit Manager API. רשימה של נקודות הקצה הזמינות מופיעה בקטע מיקומים. לדוגמה: us-central1.
  • AUDIT_OPERATION_ID: המזהה הייחודי של הפעולה שנמצאת בתהליך, שנכלל בגוף התגובה כשמריצים את הביקורת. לדוגמה: 098234.

ה-method של ה-HTTP וכתובת ה-URL:

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

כדי לשלוח את הבקשה אתם צריכים לבחור אחת מהאפשרויות הבאות:

curl

מריצים את הפקודה הבאה:

curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://auditmanager.googleapis.com/RESOURCE_TYPE/RESOURCE_ID/locations/LOCATION//operationDetails/AUDIT_OPERATION_ID"

PowerShell

מריצים את הפקודה הבאה:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://auditmanager.googleapis.com/RESOURCE_TYPE/RESOURCE_ID/locations/LOCATION//operationDetails/AUDIT_OPERATION_ID" | Select-Object -Expand Content
תגובה מוצלחת כוללת אחד מסוגי סטטוס הביצוע הבאים:
Status type Description
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 destination.
OPERATION_STATE_DONE The audit report generation process is completed.
OPERATION_STATE_FAILED The audit report generation process has failed.

Each of the execution status types might provide any of the following additional information, when applicable:

Additional status Description
failure_reason If the audit assessment fails, this field provides the reason for the failure.
evaluation_percent_complete If evaluation has started, this field provides the percentage of the progress. When the process is yet to start, the field starts at 0. When the process is concluded, the field is set to 100.
report_generation_percent_complete If the report generation has started, this field provides percentage of the progress. When the process is yet to start, the field starts at 0. When the process is concluded, the field is set to 100.
report_uploading_percent_complete If the report uploading has started, this field provides percentage of the progress. When the process is yet to start, the field starts at 0. When the process is concluded, the field is set to 100.

כשדוח ביקורת מסתיים ומועלה, מוחזר קישור לדוח.

המאמרים הבאים