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/394/lib/surface/compute/health_sources/create.yaml
- release_tracks: [ALPHA, BETA]
  help_text:
    brief: "Create a health source."
    description: "Create a health source."
    examples: |
      The following command creates a new health source:

        $ {command} <HEALTH_SOURCE_NAME> \
          --region=<REGION> \
          --source-type=BACKEND_SERVICE \
          --sources=my-backend-service \
          --health-aggregation-policy=my-health-aggregation-policy

  request:
    ALPHA:
      api_version: alpha
    BETA:
      api_version: beta
    collection: compute.regionHealthSources
    method: insert
    modify_request_hooks:
    - googlecloudsdk.api_lib.compute.health_sources.modify_request_hooks:add_name_to_payload
    - googlecloudsdk.api_lib.compute.health_sources.modify_request_hooks:parse_health_aggregation_policy_create
    - googlecloudsdk.api_lib.compute.health_sources.modify_request_hooks:parse_sources_create

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

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

    params:
    - arg_name: description
      api_field: healthSource.description
      help_text: |
        A textual description of the HealthSource.
      required: false

    - arg_name: health-aggregation-policy
      api_field: healthSource.healthAggregationPolicy
      help_text: |
        URL to the health aggregation policy resource. Must be set. Must be
        regional and in the same region as the HealthSource. Can be mutated.
      required: true

    - arg_name: source-type
      api_field: healthSource.sourceType
      help_text: |
        Specifies the type of the HealthSource. The only allowed value is
        BACKEND_SERVICE. Must be specified when the HealthSource is created,
        and cannot be mutated.
      choices:
      - arg_value: backend-service
        enum_value: BACKEND_SERVICE
      default: backend-service

    - arg_name: sources
      api_field: healthSource.sources
      help_text: |
        URLs to the source resources. Must be size 1. Must be a BackendService
        if the sourceType is BACKEND_SERVICE. The BackendService must have load
        balancing scheme INTERNAL or INTERNAL_MANAGED and must be regional and
        in the same region as the HealthSource (cross-region deployment for
        INTERNAL_MANAGED is not supported). The BackendService may use only IGs,
        MIGs, or NEGs of type GCE_VM_IP or GCE_VM_IP_PORT. The BackendService
        may not use haPolicy. Can be mutated.
      required: true