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:
v1orv1beta.Create a file named
psh-enable.yamland 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_IDRun the following command:
kubectl apply -f psh-enable.yamlThe 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.