- release_tracks: [ALPHA, BETA]
  help_text:
    brief: Update an existing Beyondcorp application connection.
    description: Update an existing Beyondcorp application connection.
    examples: |
      To modify the connection ``my-connection'' in 'us-central1' by adding
      labels 'k0', with value 'value1' and label 'k1' with value 'value2' and
      removing labels with key 'k3', run:

        $ {command} my-connection \
            --location=us-central1 \
            --display-name=new-display-name \
            --connectors={connector1} \
            --application-endpoint=host:port \
            --update-labels=k0=value1,k1=value2 --remove-labels=k3

  request:
    collection: beyondcorp.projects.locations.appConnections
    modify_request_hooks:
    - googlecloudsdk.command_lib.beyondcorp.app.connections.hooks:CheckFieldsSpecified
    - googlecloudsdk.command_lib.beyondcorp.app.connections.hooks:UpdateLabels
    - googlecloudsdk.command_lib.beyondcorp.app.connections.hooks:SetConnectors
    - googlecloudsdk.command_lib.beyondcorp.app.connections.hooks:ValidateAndParseAppEndpoint
    - googlecloudsdk.command_lib.beyondcorp.app.connections.hooks:UpdateApplicationEndpointMask
    ALPHA:
      api_version: v1alpha
    BETA:
      api_version: v1

  response:
    modify_response_hooks:
    - googlecloudsdk.command_lib.beyondcorp.app.connections.hooks:PrintMessageInResponse

  async:
    collection: beyondcorp.projects.locations.operations

  arguments:
    resource:
      arg_name: connection
      spec: !REF googlecloudsdk.command_lib.beyondcorp.app.resources:appconnection
      help_text: The Beyondcorp connection you want to update.

    params:
    - _REF_: googlecloudsdk.command_lib.beyondcorp.app.connections.flags:display_name_v1alpha
      release_tracks: [ALPHA]
    - _REF_: googlecloudsdk.command_lib.beyondcorp.app.connections.flags:display_name_v1
      release_tracks: [BETA]
    - _REF_: googlecloudsdk.command_lib.beyondcorp.app.connections.flags:connectors_v1alpha
      release_tracks: [ALPHA]
    - _REF_: googlecloudsdk.command_lib.beyondcorp.app.connections.flags:connectors_v1
      release_tracks: [BETA]
    - _REF_: googlecloudsdk.command_lib.beyondcorp.app.connections.flags:application_endpoint

    additional_arguments_hook: googlecloudsdk.command_lib.beyondcorp.app.connections.hooks:UpdateLabelsFlags
