View, update, and delete Private Service Connect health configurations

This page describes how to manage your Private Service Connect health resources after you have created them. You can list, describe, update, and delete health aggregation policies, health sources, and composite health checks.

Manage health aggregation policies

This section describes how to manage health aggregation policies.

List health aggregation policies

You can list all health aggregation policies in a region.

gcloud

Use the gcloud beta compute health-aggregation-policies list command.

gcloud beta compute health-aggregation-policies list \
    --regions=REGION

Replace REGION with the region of the health aggregation policies.

Describe a health aggregation policy

You can describe a health aggregation policy to view its details.

gcloud

Use the gcloud beta compute health-aggregation-policies describe command.

gcloud beta compute health-aggregation-policies describe POLICY \
    --region=REGION

Replace the following:

  • POLICY: the name of the health aggregation policy
  • REGION: the region of the health aggregation policy

Update a health aggregation policy

You can update the description, percentage healthy threshold, or minimum healthy threshold of a health aggregation policy.

gcloud

Use the gcloud beta compute health-aggregation-policies update command.

gcloud beta compute health-aggregation-policies update POLICY \
    --region=REGION \
    --description="DESCRIPTION" \
    --healthy-percent-threshold=PERCENT_HEALTHY \
    --min-healthy-threshold=MINIMUM_HEALTHY

Replace the following:

  • POLICY: the name of the health aggregation policy to update
  • REGION: the region of the health aggregation policy
  • DESCRIPTION: an updated description for the policy
  • PERCENT_HEALTHY: the updated minimum percentage of endpoints in a backend service that must be healthy for the health source to be considered healthy—for example, 75
  • MINIMUM_HEALTHY: the updated minimum number of endpoints in a backend service that must be healthy for the health source to be considered healthy—for example, 2

Delete a health aggregation policy

You can delete a health aggregation policy if it isn't associated with an existing health source.

gcloud

Use the gcloud beta compute health-aggregation-policies delete command.

gcloud beta compute health-aggregation-policies delete POLICY \
    --region=REGION

Replace the following:

  • POLICY: the name of the health aggregation policy to delete
  • REGION: the region of the health aggregation policy

Manage health sources

The following sections describe how to manage your health sources.

List health sources

You can list health sources in a region.

gcloud

Use the gcloud beta compute health-sources list command.

gcloud beta compute health-sources list \
    --regions=REGION

Replace REGION with the region of the health sources.

Describe a health source

You can describe a health source to view its details.

gcloud

Use the gcloud beta compute health-sources describe command.

gcloud beta compute health-sources describe HEALTH_SOURCE \
    --region=REGION

Replace the following:

  • HEALTH_SOURCE: the name of the health source
  • REGION: the region of the health source

Update a health source

You can update the description, backend service, or health aggregation policy of an existing health source.

gcloud

Use the gcloud beta compute health-sources update command.

gcloud beta compute health-sources update HEALTH_SOURCE \
    --region=REGION \
    --description="DESCRIPTION" \
    --sources=BACKEND_SERVICE \
    --health-aggregation-policy=POLICY

Replace the following:

  • HEALTH_SOURCE: the name of the health source to update
  • REGION: the region of the health source
  • DESCRIPTION: an updated description for the health source
  • BACKEND_SERVICE: an updated backend service to use as the source of health

    The backend service must fulfill the following requirements:

    • It must have a load balancing scheme of INTERNAL or INTERNAL_MANAGED.
    • It must be in the same region as the health source you are creating.
    • Its backends must be instance groups or network endpoint groups of type GCE_VM_IP or GCE_VM_IP_PORT.
  • POLICY: an updated health aggregation policy to apply to this health source.

Delete a health source

You can delete a health source if it isn't associated with an existing composite health check.

gcloud

Use the gcloud beta compute health-sources delete command.

gcloud beta compute health-sources delete HEALTH_SOURCE \
    --region=REGION

Replace the following:

  • HEALTH_SOURCE: the name of the health source to delete
  • REGION: the region of the health source

Manage composite health checks

The following sections describe how to manage your composite health checks.

List composite health checks

You can list composite health checks in a region.

gcloud

To list the composite health checks in a region, use the gcloud beta compute composite-health-checks list command.

gcloud beta compute composite-health-checks list \
    --regions=REGION

Replace REGION with the region of the composite health checks.

Describe a composite health check

You can describe a composite health check to view its details.

gcloud

Use the gcloud beta compute composite-health-checks describe command.

gcloud beta compute composite-health-checks describe COMPOSITE_HEALTH_CHECK \
    --region=REGION

Replace the following:

  • COMPOSITE_HEALTH_CHECK: the name of the composite health check
  • REGION: the region of the composite health check

Update a composite health check

You can update the description, health sources, or health destination of a composite health check.

gcloud

Use the gcloud beta compute composite-health-checks update command.

gcloud beta compute composite-health-checks update COMPOSITE_HEALTH_CHECK \
    --region=REGION \
    --description="DESCRIPTION" \
    --health-sources=HEALTH_SOURCES \
    --health-destination=HEALTH_DESTINATION

Replace the following:

  • COMPOSITE_HEALTH_CHECK: the name of the composite health check to update
  • REGION: the region of the composite health check
  • DESCRIPTION: an updated description
  • HEALTH_SOURCES: the names of one or more health sources to associate with the composite health check

    You can include multiple health sources in a comma-separated list.

  • HEALTH_DESTINATION: the URI of the forwarding rule that receives the composite health state from this composite health check—for example, projects/PROJECT_ID/regions/REGION/forwardingRules/FORWARDING_RULE.

    The forwarding rule must be associated with a producer load balancer that supports Private Service Connect health and fulfills the following requirements:

    • It must have a load balancing scheme of INTERNAL or INTERNAL_MANAGED.
    • It must be in the same region as the composite health check.

Delete a composite health check

You can delete a composite health check.

gcloud

Use the gcloud beta compute composite-health-checks delete command.

gcloud beta compute composite-health-checks delete COMPOSITE_HEALTH_CHECK \
    --region=REGION

Replace the following:

  • COMPOSITE_HEALTH_CHECK: the name of the composite health check to delete
  • REGION: the region of the composite health check