- release_tracks: [ALPHA, BETA]
  help_text:
    brief: Create a new Beyondcorp application connection.
    description: Create a new Beyondcorp application connection.
    examples: |
      The following command creates a Connection with ID ``my-connection'' using default ``tcp''
      type connection:

        $ {command} my-connection \
            --location=us-central1 \
            --application-endpoint=localhost:8080


      The following command creates a Connection with ID ``my-connection'' with explicit project
      value for all required and optional parameters:

        $ {command} my-connection \
            --project=projectId \
            --location=us-central1 \
            --application-endpoint-host=localhost \
            --application-endpoint-port=8080 \
            --type=tcp \
            --connectors=my-connector1,my-connector2 \
            --labels='foo=bar' \
            --display-name=connection-display-name
            --async

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


  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 application connection you want to create.
    params:
    - group:
        help_text: Application endpoint.
        required: true
        mutex: true
        params:
        - _REF_: googlecloudsdk.command_lib.beyondcorp.app.connections.flags:application_endpoint
        - group:
            params:
            - _REF_: googlecloudsdk.command_lib.beyondcorp.app.connections.flags:application_endpoint_host_v1alpha
              required: true
              release_tracks: [ALPHA]
            - _REF_: googlecloudsdk.command_lib.beyondcorp.app.connections.flags:application_endpoint_host_v1
              required: true
              release_tracks: [BETA]
            - _REF_: googlecloudsdk.command_lib.beyondcorp.app.connections.flags:application_endpoint_port_v1alpha
              required: true
              release_tracks: [ALPHA]
            - _REF_: googlecloudsdk.command_lib.beyondcorp.app.connections.flags:application_endpoint_port_v1
              required: true
              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:connection_type_v1alpha
      release_tracks: [ALPHA]
    - _REF_: googlecloudsdk.command_lib.beyondcorp.app.connections.flags:connection_type_v1
      release_tracks: [BETA]
    - _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:app_gateway_v1
      release_tracks: [BETA]

    labels:
      ALPHA:
        api_field: googleCloudBeyondcorpAppconnectionsV1alphaAppConnection.labels
      BETA:
        api_field: googleCloudBeyondcorpAppconnectionsV1AppConnection.labels
