openapi: 3.1.0
info:
  title: Elastic Metal - Flexible IP API
  description: |-
    Flexible IP addresses are additional public IP addresses that you can hold independently of any Elastic Metal server. They can either be IPv4 (single IP) or IPv6 (/64 IP block).

    Flexible IPs can be attached to and detached from any Elastic Metal server within the same zone. You can hold multiple flexible IPs in your account, and a given server can be linked to multiple flexible IPs. When you delete a flexible IP address, it is disassociated from your account.

    Flexible IPs can also be used to implement failovers. If any failure or maintenance issue occurs on a given Elastic Metal server, its flexible IP address can be transferred to another server.


    <Message type="important">
      This documentation refers to flexible IPs for Elastic Metal servers. Refer to the corresponding product documentation if you are looking for information about flexible IPs for other products.
    </Message>


    ## Concepts

    Refer to our [dedicated concepts page](https://www.scaleway.com/en/docs/elastic-metal/concepts/) to find definitions of the different terms referring to Elastic Metal and flexible IPs.

    ## Quickstart




    1. **Configure your environment variables.**
        ```bash
        export SCW_ACCESS_KEY="<API access key>"
        export SCW_SECRET_KEY="<API secret key>"
        export SCW_DEFAULT_ZONE="<Scaleway default zone>"
        ```
        <Message type="note">
        This is an optional step that seeks to simplify your usage of the APIs. Refer to the Availability Zones section to verify which zones are available for use.
        </Message>

    2. **Edit the POST request payload** that we will use in the next step to create a flexible IP.
        ```
        {
        "project_id": "88f30nda-6768-9293-a89c-2b0b178628a6",
        "description": "This is the description of my fIP",
        "tags": [
            "tag1"
        ],
        "server_id": "9dddd3sa-f13c-4351-9185-18f6b6d97t9w",
        "reverse": "9dddd3se-f14c-4859-9185-18f6b6d78f8b.fr-par-1.baremetal.scw.cloud",
        "is_ipv6": true
        }
        ```

        | Parameter      | Description                                                        |
        |----------------|--------------------------------------------------------------------|
        | `project_id`   | **REQUIRED** ID of the Project to create your flexible IP in.      |
        | `description`  | A description for your flexible IP (max. 255 characters).          |
        | `tags`         | One or several tags for your flexible IP (optional)                |
        | `server_id`    | ID of the server on which to attach your newly created flexible IP.|
        | `reverse`      | Value of the server's reverse DNS.                                 |
        | `is_ipv6`      | **BOOLEAN** Defines whether the flexible IP has an IPv6 address.   |

        <Message type="note">
        Except when specified, all values are nullable.
        </Message>

    3. **Create a flexible IP**: run the following command to create a flexible IP, including the payload you edited in the previous step.
        ```bash
        curl -X POST \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          -H "Content-Type: application/json" \
          "https://api.scaleway.com/flexible-ip/v1alpha1/zones/$SCW_DEFAULT_ZONE/fips" \
          -d '{
              "project_id": "88f30nda-6768-9293-a89c-2b0b178628a6",
              "description": "This is the description of my fIP",
              "tags": [
                  "tag1"
              ],
              "server_id": "9dddd3sa-f13c-4351-9185-18f6b6d97t9w",
              "reverse": "9dddd3se-f14c-4859-9185-18f6b6d78f8b.fr-par-1.baremetal.scw.cloud",
              "is_ipv6": true
              }'
        ```

        You should get an output similar to the following one, providing details about your flexible IP:

        <Message type="note">
        This is a response example, the UUIDs and IP address displayed are not real.
        </Message>

        ```bash
        {
            "id": "058d9f12-c33d-523d-b216-da4c9d0f3d66",
            "organization_id": "88f30nda-6768-9293-a89c-2b0b178628a6",
            "project_id": "88f30nda-6768-9293-a89c-2b0b178628a6",
            "description": "This is the description of my fIP",
            "updated_at": "2023-04-04T13:34:19.058178830Z",
            "created_at": "2023-01-31T16:30:54.017824Z",
            "status": "updating",
            "tags": [
                "tag1"
            ],
            "ip_address": "1998:cb9:813:24f3::/75",
            "server_id": null,
            "reverse": "9dddd3se-f14c-4859-9185-18f6b6d78f8b.fr-par-1.baremetal.scw.cloud",
            "mac_address": null,
            "zone": "fr-par-1"
        }
        ```

    4. **Get a list of your flexible IPs**: run the following command to get a list of all the flexible IPs in your account, with their details:
        ```bash
        curl -X GET \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          -H "Content-Type: application/json" \
          "https://api.scaleway.com/flexible-ip/v1alpha1/zones/$SCW_DEFAULT_ZONE/fips"
        ```

    5. **Generate a virtual MAC (Media Access Control) address**: run the following command to generate a virtual MAC address on a given flexible IP. Ensure that you replace `<FLEXIBLE-IP-ID>` in the URL with the ID of the flexible IP you want to create a virtual MAC address for.
        ```bash
        curl -X POST \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          -H "Content-Type: application/json" \
          "https://api.scaleway.com/flexible-ip/v1alpha1/zones/$SCW_DEFAULT_ZONE/fips/<FLEXIBLE-IP-ID>/mac" \
          -d '{
            "mac_type": "<MAC_TYPE>"
          }'
        ```

        **Payload value**

        * **mac_type** (string): Choose the type of virtual MAC address you want to generate on your flexible IP: `vmware`, `xen` or `kvm` (with the default value being set to `unknown_type`). To get more information about the available virtual MAC addresses, refer to the "Technical information" part of this quickstart.

    6. **Duplicate a virtual MAC (Media Access Control) address**: run the following command to duplicate a Virtual MAC from a given flexible IP onto another flexible IP attached to the same server.
        ```bash
        curl -X POST \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          -H "Content-Type: application/json" \
          "https://api.scaleway.com/flexible-ip/v1alpha1/zones/$SCW_DEFAULT_ZONE/fips/<fip_id> \
          -d '{
            "duplicate_from_fip_id": "<ID_OF_THE_FIP_TO_DUPLICATE_MAC_FROM>"
          }'
        ```
        **Payload values**

        * **fip_id** (string): ID of the flexible IP on which to duplicate the Virtual MAC. Note that flexible IPs need to be attached to the same server for the operation to work.
        * **duplicate_from_fip_id** (string): ID of the flexible IP to duplicate the Virtual MAC from.


    <Message type="requirement">
    To perform the following steps, you must first ensure that:
    - You have a [Scaleway account](https://console.scaleway.com/)
    - You have [created an API key](https://www.scaleway.com/en/docs/iam/how-to/create-api-keys/) and that the API key has [sufficient IAM permissions](https://www.scaleway.com/en/docs/iam/reference-content/permission-sets/) to perform the actions described on this page
    - You have [installed `curl`](https://curl.se/download.html)
    </Message>


    ## Technical information

    A virtual MAC (Media Access Control) address can be generated on a flexible IP. Virtual MAC addresses are unique identifiers assigned to a virtual machine's network interface. This is particularly useful for virtualization technologies enabling multiple virtual machines to run on a single host machine (now called a hypervisor).

    Flexible IPs can have virtual MAC addresses assigned to them, and it is possible to duplicate these virtual MAC addresses between flexible IPs on the same server. When a virtual MAC address is duplicated onto another flexible IP, the two become part of the same virtual MAC group.

    When flexible IPs belong to a given MAC group, they cannot be moved separately to another server. Both must be transferred to the new server, as a group. Subsequently, a MAC group can be moved by providing a list of flexible IP IDs in Attach/Detach requests.

    Note that if you detach a single flexible IP from a MAC group, the virtual MAC address will be removed from the detached flexible IP.

    ### Availability Zones

    Flexible IPs are available in the following Availability Zones:

    | Name      | API ID                           |
    |-----------|--------------------------------- |
    | Paris     | `fr-par-1` `fr-par-2`            |
    | Amsterdam | `nl-ams-1` `nl-ams-2`            |
    | Warsaw    | `pl-waw-2` `pl-waw-3`            |

    ## Technical limitations

    - Flexible IPs exist for many resources (Instances, Load Balancers, etc). Note, however, that each of these sets of flexible IPs is independent and usable only with that product. This API concerns flexible IPs for Elastic Metal servers only.
    - There is a limit of 64 flexible IPs per server
    ## Going further

    For more help using flexible IPs, check out the following resources:
    - Our [main documentation](https://www.scaleway.com/en/docs/elastic-metal/)
    - Our [Slack Community](https://www.scaleway.com/en/docs/tutorials/scaleway-slack-community/)
    - Our [support ticketing system](https://www.scaleway.com/en/docs/account/how-to/open-a-support-ticket/).
  version: v1alpha1
servers:
- url: https://api.scaleway.com
tags:
- name: Flexible IP
  description: |
    A flexible IP can be attached to any Elastic Metal server within the same zone.
    Multiple flexible IPs can be attached to a server.
components:
  schemas:
    scaleway.flexible_ip.v1alpha1.AttachFlexibleIPsResponse:
      type: object
      properties:
        total_count:
          type: integer
          description: Total count of flexible IPs that are being updated.
          format: uint32
        flexible_ips:
          type: array
          description: List of flexible IPs in an updating state.
          items:
            $ref: '#/components/schemas/scaleway.flexible_ip.v1alpha1.FlexibleIP'
      x-properties-order:
      - total_count
      - flexible_ips
    scaleway.flexible_ip.v1alpha1.DetachFlexibleIPsResponse:
      type: object
      properties:
        total_count:
          type: integer
          description: Total count of flexible IPs that are being detached.
          format: uint32
        flexible_ips:
          type: array
          description: List of flexible IPs in a detaching state.
          items:
            $ref: '#/components/schemas/scaleway.flexible_ip.v1alpha1.FlexibleIP'
      x-properties-order:
      - total_count
      - flexible_ips
    scaleway.flexible_ip.v1alpha1.FlexibleIP:
      type: object
      properties:
        id:
          type: string
          description: ID of the flexible IP.
        organization_id:
          type: string
          description: ID of the Organization the flexible IP is attached to.
        project_id:
          type: string
          description: ID of the Project the flexible IP is attached to.
        description:
          type: string
          description: Flexible IP description.
        tags:
          type: array
          description: Flexible IP tags.
          items:
            type: string
        updated_at:
          type: string
          description: Date on which the flexible IP was last updated. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        created_at:
          type: string
          description: Date on which the flexible IP was created. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        status:
          type: string
          description: |-
            Flexible IP status.
            - ready : flexible IP is created and ready to be attached to a server or to be associated with a virtual MAC.
            - updating: flexible IP is being attached to a server or a virtual MAC operation is ongoing
            - attached: flexible IP is attached to a server
            - error: a flexible IP operation resulted in an error
            - detaching: flexible IP is being detached from a server
            - locked: the resource of the flexible IP is locked.
          enum:
          - unknown
          - ready
          - updating
          - attached
          - error
          - detaching
          - locked
          default: unknown
        ip_address:
          type: string
          description: IP of the flexible IP. (IP network)
          example: 1.2.3.4/32
        mac_address:
          type: object
          description: MAC address of the flexible IP.
          properties:
            id:
              type: string
              description: ID of the flexible IP.
            mac_address:
              type: string
              description: MAC address of the Virtual MAC.
            mac_type:
              type: string
              description: Type of virtual MAC.
              enum:
              - unknown_type
              - vmware
              - xen
              - kvm
              default: unknown_type
            status:
              type: string
              description: Status of virtual MAC.
              enum:
              - unknown
              - ready
              - updating
              - used
              - error
              - deleting
              default: unknown
            updated_at:
              type: string
              description: Date on which the virtual MAC was last updated. (RFC 3339
                format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            created_at:
              type: string
              description: Date on which the virtual MAC was created. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            zone:
              type: string
              description: MAC address IP Availability Zone.
          x-properties-order:
          - id
          - mac_address
          - mac_type
          - status
          - updated_at
          - created_at
          - zone
        server_id:
          type: string
          description: ID of the server linked to the flexible IP.
          nullable: true
        reverse:
          type: string
          description: Reverse DNS value.
        zone:
          type: string
          description: Availability Zone of the flexible IP.
      x-properties-order:
      - id
      - organization_id
      - project_id
      - description
      - tags
      - updated_at
      - created_at
      - status
      - ip_address
      - mac_address
      - server_id
      - reverse
      - zone
    scaleway.flexible_ip.v1alpha1.FlexibleIP.Status:
      type: string
      enum:
      - unknown
      - ready
      - updating
      - attached
      - error
      - detaching
      - locked
      default: unknown
    scaleway.flexible_ip.v1alpha1.ListFlexibleIPsResponse:
      type: object
      properties:
        total_count:
          type: integer
          description: Total count of matching flexible IPs.
          format: uint32
        flexible_ips:
          type: array
          description: List of all flexible IPs.
          items:
            $ref: '#/components/schemas/scaleway.flexible_ip.v1alpha1.FlexibleIP'
      x-properties-order:
      - total_count
      - flexible_ips
  securitySchemes:
    scaleway:
      in: header
      name: X-Auth-Token
      type: apiKey
paths:
  /flexible-ip/v1alpha1/zones/{zone}/fips:
    get:
      tags:
      - Flexible IP
      operationId: ListFlexibleIPs
      summary: List flexible IPs
      description: List all flexible IPs within a given zone.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - pl-waw-2
          - pl-waw-3
      - in: query
        name: order_by
        description: Sort order of the returned flexible IPs.
        schema:
          type: string
          enum:
          - created_at_asc
          - created_at_desc
          default: created_at_asc
      - in: query
        name: page
        description: Page number.
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        description: Maximum number of flexible IPs per page.
        schema:
          type: integer
          format: uint32
      - in: query
        name: tags
        description: Filter by tag, only flexible IPs with one or more matching tags
          will be returned.
        schema:
          type: array
          items:
            type: string
      - in: query
        name: status
        description: Filter by status, only flexible IPs with this status will be
          returned.
        schema:
          type: array
          items:
            $ref: '#/components/schemas/scaleway.flexible_ip.v1alpha1.FlexibleIP.Status'
      - in: query
        name: server_ids
        description: Filter by server IDs, only flexible IPs with these server IDs
          will be returned.
        schema:
          type: array
          items:
            type: string
      - in: query
        name: organization_id
        description: Filter by Organization ID, only flexible IPs from this Organization
          will be returned.
        schema:
          type: string
      - in: query
        name: project_id
        description: Filter by Project ID, only flexible IPs from this Project will
          be returned.
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.flexible_ip.v1alpha1.ListFlexibleIPsResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Flexible IP
      operationId: CreateFlexibleIP
      summary: Create a new flexible IP
      description: Generate a new flexible IP within a given zone, specifying its
        configuration including Project ID and description.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - pl-waw-2
          - pl-waw-3
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.flexible_ip.v1alpha1.FlexibleIP'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  type: string
                  description: ID of the project to associate with the Flexible IP.
                description:
                  type: string
                  description: Flexible IP description (max. of 255 characters).
                tags:
                  type: array
                  description: Tags to associate to the flexible IP.
                  items:
                    type: string
                server_id:
                  type: string
                  description: ID of the server to which the newly created flexible
                    IP will be attached.
                  nullable: true
                reverse:
                  type: string
                  description: Value of the reverse DNS.
                  nullable: true
                is_ipv6:
                  type: boolean
                  description: Defines whether the flexible IP has an IPv6 address.
              required:
              - project_id
              x-properties-order:
              - project_id
              - description
              - tags
              - server_id
              - reverse
              - is_ipv6
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "description": "string",
              "is_ipv6": false,
              "project_id": "string"
            }' \
            "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips" \
            X-Auth-Token:$SCW_SECRET_KEY \
            description="string" \
            is_ipv6:=false \
            project_id="string"
  /flexible-ip/v1alpha1/zones/{zone}/fips/{fip_id}:
    get:
      tags:
      - Flexible IP
      operationId: GetFlexibleIP
      summary: Get an existing flexible IP
      description: Retrieve information about an existing flexible IP, specified by
        its ID and zone. Its full details, including Project ID, description and status,
        are returned in the response object.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: fip_id
        description: ID of the flexible IP.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.flexible_ip.v1alpha1.FlexibleIP'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips/{fip_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips/{fip_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Flexible IP
      operationId: UpdateFlexibleIP
      summary: Update an existing flexible IP
      description: Update the parameters of an existing flexible IP, specified by
        its ID and zone. These parameters include tags and description.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: fip_id
        description: ID of the flexible IP to update.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.flexible_ip.v1alpha1.FlexibleIP'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  type: string
                  description: Flexible IP description (max. 255 characters).
                  nullable: true
                tags:
                  type: array
                  description: Tags associated with the flexible IP.
                  nullable: true
                  items:
                    type: string
                reverse:
                  type: string
                  description: Value of the reverse DNS.
                  nullable: true
              x-properties-order:
              - description
              - tags
              - reverse
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X PATCH \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips/{fip_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips/{fip_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Flexible IP
      operationId: DeleteFlexibleIP
      summary: Delete an existing flexible IP
      description: Delete an existing flexible IP, specified by its ID and zone. Note
        that deleting a flexible IP is permanent and cannot be undone.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: fip_id
        description: ID of the flexible IP to delete.
        required: true
        schema:
          type: string
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips/{fip_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips/{fip_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /flexible-ip/v1alpha1/zones/{zone}/fips/{fip_id}/mac:
    post:
      tags:
      - Flexible IP
      operationId: GenerateMACAddr
      summary: Generate a virtual MAC address on an existing flexible IP
      description: Generate a virtual MAC (Media Access Control) address on an existing
        flexible IP.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: fip_id
        description: ID of the flexible IP for which to generate a virtual MAC.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.flexible_ip.v1alpha1.FlexibleIP'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                mac_type:
                  type: string
                  description: TODO.
                  enum:
                  - unknown_type
                  - vmware
                  - xen
                  - kvm
                  default: unknown_type
              required:
              - mac_type
              x-properties-order:
              - mac_type
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"mac_type":"unknown_type"}' \
            "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips/{fip_id}/mac"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips/{fip_id}/mac" \
            X-Auth-Token:$SCW_SECRET_KEY \
            mac_type="unknown_type"
    delete:
      tags:
      - Flexible IP
      operationId: DeleteMACAddr
      summary: Detach a given virtual MAC address from an existing flexible IP
      description: Detach a given MAC (Media Access Control) address from an existing
        flexible IP.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: fip_id
        description: |-
          ID of the flexible IP from which to delete the virtual MAC.
          If the flexible IP belongs to a MAC group, the MAC will be removed from both the MAC group and flexible IP.
        required: true
        schema:
          type: string
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips/{fip_id}/mac"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips/{fip_id}/mac" \
            X-Auth-Token:$SCW_SECRET_KEY
  /flexible-ip/v1alpha1/zones/{zone}/fips/{fip_id}/mac/duplicate:
    post:
      tags:
      - Flexible IP
      operationId: DuplicateMACAddr
      summary: Duplicate a virtual MAC address to another flexible IP
      description: Duplicate a virtual MAC address from a given flexible IP to another
        flexible IP attached to the same server.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: fip_id
        description: |-
          ID of the flexible IP on which to duplicate the virtual MAC.
          Note that the flexible IPs need to be attached to the same server.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.flexible_ip.v1alpha1.FlexibleIP'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                duplicate_from_fip_id:
                  type: string
                  description: |-
                    ID of the flexible IP to duplicate the Virtual MAC from.
                    Note that flexible IPs need to be attached to the same server.
              required:
              - duplicate_from_fip_id
              x-properties-order:
              - duplicate_from_fip_id
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"duplicate_from_fip_id":"string"}' \
            "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips/{fip_id}/mac/duplicate"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips/{fip_id}/mac/duplicate" \
            X-Auth-Token:$SCW_SECRET_KEY \
            duplicate_from_fip_id="string"
  /flexible-ip/v1alpha1/zones/{zone}/fips/{fip_id}/mac/move:
    post:
      tags:
      - Flexible IP
      operationId: MoveMACAddr
      summary: Relocate an existing virtual MAC address to a different flexible IP
      description: Relocate a virtual MAC (Media Access Control) address from an existing
        flexible IP to a different flexible IP.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: fip_id
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.flexible_ip.v1alpha1.FlexibleIP'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                dst_fip_id:
                  type: string
              x-properties-order:
              - dst_fip_id
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"dst_fip_id":"string"}' \
            "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips/{fip_id}/mac/move"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips/{fip_id}/mac/move" \
            X-Auth-Token:$SCW_SECRET_KEY \
            dst_fip_id="string"
  /flexible-ip/v1alpha1/zones/{zone}/fips/attach:
    post:
      tags:
      - Flexible IP
      operationId: AttachFlexibleIP
      summary: Attach an existing flexible IP to a server
      description: Attach an existing flexible IP to a specified Elastic Metal server.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - pl-waw-2
          - pl-waw-3
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.flexible_ip.v1alpha1.AttachFlexibleIPsResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                fips_ids:
                  type: array
                  description: |-
                    List of flexible IP IDs to attach to a server.
                    Multiple IDs can be provided, but note that flexible IPs must belong to the same MAC group (see details about MAC groups).
                  items:
                    type: string
                server_id:
                  type: string
                  description: ID of the server on which to attach the flexible IPs.
              required:
              - fips_ids
              - server_id
              x-properties-order:
              - fips_ids
              - server_id
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"fips_ids":["string"],"server_id":"string"}' \
            "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips/attach"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips/attach" \
            X-Auth-Token:$SCW_SECRET_KEY \
            fips_ids:='["string"]' \
            server_id="string"
  /flexible-ip/v1alpha1/zones/{zone}/fips/detach:
    post:
      tags:
      - Flexible IP
      operationId: DetachFlexibleIP
      summary: Detach an existing flexible IP from a server
      description: Detach an existing flexible IP from a specified Elastic Metal server.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - pl-waw-2
          - pl-waw-3
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.flexible_ip.v1alpha1.DetachFlexibleIPsResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                fips_ids:
                  type: array
                  description: List of flexible IP IDs to detach from a server. Multiple
                    IDs can be provided. Note that flexible IPs must belong to the
                    same MAC group.
                  items:
                    type: string
              required:
              - fips_ids
              x-properties-order:
              - fips_ids
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"fips_ids":["string"]}' \
            "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips/detach"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/flexible-ip/v1alpha1/zones/{zone}/fips/detach" \
            X-Auth-Token:$SCW_SECRET_KEY \
            fips_ids:='["string"]'
