openapi: 3.1.0
info:
  title: Site-to-Site VPN
  description: |-
    Scaleway Site-to-Site VPN connects your infrastructure (on-premise, in a private cloud, or in another public cloud) to your Scaleway VPC with IPsec.

    Site-to-Site VPN establishes a private & encrypted tunnel over the public internet using IPsec. It allows your remote infrastructure to securely reach resources hosted in your Scaleway Private Networks without requiring dedicated physical links. This managed solution ensures confidentiality and integrity of through traffic, with a deployment that is simple and cost-effective, even across geographically distributed infrastructure.

    You can establish one or multiple VPN tunnels depending on your needs, and take advantage of dynamic routing with BGP to ensure high availability and flexibility across your infrastructure.

    Once connection is established with your VPC, Site-to-Site VPN allows you to control BGP route propagation: you can fine-tune which IPv4 or IPv6 prefixes are allowed to flow.

    <Message type="note">
    This product is currently in [Public Beta](https://www.scaleway.com/en/betas/).
    </Message>

    ## Concepts

    ### VPN Gateway

    A VPN gateway is a managed resource that serves IPsec tunnels between your external infrastructure and your Scaleway VPC. Each connection within the gateway represents an IPsec tunnel established over the public internet. A single VPN gateway can host multiple connections.

    ### Customer Gateway

    A customer gateway is a logical resource that represents your on-premises network device. It acts as the endpoint of the IPsec tunnel established with the Scaleway VPN gateway. Each customer gateway can be configured with one public IPv4 address, one public IPv6 address, and the ASN of the BGP router used to establish the BGP session over the IPsec tunnel.

    This resource is required to define the remote side of the VPN tunnel. Its information will be used during the setup of the connection.

    ### Connection

    A connection represents the bridge between your VPN gateway and your customer gateway. One connection can support up to two IPsec tunnels: one over IPv4 and one over IPv6. This allows for a highly available tunnel configuration, provided that both the VPN gateway and the customer gateway have configured public IP addresses through Scaleway resources, using the correct IP version on both ends.

    ## Quickstart

    1. Configure your environment variables.

       <Message type="note">
       This is an optional step that seeks to simplify your usage of the Site-to-Site VPN API.
       </Message>

       ```bash
       export SCW_SECRET_KEY="<API secret key>"
       export SCW_DEFAULT_REGION="<Scaleway default region>"
       export SCW_PROJECT_ID="<Scaleway Project ID>"
       ```

    2. **Choose a VPN gateway type**: VPN gateways come in different shapes, sizes, and pricing. When you create your VPN gateway, you need to specify the required gateway type in the request. Use the following call to get a list of available VPN gateway offer types and their details:

        ```bash
        curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/$SCW_DEFAULT_REGION/vpn-gateway-types"
        ```

    3. **Create a VPN gateway**: run the following command to create a VPN Gateway. You can customize the details in the payload to your needs, using the table below to help.

       ```bash
       curl -X POST \
         -H "X-Auth-Token: $SCW_SECRET_KEY" \
         -H "Content-Type: application/json" \
         "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/$SCW_DEFAULT_REGION/vpn-gateways" \
         -d '{
           "project_id": "'"$SCW_PROJECT_ID"'",
           "name": "My New Gateway",
           "tags": ["test", "another tag"],
           "gateway_type": "VGW-S",
           "private_network_id": "00cfd222-2402-4598-9438-b12b995e9e80"
         }'
       ```

       | Parameter          | Description                                         | Valid values OR Example                   |
       | ------------------ | --------------------------------------------------- | ----------------------------------------- |
       | project_id         | ID of project                                       | `any valid project UUID`                  |
       | name               | Name for VPN Gateway                                | `desired name for VPN Gateway`            |
       | tags               | Tags for VPN Gateway                                | `a list of tags`                          |
       | gateway_type       | Offer type for VPN Gateway                          | `any valid offer type string, e.g. VGW-S` |
       | private_network_id | ID of a Private Network (cannot be detach later)    | `any valid private network UUID`          |

    4. **Get a list of your VPN gateways**: run the following command to get a list of all the VPN gateways in your account, with their details:

       ```bash
       curl -X GET \
         -H "Content-Type: application/json" \
         -H "X-Auth-Token: $SCW_SECRET_KEY" \
         "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/$SCW_DEFAULT_REGION/vpn-gateways"
       ```

    5. **Create a customer gateway**: run the following command to create a customer gateway. You can customize the details in the payload to your needs, using the table below to help.

       ```bash
       curl -X POST \
         -H "X-Auth-Token: $SCW_SECRET_KEY" \
         -H "Content-Type: application/json" \
         "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/$SCW_DEFAULT_REGION/customer-gateways" \
         -d '{
           "project_id": "'"$SCW_PROJECT_ID"'",
           "name": "My Device",
           "tags": ["test", "another tag"],
           "ipv4_public": "51.158.0.1",
           "asn": "11111"
         }'
       ```

       | Parameter   | Description                     | Valid values OR Example                       |
       | ----------- | ------------------------------- | --------------------------------------------- |
       | project_id  | ID of project                   | `any valid project UUID`                      |
       | name        | Name for Customer Gateway       | `desired name for Connection`                 |
       | tags        | Tags for Customer Gateway       | `a list of tags`                              |
       | ipv4_public | Public IPv4 of Customer Gateway | `any valid public ipv4 ip`                    |
       | asn         | BGP ASN of Customer Gateway     | `any valid asn except reserved scw ASN 12876` |

    6. **Create a routing policy**: A routing policy is required for each traffic type (IPv4 and/or IPv6) to be supported over the connection.

       ```bash
       curl -X POST \
         -H "X-Auth-Token: $SCW_SECRET_KEY" \
         -H "Content-Type: application/json" \
         "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/$SCW_DEFAULT_REGION/routing-policies" \
         -d '{
           "project_id": "'"$SCW_PROJECT_ID"'",
           "name": "my-rp-v4",
           "tags": ["test", "another tag"],
           "is_ipv6": false,
           "prefix_filter_in": [
             "10.0.0.0/8"
           ],
           "prefix_filter_out": [
             "172.16.12.0/24"
           ]
         }'
       ```

       | Parameter           | Description                                                                               | Valid values OR Example        |
       | ------------------- | ----------------------------------------------------------------------------------------- | ------------------------------ |
       | project_id          | ID of Project                                                                             | `any valid project UUID`       |
       | name                | Name for routing policy                                                                   | `desired name for Connection`  |
       | tags                | Tags for routing policy                                                                   | `a list of tags`               |
       | is_ipv6             | Whether routing policy should be IPv6 or IPv4                                             | `true or false`                |
       | prefix_filter_in    | IP prefixes to accept from the customer gateway (ranges of route announcements to accept) | `a list of IP subnets`         |
       | prefix_filter_out   | IP prefixes to advertise to the customer gateway (ranges of routes to advertise)          | `a list of IP subnets`         |

    7. **Create a connection between a VPN gateway and a customer gateway**: When your VPN gateway has been provisioned and has **active** status, you must create a connection.

       ```bash
       curl -X POST \
         -H "Content-Type: application/json" \
         -H "X-Auth-Token: $SCW_SECRET_KEY" \
         "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/$SCW_DEFAULT_REGION/connections" \
         -d '{
           "project_id": "'"$SCW_PROJECT_ID"'",
           "name": "My New Connection",
           "tags": ["test", "another tag"],
           "vpn_gateway_id": "ec5b8281-0c4f-49ea-a8fd-bd37554f5896",
           "customer_gateway_id": "beba6285-b502-4579-82d6-2815fb1ef1f1",
           "ikev2_ciphers": [{"encryption": "aes256", "integrity": "sha256", "dh_group": "curve25519"}],
           "esp_ciphers": [{"encryption": "aes256gcm", "dh_group": "curve25519"}],
           "bgp_config_ipv4": {
             "routing_policy_id": "3fe0612d-6d61-41a8-87f4-243900e07616"
           }
         }'
       ```

       | Parameter           | Description                                                              | Valid values OR Example                   |
       | ------------------- | ------------------------------------------------------------------------ | ----------------------------------------- |
       | project_id          | ID of project                                                            | `any valid project UUID`                  |
       | name                | Name for Connection                                                      | `desired name for Connection`             |
       | tags                | Tags for Connection                                                      | `a list of tags`                          |
       | vpn_gateway_id      | ID of a VPN Gateway                                                      | `any valid VPN Gateway UUID`              |
       | customer_gateway_id | ID of a Customer Gateway                                                 | `any valid Customer Gateway UUID`         |
       | routing_policy_id   | ID of a Routing Policy (same parameter available for bgp_config_ipv6)    | `any valid Routing Policy UUID`           |

       Refer to the [documentation](https://www.scaleway.com/en/docs/site-to-site-vpn/) for help with these steps if necessary.

    8. **Configure your customer gateway device**: Configure your real physical or software-based networking device, located on the remote network you want to connect to your Scaleway VPC. It is the physical device represented by your customer gateway. To successfully configure the device, you will need the public IP address(es) of the VPN gateway, the Scaleway ASN (12876) and the pre-shared key of the connection.

    9. **Enable route propagation**: Enable route propagation to prompt the two gateways to initiate BGP sessions and share routing information. This is the final step in allowing traffic to flow across the Site-to-Site VPN connection. Ensure that you replace `{connection-id}` in the URL with the ID of the connection on which you want to enable route propagation.

       ```bash
       curl -X POST \
         -H "Content-Type: application/json" \
         -H "X-Auth-Token: $SCW_SECRET_KEY" \
         "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/$SCW_DEFAULT_REGION/connections/{connection-id}/enable-route-propagation"
       ```

    10. **Delete your VPN gateway**: run the following command to delete a VPN gateway when you no longer need it. Ensure that you replace `{vpn-gateway-id}` in the URL with the ID of the VPN gateway you want to delete.

        ```bash
        curl -X DELETE \
         -H "Content-Type: application/json" \
         -H "X-Auth-Token: $SCW_SECRET_KEY" \
         "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/$SCW_DEFAULT_REGION/vpn-gateways/{vpn-gateway-id}"
        ```

    <Message type="requirement">

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

    ### Regions

    The Scaleway Site-to-Site VPN is a **regional** API, meaning that each call must specify in its path parameters the Region for the resources concerned by the call.

    The following Regions are available for Site-to-Site VPN:

    | Name      | API ID                |
    |-----------|-----------------------|
    | Paris     | `fr-par` |
    | Milan     | `it-mil` |
    | Amsterdam | `nl-ams` |
    | Warsaw    | `pl-waw` |

    ## Going further

    For more help using Scaleway Site-to-Site VPN, check out the following resources:

    - Our [main documentation](https://www.scaleway.com/en/docs/site-to-site-vpn/)
    - The `#virtual-private-cloud` channel on our [Slack Community](https://www.scaleway.com/en/docs/tutorials/scaleway-slack-community/).
  version: v1alpha1
servers:
- url: https://api.scaleway.com
tags:
- name: VPN Gateways
  description: |
    A VPN gateway is an IPsec peer managed by Scaleway. It can support multiple connections to customer gateways.
- name: VPN Gateway Types
  description: |
    VPN gateways come in various shapes, sizes and prices, which are described by VPN gateway types. They represent the different commercial offer types for VPN gateways available at Scaleway.
- name: Connections
  description: |
    A connection represents the IPsec tunnel between VPN gateway and customer gateway.
- name: Customer Gateways
  description: |
    A customer gateway represents a Scaleway client's device that communicates with a VPN gateway.
- name: Routing Policies
  description: |
    By default, all routes across the Site-to-Site VPN (between VPN gateway and customer gateway) are blocked. Routing policies allow you to set filters to define the IP prefixes to allow.
components:
  schemas:
    scaleway.s2s_vpn.v1alpha1.BgpSession:
      type: object
      properties:
        routing_policy_id:
          type: string
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        private_ip:
          type: string
          description: (IP network)
          example: 1.2.3.4/32
        peer_private_ip:
          type: string
          description: (IP network)
          example: 1.2.3.4/32
      x-properties-order:
      - routing_policy_id
      - private_ip
      - peer_private_ip
    scaleway.s2s_vpn.v1alpha1.BgpSession.Status:
      type: string
      enum:
      - unknown_status
      - up
      - down
      - disabled
      default: unknown_status
    scaleway.s2s_vpn.v1alpha1.ChangeConnectionPskRequest.Secret:
      type: object
      properties:
        id:
          type: string
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        revision:
          type:
          - integer
          - "null"
          format: uint32
      x-properties-order:
      - id
      - revision
    scaleway.s2s_vpn.v1alpha1.ChangeConnectionPskResponse:
      type: object
      properties:
        connection:
          description: This connection.
          $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection'
      x-properties-order:
      - connection
    scaleway.s2s_vpn.v1alpha1.Connection:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the connection. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        srn:
          type: string
          description: The SRN of the connection.
          pattern: ^srn://s2s-vpn\.[^/]+/regions/[^/]+/connections/[^/]+$
        project_id:
          type: string
          description: Project ID. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        organization_id:
          type: string
          description: Organization ID. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        name:
          type: string
          description: Name of the connection.
        tags:
          type: array
          description: List of tags applied to the connection.
          items:
            type: string
        created_at:
          type:
          - string
          - "null"
          description: Creation date of the connection. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        updated_at:
          type:
          - string
          - "null"
          description: Last modification date of the connection. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        status:
          description: Status of the connection.
          $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection.Status'
        is_ipv6:
          type: boolean
          description: IP version of the IPSec Tunnel.
        initiation_policy:
          description: Who initiates the IPsec tunnel.
          $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection.InitiationPolicy'
        secret_id:
          type: string
          description: ID of the secret in Secret Manager which contains the PSK.
            (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        secret_revision:
          type: integer
          description: Version number of the secret in Secret Manager which contains
            the PSK.
          format: uint32
        ikev2_ciphers:
          type: array
          description: List of IKE v2 ciphers proposed for the IPsec tunnel.
          items:
            $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection.Cipher'
        esp_ciphers:
          type: array
          description: List of ESP ciphers proposed for the IPsec tunnel.
          items:
            $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection.Cipher'
        route_propagation_enabled:
          type: boolean
          description: Defines whether route propagation is enabled or not.
        vpn_gateway_id:
          type: string
          description: ID of the VPN gateway attached to the connection. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        customer_gateway_id:
          type: string
          description: ID of the customer gateway attached to the connection. (UUID
            format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        tunnel_status:
          description: Status of the IPsec tunnel.
          $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.TunnelStatus'
        tunnel_status_ipv4:
          description: Status of the IPv4 IPsec tunnel.
          deprecated: true
          $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.TunnelStatus'
        tunnel_status_ipv6:
          description: Status of the IPv6 IPsec tunnel.
          deprecated: true
          $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.TunnelStatus'
        bgp_status_ipv4:
          description: Status of the BGP IPv4 session.
          $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.BgpSession.Status'
        bgp_status_ipv6:
          description: Status of the BGP IPv6 session.
          $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.BgpSession.Status'
        bgp_session_ipv4:
          description: BGP IPv4 session, including status, interco private IPv4 subnet
            and attached routing policy.
          $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.BgpSession'
        bgp_session_ipv6:
          description: BGP IPv6 session, including status, interco private IPv6 subnet
            and attached routing policy.
          $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.BgpSession'
        region:
          type: string
          description: Region of the connection.
      x-properties-order:
      - id
      - srn
      - project_id
      - organization_id
      - name
      - tags
      - created_at
      - updated_at
      - status
      - is_ipv6
      - initiation_policy
      - secret_id
      - secret_revision
      - ikev2_ciphers
      - esp_ciphers
      - route_propagation_enabled
      - vpn_gateway_id
      - customer_gateway_id
      - tunnel_status
      - tunnel_status_ipv4
      - tunnel_status_ipv6
      - bgp_status_ipv4
      - bgp_status_ipv6
      - bgp_session_ipv4
      - bgp_session_ipv6
      - region
    scaleway.s2s_vpn.v1alpha1.Connection.Cipher:
      type: object
      properties:
        encryption:
          $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection.Encryption'
        integrity:
          $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection.Integrity'
        dh_group:
          $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection.DhGroup'
      x-properties-order:
      - encryption
      - integrity
      - dh_group
    scaleway.s2s_vpn.v1alpha1.Connection.DhGroup:
      type: string
      enum:
      - unknown_dhgroup
      - modp2048
      - modp3072
      - modp4096
      - ecp256
      - ecp384
      - ecp521
      - curve25519
      default: unknown_dhgroup
    scaleway.s2s_vpn.v1alpha1.Connection.Encryption:
      type: string
      enum:
      - unknown_encryption
      - aes128
      - aes192
      - aes256
      - aes128gcm
      - aes192gcm
      - aes256gcm
      - aes128ccm
      - aes256ccm
      - chacha20poly1305
      default: unknown_encryption
    scaleway.s2s_vpn.v1alpha1.Connection.InitiationPolicy:
      type: string
      enum:
      - unknown_initiation_policy
      - vpn_gateway
      - customer_gateway
      default: unknown_initiation_policy
    scaleway.s2s_vpn.v1alpha1.Connection.Integrity:
      type: string
      enum:
      - unknown_integrity
      - sha256
      - sha384
      - sha512
      default: unknown_integrity
    scaleway.s2s_vpn.v1alpha1.Connection.Status:
      type: string
      enum:
      - unknown_status
      - active
      - limited_connectivity
      - down
      - locked
      default: unknown_status
    scaleway.s2s_vpn.v1alpha1.CreateConnectionRequest.BgpConfig:
      type: object
      properties:
        routing_policy_id:
          type: string
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        private_ip:
          type:
          - string
          - "null"
          description: (IP network)
          example: 1.2.3.4/32
        peer_private_ip:
          type:
          - string
          - "null"
          description: (IP network)
          example: 1.2.3.4/32
      x-properties-order:
      - routing_policy_id
      - private_ip
      - peer_private_ip
    scaleway.s2s_vpn.v1alpha1.CreateConnectionRequest.InitiationPolicy:
      type: string
      enum:
      - unknown_initiation_policy
      - vpn_gateway
      - customer_gateway
      default: unknown_initiation_policy
    scaleway.s2s_vpn.v1alpha1.CreateConnectionRequest.Secret:
      type: object
      properties:
        id:
          type: string
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        revision:
          type:
          - integer
          - "null"
          format: uint32
      x-properties-order:
      - id
      - revision
    scaleway.s2s_vpn.v1alpha1.CreateConnectionResponse:
      type: object
      properties:
        connection:
          description: This connection.
          $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection'
        pre_shared_key:
          type: string
          description: |-
            New PSK generated for this connection.
            Deprecated, use secret_id & secret_revision fields.
          deprecated: true
      x-properties-order:
      - connection
      - pre_shared_key
    scaleway.s2s_vpn.v1alpha1.CreateVpnGatewayRequest.DualIpTunnel:
      type: object
      properties:
        ipam_ipv4_id:
          type:
          - string
          - "null"
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        ipam_ipv6_id:
          type:
          - string
          - "null"
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      x-properties-order:
      - ipam_ipv4_id
      - ipam_ipv6_id
    scaleway.s2s_vpn.v1alpha1.CreateVpnGatewayRequest.PublicConfig:
      type: object
      properties:
        ipam_ipv4_id:
          type:
          - string
          - "null"
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        ipam_ipv6_id:
          type:
          - string
          - "null"
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      x-properties-order:
      - ipam_ipv4_id
      - ipam_ipv6_id
    scaleway.s2s_vpn.v1alpha1.CreateVpnGatewayRequest.PublicTunnelConfig:
      type: object
      properties:
        single_ipv4_tunnel:
          description: Precisely one of single_ipv4_tunnel, single_ipv6_tunnel, dual_ipv4v6_tunnel
            can be set.
          x-one-of: config
          oneOf:
          - $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.CreateVpnGatewayRequest.SingleIpTunnel'
          - type: "null"
        single_ipv6_tunnel:
          description: Precisely one of single_ipv4_tunnel, single_ipv6_tunnel, dual_ipv4v6_tunnel
            can be set.
          x-one-of: config
          oneOf:
          - $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.CreateVpnGatewayRequest.SingleIpTunnel'
          - type: "null"
        dual_ipv4v6_tunnel:
          description: Precisely one of single_ipv4_tunnel, single_ipv6_tunnel, dual_ipv4v6_tunnel
            can be set.
          x-one-of: config
          oneOf:
          - $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.CreateVpnGatewayRequest.DualIpTunnel'
          - type: "null"
      x-properties-order:
      - single_ipv4_tunnel
      - single_ipv6_tunnel
      - dual_ipv4v6_tunnel
    scaleway.s2s_vpn.v1alpha1.CreateVpnGatewayRequest.SingleIpTunnel:
      type: object
      properties:
        ipam_id:
          type:
          - string
          - "null"
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      x-properties-order:
      - ipam_id
    scaleway.s2s_vpn.v1alpha1.CustomerGateway:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the customer gateway. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        srn:
          type: string
          description: The SRN of the customer gateway.
          pattern: ^srn://s2s-vpn\.[^/]+/regions/[^/]+/customer-gateways/[^/]+$
        project_id:
          type: string
          description: Project ID. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        organization_id:
          type: string
          description: Organization ID. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        name:
          type: string
          description: Name of the customer gateway.
        tags:
          type: array
          description: List of tags applied to the customer gateway.
          items:
            type: string
        created_at:
          type:
          - string
          - "null"
          description: Creation date of the customer gateway. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        updated_at:
          type:
          - string
          - "null"
          description: Last modification date of the customer gateway. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        public_ipv4:
          type:
          - string
          - "null"
          description: Public IPv4 address of the customer gateway. (IPv4 address)
          example: 1.2.3.4
        public_ipv6:
          type:
          - string
          - "null"
          description: Public IPv6 address of the customer gateway. (IPv6 address)
          example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
        asn:
          type: integer
          description: AS Number of the customer gateway.
          format: uint32
        connection_ids:
          type: array
          description: List of connection ids of the customer gateway.
          items:
            type: string
        region:
          type: string
          description: Region of the customer gateway.
      x-properties-order:
      - id
      - srn
      - project_id
      - organization_id
      - name
      - tags
      - created_at
      - updated_at
      - public_ipv4
      - public_ipv6
      - asn
      - connection_ids
      - region
    scaleway.s2s_vpn.v1alpha1.GatewayType:
      type: object
      properties:
        name:
          type: string
        bandwidth:
          type: integer
          format: uint64
        allowed_connections:
          type: integer
          format: uint64
        zones:
          type: array
          items:
            type: string
        region:
          type: string
          description: The region you want to target
      x-properties-order:
      - name
      - bandwidth
      - allowed_connections
      - zones
      - region
    scaleway.s2s_vpn.v1alpha1.ListConnectionsRequest.OrderBy:
      type: string
      enum:
      - created_at_asc
      - created_at_desc
      - name_asc
      - name_desc
      - status_asc
      - status_desc
      default: created_at_asc
    scaleway.s2s_vpn.v1alpha1.ListConnectionsResponse:
      type: object
      properties:
        connections:
          type: array
          description: List of connections on the current page.
          items:
            $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection'
        total_count:
          type: integer
          description: Total number of connections.
          format: uint64
      x-properties-order:
      - connections
      - total_count
    scaleway.s2s_vpn.v1alpha1.ListCustomerGatewaysRequest.OrderBy:
      type: string
      enum:
      - created_at_asc
      - created_at_desc
      - name_asc
      - name_desc
      default: created_at_asc
    scaleway.s2s_vpn.v1alpha1.ListCustomerGatewaysResponse:
      type: object
      properties:
        gateways:
          type: array
          description: List of customer gateways on the current page.
          items:
            $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.CustomerGateway'
        total_count:
          type: integer
          description: Total number of customer gateways.
          format: uint64
      x-properties-order:
      - gateways
      - total_count
    scaleway.s2s_vpn.v1alpha1.ListRoutingPoliciesRequest.OrderBy:
      type: string
      enum:
      - created_at_asc
      - created_at_desc
      - name_asc
      - name_desc
      default: created_at_asc
    scaleway.s2s_vpn.v1alpha1.ListRoutingPoliciesResponse:
      type: object
      properties:
        routing_policies:
          type: array
          items:
            $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.RoutingPolicy'
        total_count:
          type: integer
          format: uint64
      x-properties-order:
      - routing_policies
      - total_count
    scaleway.s2s_vpn.v1alpha1.ListVpnGatewayTypesResponse:
      type: object
      properties:
        gateway_types:
          type: array
          description: List of VPN gateway types on the current page.
          items:
            $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.GatewayType'
        total_count:
          type: integer
          description: Total number of gateway types.
          format: uint64
      x-properties-order:
      - gateway_types
      - total_count
    scaleway.s2s_vpn.v1alpha1.ListVpnGatewaysRequest.OrderBy:
      type: string
      enum:
      - created_at_asc
      - created_at_desc
      - name_asc
      - name_desc
      - type_asc
      - type_desc
      - status_asc
      - status_desc
      default: created_at_asc
    scaleway.s2s_vpn.v1alpha1.ListVpnGatewaysResponse:
      type: object
      properties:
        gateways:
          type: array
          description: List of VPN gateways on the current page.
          items:
            $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.VpnGateway'
        total_count:
          type: integer
          description: Total number of VPN gateways.
          format: uint64
      x-properties-order:
      - gateways
      - total_count
    scaleway.s2s_vpn.v1alpha1.RenewConnectionPskResponse:
      type: object
      properties:
        connection:
          description: This connection.
          $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection'
        pre_shared_key:
          type: string
          description: |-
            New PSK generated for this connection.
            Deprecated, use secret_id & secret_revision fields.
          deprecated: true
      x-properties-order:
      - connection
      - pre_shared_key
    scaleway.s2s_vpn.v1alpha1.RoutingPolicy:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the routing policy. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        srn:
          type: string
          description: The SRN of the routing policy.
          pattern: ^srn://s2s-vpn\.[^/]+/regions/[^/]+/routing-policies/[^/]+$
        project_id:
          type: string
          description: Project ID. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        organization_id:
          type: string
          description: Organization ID. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        name:
          type: string
          description: Name of the routing policy.
        tags:
          type: array
          description: List of tags associated with the routing policy.
          items:
            type: string
        created_at:
          type:
          - string
          - "null"
          description: Creation date of the routing policy. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        updated_at:
          type:
          - string
          - "null"
          description: Last modification date of the routing policy. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        is_ipv6:
          type: boolean
          description: IP prefixes version of the routing policy.
        prefix_filter_in:
          type: array
          description: IP prefixes to accept from the peer (ranges of route announcements
            to accept). (IP network)
          example:
          - 1.2.3.4/32
          items:
            type: string
        prefix_filter_out:
          type: array
          description: IP prefix filters to advertise to the peer (ranges of routes
            to advertise). (IP network)
          example:
          - 1.2.3.4/32
          items:
            type: string
        region:
          type: string
          description: Region of the routing policy.
      x-properties-order:
      - id
      - srn
      - project_id
      - organization_id
      - name
      - tags
      - created_at
      - updated_at
      - is_ipv6
      - prefix_filter_in
      - prefix_filter_out
      - region
    scaleway.s2s_vpn.v1alpha1.TunnelStatus:
      type: string
      enum:
      - unknown_tunnel_status
      - up
      - down
      default: unknown_tunnel_status
    scaleway.s2s_vpn.v1alpha1.VpnGateway:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the VPN gateway. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        srn:
          type: string
          description: The SRN of the VPN gateway.
          pattern: ^srn://s2s-vpn\.[^/]+/zones/[^/]+/vpn-gateways/[^/]+$
        project_id:
          type: string
          description: Project ID. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        organization_id:
          type: string
          description: Organization ID. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        name:
          type: string
          description: Name of the VPN gateway.
        tags:
          type: array
          description: List of tags applied to the VPN gateway.
          items:
            type: string
        created_at:
          type:
          - string
          - "null"
          description: Creation date of the VPN gateway. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        updated_at:
          type:
          - string
          - "null"
          description: Last modification date of the VPN gateway. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        status:
          description: Status of the VPN gateway.
          $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.VpnGateway.Status'
        gateway_type:
          type: string
          description: Gateway type of the VPN gateway.
        public_config:
          description: |-
            Public endpoint configuration of the VPN gateway.
            Precisely one of public_config, private_config can be set.
          x-one-of: endpoint
          oneOf:
          - $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.VpnGateway.PublicConfig'
          - type: "null"
        private_config:
          description: Precisely one of public_config, private_config can be set.
          x-one-of: endpoint
          oneOf:
          - $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.VpnGateway.PrivateConfig'
          - type: "null"
        private_network_id:
          type: string
          description: ID of the Private Network attached to the VPN gateway. (UUID
            format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        ipam_private_ipv4_id:
          type: string
          description: ID of the IPAM private IPv4 address attached to the VPN gateway.
            (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        ipam_private_ipv6_id:
          type: string
          description: ID of the IPAM private IPv6 address attached to the VPN gateway.
            (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        asn:
          type: integer
          description: Autonomous System Number (ASN) of the VPN gateway, used by
            Border Gateway Protocol (BGP) to exchange routing information with the
            customer gateway.
          format: uint32
        connection_ids:
          type: array
          description: List of connection ids of the VPN gateway.
          items:
            type: string
        zone:
          type: string
          description: Zone where the VPN gateway resource is currently provisioned.
        region:
          type: string
          description: Region of the VPN gateway.
      x-properties-order:
      - id
      - srn
      - project_id
      - organization_id
      - name
      - tags
      - created_at
      - updated_at
      - status
      - gateway_type
      - public_config
      - private_config
      - private_network_id
      - ipam_private_ipv4_id
      - ipam_private_ipv6_id
      - asn
      - connection_ids
      - zone
      - region
    scaleway.s2s_vpn.v1alpha1.VpnGateway.PrivateConfig:
      type: object
    scaleway.s2s_vpn.v1alpha1.VpnGateway.PublicConfig:
      type: object
      properties:
        ipam_ipv4_id:
          type:
          - string
          - "null"
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        ipam_ipv6_id:
          type:
          - string
          - "null"
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      x-properties-order:
      - ipam_ipv4_id
      - ipam_ipv6_id
    scaleway.s2s_vpn.v1alpha1.VpnGateway.Status:
      type: string
      enum:
      - unknown_status
      - configuring
      - failed
      - provisioning
      - active
      - deprovisioning
      - locked
      default: unknown_status
  securitySchemes:
    scaleway:
      in: header
      name: X-Auth-Token
      type: apiKey
paths:
  /s2s-vpn/v1alpha1/regions/{region}/connections:
    get:
      tags:
      - Connections
      operationId: ListConnections
      summary: List connections
      description: List all your connections. A number of filters are available, including
        Project ID, name, tags and status.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: query
        name: page
        description: Page number to return.
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        description: Maximum number of connections to return per page.
        schema:
          type: integer
          format: uint32
      - in: query
        name: order_by
        description: Order in which to return results.
        schema:
          $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.ListConnectionsRequest.OrderBy'
      - in: query
        name: project_id
        description: Project ID to filter for. (UUID format)
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: organization_id
        description: Organization ID to filter for. (UUID format)
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: name
        description: Connection name to filter for.
        schema:
          type: string
      - in: query
        name: tags
        description: Tags to filter for.
        schema:
          type: array
          items:
            type: string
      - in: query
        name: statuses
        description: Connection statuses to filter for.
        schema:
          type: array
          items:
            $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection.Status'
      - in: query
        name: is_ipv6
        description: Filter connections with IP version of IPSec tunnel.
        schema:
          type: boolean
      - in: query
        name: routing_policy_ids
        description: Filter for connections using these routing policies.
        schema:
          type: array
          items:
            type: string
      - in: query
        name: route_propagation_enabled
        description: Filter for connections with route propagation enabled.
        schema:
          type: boolean
      - in: query
        name: vpn_gateway_ids
        description: Filter for connections attached to these VPN gateways.
        schema:
          type: array
          items:
            type: string
      - in: query
        name: customer_gateway_ids
        description: Filter for connections attached to these customer gateways.
        schema:
          type: array
          items:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.ListConnectionsResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/connections"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/connections" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Connections
      operationId: CreateConnection
      summary: Create a connection
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.CreateConnectionResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  type: string
                  description: ID of the Project to create the connection in. (UUID
                    format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                name:
                  type: string
                  description: Name of the connection.
                tags:
                  type: array
                  description: List of tags to apply to the connection.
                  items:
                    type: string
                is_ipv6:
                  type: boolean
                  description: Defines IP version of the IPSec Tunnel.
                initiation_policy:
                  description: Who initiates the IPsec tunnel.
                  $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.CreateConnectionRequest.InitiationPolicy'
                ikev2_ciphers:
                  type: array
                  description: List of IKE v2 ciphers proposed for the IPsec tunnel.
                  items:
                    $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection.Cipher'
                esp_ciphers:
                  type: array
                  description: List of ESP ciphers proposed for the IPsec tunnel.
                  items:
                    $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection.Cipher'
                enable_route_propagation:
                  type: boolean
                  description: Defines whether route propagation is enabled or not.
                secret:
                  description: |-
                    Previously created secret in Secret Manager containing the PSK to be used for the IPsec tunnel.
                    If no secret is given, S2S VPN will create one automatically in Secret Manager, reference its secret_id and version in the connection and use the generated PSK.
                    Secret version is also optional and maybe used to refer to a previous version. If no version is given, "latest" is used.
                  $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.CreateConnectionRequest.Secret'
                vpn_gateway_id:
                  type: string
                  description: ID of the VPN gateway to attach to the connection.
                    (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                customer_gateway_id:
                  type: string
                  description: ID of the customer gateway to attach to the connection.
                    (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                bgp_config_ipv4:
                  description: BGP config of IPv4 session, including interco private
                    IPv4 subnet (first IP assigned to the VPN Gateway, second IP to
                    the Customer Gateway) and attached routing policy.
                  $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.CreateConnectionRequest.BgpConfig'
                bgp_config_ipv6:
                  description: BGP config of IPv6 session, including interco private
                    IPv6 subnet (first IP assigned to the VPN Gateway, second IP to
                    the Customer Gateway) and attached routing policy.
                  $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.CreateConnectionRequest.BgpConfig'
              required:
              - project_id
              - name
              - initiation_policy
              - ikev2_ciphers
              - esp_ciphers
              - vpn_gateway_id
              - customer_gateway_id
              x-properties-order:
              - project_id
              - name
              - tags
              - is_ipv6
              - initiation_policy
              - ikev2_ciphers
              - esp_ciphers
              - enable_route_propagation
              - secret
              - vpn_gateway_id
              - customer_gateway_id
              - bgp_config_ipv4
              - bgp_config_ipv6
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "customer_gateway_id": "6170692e-7363-616c-6577-61792e636f6d",
              "enable_route_propagation": false,
              "esp_ciphers": [
                  ""
              ],
              "ikev2_ciphers": [
                  ""
              ],
              "initiation_policy": "unknown_initiation_policy",
              "is_ipv6": false,
              "name": "string",
              "project_id": "6170692e-7363-616c-6577-61792e636f6d",
              "vpn_gateway_id": "6170692e-7363-616c-6577-61792e636f6d"
            }' \
            "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/connections"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/connections" \
            X-Auth-Token:$SCW_SECRET_KEY \
            customer_gateway_id="6170692e-7363-616c-6577-61792e636f6d" \
            enable_route_propagation:=false \
            esp_ciphers:='[
              ""
            ]' \
            ikev2_ciphers:='[
              ""
            ]' \
            initiation_policy="unknown_initiation_policy" \
            is_ipv6:=false \
            name="string" \
            project_id="6170692e-7363-616c-6577-61792e636f6d" \
            vpn_gateway_id="6170692e-7363-616c-6577-61792e636f6d"
  /s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}:
    get:
      tags:
      - Connections
      operationId: GetConnection
      summary: Get a connection
      description: Get a connection for the given connection ID. The response object
        includes information about the connection's various configuration details.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: path
        name: connection_id
        description: ID of the requested connection. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Connections
      operationId: UpdateConnection
      summary: Update a connection
      description: Update an existing connection, specified by its connection ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: path
        name: connection_id
        description: ID of the connection to update. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type:
                  - string
                  - "null"
                  description: Name of the connection.
                tags:
                  type:
                  - array
                  - "null"
                  description: List of tags to apply to the connection.
                initiation_policy:
                  description: Who initiates the IPsec tunnel.
                  $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.CreateConnectionRequest.InitiationPolicy'
                ikev2_ciphers:
                  type: array
                  description: List of IKE v2 ciphers proposed for the IPsec tunnel.
                  items:
                    $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection.Cipher'
                esp_ciphers:
                  type: array
                  description: List of ESP ciphers proposed for the IPsec tunnel.
                  items:
                    $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection.Cipher'
                secret_id:
                  type:
                  - string
                  - "null"
                  description: Secret ID in the client's project containing the PSK.
                    (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                secret_revision:
                  type:
                  - integer
                  - "null"
                  description: |-
                    Secret version in the client's project containing the PSK.
                    If not given it will not change. If secret_id is updated, secret_revision should be set accordingly.
                  format: uint32
              x-properties-order:
              - name
              - tags
              - initiation_policy
              - ikev2_ciphers
              - esp_ciphers
              - secret_id
              - secret_revision
      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/s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Connections
      operationId: DeleteConnection
      summary: Delete a connection
      description: Delete an existing connection, specified by its connection ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: path
        name: connection_id
        description: ID of the connection to delete. (UUID format)
        required: true
        schema:
          type: string
          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/s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}/change-psk:
    post:
      tags:
      - Connections
      operationId: ChangeConnectionPsk
      summary: Change pre-shared key
      description: Change pre-shared key for a given connection.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: path
        name: connection_id
        description: ID of the connection to renew the PSK. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.ChangeConnectionPskResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                secret:
                  description: New PSK Secret of the connection.
                  $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.ChangeConnectionPskRequest.Secret'
              required:
              - secret
              x-properties-order:
              - secret
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"secret":""}' \
            "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}/change-psk"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}/change-psk" \
            X-Auth-Token:$SCW_SECRET_KEY \
            secret=""
  /s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}/detach-routing-policy:
    post:
      tags:
      - Connections
      operationId: DetachRoutingPolicy
      summary: Detach a routing policy
      description: Detach an existing routing policy from a connection, specified
        by its connection ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: path
        name: connection_id
        description: ID of the connection from which routing policy is being detached.
          (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                routing_policy_v4:
                  type:
                  - string
                  - "null"
                  description: |-
                    ID of the routing policy to detach from the BGP IPv4 session. (UUID format)
                    Precisely one of routing_policy_v4, routing_policy_v6 can be set.
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: routing_policy
                routing_policy_v6:
                  type:
                  - string
                  - "null"
                  description: |-
                    ID of the routing policy to detach from the BGP IPv6 session. (UUID format)
                    Precisely one of routing_policy_v4, routing_policy_v6 can be set.
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: routing_policy
              x-properties-order:
              - routing_policy_v4
              - routing_policy_v6
      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/s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}/detach-routing-policy"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}/detach-routing-policy" \
            X-Auth-Token:$SCW_SECRET_KEY
  /s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}/disable-route-propagation:
    post:
      tags:
      - Connections
      operationId: DisableRoutePropagation
      summary: Disable route propagation
      description: Prevent any prefixes from being announced in the BGP session. Traffic
        will not be able to flow over the VPN Gateway until route propagation is re-enabled.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: path
        name: connection_id
        description: ID of the connection on which to disable route propagation. (UUID
          format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection'
      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/s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}/disable-route-propagation"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}/disable-route-propagation" \
            X-Auth-Token:$SCW_SECRET_KEY
  /s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}/enable-route-propagation:
    post:
      tags:
      - Connections
      operationId: EnableRoutePropagation
      summary: Enable route propagation
      description: Enable all allowed prefixes (defined in a routing policy) to be
        announced in the BGP session. This allows traffic to flow between the attached
        VPC and the on-premises infrastructure along the announced routes. Note that
        by default, even when route propagation is enabled, all routes are blocked.
        It is essential to attach a routing policy to define the ranges of routes
        to announce.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: path
        name: connection_id
        description: ID of the connection on which to enable route propagation. (UUID
          format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection'
      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/s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}/enable-route-propagation"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}/enable-route-propagation" \
            X-Auth-Token:$SCW_SECRET_KEY
  /s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}/renew-psk:
    post:
      tags:
      - Connections
      operationId: RenewConnectionPsk
      summary: Renew pre-shared key
      description: Renew pre-shared key for a given connection.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: path
        name: connection_id
        description: ID of the connection to renew the PSK. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.RenewConnectionPskResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                generate_revision:
                  type:
                  - boolean
                  - "null"
                  description: Generate a new version or update to the latest existing
                    one.
              x-properties-order:
              - generate_revision
      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/s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}/renew-psk"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}/renew-psk" \
            X-Auth-Token:$SCW_SECRET_KEY
  /s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}/set-routing-policy:
    post:
      tags:
      - Connections
      operationId: SetRoutingPolicy
      summary: Set a new routing policy
      description: Set a new routing policy on a connection, overriding the existing
        one if present, specified by its connection ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: path
        name: connection_id
        description: ID of the connection whose routing policy is being updated. (UUID
          format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.Connection'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                routing_policy_v4:
                  type:
                  - string
                  - "null"
                  description: |-
                    ID of the routing policy to set for the BGP IPv4 session. (UUID format)
                    Precisely one of routing_policy_v4, routing_policy_v6 can be set.
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: routing_policy
                routing_policy_v6:
                  type:
                  - string
                  - "null"
                  description: |-
                    ID of the routing policy to set for the BGP IPv6 session. (UUID format)
                    Precisely one of routing_policy_v4, routing_policy_v6 can be set.
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: routing_policy
              x-properties-order:
              - routing_policy_v4
              - routing_policy_v6
      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/s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}/set-routing-policy"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/connections/{connection_id}/set-routing-policy" \
            X-Auth-Token:$SCW_SECRET_KEY
  /s2s-vpn/v1alpha1/regions/{region}/customer-gateways:
    get:
      tags:
      - Customer Gateways
      operationId: ListCustomerGateways
      summary: List customer gateways
      description: List all your customer gateways. A number of filters are available,
        including Project ID, name, and tags.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: query
        name: page
        description: Page number to return.
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        description: Maximum number of customer gateways to return per page.
        schema:
          type: integer
          format: uint32
      - in: query
        name: order_by
        description: Order in which to return results.
        schema:
          $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.ListCustomerGatewaysRequest.OrderBy'
      - in: query
        name: project_id
        description: Project ID to filter for. (UUID format)
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: organization_id
        description: Organization ID to filter for. (UUID format)
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: name
        description: Customer gateway name to filter for.
        schema:
          type: string
      - in: query
        name: tags
        description: Tags to filter for.
        schema:
          type: array
          items:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.ListCustomerGatewaysResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/customer-gateways"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/customer-gateways" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Customer Gateways
      operationId: CreateCustomerGateway
      summary: Create a customer gateway
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.CustomerGateway'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  type: string
                  description: ID of the Project to create the customer gateway in.
                    (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                name:
                  type: string
                  description: Name of the customer gateway.
                tags:
                  type: array
                  description: List of tags to apply to the customer gateway.
                  items:
                    type: string
                ipv4_public:
                  type:
                  - string
                  - "null"
                  description: Public IPv4 address of the customer gateway. (IP network)
                  example: 1.2.3.4/32
                ipv6_public:
                  type:
                  - string
                  - "null"
                  description: Public IPv6 address of the customer gateway. (IP network)
                  example: 1.2.3.4/32
                asn:
                  type: integer
                  description: AS Number of the customer gateway.
                  format: uint32
              required:
              - project_id
              - name
              - asn
              x-properties-order:
              - project_id
              - name
              - tags
              - ipv4_public
              - ipv6_public
              - asn
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "asn": 42,
              "name": "string",
              "project_id": "6170692e-7363-616c-6577-61792e636f6d"
            }' \
            "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/customer-gateways"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/customer-gateways" \
            X-Auth-Token:$SCW_SECRET_KEY \
            asn:=42 \
            name="string" \
            project_id="6170692e-7363-616c-6577-61792e636f6d"
  /s2s-vpn/v1alpha1/regions/{region}/customer-gateways/{gateway_id}:
    get:
      tags:
      - Customer Gateways
      operationId: GetCustomerGateway
      summary: Get a customer gateway
      description: Get a customer gateway for the given customer gateway ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: path
        name: gateway_id
        description: ID of the requested customer gateway. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.CustomerGateway'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/customer-gateways/{gateway_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/customer-gateways/{gateway_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Customer Gateways
      operationId: UpdateCustomerGateway
      summary: Update a customer gateway
      description: Update an existing customer gateway, specified by its customer
        gateway ID. You can update its name, tags, public IPv4 & IPv6 address and
        AS Number.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: path
        name: gateway_id
        description: ID of the customer gateway to update. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.CustomerGateway'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type:
                  - string
                  - "null"
                  description: Name of the customer gateway.
                tags:
                  type:
                  - array
                  - "null"
                  description: List of tags to apply to the customer gateway.
                ipv4_public:
                  type:
                  - string
                  - "null"
                  description: Public IPv4 address of the customer gateway. (IP network)
                  example: 1.2.3.4/32
                ipv6_public:
                  type:
                  - string
                  - "null"
                  description: Public IPv6 address of the customer gateway. (IP network)
                  example: 1.2.3.4/32
                asn:
                  type:
                  - integer
                  - "null"
                  description: AS Number of the customer gateway.
                  format: uint32
              x-properties-order:
              - name
              - tags
              - ipv4_public
              - ipv6_public
              - asn
      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/s2s-vpn/v1alpha1/regions/{region}/customer-gateways/{gateway_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/customer-gateways/{gateway_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Customer Gateways
      operationId: DeleteCustomerGateway
      summary: Delete a customer gateway
      description: Delete an existing customer gateway, specified by its customer
        gateway ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: path
        name: gateway_id
        description: ID of the customer gateway to delete. (UUID format)
        required: true
        schema:
          type: string
          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/s2s-vpn/v1alpha1/regions/{region}/customer-gateways/{gateway_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/customer-gateways/{gateway_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /s2s-vpn/v1alpha1/regions/{region}/routing-policies:
    get:
      tags:
      - Routing Policies
      operationId: ListRoutingPolicies
      summary: List routing policies
      description: List all routing policies in a given region. A routing policy can
        be attached to one or multiple connections (S2S VPN connections).
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: query
        name: page
        description: Page number to return.
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        description: Maximum number of routing policies to return per page.
        schema:
          type: integer
          format: uint32
      - in: query
        name: order_by
        description: Order in which to return results.
        schema:
          $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.ListRoutingPoliciesRequest.OrderBy'
      - in: query
        name: project_id
        description: Project ID to filter for. (UUID format)
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: organization_id
        description: Organization ID to filter for. (UUID format)
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: name
        description: Routing policy name to filter for.
        schema:
          type: string
      - in: query
        name: tags
        description: Tags to filter for.
        schema:
          type: array
          items:
            type: string
      - in: query
        name: ipv6
        description: Filter for the routing policies based on IP prefixes version.
        schema:
          type: boolean
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.ListRoutingPoliciesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/routing-policies"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/routing-policies" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Routing Policies
      operationId: CreateRoutingPolicy
      summary: Create a routing policy
      description: Create a routing policy. Routing policies allow you to set IP prefix
        filters to define the incoming route announcements to accept from the customer
        gateway, and the outgoing routes to announce to the customer gateway.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.RoutingPolicy'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  type: string
                  description: ID of the Project to create the routing policy in.
                    (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                name:
                  type: string
                  description: Name of the routing policy.
                tags:
                  type: array
                  description: List of tags to apply to the routing policy.
                  items:
                    type: string
                is_ipv6:
                  type: boolean
                  description: IP prefixes version of the routing policy.
                prefix_filter_in:
                  type: array
                  description: IP prefixes to accept from the peer (ranges of route
                    announcements to accept). (IP network)
                  example:
                  - 1.2.3.4/32
                  items:
                    type: string
                prefix_filter_out:
                  type: array
                  description: IP prefix filters to advertise to the peer (ranges
                    of routes to advertise). (IP network)
                  example:
                  - 1.2.3.4/32
                  items:
                    type: string
              required:
              - project_id
              - name
              x-properties-order:
              - project_id
              - name
              - tags
              - is_ipv6
              - prefix_filter_in
              - prefix_filter_out
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "is_ipv6": false,
              "name": "string",
              "project_id": "6170692e-7363-616c-6577-61792e636f6d"
            }' \
            "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/routing-policies"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/routing-policies" \
            X-Auth-Token:$SCW_SECRET_KEY \
            is_ipv6:=false \
            name="string" \
            project_id="6170692e-7363-616c-6577-61792e636f6d"
  /s2s-vpn/v1alpha1/regions/{region}/routing-policies/{routing_policy_id}:
    get:
      tags:
      - Routing Policies
      operationId: GetRoutingPolicy
      summary: Get routing policy
      description: Get a routing policy for the given routing policy ID. The response
        object gives information including the policy's name, tags and prefix filters.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: path
        name: routing_policy_id
        description: ID of the routing policy to get. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.RoutingPolicy'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/routing-policies/{routing_policy_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/routing-policies/{routing_policy_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Routing Policies
      operationId: UpdateRoutingPolicy
      summary: Update a routing policy
      description: Update an existing routing policy, specified by its routing policy
        ID. Its name, tags and incoming/outgoing prefix filters can be updated.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: path
        name: routing_policy_id
        description: ID of the routing policy to update. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.RoutingPolicy'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type:
                  - string
                  - "null"
                  description: Name of the routing policy.
                tags:
                  type:
                  - array
                  - "null"
                  description: List of tags to apply to the routing policy.
                prefix_filter_in:
                  type:
                  - array
                  - "null"
                  description: IP prefixes to accept from the peer (ranges of route
                    announcements to accept).
                prefix_filter_out:
                  type:
                  - array
                  - "null"
                  description: IP prefix filters for routes to advertise to the peer
                    (ranges of routes to advertise).
              x-properties-order:
              - name
              - tags
              - prefix_filter_in
              - prefix_filter_out
      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/s2s-vpn/v1alpha1/regions/{region}/routing-policies/{routing_policy_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/routing-policies/{routing_policy_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Routing Policies
      operationId: DeleteRoutingPolicy
      summary: Delete a routing policy
      description: Delete an existing routing policy, specified by its routing policy
        ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: path
        name: routing_policy_id
        description: ID of the routing policy to delete. (UUID format)
        required: true
        schema:
          type: string
          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/s2s-vpn/v1alpha1/regions/{region}/routing-policies/{routing_policy_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/routing-policies/{routing_policy_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /s2s-vpn/v1alpha1/regions/{region}/vpn-gateway-types:
    get:
      tags:
      - VPN Gateway Types
      operationId: ListVpnGatewayTypes
      summary: List VPN gateway types
      description: List the different VPN gateway commercial offer types available
        at Scaleway. The response is an array of objects describing the name and technical
        details of each available VPN gateway type.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: query
        name: page
        description: Page number to return.
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        description: Maximum number of VPN gateway types to return per page.
        schema:
          type: integer
          format: uint32
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.ListVpnGatewayTypesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/vpn-gateway-types"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/vpn-gateway-types" \
            X-Auth-Token:$SCW_SECRET_KEY
  /s2s-vpn/v1alpha1/regions/{region}/vpn-gateways:
    get:
      tags:
      - VPN Gateways
      operationId: ListVpnGateways
      summary: List VPN gateways
      description: List all your VPN gateways. A number of filters are available,
        including Project ID, name, tags and status.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: query
        name: page
        description: Page number to return.
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        description: Maximum number of VPN gateways to return per page.
        schema:
          type: integer
          format: uint32
      - in: query
        name: order_by
        description: Order in which to return results.
        schema:
          $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.ListVpnGatewaysRequest.OrderBy'
      - in: query
        name: project_id
        description: Project ID to filter for. (UUID format)
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: organization_id
        description: Organization ID to filter for. (UUID format)
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: name
        description: VPN gateway name to filter for.
        schema:
          type: string
      - in: query
        name: tags
        description: Tags to filter for.
        schema:
          type: array
          items:
            type: string
      - in: query
        name: statuses
        description: VPN gateway statuses to filter for.
        schema:
          type: array
          items:
            $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.VpnGateway.Status'
      - in: query
        name: gateway_types
        description: Filter for VPN gateways of these types.
        schema:
          type: array
          items:
            type: string
      - in: query
        name: private_network_ids
        description: Filter for VPN gateways attached to these private networks.
        schema:
          type: array
          items:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.ListVpnGatewaysResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/vpn-gateways"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/vpn-gateways" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - VPN Gateways
      operationId: CreateVpnGateway
      summary: Create VPN gateway
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.VpnGateway'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  type: string
                  description: ID of the Project to create the VPN gateway in. (UUID
                    format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                name:
                  type: string
                  description: Name of the VPN gateway.
                tags:
                  type: array
                  description: List of tags to apply to the VPN gateway.
                  items:
                    type: string
                gateway_type:
                  type: string
                  description: VPN gateway type (commercial offer type).
                public_config:
                  description: |-
                    Public endpoint configuration of the VPN gateway.
                    Precisely one of public_config, public_tunnel_config can be set.
                  deprecated: true
                  x-one-of: endpoint
                  oneOf:
                  - $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.CreateVpnGatewayRequest.PublicConfig'
                  - type: "null"
                private_network_id:
                  type: string
                  description: ID of the Private Network to attach to the VPN gateway.
                    (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                public_tunnel_config:
                  description: Precisely one of public_config, public_tunnel_config
                    can be set.
                  x-one-of: endpoint
                  oneOf:
                  - $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.CreateVpnGatewayRequest.PublicTunnelConfig'
                  - type: "null"
                ipam_private_ipv4_id:
                  type:
                  - string
                  - "null"
                  description: ID of the IPAM private IPv4 address to attach to the
                    VPN gateway. (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                ipam_private_ipv6_id:
                  type:
                  - string
                  - "null"
                  description: ID of the IPAM private IPv6 address to attach to the
                    VPN gateway. (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                zone:
                  type:
                  - string
                  - "null"
                  description: Availability Zone where the VPN gateway should be provisioned.
                    If no zone is specified, the VPN gateway will be automatically
                    placed.
              required:
              - project_id
              - name
              - gateway_type
              - private_network_id
              x-properties-order:
              - project_id
              - name
              - tags
              - gateway_type
              - public_config
              - private_network_id
              - public_tunnel_config
              - ipam_private_ipv4_id
              - ipam_private_ipv6_id
              - zone
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "gateway_type": "string",
              "name": "string",
              "private_network_id": "6170692e-7363-616c-6577-61792e636f6d",
              "project_id": "6170692e-7363-616c-6577-61792e636f6d"
            }' \
            "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/vpn-gateways"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/vpn-gateways" \
            X-Auth-Token:$SCW_SECRET_KEY \
            gateway_type="string" \
            name="string" \
            private_network_id="6170692e-7363-616c-6577-61792e636f6d" \
            project_id="6170692e-7363-616c-6577-61792e636f6d"
  /s2s-vpn/v1alpha1/regions/{region}/vpn-gateways/{gateway_id}:
    get:
      tags:
      - VPN Gateways
      operationId: GetVpnGateway
      summary: Get a VPN gateway
      description: Get a VPN gateway for the given VPN gateway ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: path
        name: gateway_id
        description: ID of the requested VPN gateway. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.VpnGateway'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/vpn-gateways/{gateway_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/vpn-gateways/{gateway_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - VPN Gateways
      operationId: UpdateVpnGateway
      summary: Update a VPN gateway
      description: Update an existing VPN gateway, specified by its VPN gateway ID.
        Only its name and tags can be updated.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: path
        name: gateway_id
        description: ID of the VPN gateway to update. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.VpnGateway'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type:
                  - string
                  - "null"
                  description: Name of the VPN gateway.
                tags:
                  type:
                  - array
                  - "null"
                  description: List of tags to apply to the VPN Gateway.
              x-properties-order:
              - name
              - tags
      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/s2s-vpn/v1alpha1/regions/{region}/vpn-gateways/{gateway_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/vpn-gateways/{gateway_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - VPN Gateways
      operationId: DeleteVpnGateway
      summary: Delete a VPN gateway
      description: Delete an existing VPN gateway, specified by its VPN gateway ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - it-mil
          - nl-ams
          - pl-waw
      - in: path
        name: gateway_id
        description: ID of the VPN gateway to delete. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.s2s_vpn.v1alpha1.VpnGateway'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/vpn-gateways/{gateway_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/s2s-vpn/v1alpha1/regions/{region}/vpn-gateways/{gateway_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
