Ereignisse für ein Projekt verwalten

In diesem Dokument wird beschrieben, wie Sie mit der Service Health API Ereignisse verwalten, die sich auf ein einzelnes Projekt auswirken.

Hinweis

Legen Sie Berechtigungen für den Zugriff auf die Service Health API fest.

Verweise

In der Events API-Referenz (v1, v1beta) finden Sie Informationen zu den verfügbaren Methoden und zur Bedeutung der Felder in den Antworten.

Verwenden Sie beim Festlegen des Produkts oder Standorts die Werte unter Google Cloud products und locations.

Alle aktiven Vorfälle für ein Projekt auflisten

Weitere Informationen finden Sie in der Kurzanleitung.

Details zum Vorfall abrufen

Mit der Get API können Sie detaillierte Informationen zu einem Ereignis abrufen.

Ersetzen Sie diese Werte in den folgenden Anfragedaten:

  • API_VERSION: Die zu verwendende API-Version. Verwenden Sie v1 oder v1beta.
  • PROJECT_ID: Ihre Google Cloud-Organisations-ID.

HTTP-Methode und URL:

GET https://servicehealth.googleapis.com/API VERSION/projects/PROJECT_ID/locations/global/events/event-id

Wenn Sie die Anfrage senden möchten, maximieren Sie eine der folgenden Optionen:

Sie sollten eine JSON-Antwort ähnlich wie diese erhalten:

{
  "name": "projects/PROJECT_ID/locations/global/events/event-id",
      "title": "We are experiencing a connectivity issue affecting Google Cloud SQL in us-east1, australia-southeast2.",
      "description": "The issue with Google Cloud SQL has been resolved for all affected projects as of Tuesday, 2022-10-18 11:00 US/Pacific. We thank you for your patience while we worked on resolving the issue.",
      "category": "INCIDENT",
      "detailedCategory": "CONFIRMED_INCIDENT",
      "state": "CLOSED",
      "detailedState": "RESOLVED",
      "artifacts": [
        {
          "artifact": "projects/PROJECT_ID/locations/global/artifacts/artifact_id",
          "artifactCategory": "ARTIFACT_CATEGORY_INCIDENT_REPORT",
        }
      ],
      "eventImpacts": [
        {
          "product": {
            "productName": "Google Cloud SQL",
            "id": "hV87iK5DcEXKgWU2kDri",
          },
          "location": {
            "locationName": "us-central1",
          }
        }
      ],
      "relevance": "RELATED",
   "updates": [
    {
      "updateTime": "2022-10-18T17:41:20.112287Z",
              "title": "We are experiencing a connectivity issue affecting Google Cloud SQL in us-east1, australia-southeast2.",
      "description": "We are experiencing an intermittent issue with Google Cloud SQL. Our engineering team continues to investigate the issue.",
      "symptom": "None at this time.",
      "workaround": "None at this time."
    },
    {
      "updateTime": "2022-10-18T18:00:05.690761Z",
      "title": "We are experiencing a connectivity issue affecting Google Cloud SQL in us-east1, australia-southeast2.",
      "description": "The issue with Google Cloud SQL has been resolved for all affected projects as of Tuesday, 2022-10-18 11:00 US/Pacific.\n\nWe thank you for your patience while we worked on resolving the issue.",
      "symptom": "None at this time.",
      "workaround": "None at this time."
    }
  ],
  "updateTime": "2022-10-18T18:00:05.690761Z",
  "startTime": "2022-10-18T17:41:20.112287Z",
  "endTime":  "2022-10-18T18:00:05.690761Z",
}

Wenn Sie nicht über die Berechtigungen zum Abrufen von Ereignissen verfügen, erhalten Sie den folgenden PERMISSION_DENIED-Fehler.

{
  "error": {
    "code": 403,
    "message": "Permission 'servicehealth.events.get' denied on resource '//servicehealth.googleapis.com/projects/PROJECT_ID/locations/global/events/event-id' (or it may not exist).",
    "status": "PERMISSION_DENIED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.ErrorInfo",
        "reason": "IAM_PERMISSION_DENIED",
        "domain": "servicehealth.googleapis.com",
        "metadata": {
          "resource": "projects/PROJECT_ID/locations/global/events/event-id",
          "permission": "servicehealth.events.get"
        }
      }
    ]
  }
}

Legen Sie die erforderlichen Berechtigungen fest, um den Fehler zu beheben.