Questo documento spiega come utilizzare l'API Service Health per gestire gli eventi che interessano un singolo progetto.
Prima di iniziare
Verify that billing is enabled for your Google Cloud project.
- Abilita l'API Service Health per il progetto per cui vuoi gestire gli eventi.
- Imposta le autorizzazioni per accedere all'API Service Health.
Riferimenti
Consulta il riferimento API Events (v1, v1beta) per i metodi che puoi utilizzare e il significato dei campi nelle risposte.
Quando imposti il prodotto o la località, utilizza i valori che trovi in Google Cloud products e locations.
Elenco di tutti gli incidenti attivi per un progetto
Consulta la guida rapida.
Visualizzare i dettagli dell'incidente
Puoi utilizzare l'API Get per visualizzare informazioni dettagliate su un evento.
Prima di utilizzare i dati della richiesta, apporta le seguenti sostituzioni:
- API_VERSION: la versione dell'API da utilizzare. Utilizza
v1
ov1beta
. - PROJECT_ID: l'ID del tuo progetto Google Cloud.
- EVENT_ID: l'ID dell'evento.
Metodo HTTP e URL:
GET https://servicehealth.googleapis.com/API VERSION/projects/PROJECT_ID/locations/global/events/EVENT_ID
Per inviare la richiesta, espandi una di queste opzioni:
Dovresti ricevere una risposta JSON simile alla seguente:
{ "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", }
Se non disponi delle
autorizzazioni per ottenere gli eventi,
riceverai il seguente errore PERMISSION_DENIED
.
{
"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"
}
}
]
}
}
Per correggere l'errore, imposta le autorizzazioni richieste.