HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/current/lib/surface/compute/health_aggregation_policies/create.yaml
- release_tracks: [ALPHA, BETA]
  help_text:
    brief: "Create a health aggregation policy."
    description: "Create a health aggregation policy."
    examples: |
      The following command creates a new health aggregation policy:

        $ {command} <HEALTH_AGGREGATION_POLICY_NAME> \
          --region=<REGION> \
          --healthy-percent-threshold 60 \
          --min-healthy-threshold 2 \
          --policy-type=BACKEND_SERVICE_POLICY

  request:
    ALPHA:
      api_version: alpha
    BETA:
      api_version: beta

    collection: compute.regionHealthAggregationPolicies
    method: insert
    modify_request_hooks:
    - googlecloudsdk.api_lib.compute.health_aggregation_policies.modify_request_hooks:add_name_to_payload

  async:
    collection: compute.regionOperations
    response_name_field: selfLink
    state:
      field: status
      success_values: ['DONE']

  arguments:
    resource:
      help_text: The name of the health aggregation policy you want to create.
      spec: !REF googlecloudsdk.command_lib.compute.resources:health_aggregation_policy

    params:
    - arg_name: description
      api_field: healthAggregationPolicy.description
      help_text: |
        A textual description of the health aggregation policy.

    - arg_name: healthy-percent-threshold
      api_field: healthAggregationPolicy.healthyPercentThreshold
      help_text: |
        Can only be set if the policyType field is
        BACKEND_SERVICE_POLICY. Specifies the threshold (as a
        percentage) of healthy endpoints required in order to consider the
        aggregated health result HEALTHY. Defaults to 60. Must be in
        range [0, 100]. Not applicable if the policyType field is
         DNS_PUBLIC_IP_POLICY. Can be mutated. This field is optional,
        and will be set to the default if unspecified. Note that both this
        threshold and minHealthyThreshold must be satisfied in order
        for HEALTHY to be the aggregated result. "Endpoints" refers to network
        endpoints within a Network Endpoint Group or instances within an Instance
        Group.
      type: int
      default: 60

    - arg_name: min-healthy-threshold
      api_field: healthAggregationPolicy.minHealthyThreshold
      help_text: |
        Can only be set if the policyType field is
        BACKEND_SERVICE_POLICY. Specifies the minimum number of
        healthy endpoints required in order to consider the aggregated health
        result HEALTHY. Defaults to 1. Must be positive. Not
        applicable if the policyType field is
          DNS_PUBLIC_IP_POLICY. Can be mutated. This field is optional,
        and will be set to the default if unspecified. Note that both this
        threshold and healthyPercentThreshold must be satisfied in
        order for HEALTHY to be the aggregated result. "Endpoints" refers to
        network endpoints within a Network Endpoint Group or instances within an
        Instance Group.
      type: int
      default: 1

    - arg_name: policy-type
      api_field: healthAggregationPolicy.policyType
      help_text: |
        Specifies the type of the healthAggregationPolicy. The only allowed
        value for regional resources is BACKEND_SERVICE_POLICY. Must
        be specified when the healthAggregationPolicy is created, and cannot be
        mutated.
      choices:
      - arg_value: backend-service-policy
        enum_value: BACKEND_SERVICE_POLICY
      - arg_value: dns-public-ip-policy
        enum_value: DNS_PUBLIC_IP_POLICY
      default: backend-service-policy