- release_tracks: [ALPHA, GA]

  help_text:
    brief: Create a Distributed Cloud Edge Network interconnect attachment.
    description: |
      Create a new dedicated Distributed Cloud Edge Network interconnect attachment.
    examples: |
      To create a dedicated interconnect attachment called 'my-attachment' in edge zone 'us-central1-edge-den1', run:

        $ {command} my-attachment --location=us-central1 --zone=us-central1-edge-den1 --interconnect=INTERCONNECT-LINK1 --network=my-edge-network --vlan-id=200 --mtu=1500

  request:
    collection: edgenetwork.projects.locations.zones.interconnectAttachments
    ALPHA:
      api_version: v1alpha1
    GA:
      api_version: v1
    modify_request_hooks:
    - googlecloudsdk.command_lib.edge_cloud.networking.resources:SetResourcesPathForAttachment

  arguments:
    resource:
      help_text: Distributed Cloud Edge Network interconnectAttachment to create.
      # The following should point to the resource argument definition under
      # your surface's command_lib directory.:
      spec: !REF googlecloudsdk.command_lib.edge_cloud.networking.resources:attachment

    params:
    - arg_name: interconnect
      api_field: interconnectAttachment.interconnect
      required: true
      help_text: |
        The underlying interconnect object that this attachment's traffic will traverse through.
    - arg_name: network
      api_field: interconnectAttachment.network
      help_text: |
        The network to use for dynamic routing.
    - arg_name: mtu
      api_field: interconnectAttachment.mtu
      type: int
      default: 1500
      help_text: |
        Maximum transmission unit (MTU) is the size of the largest
        IP packet that can be transmitted on this attachment. Default
        value is 1500 bytes, and the valid values are 1500 and 9000.
    - arg_name: vlan-id
      api_field: interconnectAttachment.vlanId
      default: 0
      type: int
      help_text: |
        The ID of the vlan to tag the subnetwork. Default value is 0.
    - arg_name: description
      api_field: interconnectAttachment.description
      help_text: |
        An optional, textual description for the interconnect attachment.
    labels:
      api_field: interconnectAttachment.labels

  async:
    collection: edgenetwork.projects.locations.operations
