> ## Documentation Index
> Fetch the complete documentation index at: https://gcore-waap-api-guides.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Attach interface to bare metal GPU cluster server



## OpenAPI

````yaml /api-reference/services_docs_mintlify/cloud_api.yaml post /cloud/v1/ai/clusters/{project_id}/{region_id}/{instance_id}/attach_interface
openapi: 3.1.0
info:
  title: Gcore OpenAPI – Cloud API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: b16bea63ae2e
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Bare Metal
  - name: Container as a Service
  - name: Cost Reports
  - name: DDoS Protection
  - name: Everywhere Inference
  - name: Everywhere Inference Apps
  - name: File Shares
  - name: Floating IPs
  - name: Function as a Service
  - name: GPU Bare Metal
  - name: GPU Virtual
  - name: IP Ranges
  - name: Images
  - name: Instances
  - name: Load Balancers
  - name: Logging
  - name: Managed Kubernetes
  - name: Managed PostgreSQL
  - name: Networks
  - name: Placement Groups
  - name: Ports
  - name: Projects
  - name: Quotas
  - name: Regions
  - name: Registry
  - name: Reservations
  - name: Reserved IPs
  - name: Routers
  - name: SSH Keys
  - name: Secrets
  - name: Security Groups
  - name: Snapshot Schedules
  - name: Snapshots
  - name: Tasks
  - name: User Actions
  - name: User Role Assignments
  - name: Volumes
paths:
  /cloud/v1/ai/clusters/{project_id}/{region_id}/{instance_id}/attach_interface:
    post:
      tags:
        - GPU Bare Metal
      summary: Attach interface to bare metal GPU cluster server
      operationId: AIClusterAttachInterfaceHandler.post
      parameters:
        - in: path
          name: project_id
          required: true
          description: Project ID
          schema:
            type: integer
        - in: path
          name: region_id
          required: true
          description: Region ID
          schema:
            type: integer
        - in: path
          name: instance_id
          required: true
          description: Instance ID
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: >-
                    #/components/schemas/NewInterfaceExternalExtendSchemaWithDdos
                - $ref: '#/components/schemas/NewInterfaceSpecificSubnetSchema'
                - $ref: '#/components/schemas/NewInterfaceAnySubnetSchema'
                - $ref: '#/components/schemas/NewInterfaceReservedFixedIpSchema'
              discriminator:
                propertyName: type
                mapping:
                  external:
                    $ref: >-
                      #/components/schemas/NewInterfaceExternalExtendSchemaWithDdos
                  subnet:
                    $ref: '#/components/schemas/NewInterfaceSpecificSubnetSchema'
                  any_subnet:
                    $ref: '#/components/schemas/NewInterfaceAnySubnetSchema'
                  reserved_fixed_ip:
                    $ref: '#/components/schemas/NewInterfaceReservedFixedIpSchema'
      responses:
        '200':
          description: Created task
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskIDsSerializer'
components:
  schemas:
    NewInterfaceExternalExtendSchemaWithDdos:
      type: object
      properties:
        ddos_profile:
          type:
            - 'null'
            - object
          description: Advanced DDoS protection.
          allOf:
            - $ref: '#/components/schemas/DeprecatedCreateDdosProfileSchema'
        interface_name:
          type: string
          maxLength: 37
          description: Interface name
        ip_family:
          type: string
          enum:
            - dual
            - ipv4
            - ipv6
          description: 'Which subnets should be selected: IPv4, IPv6 or use dual stack.'
        port_group:
          type: integer
          minimum: 0
          maximum: 3
          description: Each group will be added to the separate trunk.
        security_groups:
          type: array
          description: List of security group IDs
          items:
            $ref: '#/components/schemas/MandatoryIdSchema'
        type:
          type: string
          default: external
          description: Must be 'external'. Union tag
      description: Instance will be attached to default external network
      example:
        type: external
        ip_family: dual
        security_groups:
          - id: 4536dba1-93b1-492e-b3df-270b6b9f3650
          - id: cee2ca1f-507a-4a31-b714-f6c1ffb4bdfa
        ddos_profile:
          profile_template: 29
          fields: []
    NewInterfaceSpecificSubnetSchema:
      type: object
      properties:
        ddos_profile:
          type:
            - 'null'
            - object
          description: Advanced DDoS protection.
          allOf:
            - $ref: '#/components/schemas/DeprecatedCreateDdosProfileSchema'
        interface_name:
          type: string
          maxLength: 37
          description: Interface name
        port_group:
          type: integer
          minimum: 0
          maximum: 3
          description: Each group will be added to the separate trunk.
        security_groups:
          type: array
          description: List of security group IDs
          items:
            $ref: '#/components/schemas/MandatoryIdSchema'
        subnet_id:
          type: string
          description: Port will get an IP address from this subnet
        type:
          type: string
          default: subnet
          description: Must be 'subnet'
      required:
        - subnet_id
      description: Instance will be attached to specified subnet
      example:
        subnet_id: e3c6ee77-48cb-416b-b204-11b492cc776e3
        type: subnet
        security_groups:
          - id: 4536dba1-93b1-492e-b3df-270b6b9f3650
          - id: cee2ca1f-507a-4a31-b714-f6c1ffb4bdfa
        ddos_profile:
          profile_template: 29
          fields: []
        interface_name: my-subnet-interface
    NewInterfaceAnySubnetSchema:
      type: object
      properties:
        ddos_profile:
          type:
            - 'null'
            - object
          description: Advanced DDoS protection.
          allOf:
            - $ref: '#/components/schemas/DeprecatedCreateDdosProfileSchema'
        interface_name:
          type: string
          maxLength: 37
          description: Interface name
        ip_family:
          type: string
          enum:
            - dual
            - ipv4
            - ipv6
          description: 'Which subnets should be selected: IPv4, IPv6 or use dual stack.'
        network_id:
          type: string
          description: Port will get an IP address in this network subnet
        port_group:
          type: integer
          minimum: 0
          maximum: 3
          description: Each group will be added to the separate trunk.
        security_groups:
          type: array
          description: List of security group IDs
          items:
            $ref: '#/components/schemas/MandatoryIdSchema'
        type:
          type: string
          default: any_subnet
          description: Must be 'any_subnet'
      required:
        - network_id
      description: >-
        Instance will be attached to the network subnet with the largest count
        of available ips
      example:
        network_id: e3c6ee77-48cb-416b-b204-11b492cc776e3
        type: any_subnet
        security_groups:
          - id: 4536dba1-93b1-492e-b3df-270b6b9f3650
          - id: cee2ca1f-507a-4a31-b714-f6c1ffb4bdfa
        profile_template: 29
        fields: []
        interface_name: my-any-subnet-interface
    NewInterfaceReservedFixedIpSchema:
      type: object
      properties:
        ddos_profile:
          type:
            - 'null'
            - object
          description: Advanced DDoS protection.
          allOf:
            - $ref: '#/components/schemas/DeprecatedCreateDdosProfileSchema'
        interface_name:
          type: string
          maxLength: 37
          description: Interface name
        port_group:
          type: integer
          minimum: 0
          maximum: 3
          description: Each group will be added to the separate trunk.
        port_id:
          type: string
          description: Port ID
        security_groups:
          type: array
          description: List of security group IDs
          items:
            $ref: '#/components/schemas/MandatoryIdSchema'
        type:
          type: string
          default: reserved_fixed_ip
          description: Must be 'reserved_fixed_ip'. Union tag
      required:
        - port_id
      description: |-
        Instance will be attached to the given port.
        Floating IP will be created and attached to that IP
      example:
        port_id: 59905c8e-2619-420a-b046-536096473370
        type: reserved_fixed_ip
        security_groups:
          - id: 4536dba1-93b1-492e-b3df-270b6b9f3650
          - id: cee2ca1f-507a-4a31-b714-f6c1ffb4bdfa
        ddos_profile:
          profile_template: 29
          fields: []
        interface_name: my-rfip-interface
    TaskIDsSerializer:
      properties:
        tasks:
          description: >-
            List of task IDs representing asynchronous operations. Use these IDs
            to monitor operation progress:

            - `GET /v1/tasks/{task_id}` - Check individual task status and
            details

            Poll task status until completion (`FINISHED`/`ERROR`) before
            proceeding with dependent operations.
          example:
            - d478ae29-dedc-4869-82f0-96104425f565
          examples:
            - - d478ae29-dedc-4869-82f0-96104425f565
          items:
            type: string
          title: Tasks
          type: array
      required:
        - tasks
      title: TaskIDsSerializer
      type: object
    DeprecatedCreateDdosProfileSchema:
      type: object
      properties:
        fields:
          type: array
          default: []
          writeOnly: true
          description: Protection parameters.
          items:
            $ref: '#/components/schemas/DeprecatedCreateClientProfileFieldSchema'
        profile_template:
          type: integer
          writeOnly: true
          description: DDoS profile template ID.
        profile_template_name:
          type: string
          writeOnly: true
          description: DDoS profile template name.
      required:
        - profile_template
      example:
        profile_template: 29
        fields: []
    MandatoryIdSchema:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Resource ID
      required:
        - id
      description: MandatoryIdSchema schema
      example:
        id: ae74714c-c380-48b4-87f8-758d656cdad6
    DeprecatedCreateClientProfileFieldSchema:
      type: object
      properties:
        base_field:
          type: integer
          writeOnly: true
          description: ID of DDoS profile field
        field_value:
          writeOnly: true
          description: Complex value for the DDoS profile field
        value:
          type:
            - string
            - 'null'
          writeOnly: true
          maxLength: 500
          description: >-
            Basic type value. Only one of 'value' or 'field_value' must be
            specified.
      required:
        - base_field
      example:
        field_value:
          - 45046
          - 45047
        base_field: 10
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````