openapi: 3.0.0
info:
  title: Public Gateways API
  description: "Scaleway Public Gateways are building blocks for your infrastructure
    on Scaleway's public\ncloud. They sit at the border of Private Networks and provide
    access to/from other networks or the Internet. As well as this, Public Gateways
    offer a host of managed features and services to facilitate the management of
    resources in your Private Network, including NAT to map private IP addresses in
    the Private Network to the public IP address of the Public Gateway.\n\n(switchcolumn)\n<Message
    type=\"tip\">\nTo create and manage your Private Networks, check out the [VPC
    API](https://www.scaleway.com/en/developers/api/vpc).\n</Message>\n(switchcolumn)\n\n##
    Concepts\n\nRefer to our [dedicated concepts page](https://www.scaleway.com/en/docs/network/public-gateways/concepts/)
    to find definitions of all terminology related to Public Gateways, including NAT,
    SSH bastion and more.\n\n(switchcolumn)\n(switchcolumn)\n\n## Quickstart\n\n1.
    Configure your environment variables.\n\n    <Message type=\"note\">\n    This
    is an optional step that seeks to simplify your usage of the Public Gateways API.\n
    \   </Message> \n\n    ```bash\n    export SCW_SECRET_KEY=\"<API secret key>\"\n
    \   export SCW_DEFAULT_ZONE=\"<Scaleway default Availability Zone>\"\n    export
    SCW_PROJECT_ID=\"<Scaleway Project ID>\"\n    ```\n\n2. **Choose a Public Gateway
    type**: Public Gateways come in different shapes and sizes, with different network
    capabilities and pricing. When you create your Public Gateway, you need to include
    the required Public Gateway type in the request. Use the following call to get
    a list of available Public Gateway offer types and their details:\n\n    ```bash\n
    \   curl -X GET \\\n        -H \"X-Auth-Token: $SCW_SECRET_KEY\" \\\n        -H
    \"Content-Type: application/json\" \\\n        \"https://api.scaleway.com/vpc-gw/v2/zones/$SCW_DEFAULT_ZONE/gateway-types\"
    \  \n    ```\n\n3. **Create a Public Gateway**: run the following command to create
    a Public Gateway. You can customize the details in the payload (name, description,
    tags, etc) to your needs: use the information below to adjust the payload as necessary.\n\n
    \   ```bash\n    curl -X POST \\\n        -H \"X-Auth-Token: $SCW_SECRET_KEY\"
    \\\n        -H \"Content-Type: application/json\" \\\n        \"https://api.scaleway.com/vpc-gw/v2/zones/$SCW_DEFAULT_ZONE/gateways\"
    \\\n        -d '{\n            \"type\": \"VPC-GW-S\", \n            \"name\":
    \"my-new-gateway\",\n            \"tags\": [\"my-first-tag\", \"my-second-tag\"],
    \n            \"project_id\": \"'\"$SCW_PROJECT_ID\"'\"\n            }'\n    ```\n\n
    \   | Parameter       | Description                                         |
    Valid values                  | \n    |-----------------|-----------------------------------------------------|-------------------------------|\n
    \   | type            | The type of Public Gateway (commercial offer type) to
    create. Use the Gateway Types endpoint to get a list of offer types. | Any valid
    offer type string, e.g. `VPC-GW-S` |\n    | name            | A name of your choice
    for the Public Gateway        | Any string containing only alphanumeric characters
    and dashes, e.g. `my-new-gateway`. |\n    | tags            | A list of tags to
    describe your Public Gateway. These can help you manage and filter your gateways.
    | A list of alphanumeric strings, e.g. `[\"my-first-tag`, `my-second-tag` |\n
    \   | project_id      | The Scaleway Project ID to create the Public Gateway in.
    | A valid Scaleway Project ID, e.g. `f5fe13a0-b9c7-11ed-afa1-0242ac120002` |\n\n
    \   **Note**: Further parameters are available, but for the purposes of this quickstart
    we have included only the essentials. See the `Create a Public Gateway` endpoint
    documentation below for full details of all possible parameters.\n\n4. **Get a
    list of your Public Gateways**: run the following command to get a list of all
    your Public Gateways.\n\n    ```bash\n    curl -X GET \\\n        -H \"X-Auth-Token:
    $SCW_SECRET_KEY\" \\\n        -H \"Content-Type: application/json\" \\\n        \"https://api.scaleway.com/vpc-gw/v2/zones/$SCW_DEFAULT_ZONE/gateways\"\n
    \   ```\n\n5. **Attach a Private Network to a Public Gateway**: run the following
    command to attach a Private Network to your Public Gateway, and make all the Gateway's
    services such as NAT available to the Private Network. You can customize the details
    in the payload to your needs: use the information below to adjust the payload
    as necessary.\n\n   <Message type=\"tip\">\n   If you haven't created a Private
    Network yet, see the [Private Networks](https://www/scaleway.com/en/developers/api/vpc/)
    documentation to learn how to do so. Ensure you retain the ID of the Private Network.\n
    \  </Message>\n\n    ```bash\n    curl -X POST \\\n        -H \"X-Auth-Token:
    $SCW_SECRET_KEY\" \\\n        -H \"Content-Type: application/json\" \\\n        \"https://api.scaleway.com/vpc-gw/v2/zones/$SCW_DEFAULT_ZONE/gateway-networks\"
    \\\n        -d '{\n            \"gateway_id\": \"b1b2edda-9364-422d-93f2-ad04e6a054dc\",
    \n            \"private_network_id\": \"548dbcc3-8b78-486f-a79a-c3f5a17642f9\",\n
    \           \"enable_masquerade\": true\n        }'\n    ```\n\n    This configuration
    will set up the Public Gateway as a NAT gateway, masquerading traffic sent to
    it to the\n    outer internet to provide internet access to resources in the Private
    Network.\n\n    | Parameter       | Description                                         |
    Valid values                  | \n    |-----------------|-----------------------------------------------------|-------------------------------|\n
    \   | gateway_id      | The Public Gateway ID of an existing Public Gateway |
    Any valid Public Gateway ID, e.g. `b1b2edda-9364-422d-93f2-ad04e6a054dc` |\n    |
    private_network_id    | The Private Network ID of an existing Private Network
    \ | Any valid Private Network ID in the same Availability Zone as the Public Gateway,
    e.g. `548dbcc3-8b78-486f-a79a-c3f5a17642f9` |\n    | enable_masquerade     | Defines
    whether the gateway should masquerade traffic for the attached Private Network
    (i.e. whether to enable dynamic NAT) | A boolean value, e.g. `true` |\n\n    <Message
    type=\"note\">\n    Further parameters are available, but for the purposes of
    this quickstart we have included only the essentials. See the [Attach a gateway
    to a Private Network](#path-gateway-networks-attach-a-public-gateway-to-a-private-network)
    documentation below for full details of all possible parameters.\n    </Message>\n\n6.
    **Delete a Public Gateway**: run the following call to delete your Public Gateway.
    Ensure that you replace `<PUBLIC-GATEWAY-ID>` in the URL with the ID of the Public
    Gateway you want to delete.\n\n    ```bash\n    curl -X DELETE \\\n        -H
    \"X-Auth-Token: $SCW_SECRET_KEY\" \\\n        -H \"Content-Type: application/json\"
    \\\n        \"https://api.scaleway.com/vpc-gw/v2/zones/$SCW_DEFAULT_ZONE/gateways/<PUBLIC-GATEWAY-ID>\"\n
    \   ```\n\n    The expected successful response is empty.\n\n    (switchcolumn)\n
    \   <Message type=\"requirement\">\n    - You have a [Scaleway account](https://console.scaleway.com/)\n
    \   - You have [created an API key](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/)
    and that the API key has sufficient [IAM permissions](https://www.scaleway.com/en/docs/identity-and-access-management/iam/reference-content/permission-sets/)
    to perform the actions described on this page\n    - You have [installed `curl`](https://curl.se/download.html)\n
    \   </Message>\n    (switchcolumn)\n\n## Technical limitations\n\nThe following
    limitations apply to Public Gateways:\n\n- A maximum of eight (8) Private Networks
    can be plugged into a single Public Gateway\n- Note that the Public Gateway takes
    some time to start up, and actions on it are\nimpossible unless it is in the `running`
    state. To check the current state of a Public Gateway, use the [Get a Public Gateway](#path-gateways-get-a-public-gateway)
    endpoint to get information for your gateway: the `status` field of the response
    will tell you if it is running or in another state.\n- For further information
    about Public Gateway limitations see our [dedicated documentation](https://www.scaleway.com/en/docs/network/public-gateways/troubleshooting/gw-limitations/).\n\n\n##
    Technical information\n\n### Availability Zones\n\nPublic Gateways can be deployed
    in the following Availability Zones:\n\n| Name      | API ID                |\n|-----------|-----------------------|\n|
    Paris     | `fr-par-1` `fr-par-2` |\n| Amsterdam | `nl-ams-1` `nl-ams-2` `nl-ams-3`
    |\n| Warsaw    | `pl-waw-1` `pl-waw-2` `pl-waw-3` |\n\nThe Scaleway Public Gateways
    API is a **zoned** API, meaning that each call must specify in its path parameters
    the Availability Zone for the resources concerned by the call.\n\n\n## Going further\n\nFor
    more help using Scaleway Public Gateways, check out the following resources:\n-
    Our [main documentation](https://www.scaleway.com/en/docs/network/public-gateways/)\n-
    The #public-gateway channel on our [Slack Community](https://www.scaleway.com/en/docs/tutorials/scaleway-slack-community/)\n-
    Our [support ticketing system](https://www.scaleway.com/en/docs/console/my-account/how-to/open-a-support-ticket/)."
  version: v2
servers:
- url: https://api.scaleway.com
tags:
- name: Gateways
  description: |
    Public Gateways are building blocks for your infrastructure on Scaleway's shared public cloud. They provide a set of managed network services and features for Scaleway's Private Networks such NAT and PAT rules.
- name: Gateway Networks
  description: |
    A Gateway Network represents the connection of a Private Network to a Public Gateway.
- name: PAT Rules
  description: |
    PAT (Port Address Translation) rules, aka static NAT rules, belong to a specified Public Gateway.  They define the forwarding of a public port to a specific device on a Private Network, enabling enables ingress traffic from the public Internet  to reach the correct device in the Private Network.
- name: IPs
  description: |
    Public, flexible IP addresses for Public Gateways, allowing the gateway to reach the public internet, as well as forward (masquerade) traffic from member devices of attached Private Networks.
- name: Gateway Types
  description: |
    Public Gateways come in various shapes, sizes and prices, which are  described by gateway types. They represent the different commercial  offer types for Public Gateways available at Scaleway.
- name: Allowed IPs
  description: |
    SSH bastion can be restricted by defining ranges of IPs that are allowed to connect. The default entry of 0.0.0.0/0 allows all IPs to connect.
components:
  schemas:
    scaleway.vpc_gw.v2.AddBastionAllowedIPsResponse:
      type: object
      properties:
        ip_ranges:
          type: array
          description: Ranges of IP addresses allowed to connect to the gateway's
            SSH bastion. (IP network)
          example:
          - 1.2.3.4/32
          items:
            type: string
      x-properties-order:
      - ip_ranges
    scaleway.vpc_gw.v2.Gateway:
      type: object
      properties:
        id:
          type: string
          description: ID of the gateway. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        organization_id:
          type: string
          description: Owning Organization. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        project_id:
          type: string
          description: Owning Project. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        created_at:
          type: string
          description: Gateway creation date. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        updated_at:
          type: string
          description: Gateway last modification date. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        type:
          type: string
          description: Gateway type name (commercial offer).
        bandwidth:
          type: integer
          description: Bandwidth available of the gateway.
          format: uint64
        status:
          type: string
          description: Current status of the gateway.
          enum:
          - unknown_status
          - stopped
          - allocating
          - configuring
          - running
          - stopping
          - failed
          - deleting
          - locked
          default: unknown_status
        name:
          type: string
          description: Name of the gateway.
        tags:
          type: array
          description: Tags associated with the gateway.
          items:
            type: string
        ipv4:
          type: object
          description: Public IPv4 address of the gateway.
          properties:
            id:
              type: string
              description: IP address ID. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            organization_id:
              type: string
              description: Owning Organization. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            project_id:
              type: string
              description: Owning Project. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            created_at:
              type: string
              description: IP address creation date. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            updated_at:
              type: string
              description: IP address last modification date. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            tags:
              type: array
              description: Tags associated with the IP address.
              items:
                type: string
            address:
              type: string
              description: The IP address itself. (IP address)
              example: 1.2.3.4
            reverse:
              type: string
              description: Reverse domain name for the IP address.
            gateway_id:
              type: string
              description: Public Gateway associated with the IP address. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            zone:
              type: string
              description: Zone of the IP address.
          x-properties-order:
          - id
          - organization_id
          - project_id
          - created_at
          - updated_at
          - tags
          - address
          - reverse
          - gateway_id
          - zone
        gateway_networks:
          type: array
          description: GatewayNetwork objects attached to the gateway (each one represents
            a connection to a Private Network).
          items:
            $ref: '#/components/schemas/scaleway.vpc_gw.v2.GatewayNetwork'
        version:
          type: string
          description: Version of the running gateway software.
        can_upgrade_to:
          type: string
          description: Newly available gateway software version that can be updated
            to.
        bastion_enabled:
          type: boolean
          description: Defines whether SSH bastion is enabled on the gateway.
        bastion_port:
          type: integer
          description: Port of the SSH bastion.
          format: uint32
        smtp_enabled:
          type: boolean
          description: Defines whether SMTP traffic is allowed to pass through the
            gateway.
        is_legacy:
          type: boolean
          description: Defines whether the gateway uses non-IPAM IP configurations.
        bastion_allowed_ips:
          type: array
          description: Ranges of IP addresses allowed to connect to the gateway's
            SSH bastion. (IP network)
          example:
          - 1.2.3.4/32
          items:
            type: string
        zone:
          type: string
          description: Zone of the gateway.
      x-properties-order:
      - id
      - organization_id
      - project_id
      - created_at
      - updated_at
      - type
      - bandwidth
      - status
      - name
      - tags
      - ipv4
      - gateway_networks
      - version
      - can_upgrade_to
      - bastion_enabled
      - bastion_port
      - smtp_enabled
      - is_legacy
      - bastion_allowed_ips
      - zone
    scaleway.vpc_gw.v2.Gateway.Status:
      type: string
      enum:
      - unknown_status
      - stopped
      - allocating
      - configuring
      - running
      - stopping
      - failed
      - deleting
      - locked
      default: unknown_status
    scaleway.vpc_gw.v2.GatewayNetwork:
      type: object
      properties:
        id:
          type: string
          description: ID of the Public Gateway-Private Network connection. (UUID
            format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        created_at:
          type: string
          description: Connection creation date. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        updated_at:
          type: string
          description: Connection last modification date. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        gateway_id:
          type: string
          description: ID of the connected Public Gateway. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        private_network_id:
          type: string
          description: ID of the connected Private Network. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        mac_address:
          type: string
          description: MAC address of the gateway in the Private Network (if the gateway
            is up and running).
        masquerade_enabled:
          type: boolean
          description: Defines whether the gateway masquerades traffic for this Private
            Network (Dynamic NAT).
        status:
          type: string
          description: Current status of the Public Gateway's connection to the Private
            Network.
          enum:
          - unknown_status
          - created
          - attaching
          - configuring
          - ready
          - detaching
          default: unknown_status
        push_default_route:
          type: boolean
          description: Enabling the default route also enables masquerading.
        ipam_ip_id:
          type: string
          description: Use this IPAM-booked IP ID as the Gateway's IP in this Private
            Network. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        zone:
          type: string
          description: Zone of the GatewayNetwork connection.
      x-properties-order:
      - id
      - created_at
      - updated_at
      - gateway_id
      - private_network_id
      - mac_address
      - masquerade_enabled
      - status
      - push_default_route
      - ipam_ip_id
      - zone
    scaleway.vpc_gw.v2.GatewayNetwork.Status:
      type: string
      enum:
      - unknown_status
      - created
      - attaching
      - configuring
      - ready
      - detaching
      default: unknown_status
    scaleway.vpc_gw.v2.GatewayType:
      type: object
      properties:
        name:
          type: string
          description: Public Gateway type name.
        bandwidth:
          type: integer
          description: Bandwidth, in bps, of the Public Gateway. This is the public
            bandwidth to the outer Internet, and the internal bandwidth to each connected
            Private Networks.
          format: uint64
        zone:
          type: string
          description: Zone the Public Gateway type is available in.
      x-properties-order:
      - name
      - bandwidth
      - zone
    scaleway.vpc_gw.v2.IP:
      type: object
      properties:
        id:
          type: string
          description: IP address ID. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        organization_id:
          type: string
          description: Owning Organization. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        project_id:
          type: string
          description: Owning Project. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        created_at:
          type: string
          description: IP address creation date. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        updated_at:
          type: string
          description: IP address last modification date. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        tags:
          type: array
          description: Tags associated with the IP address.
          items:
            type: string
        address:
          type: string
          description: The IP address itself. (IP address)
          example: 1.2.3.4
        reverse:
          type: string
          description: Reverse domain name for the IP address.
        gateway_id:
          type: string
          description: Public Gateway associated with the IP address. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        zone:
          type: string
          description: Zone of the IP address.
      x-properties-order:
      - id
      - organization_id
      - project_id
      - created_at
      - updated_at
      - tags
      - address
      - reverse
      - gateway_id
      - zone
    scaleway.vpc_gw.v2.ListGatewayNetworksResponse:
      type: object
      properties:
        gateway_networks:
          type: array
          description: GatewayNetworks on this page.
          items:
            $ref: '#/components/schemas/scaleway.vpc_gw.v2.GatewayNetwork'
        total_count:
          type: integer
          description: Total GatewayNetworks count matching the filter.
          format: uint64
      x-properties-order:
      - gateway_networks
      - total_count
    scaleway.vpc_gw.v2.ListGatewayTypesResponse:
      type: object
      properties:
        types:
          type: array
          description: Available types of Public Gateway.
          items:
            $ref: '#/components/schemas/scaleway.vpc_gw.v2.GatewayType'
      x-properties-order:
      - types
    scaleway.vpc_gw.v2.ListGatewaysResponse:
      type: object
      properties:
        gateways:
          type: array
          description: Gateways on this page.
          items:
            $ref: '#/components/schemas/scaleway.vpc_gw.v2.Gateway'
        total_count:
          type: integer
          description: Total count of gateways matching the filter.
          format: uint64
      x-properties-order:
      - gateways
      - total_count
    scaleway.vpc_gw.v2.ListIPsResponse:
      type: object
      properties:
        ips:
          type: array
          description: IP addresses on this page.
          items:
            $ref: '#/components/schemas/scaleway.vpc_gw.v2.IP'
        total_count:
          type: integer
          description: Total count of IP addresses matching the filter.
          format: uint64
      x-properties-order:
      - ips
      - total_count
    scaleway.vpc_gw.v2.ListPatRulesResponse:
      type: object
      properties:
        pat_rules:
          type: array
          description: Array of PAT rules matching the filter.
          items:
            $ref: '#/components/schemas/scaleway.vpc_gw.v2.PatRule'
        total_count:
          type: integer
          description: Total count of PAT rules matching the filter.
          format: uint64
      x-properties-order:
      - pat_rules
      - total_count
    scaleway.vpc_gw.v2.PatRule:
      type: object
      properties:
        id:
          type: string
          description: PAT rule ID. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        gateway_id:
          type: string
          description: Gateway the PAT rule applies to. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        created_at:
          type: string
          description: PAT rule creation date. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        updated_at:
          type: string
          description: PAT rule last modification date. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        public_port:
          type: integer
          description: Public port to listen on.
          format: uint32
        private_ip:
          type: string
          description: Private IP address to forward data to. (IP address)
          example: 1.2.3.4
        private_port:
          type: integer
          description: Private port to translate to.
          format: uint32
        protocol:
          type: string
          description: Protocol the rule applies to.
          enum:
          - unknown_protocol
          - both
          - tcp
          - udp
          default: unknown_protocol
        zone:
          type: string
          description: Zone of the PAT rule.
      x-properties-order:
      - id
      - gateway_id
      - created_at
      - updated_at
      - public_port
      - private_ip
      - private_port
      - protocol
      - zone
    scaleway.vpc_gw.v2.SetBastionAllowedIPsResponse:
      type: object
      properties:
        ip_ranges:
          type: array
          description: Ranges of IP addresses allowed to connect to the gateway's
            SSH bastion. (IP network)
          example:
          - 1.2.3.4/32
          items:
            type: string
      x-properties-order:
      - ip_ranges
    scaleway.vpc_gw.v2.SetPatRulesRequest.Rule:
      type: object
      properties:
        public_port:
          type: integer
          description: |-
            Public port to listen on.
            Public port to listen on. Uniquely identifies the rule, and a matching rule will be updated with the new parameters.
          format: uint32
        private_ip:
          type: string
          description: Private IP to forward data to. (IP address)
          example: 1.2.3.4
        private_port:
          type: integer
          description: Private port to translate to.
          format: uint32
        protocol:
          type: string
          description: Protocol the rule should apply to.
          enum:
          - unknown_protocol
          - both
          - tcp
          - udp
          default: unknown_protocol
      x-properties-order:
      - public_port
      - private_ip
      - private_port
      - protocol
    scaleway.vpc_gw.v2.SetPatRulesResponse:
      type: object
      properties:
        pat_rules:
          type: array
          description: List of PAT rules.
          items:
            $ref: '#/components/schemas/scaleway.vpc_gw.v2.PatRule'
      x-properties-order:
      - pat_rules
  securitySchemes:
    scaleway:
      in: header
      name: X-Auth-Token
      type: apiKey
paths:
  /vpc-gw/v2/zones/{zone}/gateway-networks:
    get:
      tags:
      - Gateway Networks
      operationId: ListGatewayNetworks
      summary: List Public Gateway connections to Private Networks
      description: List the connections between Public Gateways and Private Networks
        (a connection = a GatewayNetwork). You can choose to filter by `gateway-id`
        to list all Private Networks attached to the specified Public Gateway, or
        by `private_network_id` to list all Public Gateways attached to the specified
        Private Network. Other query parameters are also available. The result is
        an array of GatewayNetwork objects, each giving details of the connection
        between a given Public Gateway and a given Private Network.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: query
        name: order_by
        description: Order in which to return results.
        schema:
          type: string
          description: Order in which to return results.
          enum:
          - created_at_asc
          - created_at_desc
          - status_asc
          - status_desc
          default: created_at_asc
      - in: query
        name: page
        description: Page number.
        schema:
          type: integer
          description: Page number.
          format: int32
      - in: query
        name: page_size
        description: GatewayNetworks per page.
        schema:
          type: integer
          description: GatewayNetworks per page.
          format: uint32
      - in: query
        name: status
        description: Filter for GatewayNetworks with these status. Use `unknown` to
          include all statuses.
        schema:
          type: array
          description: Filter for GatewayNetworks with these status. Use `unknown`
            to include all statuses.
          items:
            $ref: '#/components/schemas/scaleway.vpc_gw.v2.GatewayNetwork.Status'
      - in: query
        name: gateway_ids
        description: Filter for GatewayNetworks connected to these gateways.
        schema:
          type: array
          description: Filter for GatewayNetworks connected to these gateways.
          items:
            type: string
      - in: query
        name: private_network_ids
        description: Filter for GatewayNetworks connected to these Private Networks.
        schema:
          type: array
          description: Filter for GatewayNetworks connected to these Private Networks.
          items:
            type: string
      - in: query
        name: masquerade_enabled
        description: Filter for GatewayNetworks with this `enable_masquerade` setting.
        schema:
          type: boolean
          description: Filter for GatewayNetworks with this `enable_masquerade` setting.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.ListGatewayNetworksResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateway-networks"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateway-networks" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Gateway Networks
      operationId: CreateGatewayNetwork
      summary: Attach a Public Gateway to a Private Network
      description: Attach a specific Public Gateway to a specific Private Network
        (create a GatewayNetwork). You can configure parameters for the connection
        including whether to enable masquerade (dynamic NAT), and more.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.GatewayNetwork'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                gateway_id:
                  type: string
                  description: Public Gateway to connect. (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                private_network_id:
                  type: string
                  description: Private Network to connect. (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                enable_masquerade:
                  type: boolean
                  description: Defines whether to enable masquerade (dynamic NAT)
                    on the GatewayNetwork.
                push_default_route:
                  type: boolean
                  description: Enabling the default route also enables masquerading.
                ipam_ip_id:
                  type: string
                  description: Use this IPAM-booked IP ID as the Gateway's IP in this
                    Private Network. (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
              x-properties-order:
              - gateway_id
              - private_network_id
              - enable_masquerade
              - push_default_route
              - ipam_ip_id
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "enable_masquerade": false,
              "gateway_id": "6170692e-7363-616c-6577-61792e636f6d",
              "private_network_id": "6170692e-7363-616c-6577-61792e636f6d",
              "push_default_route": false
            }' \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateway-networks"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateway-networks" \
            X-Auth-Token:$SCW_SECRET_KEY \
            enable_masquerade:=false \
            gateway_id="6170692e-7363-616c-6577-61792e636f6d" \
            private_network_id="6170692e-7363-616c-6577-61792e636f6d" \
            push_default_route:=false
  /vpc-gw/v2/zones/{zone}/gateway-networks/{gateway_network_id}:
    get:
      tags:
      - Gateway Networks
      operationId: GetGatewayNetwork
      summary: Get a Public Gateway connection to a Private Network
      description: Get details of a given connection between a Public Gateway and
        a Private Network (this connection = a GatewayNetwork), specified by its `gateway_network_id`.
        The response object contains details of the connection including the IDs of
        the Public Gateway and Private Network, the dates the connection was created/updated
        and its configuration settings.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: gateway_network_id
        description: ID of the GatewayNetwork to fetch. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the GatewayNetwork to fetch. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.GatewayNetwork'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateway-networks/{gateway_network_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateway-networks/{gateway_network_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Gateway Networks
      operationId: UpdateGatewayNetwork
      summary: Update a Public Gateway's connection to a Private Network
      description: Update the configuration parameters of a connection between a given
        Public Gateway and Private Network (the connection = a GatewayNetwork). Updatable
        parameters include whether to enable traffic masquerade (dynamic NAT).
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: gateway_network_id
        description: ID of the GatewayNetwork to update. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the GatewayNetwork to update. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.GatewayNetwork'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                enable_masquerade:
                  type: boolean
                  description: Defines whether to enable masquerade (dynamic NAT)
                    on the GatewayNetwork.
                push_default_route:
                  type: boolean
                  description: Enabling the default route also enables masquerading.
                ipam_ip_id:
                  type: string
                  description: Use this IPAM-booked IP ID as the Gateway's IP in this
                    Private Network. (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
              x-properties-order:
              - enable_masquerade
              - push_default_route
              - ipam_ip_id
      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/vpc-gw/v2/zones/{zone}/gateway-networks/{gateway_network_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateway-networks/{gateway_network_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Gateway Networks
      operationId: DeleteGatewayNetwork
      summary: Detach a Public Gateway from a Private Network
      description: Detach a given Public Gateway from a given Private Network, i.e.
        delete a GatewayNetwork specified by a gateway_network_id.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: gateway_network_id
        description: ID of the GatewayNetwork to delete. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the GatewayNetwork to delete. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.GatewayNetwork'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateway-networks/{gateway_network_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateway-networks/{gateway_network_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /vpc-gw/v2/zones/{zone}/gateway-types:
    get:
      tags:
      - Gateway Types
      operationId: ListGatewayTypes
      summary: List Public Gateway types
      description: List the different Public Gateway commercial offer types available
        at Scaleway. The response is an array of objects describing the name and technical
        details of each available gateway type.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.ListGatewayTypesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateway-types"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateway-types" \
            X-Auth-Token:$SCW_SECRET_KEY
  /vpc-gw/v2/zones/{zone}/gateways:
    get:
      tags:
      - Gateways
      operationId: ListGateways
      summary: List Public Gateways
      description: List Public Gateways in a given Scaleway Organization or Project.
        By default, results are displayed in ascending order of creation date.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: query
        name: order_by
        description: Order in which to return results.
        schema:
          type: string
          description: Order in which to return results.
          enum:
          - created_at_asc
          - created_at_desc
          - name_asc
          - name_desc
          - type_asc
          - type_desc
          - status_asc
          - status_desc
          default: created_at_asc
      - in: query
        name: page
        description: Page number to return.
        schema:
          type: integer
          description: Page number to return.
          format: int32
      - in: query
        name: page_size
        description: Gateways per page.
        schema:
          type: integer
          description: Gateways per page.
          format: uint32
      - in: query
        name: organization_id
        description: Include only gateways in this Organization. (UUID format)
        schema:
          type: string
          description: Include only gateways in this Organization. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: project_id
        description: Include only gateways in this Project. (UUID format)
        schema:
          type: string
          description: Include only gateways in this Project. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: name
        description: Filter for gateways which have this search term in their name.
        schema:
          type: string
          description: Filter for gateways which have this search term in their name.
      - in: query
        name: tags
        description: Filter for gateways with these tags.
        schema:
          type: array
          description: Filter for gateways with these tags.
          items:
            type: string
      - in: query
        name: types
        description: Filter for gateways of these types.
        schema:
          type: array
          description: Filter for gateways of these types.
          items:
            type: string
      - in: query
        name: status
        description: Filter for gateways with these status. Use `unknown` to include
          all statuses.
        schema:
          type: array
          description: Filter for gateways with these status. Use `unknown` to include
            all statuses.
          items:
            $ref: '#/components/schemas/scaleway.vpc_gw.v2.Gateway.Status'
      - in: query
        name: private_network_ids
        description: Filter for gateways attached to these Private Networks.
        schema:
          type: array
          description: Filter for gateways attached to these Private Networks.
          items:
            type: string
      - in: query
        name: include_legacy
        description: Include also legacy gateways.
        schema:
          type: boolean
          description: Include also legacy gateways.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.ListGatewaysResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateways"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateways" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Gateways
      operationId: CreateGateway
      summary: Create a Public Gateway
      description: Create a new Public Gateway in the specified Scaleway Project,
        defining its **name**, **type** and other configuration details such as whether
        to enable SSH bastion.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.Gateway'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  type: string
                  description: Scaleway Project to create the gateway in. (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                name:
                  type: string
                  description: Name for the gateway.
                tags:
                  type: array
                  description: Tags for the gateway.
                  items:
                    type: string
                type:
                  type: string
                  description: Gateway type (commercial offer type).
                ip_id:
                  type: string
                  description: Existing IP address to attach to the gateway. (UUID
                    format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                enable_smtp:
                  type: boolean
                  description: Defines whether SMTP traffic should be allowed pass
                    through the gateway.
                enable_bastion:
                  type: boolean
                  description: Defines whether SSH bastion should be enabled the gateway.
                bastion_port:
                  type: integer
                  description: Port of the SSH bastion.
                  format: uint32
              x-properties-order:
              - project_id
              - name
              - tags
              - type
              - ip_id
              - enable_smtp
              - enable_bastion
              - bastion_port
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "enable_bastion": false,
              "enable_smtp": false,
              "name": "string",
              "project_id": "6170692e-7363-616c-6577-61792e636f6d",
              "type": "string"
            }' \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateways"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateways" \
            X-Auth-Token:$SCW_SECRET_KEY \
            enable_bastion:=false \
            enable_smtp:=false \
            name="string" \
            project_id="6170692e-7363-616c-6577-61792e636f6d" \
            type="string"
  /vpc-gw/v2/zones/{zone}/gateways/{gateway_id}:
    get:
      tags:
      - Gateways
      operationId: GetGateway
      summary: Get a Public Gateway
      description: Get details of a Public Gateway, specified by its gateway ID. The
        response object contains full details of the gateway, including its **name**,
        **type**, **status** and more.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: gateway_id
        description: ID of the gateway to fetch. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the gateway to fetch. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.Gateway'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateways/{gateway_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateways/{gateway_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Gateways
      operationId: UpdateGateway
      summary: Update a Public Gateway
      description: Update the parameters of an existing Public Gateway, for example,
        its **name**, **tags**, **SSH bastion configuration**, and **DNS servers**.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: gateway_id
        description: ID of the gateway to update. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the gateway to update. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.Gateway'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Name for the gateway.
                tags:
                  type: array
                  description: Tags for the gateway.
                  nullable: true
                  items:
                    type: string
                enable_bastion:
                  type: boolean
                  description: Defines whether SSH bastion should be enabled the gateway.
                bastion_port:
                  type: integer
                  description: Port of the SSH bastion.
                  format: uint32
                enable_smtp:
                  type: boolean
                  description: Defines whether SMTP traffic should be allowed to pass
                    through the gateway.
              x-properties-order:
              - name
              - tags
              - enable_bastion
              - bastion_port
              - enable_smtp
      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/vpc-gw/v2/zones/{zone}/gateways/{gateway_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateways/{gateway_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Gateways
      operationId: DeleteGateway
      summary: Delete a Public Gateway
      description: Delete an existing Public Gateway, specified by its gateway ID.
        This action is irreversible.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: gateway_id
        description: ID of the gateway to delete. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the gateway to delete. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: delete_ip
        description: Defines whether the PGW's IP should be deleted.
        required: true
        schema:
          type: boolean
          description: Defines whether the PGW's IP should be deleted.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.Gateway'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateways/{gateway_id}?delete_ip=false"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateways/{gateway_id}" \
            X-Auth-Token:$SCW_SECRET_KEY \
            delete_ip==false
  /vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/bastion-allowed-ips:
    post:
      tags:
      - Allowed IPs
      operationId: AddBastionAllowedIPs
      summary: Add allowed IP range to SSH bastion
      description: Add an IP range (in CIDR notation) to be allowed to connect to
        the SSH bastion.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: gateway_id
        description: ID of the gateway to add the allowed IP range to.
        required: true
        schema:
          type: string
          description: ID of the gateway to add the allowed IP range to.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.AddBastionAllowedIPsResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ip_range:
                  type: string
                  description: IP range allowed to connect to the SSH bastion. (IP
                    network)
                  example: 1.2.3.4/32
              x-properties-order:
              - ip_range
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"ip_range":"1.2.3.4/32"}' \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/bastion-allowed-ips"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/bastion-allowed-ips" \
            X-Auth-Token:$SCW_SECRET_KEY \
            ip_range="1.2.3.4/32"
    put:
      tags:
      - Allowed IPs
      operationId: SetBastionAllowedIPs
      summary: Set all IP ranges allowed for SSH bastion
      description: Set a definitive list of IP ranges (in CIDR notation) allowed to
        connect to the SSH bastion.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: gateway_id
        description: ID of the gateway on which to set the allowed IP range.
        required: true
        schema:
          type: string
          description: ID of the gateway on which to set the allowed IP range.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.SetBastionAllowedIPsResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ip_ranges:
                  type: array
                  description: New list of IP ranges (each range in CIDR notation)
                    allowed to connect to the SSH bastion.
                  items:
                    type: string
              x-properties-order:
              - ip_ranges
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X PUT \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/bastion-allowed-ips"
      - lang: HTTPie
        source: |-
          http PUT "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/bastion-allowed-ips" \
            X-Auth-Token:$SCW_SECRET_KEY
  /vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/bastion-allowed-ips/{ip_range}:
    delete:
      tags:
      - Allowed IPs
      operationId: DeleteBastionAllowedIPs
      summary: Delete allowed IP range from SSH bastion
      description: Delete an IP range (defined in CIDR notation) from SSH bastion,
        so that it is no longer allowed to connect.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: gateway_id
        description: ID of the gateway on which to delete the allowed IP range.
        required: true
        schema:
          type: string
          description: ID of the gateway on which to delete the allowed IP range.
      - in: path
        name: ip_range
        description: IP range to delete from SSH bastion's list of allowed IPs. (IP
          network)
        required: true
        schema:
          type: string
          description: IP range to delete from SSH bastion's list of allowed IPs.
            (IP network)
          example: 1.2.3.4/32
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/bastion-allowed-ips/{ip_range}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/bastion-allowed-ips/{ip_range}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/refresh-ssh-keys:
    post:
      tags:
      - Gateways
      operationId: RefreshSSHKeys
      summary: Refresh a Public Gateway's SSH keys
      description: Refresh the SSH keys of a given Public Gateway, specified by its
        gateway ID. This adds any new SSH keys in the gateway's Scaleway Project to
        the gateway itself.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: gateway_id
        description: ID of the gateway to refresh SSH keys on. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the gateway to refresh SSH keys on. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.Gateway'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/refresh-ssh-keys"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/refresh-ssh-keys" \
            X-Auth-Token:$SCW_SECRET_KEY
  /vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/upgrade:
    post:
      tags:
      - Gateways
      operationId: UpgradeGateway
      summary: Upgrade a Public Gateway to the latest version and/or to a different
        commercial offer type
      description: Upgrade a given Public Gateway to the newest software version or
        to a different commercial offer type. This applies the latest bugfixes and
        features to your Public Gateway. Note that gateway service will be interrupted
        during the update.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: gateway_id
        description: ID of the gateway to upgrade. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the gateway to upgrade. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.Gateway'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  description: Gateway type (commercial offer).
              x-properties-order:
              - type
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/upgrade"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/upgrade" \
            X-Auth-Token:$SCW_SECRET_KEY
  /vpc-gw/v2/zones/{zone}/ips:
    get:
      tags:
      - IPs
      operationId: ListIPs
      summary: List IPs
      description: List Public Gateway flexible IP addresses. A number of filter options
        are available for limiting results in the response.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: query
        name: order_by
        description: Order in which to return results.
        schema:
          type: string
          description: Order in which to return results.
          enum:
          - created_at_asc
          - created_at_desc
          - address_asc
          - address_desc
          - reverse_asc
          - reverse_desc
          default: created_at_asc
      - in: query
        name: page
        description: Page number.
        schema:
          type: integer
          description: Page number.
          format: int32
      - in: query
        name: page_size
        description: IP addresses per page.
        schema:
          type: integer
          description: IP addresses per page.
          format: uint32
      - in: query
        name: organization_id
        description: Include only gateways in this Organization. (UUID format)
        schema:
          type: string
          description: Include only gateways in this Organization. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: project_id
        description: Filter for IP addresses in this Project. (UUID format)
        schema:
          type: string
          description: Filter for IP addresses in this Project. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: tags
        description: Filter for IP addresses with these tags.
        schema:
          type: array
          description: Filter for IP addresses with these tags.
          items:
            type: string
      - in: query
        name: reverse
        description: Filter for IP addresses that have a reverse containing this string.
        schema:
          type: string
          description: Filter for IP addresses that have a reverse containing this
            string.
      - in: query
        name: is_free
        description: Filter based on whether the IP is attached to a gateway or not.
        schema:
          type: boolean
          description: Filter based on whether the IP is attached to a gateway or
            not.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.ListIPsResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/ips"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/ips" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - IPs
      operationId: CreateIP
      summary: Reserve an IP
      description: Create (reserve) a new flexible IP address that can be used for
        a Public Gateway in a specified Scaleway Project.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.IP'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  type: string
                  description: Project to create the IP address in. (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                tags:
                  type: array
                  description: Tags to give to the IP address.
                  items:
                    type: string
              x-properties-order:
              - project_id
              - tags
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"project_id":"6170692e-7363-616c-6577-61792e636f6d"}' \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/ips"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/ips" \
            X-Auth-Token:$SCW_SECRET_KEY \
            project_id="6170692e-7363-616c-6577-61792e636f6d"
  /vpc-gw/v2/zones/{zone}/ips/{ip_id}:
    get:
      tags:
      - IPs
      operationId: GetIP
      summary: Get an IP
      description: Get details of a Public Gateway flexible IP address, identified
        by its IP ID. The response object contains information including which (if
        any) Public Gateway using this IP address, the reverse and various other metadata.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: ip_id
        description: ID of the IP address to get. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the IP address to get. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.IP'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/ips/{ip_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/ips/{ip_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - IPs
      operationId: UpdateIP
      summary: Update an IP
      description: Update details of an existing flexible IP address, including its
        tags, reverse and the Public Gateway it is assigned to.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: ip_id
        description: ID of the IP address to update. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the IP address to update. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.IP'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tags:
                  type: array
                  description: Tags to give to the IP address.
                  nullable: true
                  items:
                    type: string
                reverse:
                  type: string
                  description: Reverse to set on the address. Empty string to unset.
                gateway_id:
                  type: string
                  description: Gateway to attach the IP address to. Empty string to
                    detach. (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
              x-properties-order:
              - tags
              - reverse
              - gateway_id
      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/vpc-gw/v2/zones/{zone}/ips/{ip_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/ips/{ip_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - IPs
      operationId: DeleteIP
      summary: Delete an IP
      description: Delete a flexible IP address from your account. This action is
        irreversible.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: ip_id
        description: ID of the IP address to delete. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the IP address to delete. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/ips/{ip_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/ips/{ip_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /vpc-gw/v2/zones/{zone}/pat-rules:
    get:
      tags:
      - PAT Rules
      operationId: ListPatRules
      summary: List PAT rules
      description: List PAT rules. You can filter by gateway ID to list all PAT rules
        for a particular gateway, or filter for PAT rules targeting a specific IP
        address or using a specific protocol.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: query
        name: order_by
        description: Order in which to return results.
        schema:
          type: string
          description: Order in which to return results.
          enum:
          - created_at_asc
          - created_at_desc
          - public_port_asc
          - public_port_desc
          default: created_at_asc
      - in: query
        name: page
        description: Page number.
        schema:
          type: integer
          description: Page number.
          format: int32
      - in: query
        name: page_size
        description: PAT rules per page.
        schema:
          type: integer
          description: PAT rules per page.
          format: uint32
      - in: query
        name: gateway_ids
        description: Filter for PAT rules on these gateways.
        schema:
          type: array
          description: Filter for PAT rules on these gateways.
          items:
            type: string
      - in: query
        name: private_ips
        description: Filter for PAT rules targeting these private ips.
        schema:
          type: array
          description: Filter for PAT rules targeting these private ips.
          items:
            type: string
      - in: query
        name: protocol
        description: Filter for PAT rules with this protocol.
        schema:
          type: string
          description: Filter for PAT rules with this protocol.
          enum:
          - unknown_protocol
          - both
          - tcp
          - udp
          default: unknown_protocol
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.ListPatRulesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/pat-rules"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/pat-rules" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - PAT Rules
      operationId: CreatePatRule
      summary: Create a PAT rule
      description: Create a new PAT rule on a specified Public Gateway, defining the
        protocol to use, public port to listen on, and private port / IP address to
        map to.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.PatRule'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                gateway_id:
                  type: string
                  description: ID of the Gateway on which to create the rule. (UUID
                    format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                public_port:
                  type: integer
                  description: Public port to listen on.
                  format: uint32
                private_ip:
                  type: string
                  description: Private IP to forward data to. (IP address)
                  example: 1.2.3.4
                private_port:
                  type: integer
                  description: Private port to translate to.
                  format: uint32
                protocol:
                  type: string
                  description: Protocol the rule should apply to.
                  enum:
                  - unknown_protocol
                  - both
                  - tcp
                  - udp
                  default: unknown_protocol
              x-properties-order:
              - gateway_id
              - public_port
              - private_ip
              - private_port
              - protocol
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "gateway_id": "6170692e-7363-616c-6577-61792e636f6d",
              "private_ip": "1.2.3.4",
              "private_port": 42,
              "public_port": 42
            }' \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/pat-rules"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/pat-rules" \
            X-Auth-Token:$SCW_SECRET_KEY \
            gateway_id="6170692e-7363-616c-6577-61792e636f6d" \
            private_ip="1.2.3.4" \
            private_port:=42 \
            public_port:=42
    put:
      tags:
      - PAT Rules
      operationId: SetPatRules
      summary: Set all PAT rules
      description: Set a definitive list of PAT rules attached to a Public Gateway.
        Each rule is identified by its public port and protocol. This will sync the
        current PAT rule list on the gateway with the new list, creating, updating
        or deleting PAT rules accordingly.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.SetPatRulesResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                gateway_id:
                  type: string
                  description: ID of the gateway on which to set the PAT rules. (UUID
                    format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                pat_rules:
                  type: array
                  description: New list of PAT rules.
                  items:
                    $ref: '#/components/schemas/scaleway.vpc_gw.v2.SetPatRulesRequest.Rule'
              required:
              - pat_rules
              x-properties-order:
              - gateway_id
              - pat_rules
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X PUT \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"gateway_id":"6170692e-7363-616c-6577-61792e636f6d","pat_rules":[""]}' \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/pat-rules"
      - lang: HTTPie
        source: |-
          http PUT "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/pat-rules" \
            X-Auth-Token:$SCW_SECRET_KEY \
            gateway_id="6170692e-7363-616c-6577-61792e636f6d" \
            pat_rules:='[""]'
  /vpc-gw/v2/zones/{zone}/pat-rules/{pat_rule_id}:
    get:
      tags:
      - PAT Rules
      operationId: GetPatRule
      summary: Get a PAT rule
      description: Get a PAT rule, specified by its PAT rule ID. The response object
        gives full details of the PAT rule, including the Public Gateway it belongs
        to and the configuration settings in terms of public / private ports, private
        IP and protocol.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: pat_rule_id
        description: ID of the PAT rule to get. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the PAT rule to get. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.PatRule'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/pat-rules/{pat_rule_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/pat-rules/{pat_rule_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - PAT Rules
      operationId: UpdatePatRule
      summary: Update a PAT rule
      description: Update a PAT rule, specified by its PAT rule ID. Configuration
        settings including private/public port, private IP address and protocol can
        all be updated.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: pat_rule_id
        description: ID of the PAT rule to update. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the PAT rule to update. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.vpc_gw.v2.PatRule'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                public_port:
                  type: integer
                  description: Public port to listen on.
                  format: uint32
                private_ip:
                  type: string
                  description: Private IP to forward data to. (IP address)
                  example: 1.2.3.4
                private_port:
                  type: integer
                  description: Private port to translate to.
                  format: uint32
                protocol:
                  type: string
                  description: Protocol the rule should apply to.
                  enum:
                  - unknown_protocol
                  - both
                  - tcp
                  - udp
                  default: unknown_protocol
              x-properties-order:
              - public_port
              - private_ip
              - private_port
              - protocol
      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/vpc-gw/v2/zones/{zone}/pat-rules/{pat_rule_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/pat-rules/{pat_rule_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - PAT Rules
      operationId: DeletePatRule
      summary: Delete a PAT rule
      description: Delete a PAT rule, identified by its PAT rule ID. This action is
        irreversible.
      parameters:
      - in: path
        name: zone
        description: The zone you want to target
        required: true
        schema:
          type: string
          description: The zone you want to target
          enum:
          - fr-par-1
          - fr-par-2
          - nl-ams-1
          - nl-ams-2
          - nl-ams-3
          - pl-waw-1
          - pl-waw-2
          - pl-waw-3
      - in: path
        name: pat_rule_id
        description: ID of the PAT rule to delete. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the PAT rule to delete. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/pat-rules/{pat_rule_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/vpc-gw/v2/zones/{zone}/pat-rules/{pat_rule_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
