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/redis/clusters/add_cluster_endpoints.yaml
- release_tracks: [ALPHA, BETA, GA]
  help_text:
    brief: |
      Add more cluster endpoints.
    description: |
      This is required to enable multi-vpc for Redis cluster.

      To add one cluster endpoint to an existing Redis cluster, two PSC connections MUST be added as a pair: one for the Redis cluster's discovery service attachment and the other for the additional service attachment.

      Multiple cluster endpoints COULD be added simultaneously.

      This command can fail for the following reasons:
        * The cluster specified does not exist.
        * The number of connections provided to a cluster endpoint are not in pairs.
        * One of the connections is not found.
    examples: |
      To connect redis cluster to one additional VPC, run:

        $ {command} my-redis-cluster add-cluster-endpoints --cluster-endpoint='["psc-connection":[{"psc-connection-id":"$ID","address":"$IP","network":"projects/$PROJECT/global/networks/$NETWORK","forwarding-rule":"projects/$PROJECT/regions/us-east1/forwardingRules/$FR_NAME","service-attachment":"projects/$PROJECT/regions/$REGION/serviceAttachments/$SA_NAME"},{$ADDITIONAL_PSC_CONNECTION}]]' --cluster_endpoint=$ADDITIONAL_CLUSTER_ENDPOINT
        $PSCConnectionID SHOULD be extracted from forwarding rules. E.g. 75311697652483351

  arguments:
    resource:
      spec: !REF googlecloudsdk.command_lib.redis.resources:cluster
      help_text: |
        Arguments and flags that specify the Memorystore Redis cluster you want to update.
    params:
    - arg_name: cluster-endpoint
      api_field: cluster.clusterEndpoints
      repeated: true
      required: true
      help_text: |
        Resource details of a redis cluster endpoint
      type: arg_object
      spec:
      - api_field: connections
        json_name: psc-connection
        type: arg_object
        spec:
        - api_field: pscConnection.pscConnectionId
          json_name: psc-connection-id
        - api_field: pscConnection.network
          json_name: network
        - api_field: pscConnection.address
          json_name: address
        - api_field: pscConnection.forwardingRule
          json_name: forwarding-rule
        - api_field: pscConnection.serviceAttachment
          json_name: service-attachment

  async:
    collection: redis.projects.locations.operations

  request:
    ALPHA:
      api_version: v1alpha1
    BETA:
      api_version: v1beta1
    GA:
      api_version: v1
    modify_request_hooks:
    - googlecloudsdk.command_lib.redis.psc_update_util:UpdateClusterEndpoints
    collection: redis.projects.locations.clusters
    method: patch