Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Este documento explica como usar a API Service Health para gerenciar eventos
que afetam sua organização.
A integridade do serviço personalizado fornece os recursos das APIs OrganizationEvents e OrganizationImpacts, que permitem receber informações sobre eventos que afetam sua organização. Exemplos dessas informações:
Eventos de integridade do serviço que podem afetar um ou mais projetos em uma organização.
Lista de projetos que podem ser ou são afetados por um evento que afeta sua organização.
Antes de começar
Ative a API Service Health
em pelo menos um projeto da sua organização. Os recursos da API OrganizationEvents e OrganizationImpacts recebem informações apenas de projetos que têm a API Service Health ativada.
Configure as permissões do Identity and Access Management (IAM) na sua organização para usar
os recursos da API OrganizationEvents e OrganizationImpacts. Execute este comando:
As políticas do IAM concedidas em uma organização são herdadas por todos os projetos dela. Com elas, é possível acessar APIs de eventos da organização e do projeto em toda a organização.
Você receberá uma resposta JSON semelhante a esta:
{
"name": "organizations/ORGANIZATION_ID/locations/global/organizationEvents/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",
"eventImpacts": [
{
"product": {
"productName": "Google Cloud SQL",
"id": "hV87iK5DcEXKgWU2kDri",
},
"location": {
"locationName": "us-central1",
}
}
],
"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 você não tiver permissões para receber eventos, vai aparecer o seguinte erro PERMISSION_DENIED.
{
"error": {
"code": 403,
"message": "Permission 'servicehealth.organizationEvents.get' denied on resource '//servicehealth.googleapis.com/organizations/ORGANIZATION_ID/locations/global/organizationEvents/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": "organizations/ORGANIZATION_ID/locations/global/organizationEvents/EVENT_ID",
"permission": "servicehealth.organizationEvents.get"
}
}
]
}
}
Receber detalhes de um projeto em uma organização que pode ser afetada por um evento
Para um determinado evento, o ID permanece o mesmo entre os eventos do projeto e da organização.
O OrganizationImpact contém um EVENT_ID e um PROJECT_NUMBER, que podem ser usados para
receber detalhes de um evento que afeta
seu projeto. Esses detalhes incluem
state e
relevance.
PROJECT_NUMBER é intercambiável com PROJECT_ID, que a API Get retorna.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-11 UTC."],[],[],null,["# Manage events affecting an organization\n\nThis document explains how-tos for using the Service Health API to manage events\naffecting your organization.\n\nPersonalized Service Health provides the OrganizationEvents and OrganizationImpacts API\nresources, which let you get information on events that affect your\norganization. This information includes:\n\n- Service health events that may impact one or more projects in an organization.\n- List of projects that may be or are impacted by an event affecting your organization.\n\nBefore you begin\n----------------\n\n1. [Enable the Service Health API](/service-health/docs/manage-access#enable-service-health-api-single-project) for at least one project under your organization. The OrganizationEvents and OrganizationImpacts API resources get information only for projects that have the Service Health API enabled.\n2.\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n3. Set [permissions to access the Service Health API](/service-health/docs/manage-access#access-service-health-api-dashboard).\n4. Configure Identity and Access Management (IAM) permissions on your organization to use\n the OrganizationEvents and OrganizationImpacts API resources. Run the\n following command:\n\n gcloud organizations add-iam-policy-binding $\u003cvar scope=\"ORGANIZATION_ID\" translate=\"no\"\u003eORGANIZATION_ID\u003c/var\u003e \\\n --member {USER|GROUP|SERVICE_ACCOUNT} \\\n --role roles/servicehealth.viewer\n\n To get your \u003cvar class=\"readonly\" translate=\"no\"\u003eORGANIZATION_ID\u003c/var\u003e, see [Getting your organization resource ID](/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).\n\n The IAM policies granted on an organization are inherited by\n all projects in the organization. These policies allow you to access\n organization and project event APIs across the organization.\n\nReferences\n----------\n\nSee the [OrganizationEvents](/service-health/docs/reference/rest/v1/organizations.locations.organizationEvents)\nand\n[OrganizationImpacts](/service-health/docs/reference/rest/v1/organizations.locations.organizationImpacts)\nAPI reference for the methods you can use, and the meaning of the fields in the\nresponse.\n\nWhen setting the product or location, use the values found at\n[Google Cloud products](/service-health/docs/supported-products-locations) and\n[locations](/service-health/docs/supported-products-locations#locations).\n\nList projects under an organization that may be affected by an event\n--------------------------------------------------------------------\n\nSee the [quickstart](/service-health/docs/list-events#list_projects_under_an_organization_that_may_be_affected_by_an_event).\n\nList all active incidents for an organization\n---------------------------------------------\n\nSee the [quickstart](/service-health/docs/list-events#list_all_active_incidents_for_an_organization).\n\nGet details for an event affecting an organization\n--------------------------------------------------\n\nYou can use the Get API to view detailed information about an event affecting an\norganization.\n\n\nBefore using any of the request data,\nmake the following replacements:\n\n- \u003cvar class=\"edit\" scope=\"API_VERSION\" translate=\"no\"\u003eAPI_VERSION\u003c/var\u003e: The API version to use. Use `v1` or `v1beta`.\n- \u003cvar class=\"edit\" scope=\"ORGANIZATION_ID\" translate=\"no\"\u003eORGANIZATION_ID\u003c/var\u003e: your Google Cloud organization ID.\n- \u003cvar class=\"edit\" scope=\"EVENT_ID\" translate=\"no\"\u003eEVENT_ID\u003c/var\u003e: the ID of the event.\n\n\nHTTP method and URL:\n\n```\nGET https://servicehealth.googleapis.com/API VERSION/organizations/ORGANIZATION_ID/locations/global/organizationEvents/EVENT_ID\n```\n\nTo send your request, expand one of these options:\n\n#### curl (Linux, macOS, or Cloud Shell)\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nExecute the following command:\n\n```\ncurl -X GET \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n \"https://servicehealth.googleapis.com/API VERSION/organizations/ORGANIZATION_ID/locations/global/organizationEvents/EVENT_ID\"\n```\n\n#### PowerShell (Windows)\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nExecute the following command:\n\n```\n$cred = gcloud auth print-access-token\n$headers = @{ \"Authorization\" = \"Bearer $cred\" }\n\nInvoke-WebRequest `\n -Method GET `\n -Headers $headers `\n -Uri \"https://servicehealth.googleapis.com/API VERSION/organizations/ORGANIZATION_ID/locations/global/organizationEvents/EVENT_ID\" | Select-Object -Expand Content\n```\n\nYou should receive a JSON response similar to the following:\n\n```\n{\n \"name\": \"organizations/ORGANIZATION_ID/locations/global/organizationEvents/EVENT_ID\",\n \"title\": \"We are experiencing a connectivity issue affecting Google Cloud SQL in us-east1, australia-southeast2.\",\n \"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.\",\n \"category\": \"INCIDENT\",\n \"detailedCategory\": \"CONFIRMED_INCIDENT\",\n \"state\": \"CLOSED\",\n \"detailedState\": \"RESOLVED\",\n \"eventImpacts\": [\n {\n \"product\": {\n \"productName\": \"Google Cloud SQL\",\n \"id\": \"hV87iK5DcEXKgWU2kDri\",\n },\n \"location\": {\n \"locationName\": \"us-central1\",\n }\n }\n ],\n \"updates\": [\n {\n \"updateTime\": \"2022-10-18T17:41:20.112287Z\",\n \"title\": \"We are experiencing a connectivity issue affecting Google Cloud SQL in us-east1, australia-southeast2.\",\n \"description\": \"We are experiencing an intermittent issue with Google Cloud SQL. Our engineering team continues to investigate the issue.\",\n \"symptom\": \"None at this time.\",\n \"workaround\": \"None at this time.\"\n },\n {\n \"updateTime\": \"2022-10-18T18:00:05.690761Z\",\n \"title\": \"We are experiencing a connectivity issue affecting Google Cloud SQL in us-east1, australia-southeast2.\",\n \"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.\",\n \"symptom\": \"None at this time.\",\n \"workaround\": \"None at this time.\"\n }\n ],\n \"updateTime\": \"2022-10-18T18:00:05.690761Z\",\n \"startTime\": \"2022-10-18T17:41:20.112287Z\",\n \"endTime\": \"2022-10-18T18:00:05.690761Z\",\n}\n```\n\nIf you don't have\npermissions to get events,\nyou will get the following `PERMISSION_DENIED` error. \n\n {\n \"error\": {\n \"code\": 403,\n \"message\": \"Permission 'servicehealth.organizationEvents.get' denied on resource '//servicehealth.googleapis.com/organizations/\u003cvar scope=\"ORGANIZATION_ID\" translate=\"no\"\u003eORGANIZATION_ID\u003c/var\u003e/locations/global/organizationEvents/\u003cvar scope=\"EVENT_ID\" translate=\"no\"\u003eEVENT_ID\u003c/var\u003e' (or it may not exist).\",\n \"status\": \"PERMISSION_DENIED\",\n \"details\": [\n {\n \"@type\": \"type.googleapis.com/google.rpc.ErrorInfo\",\n \"reason\": \"IAM_PERMISSION_DENIED\",\n \"domain\": \"servicehealth.googleapis.com\",\n \"metadata\": {\n \"resource\": \"organizations/\u003cvar scope=\"ORGANIZATION_ID\" translate=\"no\"\u003eORGANIZATION_ID\u003c/var\u003e/locations/global/organizationEvents/\u003cvar scope=\"EVENT_ID\" translate=\"no\"\u003eEVENT_ID\u003c/var\u003e\",\n \"permission\": \"servicehealth.organizationEvents.get\"\n }\n }\n ]\n }\n }\n\nTo fix this error, set the [required permissions](/service-health/docs/manage-access#access-service-health-api-dashboard).\n\nGet details for a project under an organization that may be affected by an event\n--------------------------------------------------------------------------------\n\nFor a given event, the event ID remains the same between your project and\norganization events.\n[`OrganizationImpact`](/service-health/docs/reference/rest/v1/organizations.locations.organizationImpacts#resource:-organizationimpact) contains an \u003cvar class=\"readonly\" translate=\"no\"\u003eEVENT_ID\u003c/var\u003e and a \u003cvar class=\"readonly\" translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e, which you can use to\n[get details for an event](/service-health/docs/project-events#get_incident_details) affecting\nyour project. These details include\n[`state`](/service-health/docs/reference/rest/v1/projects.locations.events#state) and\n[`relevance`](/service-health/docs/reference/rest/v1/projects.locations.events#relevance).\n\n\u003cvar class=\"readonly\" translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e is interchangeable with \u003cvar class=\"readonly\" translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e, which the Get API\nreturns."]]