> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gcore.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create bare metal server

> Use [POST /v1/projects/{`project_id`}/baremetal/servers](/api-reference/cloud/bare-metal/create-bare-metal-server) instead. This route continues to work. Later, we will deprecate it and then remove it. We will tell you in advance.

Create a new bare metal server with the specified configuration.

How to get access:

For Linux,

  - Use the `user_data` field to provide a
  [cloud-init script](https://cloudinit.readthedocs.io/en/latest/reference/examples.html)
  in base64 to apply configurations to the instance.
  - Specify the `username` and `password` to create a new user.
  - When only `password` is provided, it is set as the password for the default user of the image.
  - The `user_data` is ignored when the `password` is specified.


For Windows,

  - Use the `user_data` field to provide a
  [cloudbase-init script](https://cloudbase-init.readthedocs.io/en/latest/userdata.html#cloud-config)
  in base64 to create new users on Windows.
  - Use the `password` field to set the password for the 'Admin' user on Windows.
  - The password of the Admin user cannot be updated via `user_data`.
  - The `username` cannot be specified in the request.



## OpenAPI

````yaml /api-reference/services_docs_mintlify_enriched/cloud_api.yaml post /cloud/v1/bminstances/{project_id}/{region_id}
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: 6f694ac41f91
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Bare Metal
  - name: Basic VMs
  - 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: Pricing
  - 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/bminstances/{project_id}/{region_id}:
    post:
      tags:
        - Bare Metal
      summary: Create bare metal server
      description: >-
        Use [POST
        /v1/projects/{`project_id`}/baremetal/servers](/api-reference/cloud/bare-metal/create-bare-metal-server)
        instead. This route continues to work. Later, we will deprecate it and
        then remove it. We will tell you in advance.


        Create a new bare metal server with the specified configuration.


        How to get access:


        For Linux,

          - Use the `user_data` field to provide a
          [cloud-init script](https://cloudinit.readthedocs.io/en/latest/reference/examples.html)
          in base64 to apply configurations to the instance.
          - Specify the `username` and `password` to create a new user.
          - When only `password` is provided, it is set as the password for the default user of the image.
          - The `user_data` is ignored when the `password` is specified.


        For Windows,

          - Use the `user_data` field to provide a
          [cloudbase-init script](https://cloudbase-init.readthedocs.io/en/latest/userdata.html#cloud-config)
          in base64 to create new users on Windows.
          - Use the `password` field to set the password for the 'Admin' user on Windows.
          - The password of the Admin user cannot be updated via `user_data`.
          - The `username` cannot be specified in the request.
      operationId: BmInstanceCreateSet.post
      parameters:
        - in: path
          name: project_id
          required: true
          description: Project ID
          schema:
            description: Project ID
            example: 1
            examples:
              - 1
            title: Project Id
            type: integer
        - in: path
          name: region_id
          required: true
          description: Region ID
          schema:
            description: Region ID
            example: 1
            examples:
              - 1
            title: Region Id
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBareMetalServerSerializer'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskIDsSerializer'
        '400':
          $ref: '#/components/responses/ProblemBadRequestWithLegacyKeys'
        '401':
          $ref: '#/components/responses/ProblemUnauthorizedWithLegacyKeys'
        '403':
          $ref: '#/components/responses/ProblemForbiddenWithLegacyKeys'
        '404':
          $ref: '#/components/responses/ProblemNotFoundWithLegacyKeys'
        '409':
          $ref: '#/components/responses/ProblemConflictWithLegacyKeys'
        '500':
          $ref: '#/components/responses/ProblemInternalServerErrorWithLegacyKeys'
        '503':
          $ref: '#/components/responses/ProblemServiceUnavailableWithLegacyKeys'
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from gcore import Gcore

            client = Gcore(
                api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
            )
            task_id_list = client.cloud.baremetal.servers.create(
                project_id=1,
                region_id=1,
                flavor="bm2-hf-medium",
                interfaces=[{
                    "type": "external"
                }],
            )
            print(task_id_list.tasks)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/G-Core/gcore-go\"\n\t\"github.com/G-Core/gcore-go/cloud\"\n\t\"github.com/G-Core/gcore-go/option\"\n)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttaskIDList, err := client.Cloud.Baremetal.Servers.New(context.TODO(), cloud.BaremetalServerNewParams{\n\t\tProjectID: gcore.Int(1),\n\t\tRegionID:  gcore.Int(1),\n\t\tFlavor:    \"bm2-hf-medium\",\n\t\tInterfaces: []cloud.BaremetalServerNewParamsInterfaceUnion{{\n\t\t\tOfExternal: &cloud.BaremetalServerNewParamsInterfaceExternal{},\n\t\t}},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", taskIDList.Tasks)\n}\n"
components:
  schemas:
    CreateBareMetalServerSerializer:
      example:
        flavor: bm2-hf-medium
        image_id: b5b4d65d-945f-4b98-ab6f-332319c724ef
        interfaces:
          - type: external
        name: my-bare-metal
        ssh_key_name: my-ssh-key
      examples:
        - flavor: bm2-hf-medium
          image_id: b5b4d65d-945f-4b98-ab6f-332319c724ef
          interfaces:
            - type: external
          name: my-bare-metal
          ssh_key_name: my-ssh-key
      properties:
        app_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            Parameters for the application template if creating the instance
            from an `apptemplate`.
          title: App Config
        apptemplate_id:
          description: Apptemplate ID. Either `image_id` or `apptemplate_id` is required.
          title: Apptemplate Id
          type: string
        ddos_profile:
          $ref: '#/components/schemas/BaseCreateClientProfileSerializer'
          description: Enable advanced DDoS protection for the server
        flavor:
          description: The flavor of the instance.
          example: bm2-hf-medium
          examples:
            - bm2-hf-medium
          title: Flavor
          type: string
        image_id:
          description: Image ID. Either `image_id` or `apptemplate_id` is required.
          format: uuid4
          title: Image Id
          type: string
        interfaces:
          description: >-
            A list of network interfaces for the server. You can create one or
            more interfaces - private, public, or both.
          items:
            $ref: '#/components/schemas/CreateBareMetalInterfaceSerializers'
          minItems: 1
          title: Interfaces
          type: array
        name:
          description: Server name.
          example: my-bare-metal
          examples:
            - my-bare-metal
          pattern: ^[a-zA-Z0-9][a-zA-Z 0-9._\-]{1,61}[a-zA-Z0-9._]$
          title: Name
          type: string
        name_template:
          description: >-
            If you want server names to be automatically generated based on IP
            addresses, you can provide a name template instead of specifying the
            name manually. The template should include a placeholder that will
            be replaced during provisioning. Supported placeholders are:
            `{ip_octets}` (last 3 octets of the IP), `{two_ip_octets}`, and
            `{one_ip_octet}`.
          example:
            - my-bare-metal-{ip_octets}
          examples:
            - - my-bare-metal-{ip_octets}
          pattern: ^[a-zA-Z0-9{][a-zA-Z 0-9._\-}{]{1,61}[a-zA-Z0-9._}]$
          title: Name Template
          type: string
        password:
          description: >-
            For Linux instances, 'username' and 'password' are used to create a
            new user. When only 'password' is provided, it is set as the
            password for the default user of the image. For Windows instances,
            'username' cannot be specified. Use the 'password' field to set the
            password for the 'Admin' user on Windows. Use the 'user_data' field
            to provide a script to create new users on Windows. The password of
            the Admin user cannot be updated via 'user_data'.
          title: Password
          type: string
        ssh_key_name:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Specifies the name of the SSH keypair, created via the

            [/v1/`ssh_keys`
            endpoint](/api-reference/cloud/ssh-keys/add-or-generate-ssh-key).
          examples:
            - my-ssh-key
          title: Ssh Key Name
        tags:
          $ref: '#/components/schemas/CreateTagsSerializer'
          description: >-
            Key-value tags to associate with the resource. A tag is a key-value
            pair that can be associated with a resource, enabling efficient
            filtering and grouping for better organization and management. Both
            tag keys and values have a maximum length of 255 characters. Tag
            keys and values cannot contain characters from U+0080 to U+00FF.
            Some tags are read-only and cannot be modified by the user. Tags are
            also integrated with cost reports, allowing cost data to be filtered
            based on tag keys or values.
          examples:
            - my-tag: my-tag-value
        user_data:
          description: >-
            String in base64 format. For Linux instances, 'user_data' is ignored
            when 'password' field is provided. For Windows instances, Admin user
            password is set by 'password' field and cannot be updated via
            'user_data'. Examples of the `user_data`:
            https://cloudinit.readthedocs.io/en/latest/topics/examples.html
          title: User Data
          type: string
        username:
          description: >-
            For Linux instances, 'username' and 'password' are used to create a
            new user. For Windows instances, 'username' cannot be specified. Use
            'password' field to set the password for the 'Admin' user on
            Windows.
          title: Username
          type: string
      required:
        - interfaces
        - flavor
      title: CreateBareMetalServerSerializer
      type: object
    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
    BaseCreateClientProfileSerializer:
      properties:
        fields:
          description: >-
            List of field configurations that customize the protection
            parameters for this profile
          example:
            - base_field: 10
              field_value:
                - 45046
                - 45047
          examples:
            - - base_field: 10
                field_value:
                  - 45046
                  - 45047
          items:
            $ref: '#/components/schemas/CreateClientProfileFieldSerializer'
          title: Fields
          type: array
        profile_template:
          description: >-
            Unique identifier of the DDoS protection template to use for this
            profile
          example: 123
          examples:
            - 123
          title: Profile Template
          type: integer
      required:
        - profile_template
      title: BaseCreateClientProfileSerializer
      type: object
    CreateBareMetalInterfaceSerializers:
      discriminator:
        mapping:
          any_subnet: '#/components/schemas/CreateBareMetalAnySubnetInterfaceSerializer'
          external: '#/components/schemas/CreateBareMetalExternalInterfaceSerializer'
          reserved_fixed_ip: >-
            #/components/schemas/CreateBareMetalReservedFixedIpInterfaceSerializer
          subnet: '#/components/schemas/CreateBareMetalSubnetInterfaceSerializer'
        propertyName: type
      oneOf:
        - $ref: '#/components/schemas/CreateBareMetalExternalInterfaceSerializer'
        - $ref: '#/components/schemas/CreateBareMetalSubnetInterfaceSerializer'
        - $ref: '#/components/schemas/CreateBareMetalAnySubnetInterfaceSerializer'
        - $ref: >-
            #/components/schemas/CreateBareMetalReservedFixedIpInterfaceSerializer
      title: CreateBareMetalInterfaceSerializers
    CreateTagsSerializer:
      description: >-
        A tag is a key-value pair that can be associated with a resource,

        enabling efficient filtering and grouping for better organization and
        management.

        Some tags are read-only and cannot be modified by the user.

        Tags are also integrated with cost reports, allowing cost data to be
        filtered based on tag keys or values.
      propertyNames:
        description: >-
          Tag key. Maximum 255 characters. Cannot contain spaces, tabs,
          newlines, empty string or '=' character. Cannot contain characters
          from U+0080 to U+00FF. Trailing or leading whitespaces will be
          stripped.
        examples:
          - my-tag
        maxLength: 255
        minLength: 1
        pattern: ^[^\s=]+$
      title: CreateTagsSerializer
      type: object
      additionalProperties:
        description: >-
          Tag value. Maximum 255 characters. Cannot contain tabs, newlines, or
          empty strings. Cannot contain characters from U+0080 to U+00FF.
          Trailing or leading whitespaces will be stripped.
        example: my-tag-value
        examples:
          - my-tag-value
        maxLength: 255
        minLength: 1
        pattern: ^[^ \t\n\r\f\v]([^\t\n\r\f\v]*[^ \t\n\r\f\v])?$
        type: string
    ProblemWithLegacyKeys:
      additionalProperties: false
      description: >-
        The error body of an endpoint that was released before the problem body.
        The old keys stay

        next to the problem fields until the endpoint is removed.
      properties:
        context:
          anyOf:
            - $ref: '#/components/schemas/ProblemContext'
            - type: 'null'
          default: null
          description: >-
            Data for the `type`. Absent on a type without context keys, and on a
            `not-found` for an unknown URL.
        detail:
          description: The facts of this occurrence.
          title: Detail
          type: string
        errors:
          anyOf:
            - items:
                $ref: '#/components/schemas/ProblemError'
              type: array
            - type: 'null'
          default: null
          description: >-
            One item for each invalid input. Only on `validation-error`, and
            absent when no single input is wrong.
          title: Errors
        exception_class:
          deprecated: true
          description: The old name of the error. Use `type`.
          title: Exception Class
          type: string
        hint:
          description: What to do next.
          title: Hint
          type: string
        info:
          default: null
          deprecated: true
          description: Old data about the error. Use `context`.
          title: Info
        invalid_fields:
          default: null
          deprecated: true
          description: The old list of the invalid inputs. Use `errors`.
          title: Invalid Fields
        message:
          deprecated: true
          description: The old text of the error. Use `detail`.
          title: Message
          type: string
        request_id:
          description: >-
            ID of the request. The response also sends it in the `X-Request-Id`
            header. Quote it to support.
          title: Request Id
          type: string
        status:
          description: Copy of the HTTP status code.
          title: Status
          type: integer
        title:
          description: Fixed sentence for the `type`.
          title: Title
          type: string
        trace_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            W3C trace ID from the `traceparent` of the request. Null when the
            request has no valid `traceparent`.
          title: Trace Id
        type:
          $ref: '#/components/schemas/ProblemType'
          description: >-
            Stable error code in kebab-case, such as `not-found`. Clients branch
            on it. It is not `errors[].code`, which names what is wrong with one
            input in `snake_case`, such as `not_found`.
      required:
        - type
        - title
        - status
        - detail
        - hint
        - request_id
        - trace_id
        - exception_class
        - message
      title: ProblemWithLegacyKeys
      type: object
    CreateClientProfileFieldSerializer:
      properties:
        base_field:
          description: Unique identifier of the DDoS protection field being configured
          example: 123
          examples:
            - 123
          title: Base Field
          type: integer
        field_value:
          anyOf:
            - items: {}
              type: array
            - type: integer
            - type: string
            - type: 'null'
          description: Complex value for the DDoS profile field
          examples:
            - null
            - - 100001
          title: Field Value
      required:
        - base_field
      title: CreateClientProfileFieldSerializer
      type: object
    CreateBareMetalAnySubnetInterfaceSerializer:
      example:
        floating_ip:
          existing_floating_id: 57be69f6-6f6a-4f03-a4ad-8eb86c69ec0a
          source: existing
        interface_name: my-any-subnet-interface
        ip_address: 192.168.6.9
        network_id: 59905c8e-2619-420a-b046-536096473370
        type: any_subnet
      examples:
        - floating_ip:
            existing_floating_id: 57be69f6-6f6a-4f03-a4ad-8eb86c69ec0a
            source: existing
          interface_name: my-any-subnet-interface
          ip_address: 192.168.6.9
          network_id: 59905c8e-2619-420a-b046-536096473370
          type: any_subnet
      properties:
        floating_ip:
          description: >-
            Allows the instance to have a public IP that can be reached from the
            internet.
          discriminator:
            mapping:
              existing: >-
                #/components/schemas/ExistingInstanceFloatingIpInterfaceSerializer
              new: '#/components/schemas/NewInstanceFloatingIpInterfaceSerializer'
            propertyName: source
          oneOf:
            - $ref: '#/components/schemas/NewInstanceFloatingIpInterfaceSerializer'
            - $ref: >-
                #/components/schemas/ExistingInstanceFloatingIpInterfaceSerializer
          title: Floating Ip
        interface_name:
          description: >-
            Interface name. Defaults to `null` and is returned as `null` in the
            API response if not set.
          maxLength: 37
          title: Interface Name
          type: string
        ip_address:
          description: You can specify a specific IP address from your subnet.
          format: ipvanyaddress
          title: Ip Address
          type: string
        ip_family:
          anyOf:
            - $ref: '#/components/schemas/InterfaceIPFamily'
            - type: 'null'
          default: ipv4
          description: Specify `ipv4`, `ipv6`, or `dual` to enable both.
        network_id:
          description: The network where the instance will be connected.
          format: uuid4
          title: Network Id
          type: string
        port_group:
          default: 0
          description: >-
            Specifies the trunk group to which this interface belongs.
            Applicable only for bare metal servers. Each unique port group is
            mapped to a separate trunk port. Use this to control how interfaces
            are grouped across trunks.
          maximum: 3
          minimum: 0
          title: Port Group
          type: integer
        type:
          const: any_subnet
          description: >-
            Instance will be attached to a subnet with the largest count of free
            IPs.
          title: Type
          type: string
      required:
        - type
        - network_id
      title: CreateBareMetalAnySubnetInterfaceSerializer
      type: object
    CreateBareMetalExternalInterfaceSerializer:
      description: Instance will be attached to default external network
      example:
        interface_name: eth0
        ip_family: ipv4
        type: external
      examples:
        - interface_name: eth0
          ip_family: ipv4
          type: external
      properties:
        interface_name:
          description: >-
            Interface name. Defaults to `null` and is returned as `null` in the
            API response if not set.
          maxLength: 37
          title: Interface Name
          type: string
        ip_family:
          anyOf:
            - $ref: '#/components/schemas/InterfaceIPFamily'
            - type: 'null'
          default: ipv4
          description: Specify `ipv4`, `ipv6`, or `dual` to enable both.
        port_group:
          default: 0
          description: >-
            Specifies the trunk group to which this interface belongs.
            Applicable only for bare metal servers. Each unique port group is
            mapped to a separate trunk port. Use this to control how interfaces
            are grouped across trunks.
          maximum: 3
          minimum: 0
          title: Port Group
          type: integer
        type:
          const: external
          description: A public IP address will be assigned to the instance.
          title: Type
          type: string
      required:
        - type
      title: CreateBareMetalExternalInterfaceSerializer
      type: object
    CreateBareMetalReservedFixedIpInterfaceSerializer:
      example:
        floating_ip:
          source: new
        interface_name: my-interface
        port_id: 59905c8e-2619-420a-b046-536096473370
        type: reserved_fixed_ip
      examples:
        - floating_ip:
            source: new
          interface_name: my-interface
          port_id: 59905c8e-2619-420a-b046-536096473370
          type: reserved_fixed_ip
      properties:
        floating_ip:
          description: >-
            Allows the instance to have a public IP that can be reached from the
            internet.
          discriminator:
            mapping:
              existing: >-
                #/components/schemas/ExistingInstanceFloatingIpInterfaceSerializer
              new: '#/components/schemas/NewInstanceFloatingIpInterfaceSerializer'
            propertyName: source
          oneOf:
            - $ref: '#/components/schemas/NewInstanceFloatingIpInterfaceSerializer'
            - $ref: >-
                #/components/schemas/ExistingInstanceFloatingIpInterfaceSerializer
          title: Floating Ip
        interface_name:
          description: >-
            Interface name. Defaults to `null` and is returned as `null` in the
            API response if not set.
          maxLength: 37
          title: Interface Name
          type: string
        port_group:
          default: 0
          description: >-
            Specifies the trunk group to which this interface belongs.
            Applicable only for bare metal servers. Each unique port group is
            mapped to a separate trunk port. Use this to control how interfaces
            are grouped across trunks.
          maximum: 3
          minimum: 0
          title: Port Group
          type: integer
        port_id:
          description: >-
            Network ID the subnet belongs to. Port will be plugged in this
            network.
          title: Port Id
          type: string
        type:
          const: reserved_fixed_ip
          description: >-
            An existing available reserved fixed IP will be attached to the
            instance. If the reserved IP is not public and you choose to add a
            floating IP, the instance will be accessible from the internet.
          title: Type
          type: string
      required:
        - type
        - port_id
      title: CreateBareMetalReservedFixedIpInterfaceSerializer
      type: object
    CreateBareMetalSubnetInterfaceSerializer:
      description: >-
        The instance will get an IP address from the selected network.

        If you choose to add a floating IP, the instance will be reachable from
        the internet.

        Otherwise, it will only have a private IP within the network.
      example:
        floating_ip:
          existing_floating_id: 57be69f6-6f6a-4f03-a4ad-8eb86c69ec0a
          source: existing
        network_id: 59905c8e-2619-420a-b046-536096473370
        subnet_id: e3c6ee77-48cb-416b-b204-11b492cc776e3
        type: subnet
      examples:
        - floating_ip:
            existing_floating_id: 57be69f6-6f6a-4f03-a4ad-8eb86c69ec0a
            source: existing
          network_id: 59905c8e-2619-420a-b046-536096473370
          subnet_id: e3c6ee77-48cb-416b-b204-11b492cc776e3
          type: subnet
      properties:
        floating_ip:
          description: >-
            Allows the instance to have a public IP that can be reached from the
            internet.
          discriminator:
            mapping:
              existing: >-
                #/components/schemas/ExistingInstanceFloatingIpInterfaceSerializer
              new: '#/components/schemas/NewInstanceFloatingIpInterfaceSerializer'
            propertyName: source
          oneOf:
            - $ref: '#/components/schemas/NewInstanceFloatingIpInterfaceSerializer'
            - $ref: >-
                #/components/schemas/ExistingInstanceFloatingIpInterfaceSerializer
          title: Floating Ip
        interface_name:
          description: >-
            Interface name. Defaults to `null` and is returned as `null` in the
            API response if not set.
          maxLength: 37
          title: Interface Name
          type: string
        network_id:
          description: The network where the instance will be connected.
          format: uuid4
          title: Network Id
          type: string
        port_group:
          default: 0
          description: >-
            Specifies the trunk group to which this interface belongs.
            Applicable only for bare metal servers. Each unique port group is
            mapped to a separate trunk port. Use this to control how interfaces
            are grouped across trunks.
          maximum: 3
          minimum: 0
          title: Port Group
          type: integer
        subnet_id:
          description: The instance will get an IP address from this subnet.
          format: uuid4
          title: Subnet Id
          type: string
        type:
          const: subnet
          description: >-
            The instance will get an IP address from the selected network. If
            you choose to add a floating IP, the instance will be reachable from
            the internet. Otherwise, it will only have a private IP within the
            network.
          title: Type
          type: string
      required:
        - type
        - network_id
        - subnet_id
      title: CreateBareMetalSubnetInterfaceSerializer
      type: object
    ProblemContext:
      additionalProperties: false
      description: >-
        Data for the `type`. One flat object shared by all types. Each `type`
        always sends the same keys, and a key that the server cannot fill is
        `null`. The keys of each type:

        - `resource-in-use`: `blocking_resources`, `blocking_count`

        - `quota-exceeded`: `quotas`

        - `not-available`: `reason`, `region_id`, `resource_type`, `resource_id`

        - `permission-denied`: `operation`, `client_id`, `project_id`

        - `not-found`: `resource_type`, `resource_id`

        - `method-not-allowed`: `allowed_methods`

        - `resource-busy`: `resource_type`, `resource_id`, `resource_status`

        - `rate-limited`: `retry_after`

        - `service-unavailable`: `retry_after`

        The other types send no `context`, and neither does a `not-found` for an
        unknown URL.
      properties:
        allowed_methods:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          description: Methods that the endpoint supports.
          title: Allowed Methods
        blocking_count:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: Total number of blocking resources.
          title: Blocking Count
        blocking_resources:
          anyOf:
            - items:
                $ref: '#/components/schemas/ProblemBlockingResource'
              type: array
            - type: 'null'
          default: null
          description: At most 50 resources that block the request.
          title: Blocking Resources
        client_id:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: The account of the operation.
          title: Client Id
        operation:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Name of the operation that the credentials lack.
          title: Operation
        project_id:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: The project of the operation.
          title: Project Id
        quotas:
          anyOf:
            - items:
                $ref: '#/components/schemas/ProblemQuota'
              type: array
            - type: 'null'
          default: null
          description: The quotas that the request exceeds.
          title: Quotas
        reason:
          anyOf:
            - $ref: '#/components/schemas/NotAvailableReason'
            - type: 'null'
          default: null
          description: Why the resource is not available.
        region_id:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: The region of the error.
          title: Region Id
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: ID or name of the resource.
          title: Resource Id
        resource_status:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Current status of the resource.
          title: Resource Status
        resource_type:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            Type of the resource, as the permissions name it, such as
            `instances`.
          title: Resource Type
        retry_after:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: >-
            Seconds to wait before the next request. `null` when the server
            cannot tell.
          title: Retry After
      title: ProblemContext
      type: object
    ProblemError:
      additionalProperties: false
      description: One invalid input.
      properties:
        code:
          description: >-
            What is wrong, as a code from a fixed list, such as `missing`,
            `int_parsing` or `less_than_equal`, or one of the shared codes:
            `not_unique`, `not_found`, `mutually_exclusive`, `missing_one_of`,
            `incompatible_value`, `invalid_format`, `duplicate_item`,
            `invalid_status`. Codes are only added, never renamed or removed.
            Treat an unknown code like `value_error`.
          type: string
        ctx:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          description: >-
            Values of the broken constraint, such as `{"le": 4096}`. Absent when
            the check has no values.
          title: Ctx
        detail:
          description: What is wrong with the input.
          title: Detail
          type: string
        loc:
          description: >-
            Path to the input. Starts with `body`, `query`, `path` or `header`.
            A query filter is the parameter, then the operator: `name[contains]`
            is `["query", "name", "contains"]`.
          items:
            anyOf:
              - type: string
              - type: integer
          title: Loc
          type: array
      required:
        - loc
        - code
        - detail
      title: ProblemError
      type: object
    ProblemType:
      enum:
        - internal-server-error
        - method-not-allowed
        - not-available
        - not-found
        - permission-denied
        - quota-exceeded
        - rate-limited
        - resource-busy
        - resource-in-use
        - service-unavailable
        - unauthorized
        - validation-error
      title: ProblemType
      type: string
    ExistingInstanceFloatingIpInterfaceSerializer:
      properties:
        existing_floating_id:
          description: >-
            An existing available floating IP id must be specified if the source
            is set to `existing`
          example: e3c6ee77-48cb-416b-b204-11b492cc776e3
          examples:
            - e3c6ee77-48cb-416b-b204-11b492cc776e3
          format: uuid4
          title: Existing Floating Id
          type: string
        source:
          const: existing
          description: >-
            An existing available floating IP will be attached to the instance.
            A floating IP is a public IP that makes the instance accessible from
            the internet, even if it only has a private IP. It works like SNAT,
            allowing outgoing and incoming traffic.
          example: existing
          examples:
            - existing
          title: Source
          type: string
      required:
        - source
        - existing_floating_id
      title: Existing floating IP
      type: object
    NewInstanceFloatingIpInterfaceSerializer:
      properties:
        source:
          const: new
          description: >-
            A new floating IP will be created and attached to the instance. A
            floating IP is a public IP that makes the instance accessible from
            the internet, even if it only has a private IP. It works like SNAT,
            allowing outgoing and incoming traffic.
          example: new
          examples:
            - new
          title: Source
          type: string
      required:
        - source
      title: New floating IP
      type: object
    InterfaceIPFamily:
      enum:
        - dual
        - ipv4
        - ipv6
      title: InterfaceIPFamily
      type: string
    ProblemBlockingResource:
      additionalProperties: false
      description: One resource that blocks the request.
      properties:
        resource_id:
          description: ID of the blocking resource.
          title: Resource Id
          type: string
        resource_name:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Name of the blocking resource.
          title: Resource Name
        resource_type:
          description: >-
            Type of the blocking resource, as the permissions name it, such as
            `ports`.
          title: Resource Type
          type: string
      required:
        - resource_type
        - resource_id
      title: ProblemBlockingResource
      type: object
    ProblemQuota:
      additionalProperties: false
      description: One quota that the request exceeds.
      properties:
        available:
          anyOf:
            - type: integer
            - type: number
          description: '`limit` minus `usage`.'
          title: Available
        limit:
          anyOf:
            - type: integer
            - type: number
          description: The limit of the quota.
          title: Limit
        name:
          description: Quota name, such as `vm_count`.
          title: Name
          type: string
        overflow:
          anyOf:
            - type: integer
            - type: number
          description: 'The amount above the limit: `resulting_usage` minus `limit`.'
          title: Overflow
        region_id:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            Region of a regional quota. `null` for a global quota, or when
            unknown.
          title: Region Id
        requested:
          anyOf:
            - type: integer
            - type: number
          description: The amount that the request adds.
          title: Requested
        resulting_usage:
          anyOf:
            - type: integer
            - type: number
          description: 'The usage after the request: `usage` plus `requested`.'
          title: Resulting Usage
        scope:
          anyOf:
            - $ref: '#/components/schemas/QuotaScope'
            - type: 'null'
          description: >-
            `regional` for a quota of one region, `global` for a quota of the
            account. `null` when the server cannot tell.
        unit:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Unit of the numbers, such as `MiB`, `GiB` or `bytes`. `null` for a
            quota that counts items.
          title: Unit
        usage:
          anyOf:
            - type: integer
            - type: number
          description: The usage before the request.
          title: Usage
      required:
        - name
        - scope
        - region_id
        - limit
        - usage
        - available
        - requested
        - resulting_usage
        - overflow
        - unit
      title: ProblemQuota
      type: object
    NotAvailableReason:
      enum:
        - account
        - balance
        - capacity
        - plan
        - region
      title: NotAvailableReason
      type: string
    QuotaScope:
      enum:
        - global
        - regional
      title: QuotaScope
      type: string
  responses:
    ProblemBadRequestWithLegacyKeys:
      description: >-
        The request cannot succeed as it is. `type` is `validation-error`,
        `resource-in-use`, `quota-exceeded` or `not-available`.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemWithLegacyKeys'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        Content-Language:
          $ref: '#/components/headers/ContentLanguage'
    ProblemUnauthorizedWithLegacyKeys:
      description: The request has no valid credentials. `type` is `unauthorized`.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemWithLegacyKeys'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        Content-Language:
          $ref: '#/components/headers/ContentLanguage'
    ProblemForbiddenWithLegacyKeys:
      description: >-
        The credentials do not permit the operation, or another service manages
        the resource. `type` is `permission-denied`.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemWithLegacyKeys'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        Content-Language:
          $ref: '#/components/headers/ContentLanguage'
    ProblemNotFoundWithLegacyKeys:
      description: The resource or the URL does not exist. `type` is `not-found`.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemWithLegacyKeys'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        Content-Language:
          $ref: '#/components/headers/ContentLanguage'
    ProblemConflictWithLegacyKeys:
      description: >-
        The resource is in a transient state. `type` is `resource-busy`. Send
        the same request again after the `Retry-After` seconds.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemWithLegacyKeys'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        Content-Language:
          $ref: '#/components/headers/ContentLanguage'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
    ProblemInternalServerErrorWithLegacyKeys:
      description: >-
        The server cannot complete the request. `type` is
        `internal-server-error`.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemWithLegacyKeys'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        Content-Language:
          $ref: '#/components/headers/ContentLanguage'
    ProblemServiceUnavailableWithLegacyKeys:
      description: >-
        The service is down for a known reason, such as planned maintenance.
        `type` is `service-unavailable`. A 503 without the
        `application/problem+json` media type, and every 502 and 504, comes from
        the gateway and has no problem body.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemWithLegacyKeys'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        Content-Language:
          $ref: '#/components/headers/ContentLanguage'
  headers:
    RequestId:
      description: The ID of the request, the same as `request_id` in the body.
      schema:
        type: string
    ContentLanguage:
      description: >-
        The language of `title`, `detail`, `hint` and `errors[].detail`, from
        the `Accept-Language` of the request. Any other field is the same in
        every language.
      schema:
        type: string
        enum:
          - en
          - de
          - ru
          - az
          - zh
          - fr
          - es
          - pt
          - ko
          - ja
          - tr
    RetryAfter:
      description: >-
        The number of seconds to wait before the client sends the same request
        again.
      schema:
        type: integer
        minimum: 0
        maximum: 60
  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

````