This document explains how to enable a project for service health events processing using Config Connector programmatically, if you're using Kubernetes and want to use the Service Health API.
Follow the prerequisites for using Config Connector.
Decide on the API VERSION:
v1
orv1beta
.Create a file named
psh-enable.yaml
and copy the following snippet into it:apiVersion: serviceusage.cnrm.cloud.google.com/API VERSION kind: Service metadata: name: servicehealth.googleapis.com spec: projectRef: external: projects/PROJECT_ID
Run the following command:
kubectl apply -f psh-enable.yaml
The following message appears:
service.serviceusage.cnrm.cloud.google.com/servicehealth.googleapis.com created
Personalized Service Health will take up to 24 hours to start processing service health events.