이 문서에서는 Service Health API를 사용하여 단일 프로젝트에 영향을 미치는 이벤트를 관리하는 방법을 설명합니다.
시작하기 전에
Verify that billing is enabled for your Google Cloud project.
- 이벤트를 관리할 프로젝트에 대해 Service Health API를 사용 설정합니다.
- Service Health API에 액세스할 수 있는 권한을 설정합니다.
참조
사용할 수 있는 메서드와 응답의 필드 의미는 Events API 참조 (v1, v1beta)를 참고하세요.
제품 또는 위치를 설정할 때는 Google Cloud products 및 locations에 있는 값을 사용합니다.
프로젝트의 모든 활성 인시던트 나열
빠른 시작을 참고하세요.
인시던트 세부정보 가져오기
Get API를 사용하여 이벤트에 관한 세부정보를 볼 수 있습니다.
요청 데이터를 사용하기 전에 다음을 바꿉니다.
- API_VERSION: 사용할 API 버전입니다.
v1또는v1beta을 사용합니다. - PROJECT_ID: Google Cloud 프로젝트 ID입니다.
- EVENT_ID: 이벤트 ID입니다.
HTTP 메서드 및 URL:
GET https://servicehealth.googleapis.com/API VERSION/projects/PROJECT_ID/locations/global/events/EVENT_ID
요청을 보내려면 다음 옵션 중 하나를 펼칩니다.
다음과 비슷한 JSON 응답이 표시됩니다.
{
"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",
}
이벤트를 가져올 권한이 없으면 다음 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"
}
}
]
}
}
이 오류를 해결하려면 필수 권한을 설정하세요.