openapi: 3.1.0
info:
  title: Edge Services API
  description: |-
    Edge Services allows you to easily, securely and reliably expose your HTTP service to the internet via a single entry point. With Edge Services, you can enhance performance by enabling caching on Scaleway Object Storage buckets (S3), Scaleway Load Balancers or Scaleway Serverless Containers and Functions. You can also increase security by enabling WAF (Web Application Firewall) as well as customize your endpoints with your own domain and SSL/TLS certificate.

    ## Quickstart

    This quickstart shows you how to set up Edge Services on a Scaleway Load Balancer with Caching and WAF enabled.

    1. Configure your environment variables.

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

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

    2. **Create a Pipeline**: run the following command to create an empty pipeline. This pipeline is the main Edge Services object and represents how an HTTP request to your Object Storage bucket or Load Balancer via Edge Services will be processed.

        ```bash
        curl -X POST \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          "https://api.scaleway.com/edge-services/v1beta1/pipelines" \
          -d '{
            "project_id":"'$SCW_PROJECT_ID'",
            "name":"mypipeline",
            "description":"my-pipeline"
          }'
        ```

    3. **Create a Backend Stage**: run the following command to create a backend stage, which defines the origin service which Edge Services will point to. In this example, we point to a Scaleway Load Balancer. We need to define the Load Balancer `id`, the `frontend_id` and the `zone` where the LB is located, as well as the domain (Host Header) to be used by Edge Services when fetching content from it. Ensure that you replace `<PIPELINE_ID>` in the URL with the ID of the pipeline.

        ```bash
        curl -X POST \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          "https://api.scaleway.com/edge-services/v1beta1/pipelines/<PIPELINE_ID>/backend-stages" \
          -d '{
            "scaleway_lb": {
              "lbs": [
                {
                  "id": "<LOAD_BALANCER_ID>",
                  "zone": "fr-par-1",
                  "frontend_id": "<LB_FRONTEND_ID>",
                  "is_ssl": true,
                  "domain_name": "mydomain.com"
                }
              ]
            }
          }'
        ```

    4. **Create a WAF Stage**: run the following command to create a WAF (Web Application Firewall) stage, in order to protect your origin (defined by the backend stage) from malicious requests. In this example, we configure the WAF in a `log_only` mode, resulting in having malicious requests being logged into Cockpit but not rejected. This behavior is useful for pre-production environments. The `paranoia_level` settings allows to define the WAF sensitivity. With a high level, requests are more likely to be classed as malicious, and false positives are expected. With a lower level, requests are more likely to be classed as benign. Ensure that you replace `<BACKEND_STAGE_ID>` with the ID of the previously created backend stage and `<PIPELINE_ID>` in the URL with the ID of the pipeline.

        ```bash
        curl -X POST \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          "https://api.scaleway.com/edge-services/v1beta1/pipelines/<PIPELINE_ID>/waf-stages" \
          -d '{
            "mode":"log_only",
            "paranoia_level":1,
            "backend_stage_id":"<BACKEND_STAGE_ID>"
          }'
        ```

    5. **Create a Route Stage**: run the following command to create a Route stage, in order to define where the requests will be forwarded to by default (`waf_stage_id` or `backend_stage_id`). Ensure that you replace `<WAF_STAGE_ID>` with the ID of the previously created WAF stage and `<PIPELINE_ID>` in the URL with the ID of the pipeline.

        ```bash
        curl -X POST \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          "https://api.scaleway.com/edge-services/v1beta1/pipelines/<PIPELINE_ID>/route-stages" \
          -d '{
            "waf_stage_id":"<WAF_STAGE_ID>"
          }'
        ```

    6. **Configure the Route rules**: run the following command to configure routing rules. For each rule, a condition (based on host, method and path) and a target stage (`waf_stage_id` or `backend_stage_id`) are defined. Requests matching the condition will be directly forwarded to the specified stage. Requests that do not match will be checked by the next rule's condition. If no rules are matched, the request is forwarded to the default stage defined in the route stage. Route rules can be used to conditionally bypass the WAF stage. Ensure that you replace `<ROUTE_STAGE_ID>` with the ID of the previously created Route stage and the`<BACKEND_STAGE_ID>` with the ID of the previously created Backend stage

        ```bash
        curl -X PUT \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          "https://api.scaleway.com/edge-services/v1beta1/route-stages/<ROUTE_STAGE_ID>/route-rules" \
          -d '{
            "route_rules":[
              {"rule_http_match":{"method_filters":["get","post"],"path_filter":{"path_filter_type":"regex","value":"my_url_path"}},"backend_stage_id":"<BACKEND_STAGE_ID>"},
              {"rule_http_match":{"host_filter":{"host_filter_type":"regex","value":"www.mydomain.com"}},"backend_stage_id":"<BACKEND_STAGE_ID>"}
            ]
          }'
        ```

    7. **Create a Cache Stage**: run the following command to create a cache stage, which defines the caching configuration for Edge Services to distribute the content from the defined origin (the previously-defined backend stage). The example below sets the a custom TTL of 30 minutes for the cache. Ensure that you replace `<ROUTE_STAGE_ID>` with the ID of the previously created Route stage and `<PIPELINE_ID>` in the URL with the ID of the pipeline.

        ```bash
        curl -X POST \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          "https://api.scaleway.com/edge-services/v1beta1/pipelines/<PIPELINE_ID>/cache-stages" \
          -d '{
            "fallback_ttl":"1800s",
            "waf_stage_id":"<ROUTE_STAGE_ID>"
          }'
        ```

    8. **Create a TLS Stage**: run the following command to create a TLS stage, which defines the SSL/TLS certificate for Edge Services on the previously-defined backend stage (origin). In the example below, an auto-created Saleway-managed Let's Encrypt certificate is configured. Ensure that you replace `<CACHE_STAGE_ID>` with the ID of the previously created cache stage and `<PIPELINE_ID>` in the URL with the ID of the pipeline. If you don't need caching, then directly specify the `route_stage_id` or the `backend_stage_id` or the `waf_stage_id`.

        ```bash
        curl -X POST \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          "https://api.scaleway.com/edge-services/v1beta1/pipelines/<PIPELINE_ID>/tls-stages" \
          -d '{
            "managed_certificate":true,
            "cache_stage_id":"<CACHE_STAGE_ID>"
          }'
        ```

    9. **Create a DNS Stage**: run the following command to create a DNS stage, which defines a custom domain as an endpoint for Edge Services on your backend stage (origin). You must already own the domain. In the example below we use `myendpoint.example.com`. Ensure that you replace `<TLS_STAGE_ID>` with the ID of the previously created TLS stage and `<PIPELINE_ID>` in the URL with the ID of the pipeline.

        ```bash
        curl -X POST \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          "https://api.scaleway.com/edge-services/v1beta1/pipelines/<PIPELINE_ID>/dns-stages" \
          -d '{
            "fqdns":["myendpoint.example.com"],
            "tls_stage_id":"<TLS_STAGE_ID>"
          }'
        ```

    10. **Define the Head of the Pipeline**: run the following command to set the previously created DNS stage as first stage or `Head` of the Pipeline, to trigger the Pipeline configuration. Ensure that you replace `<PIPELINE_ID>` in the URL with the ID of the pipeline.

        ```bash
        curl -X POST \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          "https://api.scaleway.com/edge-services/v1beta1/pipelines/<PIPELINE_ID>/set-head-stage" \
          -d '{
            "add_new_head_stage":{
              "new_stage_id":"<DNS_STAGE_ID>"
            }
          }'
        ```

    11. **Access your endpoint**: Once you have created a [CNAME record](https://www.scaleway.com/en/docs/edge-services/reference-content/cname-record/) pointing towards the Edge Services default endpoint, yan can run the following command to test your pipeline. Ensure that you customize the URL according to the domain you set in step 7, and that you replace `path/to/my/content` with an appropriate URL path that is actually reachable through your Load Balancer. You can also test the URL through your web browser. Edge Services will serve the requested object. Once your content is cached, you can inspect the HTTP header `X-Cache` and see that the response is `hit-fresh`.

        ```bash
        curl -i https://myendpoint.example.com/path/to/my/content
        ```

    12. **Delete your pipeline**: run the following command to delete a pipeline. Ensure that you replace `<PIPELINE_ID>` in the URL with the ID of the pipeline you want to delete. Note that it will also delete all of the associated stages.

        ```bash
        curl -X DELETE \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          "https://api.scaleway.com/edge-services/v1beta1/pipelines/<PIPELINE_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)
    - You have created a [Scaleway Load Balancer](https://www.scaleway.com/en/docs/load-balancer/)
    </Message>

    ## Technical information

    ### Availability

    Scaleway Edge Services is currently available globally. Find out about [product availability in our dedicated documentation](https://www.scaleway.com/en/docs/account/reference-content/products-availability/).

    Edge Services is currently available for Scaleway Object Storage and Load Balancer backends only.

    ### Pipeline Stages

    An Edge Services pipeline contains a set of interlinked stages.

    The following links are possible (non-exhaustive list):

    - Pipeline > DNS stage > TLS stage > Cache stage > Route stage > WAF stage > Backend stage
    - Pipeline > DNS stage > TLS stage > Cache stage > WAF stage > Backend stage
    - Pipeline > DNS stage > TLS stage > Cache stage > Backend stage
    - Pipeline > DNS stage > TLS stage > Route stage > Backend stage
    - Pipeline > DNS stage > TLS stage > WAF stage > Backend stage
    - Pipeline > DNS stage > TLS stage > Backend stage
    - Pipeline > DNS stage > Backend stage

    If you wish to set up Edge Services without customizing the domain (that is, using the default endpoint), you can create empty TLS and DNS stages.

    - Create the TLS stage with only the `pipeline_id` and `backend_stage_id` (or `cache_stage_id` if caching feature is needed) parameters.
    - Create the DNS stage with only the `pipeline_id` and `tls_stage_id` parameters.

    If you use the WAF stage and need to exclude some requests from being inspected by the WAF (that is, bypass the WAF), define a route stage pointing towards the WAF stage, and setup route rules to override the default route stage behavior: requests matching the defined route rules will be directly sent to the backend stage and won't be inspected by the WAF. The route stage must be referenced by either a cache stage or TLS stage to be part of the pipeline.

    ## Technical limitations

    - A backend stage must point either to a Scaleway Object Storage bucket, a Scaleway Load Balancer or a Scaleway Serverless container/function
    - Only one pipeline is allowed per Object Storage bucket
    - The TLS stage currently only supports one SSL/TLS certificate
    - The DNS stage currently only supports one FQDN (Fully Qualified Domain Name)
    - Wildcard managed certificates (via Let's Encrypt) are not supported

    ## Going further

    For more help using Scaleway Edge Services, check out the following resources:

    - Our [main documentation](https://www.scaleway.com/en/docs/object-storage/how-to/get-started-edge-services/)
    - The #edge-services channel on our [Slack Community](https://www.scaleway.com/en/docs/tutorials/scaleway-slack-community/)
    - Our [support ticketing system](https://www.scaleway.com/en/docs/account/).
  version: v1beta1
servers:
- url: https://api.scaleway.com
tags:
- name: Plans
  description: Edge Services requires a plan to be selected. Select the plan that
    best fits your needs.
- name: Pipelines
  description: The main Edge Services object. A pipeline is made up of ordered stages
    and represents how an HTTP request will be processed, from the source (client)
    to the destination (origin).
- name: DNS stages
  description: A DNS stage is part of a pipeline. It allows you to customize your
    Edge Services endpoint with a domain you own. This is useful if you do not want
    to use the default domain endpoint provided by Scaleway. Edge Services will then
    serve content from your customized domain. A TLS stage is also necessary to provide
    an SSL/TLS certificate so that Edge Services can serve traffic for your customized
    domain over HTTPS.
- name: TLS stages
  description: A TLS stage is part of a pipeline. It allows you to provide an SSL/TLS
    certificate for your customized domain (DNS stage) - without this, Edge Services
    cannot serve traffic for your customized domain over HTTPS. This could be a custom
    certificate stored in [Scaleway Secret Manager](https://www.scaleway.com/en/docs/secret-manager/),
    or a Let's Encrypt certificate generated and managed by Scaleway.
- name: Cache stages
  description: A cache stage is part of a pipeline. It allows you to cache your origin's
    content, so it will be served directly to users from a cache on Edge Services'
    servers, enhancing performance. Note that including a cache stage in your pipeline
    is optional.
- name: WAF stages
  description: A WAF stage is part of a pipeline. It allows you to protect your origin
    from malicious requests, enhancing security. You can choose to either block or
    log the threats that are identified, and set a paranoia level to determine the
    sensitivity of the threat detection engine. Note that including a WAF stage in
    your pipeline is optional.
- name: Route stages
  description: A route stage is part of a pipeline. It allows you to configure routes
    towards other stages of the Edge Services pipeline, based on a defined set of
    rules (using HTTP method or path). For now, the main use case for a route stage
    is to allow all requests that match certain rules to bypass a WAF stage and route
    directly to the backend stage. More functionality for the route stage is planned
    for the future. Note that including a route stage in your pipeline is optional.
- name: Backend stages
  description: A backend stage is part of a pipeline. It defines the source of the
    content that Edge Services will serve to clients. It could be either a [Scaleway
    Object Storage](https://www.scaleway.com/en/docs/object-storage/) bucket ("S3"),
    a [Scaleway Load Balancer](https://www.scaleway.com/en/docs/load-balancer/), a
    [Scaleway Serverless Container](https://www.scaleway.com/en/docs/serverless-containers/)
    or a [Scaleway Serverless Function](https://www.scaleway.com/en/docs/serverless-functions/).
- name: Purge requests
  description: A purge request allows you to remove content from the cache (if a cache
    stage has been created). You can choose to purge the entire cache, or limit the
    purge to specified assets.
components:
  schemas:
    google.type.Money:
      type: object
      properties:
        currency_code:
          type: string
        units:
          type: integer
          format: int64
        nanos:
          type: integer
          format: int32
      x-properties-order:
      - currency_code
      - units
      - nanos
    scaleway.edge_services.v1beta1.AddRouteRulesResponse:
      type: object
      properties:
        route_rules:
          type: array
          description: List of rules to be checked against every HTTP request. The
            first matching rule will forward the request to its specified backend
            stage. If no rules are matched, the request is forwarded to the stage
            defined by `waf_stage_id` or `backend_stage_id`.
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.RouteRule'
      x-properties-order:
      - route_rules
    scaleway.edge_services.v1beta1.BackendStage:
      type: object
      properties:
        id:
          type: string
          description: ID of the backend stage.
        pipeline_id:
          type: string
          description: Pipeline ID the backend stage belongs to.
        status:
          description: Current status of the stage.
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.StageStatus'
        created_at:
          type:
          - string
          - "null"
          description: Date the backend stage was created. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        updated_at:
          type:
          - string
          - "null"
          description: Date the backend stage was last updated. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        scaleway_s3:
          description: Scaleway Object Storage origin bucket (S3) linked to the backend
            stage.
          x-one-of: backend_config
          oneOf:
          - $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ScalewayS3BackendConfig'
          - type: "null"
        scaleway_lb:
          description: Scaleway Load Balancer origin linked to the backend stage.
          x-one-of: backend_config
          oneOf:
          - $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ScalewayLbBackendConfig'
          - type: "null"
        scaleway_serverless_container:
          description: Scaleway Serverless container origin linked to the backend
            stage.
          x-one-of: backend_config
          oneOf:
          - $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ScalewayServerlessContainerBackendConfig'
          - type: "null"
        scaleway_serverless_function:
          description: Scaleway Serverless function origin linked to the backend stage.
          x-one-of: backend_config
          oneOf:
          - $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ScalewayServerlessFunctionBackendConfig'
          - type: "null"
      x-properties-order:
      - id
      - pipeline_id
      - status
      - created_at
      - updated_at
      - scaleway_s3
      - scaleway_lb
      - scaleway_serverless_container
      - scaleway_serverless_function
    scaleway.edge_services.v1beta1.CacheStage:
      type: object
      properties:
        id:
          type: string
          description: ID of the cache stage.
        pipeline_id:
          type: string
          description: Pipeline ID the cache stage belongs to.
        fallback_ttl:
          type:
          - string
          - "null"
          description: Time To Live (TTL) in seconds. Defines how long content is
            cached. (in seconds)
          example: 2.5s
        include_cookies:
          type: boolean
          description: Defines whether responses to requests with cookies must be
            stored in the cache.
        status:
          description: Current status of the stage.
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.StageStatus'
        created_at:
          type:
          - string
          - "null"
          description: Date the cache stage was created. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        updated_at:
          type:
          - string
          - "null"
          description: Date the cache stage was last updated. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        waf_stage_id:
          type:
          - string
          - "null"
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
          x-one-of: next
        backend_stage_id:
          type:
          - string
          - "null"
          description: Backend stage ID the cache stage is linked to. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
          x-one-of: next
        route_stage_id:
          type:
          - string
          - "null"
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
          x-one-of: next
      x-properties-order:
      - id
      - pipeline_id
      - fallback_ttl
      - include_cookies
      - status
      - created_at
      - updated_at
      - waf_stage_id
      - backend_stage_id
      - route_stage_id
    scaleway.edge_services.v1beta1.DNSStage:
      type: object
      properties:
        id:
          type: string
          description: ID of the DNS stage.
        default_fqdn:
          type: string
          description: Default Fully Qualified Domain Name provided for the Pipeline.
        fqdns:
          type: array
          description: Custom Fully Qualified Domain Names configured (only the first
            one is valid).
          items:
            type: string
        type:
          description: Type of the stage.
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.DNSStage.Type'
        pipeline_id:
          type: string
          description: Pipeline ID the DNS stage belongs to.
        status:
          description: Current status of the stage.
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.StageStatus'
        created_at:
          type:
          - string
          - "null"
          description: Date the DNS stage was created. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        updated_at:
          type:
          - string
          - "null"
          description: Date the DNS stage was last updated. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        tls_stage_id:
          type:
          - string
          - "null"
          description: TLS stage ID the DNS stage is linked to. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
          x-one-of: next
        cache_stage_id:
          type:
          - string
          - "null"
          description: Cache stage ID the DNS stage is linked to. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
          x-one-of: next
        backend_stage_id:
          type:
          - string
          - "null"
          description: Backend stage ID the DNS stage is linked to. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
          x-one-of: next
        wildcard_domain:
          type: boolean
          description: Support of wildcard (subdomains) for the given domain (a wildcard
            certificate is required to make it work).
      x-properties-order:
      - id
      - default_fqdn
      - fqdns
      - type
      - pipeline_id
      - status
      - created_at
      - updated_at
      - tls_stage_id
      - cache_stage_id
      - backend_stage_id
      - wildcard_domain
    scaleway.edge_services.v1beta1.DNSStage.Type:
      type: string
      enum:
      - unknown_type
      - auto
      - managed
      - custom
      x-enum-descriptions:
        values:
          unknown_type: DNS stage type unknown (default)
          auto: The DNS stage is configured with the default FQDN
          managed: Custom FQDN has been provided, managed by Scaleway Domains and
            DNS
          custom: Custom FQDN has been provided, not managed by Scaleway Domains and
            DNS
      default: unknown_type
    scaleway.edge_services.v1beta1.GetBillingResponse:
      type: object
      properties:
        current_plan:
          description: Information on the currently-selected, active Edge Services
            subscription plan.
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.PlanDetails'
        plan_cost:
          description: Cost to date (this month) for Edge Service subscription plans.
            This comprises the pro-rata cost of the current subscription plan, and
            any previous subscription plans that were active earlier in the month.
          $ref: '#/components/schemas/google.type.Money'
        pipeline_number:
          type: integer
          description: Total number of pipelines currently configured.
          format: uint32
        extra_pipelines_cost:
          description: Cost to date (this month) of pipelines not included in the
            subscription plans.
          $ref: '#/components/schemas/google.type.Money'
        current_plan_cache_usage:
          type: integer
          description: Total amount of data egressed from the cache in gigabytes from
            the beginning of the month, for the active subscription plan.
          format: uint64
        extra_cache_usage:
          type: integer
          description: Total amount of extra data egressed from cache in gigabytes
            from the beginning of the month, not included in the subscription plans.
          format: uint64
        extra_cache_cost:
          description: Cost to date (this month) of the data egressed from the cache
            that is not included in the subscription plans.
          $ref: '#/components/schemas/google.type.Money'
        current_plan_waf_usage:
          type: integer
          description: Total number of requests processed by the WAF since the beginning
            of the current month, for the active subscription plan.
          format: uint64
        extra_waf_usage:
          type: integer
          description: Total number of extra requests processed by the WAF from the
            beginning of the month, not included in the subscription plans.
          format: uint64
        extra_waf_cost:
          description: Cost to date (this month) of the extra requests processed by
            the WAF that were not included in the subscription plans.
          $ref: '#/components/schemas/google.type.Money'
        waf_add_on:
          description: Cost of activating WAF add-on (where subscription plan does
            not include WAF).
          $ref: '#/components/schemas/google.type.Money'
        plans_usage_details:
          type: object
          description: Detailed costs and usage for all Edge Services subscription
            plans that were activated during the month.
          properties:
            <plans_usage_detailKey>:
              description: Detailed costs and usage for all Edge Services subscription
                plans that were activated during the month.
              $ref: '#/components/schemas/scaleway.edge_services.v1beta1.PlanUsageDetails'
          additionalProperties: true
        total_cost:
          description: Total cost to date (this month) of all Edge Services resources
            including active subscription plan, previously active plans, extra pipelines
            and extra egress cache data.
          $ref: '#/components/schemas/google.type.Money'
      x-properties-order:
      - current_plan
      - plan_cost
      - pipeline_number
      - extra_pipelines_cost
      - current_plan_cache_usage
      - extra_cache_usage
      - extra_cache_cost
      - current_plan_waf_usage
      - extra_waf_usage
      - extra_waf_cost
      - waf_add_on
      - plans_usage_details
      - total_cost
    scaleway.edge_services.v1beta1.HeadStageResponse:
      type: object
      properties:
        head_stage:
          description: Modified or created head stage.
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.HeadStageResponse.HeadStage'
      x-properties-order:
      - head_stage
    scaleway.edge_services.v1beta1.HeadStageResponse.HeadStage:
      type: object
      properties:
        dns_stage_id:
          type:
          - string
          - "null"
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
          x-one-of: head
      x-properties-order:
      - dns_stage_id
    scaleway.edge_services.v1beta1.ListBackendStagesRequest.OrderBy:
      type: string
      enum:
      - created_at_asc
      - created_at_desc
      x-enum-descriptions:
        values:
          created_at_asc: Order by creation date (ascending chronological order)
          created_at_desc: Order by creation date (descending chronological order)
      default: created_at_asc
    scaleway.edge_services.v1beta1.ListBackendStagesResponse:
      type: object
      properties:
        stages:
          type: array
          description: Paginated list of backend stages.
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.BackendStage'
        total_count:
          type: integer
          description: Count of all backend stages matching the requested criteria.
          format: uint64
      x-properties-order:
      - stages
      - total_count
    scaleway.edge_services.v1beta1.ListCacheStagesRequest.OrderBy:
      type: string
      enum:
      - created_at_asc
      - created_at_desc
      x-enum-descriptions:
        values:
          created_at_asc: Order by creation date (ascending chronological order)
          created_at_desc: Order by creation date (descending chronological order)
      default: created_at_asc
    scaleway.edge_services.v1beta1.ListCacheStagesResponse:
      type: object
      properties:
        stages:
          type: array
          description: Paginated list of cache stages.
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.CacheStage'
        total_count:
          type: integer
          description: Count of all cache stages matching the requested criteria.
          format: uint64
      x-properties-order:
      - stages
      - total_count
    scaleway.edge_services.v1beta1.ListDNSStagesRequest.OrderBy:
      type: string
      enum:
      - created_at_asc
      - created_at_desc
      x-enum-descriptions:
        values:
          created_at_asc: Order by creation date (ascending chronological order)
          created_at_desc: Order by creation date (descending chronological order)
      default: created_at_asc
    scaleway.edge_services.v1beta1.ListDNSStagesResponse:
      type: object
      properties:
        stages:
          type: array
          description: Paginated list of DNS stages.
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.DNSStage'
        total_count:
          type: integer
          description: Count of all DNS stages matching the requested criteria.
          format: uint64
      x-properties-order:
      - stages
      - total_count
    scaleway.edge_services.v1beta1.ListHeadStagesResponse:
      type: object
      properties:
        head_stages:
          type: array
          description: Number of head stages to return per page.
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListHeadStagesResponse.HeadStage'
        total_count:
          type: integer
          description: Count of all head stages matching the requested pipeline_id.
          format: uint64
      x-properties-order:
      - head_stages
      - total_count
    scaleway.edge_services.v1beta1.ListHeadStagesResponse.HeadStage:
      type: object
      properties:
        dns_stage_id:
          type:
          - string
          - "null"
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
          x-one-of: head
      x-properties-order:
      - dns_stage_id
    scaleway.edge_services.v1beta1.ListNodesResponse:
      type: object
      properties:
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.Node'
        total_count:
          type: integer
          format: uint64
      x-properties-order:
      - nodes
      - total_count
    scaleway.edge_services.v1beta1.ListPipelinesRequest.OrderBy:
      type: string
      enum:
      - created_at_asc
      - created_at_desc
      - name_asc
      - name_desc
      x-enum-descriptions:
        values:
          created_at_asc: Order by creation date (ascending chronological order)
          created_at_desc: Order by creation date (descending chronological order)
          name_asc: Order by name (ascending alphabetical order)
          name_desc: Order by name (descending alphabetical order)
      default: created_at_asc
    scaleway.edge_services.v1beta1.ListPipelinesResponse:
      type: object
      properties:
        pipelines:
          type: array
          description: Paginated list of pipelines.
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.Pipeline'
        total_count:
          type: integer
          description: Count of all pipelines matching the requested criteria.
          format: uint64
      x-properties-order:
      - pipelines
      - total_count
    scaleway.edge_services.v1beta1.ListPlansResponse:
      type: object
      properties:
        total_count:
          type: integer
          format: uint64
        plans:
          type: array
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.PlanDetails'
      x-properties-order:
      - total_count
      - plans
    scaleway.edge_services.v1beta1.ListPurgeRequestsRequest.OrderBy:
      type: string
      enum:
      - created_at_asc
      - created_at_desc
      x-enum-descriptions:
        values:
          created_at_asc: Order by creation date (ascending chronological order)
          created_at_desc: Order by creation date (descending chronological order)
      default: created_at_asc
    scaleway.edge_services.v1beta1.ListPurgeRequestsResponse:
      type: object
      properties:
        purge_requests:
          type: array
          description: Paginated list of purge requests.
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.PurgeRequest'
        total_count:
          type: integer
          description: Count of all purge requests matching the requested criteria.
          format: uint64
      x-properties-order:
      - purge_requests
      - total_count
    scaleway.edge_services.v1beta1.ListRouteRulesResponse:
      type: object
      properties:
        route_rules:
          type: array
          description: List of rules to be checked against every HTTP request. The
            first matching rule will forward the request to its specified backend
            stage. If no rules are matched, the request is forwarded to the stage
            defined by `waf_stage_id` or `backend_stage_id`.
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.RouteRule'
        total_count:
          type: integer
          description: Count of all route rules matching the requested criteria.
          format: uint64
      x-properties-order:
      - route_rules
      - total_count
    scaleway.edge_services.v1beta1.ListRouteStagesRequest.OrderBy:
      type: string
      enum:
      - created_at_asc
      - created_at_desc
      default: created_at_asc
    scaleway.edge_services.v1beta1.ListRouteStagesResponse:
      type: object
      properties:
        stages:
          type: array
          description: Paginated list of summarized route stages.
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.RouteStage'
        total_count:
          type: integer
          description: Count of all route stages matching the requested criteria.
          format: uint64
      x-properties-order:
      - stages
      - total_count
    scaleway.edge_services.v1beta1.ListTLSStagesRequest.OrderBy:
      type: string
      enum:
      - created_at_asc
      - created_at_desc
      x-enum-descriptions:
        values:
          created_at_asc: Order by creation date (ascending chronological order)
          created_at_desc: Order by creation date (descending chronological order)
      default: created_at_asc
    scaleway.edge_services.v1beta1.ListTLSStagesResponse:
      type: object
      properties:
        stages:
          type: array
          description: Paginated list of TLS stages.
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.TLSStage'
        total_count:
          type: integer
          description: Count of all TLS stages matching the requested criteria.
          format: uint64
      x-properties-order:
      - stages
      - total_count
    scaleway.edge_services.v1beta1.ListWafStagesRequest.OrderBy:
      type: string
      enum:
      - created_at_asc
      - created_at_desc
      default: created_at_asc
    scaleway.edge_services.v1beta1.ListWafStagesResponse:
      type: object
      properties:
        stages:
          type: array
          description: Paginated list of WAF stages.
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.WafStage'
        total_count:
          type: integer
          description: Count of all WAF stages matching the requested criteria.
          format: uint64
      x-properties-order:
      - stages
      - total_count
    scaleway.edge_services.v1beta1.Node:
      type: object
      properties:
        ip:
          type: string
          description: (IP address)
          example: 1.2.3.4
      x-properties-order:
      - ip
    scaleway.edge_services.v1beta1.Pipeline:
      type: object
      properties:
        id:
          type: string
          description: ID of the pipeline.
        name:
          type: string
          description: Name of the pipeline.
        description:
          type: string
          description: Description of the pipeline.
        status:
          description: Status of the pipeline.
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.Pipeline.Status'
        errors:
          type: array
          description: Errors of the pipeline.
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.Pipeline.Error'
        project_id:
          type: string
          description: Project ID of the pipeline. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        organization_id:
          type: string
          description: Organization ID of the pipeline.
        created_at:
          type:
          - string
          - "null"
          description: Date the pipeline was created. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        updated_at:
          type:
          - string
          - "null"
          description: Date the pipeline was last updated. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
      x-properties-order:
      - id
      - name
      - description
      - status
      - errors
      - project_id
      - organization_id
      - created_at
      - updated_at
    scaleway.edge_services.v1beta1.Pipeline.Error:
      type: object
      properties:
        stage:
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.Pipeline.Error.Stage'
        code:
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.Pipeline.Error.Code'
        severity:
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.Pipeline.Error.Severity'
        message:
          type: string
        type:
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.Pipeline.Error.Type'
      x-properties-order:
      - stage
      - code
      - severity
      - message
      - type
    scaleway.edge_services.v1beta1.Pipeline.Error.Code:
      type: string
      enum:
      - unknown_code
      - dns_invalid_format
      - dns_invalid_tld
      - dns_forbidden_root_domain
      - dns_forbidden_scw_cloud
      - dns_domain_dont_exist
      - dns_cname_dont_exist
      - dns_cname_resolve
      - dns_fqdn_already_exists
      - dns_fqdn_already_in_use
      - tls_cert_deleted
      - tls_cert_disabled
      - tls_cert_expired
      - tls_cert_invalid_format
      - tls_cert_missing
      - tls_chain_order
      - tls_key_invalid_format
      - tls_key_missing
      - tls_key_too_many
      - tls_managed_domain_rate_limit
      - tls_managed_internal
      - tls_managed_unsupported
      - tls_not_wildcard
      - tls_pair_mismatch
      - tls_root_inconsistent
      - tls_root_incorrect
      - tls_root_missing
      - tls_san_mismatch
      - tls_self_signed
      - tls_caa_malfunction
      - pipeline_invalid_workflow
      - pipeline_missing_head_stage
      - pipeline_websocket_limit
      - pipeline_configuration_failed
      default: unknown_code
    scaleway.edge_services.v1beta1.Pipeline.Error.Severity:
      type: string
      enum:
      - unknown_severity
      - warning
      - critical
      default: unknown_severity
    scaleway.edge_services.v1beta1.Pipeline.Error.Stage:
      type: string
      enum:
      - unknown_stage
      - dns
      - tls
      - cache
      - backend
      default: unknown_stage
    scaleway.edge_services.v1beta1.Pipeline.Error.Type:
      type: string
      enum:
      - unknown_type
      - runtime
      - config
      default: unknown_type
    scaleway.edge_services.v1beta1.Pipeline.Status:
      type: string
      enum:
      - unknown_status
      - ready
      - error
      - pending
      - warning
      - locked
      x-enum-descriptions:
        values:
          unknown_status: Pipeline status unknown (default)
          ready: The pipeline has been created and processed
          error: An error occurred during the pipeline creation
          pending: The pipeline status is pending
          warning: An event occurred and the pipeline may not work
      default: unknown_status
    scaleway.edge_services.v1beta1.Plan:
      type: object
      properties:
        plan_name:
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.Plan.Name'
      x-properties-order:
      - plan_name
    scaleway.edge_services.v1beta1.Plan.Name:
      type: string
      enum:
      - unknown_name
      - starter
      - professional
      - advanced
      default: unknown_name
    scaleway.edge_services.v1beta1.PlanDetails:
      type: object
      properties:
        plan_name:
          description: Subscription plan name.
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.Plan.Name'
        package_gb:
          type: integer
          description: Amount of egress data from cache included in subscription plan.
          format: uint64
        pipeline_limit:
          type: integer
          description: Number of pipelines included in subscription plan.
          format: uint32
        waf_requests:
          type: integer
          description: Number of WAF requests included in subscription plan.
          format: uint64
        backend_limit:
          type: integer
          description: Number of backends per pipeline included in subscription plan.
          format: uint64
        wildcard_domain:
          type: boolean
          description: Support of wildcard subdomains for the customized domain.
      x-properties-order:
      - plan_name
      - package_gb
      - pipeline_limit
      - waf_requests
      - backend_limit
      - wildcard_domain
    scaleway.edge_services.v1beta1.PlanUsageDetails:
      type: object
      properties:
        plan_cost:
          description: Cost to date (this month) for the corresponding Edge Services
            subscription plan.
          $ref: '#/components/schemas/google.type.Money'
      x-properties-order:
      - plan_cost
    scaleway.edge_services.v1beta1.PurgeRequest:
      type: object
      properties:
        id:
          type: string
          description: ID of the purge request. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        pipeline_id:
          type: string
          description: Pipeline ID the purge request belongs to. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        status:
          description: Status of the purge request.
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.PurgeRequest.Status'
        assets:
          type:
          - array
          - "null"
          description: List of asserts to purge.
          x-one-of: target
        all:
          type:
          - boolean
          - "null"
          description: Defines whether to purge all content.
          x-one-of: target
        created_at:
          type:
          - string
          - "null"
          description: Date the purge request was created. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        updated_at:
          type:
          - string
          - "null"
          description: Date the purge request was last updated. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
      x-properties-order:
      - id
      - pipeline_id
      - status
      - assets
      - all
      - created_at
      - updated_at
    scaleway.edge_services.v1beta1.PurgeRequest.Status:
      type: string
      enum:
      - unknown_status
      - done
      - error
      - pending
      x-enum-descriptions:
        values:
          unknown_status: Purge request status unknown (default)
          done: The purge request has been processed successfully
          error: An error occurred during the purge request
          pending: The purge request status is pending
      default: unknown_status
    scaleway.edge_services.v1beta1.RouteRule:
      type: object
      properties:
        rule_http_match:
          description: Rule condition to be matched. Requests matching the condition
            defined here will be directly forwarded to the backend specified by the
            `backend_stage_id` or `waf_stage_id` fields. Requests that do not match
            will be checked by the next rule's condition.
          x-one-of: match
          oneOf:
          - $ref: '#/components/schemas/scaleway.edge_services.v1beta1.RuleHttpMatch'
          - type: "null"
        backend_stage_id:
          type:
          - string
          - "null"
          description: ID of the backend stage that requests matching the rule should
            be forwarded to. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
          x-one-of: next
        position:
          type: integer
          description: Position of the rule which determines the order of processing
            within the route stage.
          format: int32
        route_stage_id:
          type: string
          description: Route stage ID the route rule belongs to.
        waf_stage_id:
          type:
          - string
          - "null"
          description: ID of the WAF stage that requests matching the rule should
            be forwarded to. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
          x-one-of: next
      x-properties-order:
      - rule_http_match
      - backend_stage_id
      - position
      - route_stage_id
      - waf_stage_id
    scaleway.edge_services.v1beta1.RouteStage:
      type: object
      properties:
        id:
          type: string
          description: ID of the route stage.
        pipeline_id:
          type: string
          description: Pipeline ID the route stage belongs to.
        waf_stage_id:
          type:
          - string
          - "null"
          description: ID of the WAF stage HTTP requests should be forwarded to when
            no rules are matched. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
          x-one-of: next
        backend_stage_id:
          type:
          - string
          - "null"
          description: ID of the backend stage HTTP requests should be forwarded to
            when no rules are matched. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
          x-one-of: next
        status:
          description: Current status of the stage.
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.StageStatus'
        created_at:
          type:
          - string
          - "null"
          description: Date the route stage was created. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        updated_at:
          type:
          - string
          - "null"
          description: Date the route stage was last updated. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
      x-properties-order:
      - id
      - pipeline_id
      - waf_stage_id
      - backend_stage_id
      - status
      - created_at
      - updated_at
    scaleway.edge_services.v1beta1.RuleHttpMatch:
      type: object
      properties:
        method_filters:
          type: array
          description: HTTP methods to filter for. A request using any of these methods
            will be considered to match the rule. Possible values are `get`, `post`,
            `put`, `patch`, `delete`, `head`, `options`. All methods will match if
            none is provided.
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.RuleHttpMatch.MethodFilter'
        path_filter:
          description: HTTP URL path to filter for. A request whose path matches the
            given filter will be considered to match the rule. All paths will match
            if none is provided.
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.RuleHttpMatch.PathFilter'
        host_filter:
          description: Host to filter for. A request whose host matches the given
            filter will be considered to match the rule. All hosts will match if none
            is provided.
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.RuleHttpMatch.HostFilter'
      x-properties-order:
      - method_filters
      - path_filter
      - host_filter
    scaleway.edge_services.v1beta1.RuleHttpMatch.HostFilter:
      type: object
      properties:
        host_filter_type:
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.RuleHttpMatch.HostFilter.HostFilterType'
        value:
          type: string
      x-properties-order:
      - host_filter_type
      - value
    scaleway.edge_services.v1beta1.RuleHttpMatch.HostFilter.HostFilterType:
      type: string
      enum:
      - unknown_host_filter
      - regex
      default: unknown_host_filter
    scaleway.edge_services.v1beta1.RuleHttpMatch.MethodFilter:
      type: string
      enum:
      - unknown_method_filter
      - get
      - post
      - put
      - patch
      - delete
      - head
      - options
      x-enum-descriptions:
        values:
          unknown_method_filter: Method filter unknown (default)
          get: GET HTTP method
          post: POST HTTP method
          put: PUT HTTP method
          patch: PATCH HTTP method
          delete: DELETE HTTP method
          head: HEAD HTTP method
          options: OPTIONS HTTP method
      default: unknown_method_filter
    scaleway.edge_services.v1beta1.RuleHttpMatch.PathFilter:
      type: object
      properties:
        path_filter_type:
          description: Type of filter to match for the HTTP URL path. For now, all
            path filters must be written in regex and use the `regex` type.
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.RuleHttpMatch.PathFilter.PathFilterType'
        value:
          type: string
          description: Value to be matched for the HTTP URL path.
      x-properties-order:
      - path_filter_type
      - value
    scaleway.edge_services.v1beta1.RuleHttpMatch.PathFilter.PathFilterType:
      type: string
      enum:
      - unknown_path_filter
      - regex
      x-enum-descriptions:
        values:
          unknown_path_filter: Path filter type unknown (default)
          regex: Value of path to filter for is evaluated as regex
      default: unknown_path_filter
    scaleway.edge_services.v1beta1.ScalewayLb:
      type: object
      properties:
        id:
          type: string
          description: ID of the Load Balancer. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        zone:
          type: string
          description: Zone of the Load Balancer.
        frontend_id:
          type: string
          description: ID of the frontend linked to the Load Balancer. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        is_ssl:
          type:
          - boolean
          - "null"
          description: Defines whether the Load Balancer's frontend handles SSL connections.
        domain_name:
          type:
          - string
          - "null"
          description: Fully Qualified Domain Name (in the format subdomain.example.com)
            to use in HTTP requests sent towards your Load Balancer.
        has_websocket:
          type:
          - boolean
          - "null"
          description: Defines whether to forward websocket requests to the load balancer.
      required:
      - id
      - zone
      - frontend_id
      x-properties-order:
      - id
      - zone
      - frontend_id
      - is_ssl
      - domain_name
      - has_websocket
    scaleway.edge_services.v1beta1.ScalewayLbBackendConfig:
      type: object
      properties:
        lbs:
          type: array
          description: Load Balancer information.
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ScalewayLb'
      x-properties-order:
      - lbs
    scaleway.edge_services.v1beta1.ScalewayS3BackendConfig:
      type: object
      properties:
        bucket_name:
          type:
          - string
          - "null"
          description: Name of the Bucket.
        bucket_region:
          type:
          - string
          - "null"
          description: Region of the Bucket.
        is_website:
          type:
          - boolean
          - "null"
          description: Defines whether the bucket website feature is enabled.
      x-properties-order:
      - bucket_name
      - bucket_region
      - is_website
    scaleway.edge_services.v1beta1.ScalewayServerlessContainerBackendConfig:
      type: object
      properties:
        region:
          type: string
          description: The region you want to target
        container_id:
          type: string
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      required:
      - region
      - container_id
      x-properties-order:
      - region
      - container_id
    scaleway.edge_services.v1beta1.ScalewayServerlessFunctionBackendConfig:
      type: object
      properties:
        region:
          type: string
          description: The region you want to target
        function_id:
          type: string
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      required:
      - region
      - function_id
      x-properties-order:
      - region
      - function_id
    scaleway.edge_services.v1beta1.SetHeadStageRequest.AddNewHeadStage:
      type: object
      properties:
        new_stage_id:
          type: string
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      x-properties-order:
      - new_stage_id
    scaleway.edge_services.v1beta1.SetHeadStageRequest.RemoveHeadStage:
      type: object
      properties:
        remove_stage_id:
          type: string
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      x-properties-order:
      - remove_stage_id
    scaleway.edge_services.v1beta1.SetHeadStageRequest.SwapHeadStage:
      type: object
      properties:
        new_stage_id:
          type: string
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        current_stage_id:
          type: string
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      x-properties-order:
      - new_stage_id
      - current_stage_id
    scaleway.edge_services.v1beta1.SetRouteRulesRequest.RouteRule:
      type: object
      properties:
        rule_http_match:
          description: Rule condition to be matched. Requests matching the condition
            defined here will be directly forwarded to the backend specified by the
            `backend_stage_id` or `waf_stage_id` fields. Requests that do not match
            will be checked by the next rule's condition.
          x-one-of: match
          oneOf:
          - $ref: '#/components/schemas/scaleway.edge_services.v1beta1.RuleHttpMatch'
          - type: "null"
        backend_stage_id:
          type:
          - string
          - "null"
          description: ID of the backend stage that requests matching the rule should
            be forwarded to. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
          x-one-of: next
        waf_stage_id:
          type:
          - string
          - "null"
          description: ID of the WAF stage that requests matching the rule should
            be forwarded to. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
          x-one-of: next
      x-properties-order:
      - rule_http_match
      - backend_stage_id
      - waf_stage_id
    scaleway.edge_services.v1beta1.SetRouteRulesResponse:
      type: object
      properties:
        route_rules:
          type: array
          description: List of rules to be checked against every HTTP request. The
            first matching rule will forward the request to its specified backend
            stage. If no rules are matched, the request is forwarded to the stage
            defined by `waf_stage_id` or `backend_stage_id`.
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.RouteRule'
      x-properties-order:
      - route_rules
    scaleway.edge_services.v1beta1.StageStatus:
      type: string
      enum:
      - unknown_status
      - inactive
      - active
      default: unknown_status
    scaleway.edge_services.v1beta1.TLSSecret:
      type: object
      properties:
        secret_id:
          type: string
          description: ID of the Secret.
        region:
          type: string
          description: Region of the Secret.
      required:
      - secret_id
      - region
      x-properties-order:
      - secret_id
      - region
    scaleway.edge_services.v1beta1.TLSSecretsConfig:
      type: object
      properties:
        tls_secrets:
          type: array
          description: Secret information (from Secret Manager).
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.TLSSecret'
      x-properties-order:
      - tls_secrets
    scaleway.edge_services.v1beta1.TLSStage:
      type: object
      properties:
        id:
          type: string
          description: ID of the TLS stage.
        secrets:
          type: array
          description: Secret (from Scaleway Secret Manager) containing your custom
            certificate.
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.TLSSecret'
        managed_certificate:
          type: boolean
          description: True when Scaleway generates and manages a Let's Encrypt certificate
            for the TLS stage/custom endpoint.
        pipeline_id:
          type: string
          description: Pipeline ID the TLS stage belongs to.
        certificate_expires_at:
          type:
          - string
          - "null"
          description: Expiration date of the certificate. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        status:
          description: Current status of the stage.
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.StageStatus'
        created_at:
          type:
          - string
          - "null"
          description: Date the TLS stage was created. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        updated_at:
          type:
          - string
          - "null"
          description: Date the TLS stage was last updated. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        cache_stage_id:
          type:
          - string
          - "null"
          description: Cache stage ID the TLS stage is linked to. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
          x-one-of: next
        backend_stage_id:
          type:
          - string
          - "null"
          description: Backend stage ID the TLS stage is linked to. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
          x-one-of: next
        waf_stage_id:
          type:
          - string
          - "null"
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
          x-one-of: next
        route_stage_id:
          type:
          - string
          - "null"
          description: (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
          x-one-of: next
      x-properties-order:
      - id
      - secrets
      - managed_certificate
      - pipeline_id
      - certificate_expires_at
      - status
      - created_at
      - updated_at
      - cache_stage_id
      - backend_stage_id
      - waf_stage_id
      - route_stage_id
    scaleway.edge_services.v1beta1.WafExclusionRule:
      type: object
      properties:
        rule_id:
          type: integer
          format: uint32
      x-properties-order:
      - rule_id
    scaleway.edge_services.v1beta1.WafExclusionRules:
      type: object
      properties:
        rules:
          type: array
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.WafExclusionRule'
      x-properties-order:
      - rules
    scaleway.edge_services.v1beta1.WafStage:
      type: object
      properties:
        id:
          type: string
          description: ID of the WAF stage.
        pipeline_id:
          type: string
          description: Pipeline ID the WAF stage belongs to.
        mode:
          description: Mode defining WAF behavior (`disable`/`log_only`/`enable`).
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.WafStage.Mode'
        paranoia_level:
          type: integer
          description: Sensitivity level (`1`,`2`,`3`,`4`) to use when classifying
            requests as malicious. With a high level, requests are more likely to
            be classed as malicious, and false positives are expected. With a lower
            level, requests are more likely to be classed as benign.
          format: uint32
        status:
          description: Current status of the stage.
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.StageStatus'
        created_at:
          type:
          - string
          - "null"
          description: Date the WAF stage was created. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        updated_at:
          type:
          - string
          - "null"
          description: Date the WAF stage was last updated. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        backend_stage_id:
          type:
          - string
          - "null"
          description: ID of the backend stage to forward requests to after the WAF
            stage. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
          x-one-of: next
        exclusion_rules:
          type: array
          description: List of OWASP® CRS rule IDs excluded from WAF.
          items:
            $ref: '#/components/schemas/scaleway.edge_services.v1beta1.WafExclusionRule'
      x-properties-order:
      - id
      - pipeline_id
      - mode
      - paranoia_level
      - status
      - created_at
      - updated_at
      - backend_stage_id
      - exclusion_rules
    scaleway.edge_services.v1beta1.WafStage.Mode:
      type: string
      enum:
      - unknown_mode
      - disable
      - log_only
      - enable
      x-enum-descriptions:
        values:
          unknown_mode: WAF mode unknown (default)
          disable: WAF engine is disabled and does not evaluate requests
          log_only: WAF engine is enabled and evaluates requests but does not block
            them. HTTP requests which are identified as malicious, and would have
            been blocked in `enable` mode are logged in Scaleway Cockpit
          enable: WAF engine is enabled and evaluates requests. HTTP requests classed
            as malicious according to the defined `paranoia_level` are blocked and
            logged in Scaleway Cockpit
      default: unknown_mode
  securitySchemes:
    scaleway:
      in: header
      name: X-Auth-Token
      type: apiKey
paths:
  /edge-services/v1beta1/backend-stages/{backend_stage_id}:
    get:
      tags:
      - Backend stages
      operationId: GetBackendStage
      summary: Get backend stage
      description: Retrieve information about an existing backend stage, specified
        by its `backend_stage_id`. Its full details are returned in the response object.
      parameters:
      - in: path
        name: backend_stage_id
        description: ID of the requested backend stage.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.BackendStage'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/backend-stages/{backend_stage_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/backend-stages/{backend_stage_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Backend stages
      operationId: UpdateBackendStage
      summary: Update backend stage
      description: Update the parameters of an existing backend stage, specified by
        its `backend_stage_id`.
      parameters:
      - in: path
        name: backend_stage_id
        description: ID of the backend stage to update.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.BackendStage'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                scaleway_s3:
                  description: Scaleway Object Storage origin bucket (S3) linked to
                    the backend stage.
                  x-one-of: backend_config
                  oneOf:
                  - $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ScalewayS3BackendConfig'
                  - type: "null"
                scaleway_lb:
                  description: Scaleway Load Balancer origin linked to the backend
                    stage.
                  x-one-of: backend_config
                  oneOf:
                  - $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ScalewayLbBackendConfig'
                  - type: "null"
                scaleway_serverless_container:
                  description: Scaleway Serverless container origin linked to the
                    backend stage.
                  x-one-of: backend_config
                  oneOf:
                  - $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ScalewayServerlessContainerBackendConfig'
                  - type: "null"
                scaleway_serverless_function:
                  description: Scaleway Serverless function origin linked to the backend
                    stage.
                  x-one-of: backend_config
                  oneOf:
                  - $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ScalewayServerlessFunctionBackendConfig'
                  - type: "null"
                pipeline_id:
                  type: string
                  description: Pipeline ID the Backend stage belongs to.
              x-properties-order:
              - scaleway_s3
              - scaleway_lb
              - scaleway_serverless_container
              - scaleway_serverless_function
              - pipeline_id
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X PATCH \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"pipeline_id":"string"}' \
            "https://api.scaleway.com/edge-services/v1beta1/backend-stages/{backend_stage_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/edge-services/v1beta1/backend-stages/{backend_stage_id}" \
            X-Auth-Token:$SCW_SECRET_KEY \
            pipeline_id="string"
    delete:
      tags:
      - Backend stages
      operationId: DeleteBackendStage
      summary: Delete backend stage
      description: Delete an existing backend stage, specified by its `backend_stage_id`.
        Deleting a backend stage is permanent, and cannot be undone.
      parameters:
      - in: path
        name: backend_stage_id
        description: ID of the backend stage to delete.
        required: true
        schema:
          type: string
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/backend-stages/{backend_stage_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/edge-services/v1beta1/backend-stages/{backend_stage_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /edge-services/v1beta1/billing/{project_id}:
    get:
      tags:
      - Plans
      operationId: GetBilling
      summary: Billing information
      description: Gives information on the currently selected Edge Services subscription
        plan, resource usage and associated billing information for this calendar
        month (including whether consumption falls within or exceeds the currently
        selected subscription plan.).
      parameters:
      - in: path
        name: project_id
        description: (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.GetBillingResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/billing/{project_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/billing/{project_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /edge-services/v1beta1/cache-stages/{cache_stage_id}:
    get:
      tags:
      - Cache stages
      operationId: GetCacheStage
      summary: Get cache stage
      description: Retrieve information about an existing cache stage, specified by
        its `cache_stage_id`. Its full details, including Time To Live (TTL), are
        returned in the response object.
      parameters:
      - in: path
        name: cache_stage_id
        description: ID of the requested cache stage.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.CacheStage'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/cache-stages/{cache_stage_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/cache-stages/{cache_stage_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Cache stages
      operationId: UpdateCacheStage
      summary: Update cache stage
      description: Update the parameters of an existing cache stage, specified by
        its `cache_stage_id`. Parameters which can be updated include the `fallback_ttl`,
        `include_cookies` and `backend_stage_id`.
      parameters:
      - in: path
        name: cache_stage_id
        description: ID of the cache stage to update.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.CacheStage'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                fallback_ttl:
                  type:
                  - string
                  - "null"
                  description: Time To Live (TTL) in seconds. Defines how long content
                    is cached. (in seconds)
                  example: 2.5s
                include_cookies:
                  type:
                  - boolean
                  - "null"
                  description: Defines whether responses to requests with cookies
                    must be stored in the cache.
                backend_stage_id:
                  type:
                  - string
                  - "null"
                  description: Backend stage ID the cache stage will be linked to.
                    (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
                waf_stage_id:
                  type:
                  - string
                  - "null"
                  description: (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
                route_stage_id:
                  type:
                  - string
                  - "null"
                  description: (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
              x-properties-order:
              - fallback_ttl
              - include_cookies
              - backend_stage_id
              - waf_stage_id
              - route_stage_id
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X PATCH \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/edge-services/v1beta1/cache-stages/{cache_stage_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/edge-services/v1beta1/cache-stages/{cache_stage_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Cache stages
      operationId: DeleteCacheStage
      summary: Delete cache stage
      description: Delete an existing cache stage, specified by its `cache_stage_id`.
        Deleting a cache stage is permanent, and cannot be undone.
      parameters:
      - in: path
        name: cache_stage_id
        description: ID of the cache stage to delete.
        required: true
        schema:
          type: string
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/cache-stages/{cache_stage_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/edge-services/v1beta1/cache-stages/{cache_stage_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /edge-services/v1beta1/current-plan:
    patch:
      tags:
      - Plans
      operationId: SelectPlan
      summary: Select plan
      description: Subscribe to the Edge Services subscription plan of your choice,
        for the given Scaleway Project.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.Plan'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  type: string
                  description: (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                plan_name:
                  $ref: '#/components/schemas/scaleway.edge_services.v1beta1.Plan.Name'
              x-properties-order:
              - project_id
              - plan_name
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X PATCH \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"project_id":"6170692e-7363-616c-6577-61792e636f6d"}' \
            "https://api.scaleway.com/edge-services/v1beta1/current-plan"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/edge-services/v1beta1/current-plan" \
            X-Auth-Token:$SCW_SECRET_KEY \
            project_id="6170692e-7363-616c-6577-61792e636f6d"
  /edge-services/v1beta1/current-plan/{project_id}:
    get:
      tags:
      - Plans
      operationId: GetCurrentPlan
      summary: Get plan
      description: Get the current Edge Services subscription plan for your Scaleway
        Project.
      parameters:
      - in: path
        name: project_id
        description: (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.Plan'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/current-plan/{project_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/current-plan/{project_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Plans
      operationId: DeleteCurrentPlan
      summary: Delete plan
      description: Unsubscribe from the current Edge Services subscription plan for
        your Scaleway Project.
      parameters:
      - in: path
        name: project_id
        description: (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/edge-services/v1beta1/current-plan/{project_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/edge-services/v1beta1/current-plan/{project_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /edge-services/v1beta1/dns-stages/{dns_stage_id}:
    get:
      tags:
      - DNS stages
      operationId: GetDNSStage
      summary: Get DNS stage
      description: Retrieve information about an existing DNS stage, specified by
        its `dns_stage_id`. Its full details, including FQDNs, are returned in the
        response object.
      parameters:
      - in: path
        name: dns_stage_id
        description: ID of the requested DNS stage.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.DNSStage'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/dns-stages/{dns_stage_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/dns-stages/{dns_stage_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - DNS stages
      operationId: UpdateDNSStage
      summary: Update DNS stage
      description: Update the parameters of an existing DNS stage, specified by its
        `dns_stage_id`.
      parameters:
      - in: path
        name: dns_stage_id
        description: ID of the DNS stage to update.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.DNSStage'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                fqdns:
                  type:
                  - array
                  - "null"
                  description: Custom Fully Qualified Domain Name to be configured
                    (only 1 FQDN can be setup for now).
                tls_stage_id:
                  type:
                  - string
                  - "null"
                  description: TLS stage ID the DNS stage will be linked to. (UUID
                    format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
                cache_stage_id:
                  type:
                  - string
                  - "null"
                  description: Cache stage ID the DNS stage will be linked to. (UUID
                    format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
                backend_stage_id:
                  type:
                  - string
                  - "null"
                  description: Backend stage ID the DNS stage will be linked to. (UUID
                    format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
                wildcard_domain:
                  type:
                  - boolean
                  - "null"
                  description: Support of wildcard (subdomains) for the given domain
                    (a wildcard certificate is required to make it work).
              x-properties-order:
              - fqdns
              - tls_stage_id
              - cache_stage_id
              - backend_stage_id
              - wildcard_domain
      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/edge-services/v1beta1/dns-stages/{dns_stage_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/edge-services/v1beta1/dns-stages/{dns_stage_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - DNS stages
      operationId: DeleteDNSStage
      summary: Delete DNS stage
      description: Delete an existing DNS stage, specified by its `dns_stage_id`.
        Deleting a DNS stage is permanent, and cannot be undone.
      parameters:
      - in: path
        name: dns_stage_id
        description: ID of the DNS stage to delete.
        required: true
        schema:
          type: string
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/dns-stages/{dns_stage_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/edge-services/v1beta1/dns-stages/{dns_stage_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /edge-services/v1beta1/nodes:
    get:
      operationId: ListNodes
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListNodesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/nodes"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/nodes" \
            X-Auth-Token:$SCW_SECRET_KEY
  /edge-services/v1beta1/pipelines:
    get:
      tags:
      - Pipelines
      operationId: ListPipelines
      summary: List pipelines
      description: List all pipelines, for a Scaleway Organization or Scaleway Project.
        By default, the pipelines returned in the list are ordered by creation date
        in ascending order, though this can be modified via the `order_by` field.
      parameters:
      - in: query
        name: order_by
        description: Sort order of pipelines in the response.
        schema:
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListPipelinesRequest.OrderBy'
      - in: query
        name: page
        description: Page number to return, from the paginated results.
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        description: Number of pipelines to return per page.
        schema:
          type: integer
          format: uint32
      - in: query
        name: name
        description: Pipeline name to filter for. Only pipelines with this string
          within their name will be returned.
        schema:
          type: string
      - in: query
        name: organization_id
        description: Organization ID to filter for. Only pipelines from this Organization
          will be returned.
        schema:
          type: string
      - in: query
        name: project_id
        description: Project ID to filter for. Only pipelines from this Project will
          be returned.
        schema:
          type: string
      - in: query
        name: has_backend_stage_lb
        description: Filter on backend stage. Only pipelines with a Load Balancer
          origin will be returned.
        schema:
          type: boolean
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListPipelinesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/pipelines"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/pipelines" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Pipelines
      operationId: CreatePipeline
      summary: Create pipeline
      description: Create a new pipeline. You must specify a `dns_stage_id` to form
        a stage-chain that goes all the way to the backend stage (origin), so the
        HTTP request will be processed according to the stages you created.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.Pipeline'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  type: string
                  description: Project ID in which the pipeline will be created. (UUID
                    format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                name:
                  type: string
                  description: Name of the pipeline.
                description:
                  type: string
                  description: Description of the pipeline.
              required:
              - project_id
              - name
              - description
              x-properties-order:
              - project_id
              - name
              - description
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "description": "string",
              "name": "string",
              "project_id": "6170692e-7363-616c-6577-61792e636f6d"
            }' \
            "https://api.scaleway.com/edge-services/v1beta1/pipelines"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/edge-services/v1beta1/pipelines" \
            X-Auth-Token:$SCW_SECRET_KEY \
            description="string" \
            name="string" \
            project_id="6170692e-7363-616c-6577-61792e636f6d"
  /edge-services/v1beta1/pipelines/{pipeline_id}:
    get:
      tags:
      - Pipelines
      operationId: GetPipeline
      summary: Get pipeline
      description: Retrieve information about an existing pipeline, specified by its
        `pipeline_id`. Its full details, including errors, are returned in the response
        object.
      parameters:
      - in: path
        name: pipeline_id
        description: ID of the requested pipeline.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.Pipeline'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Pipelines
      operationId: UpdatePipeline
      summary: Update pipeline
      description: Update the parameters of an existing pipeline, specified by its
        `pipeline_id`. Parameters which can be updated include the `name`, `description`
        and `dns_stage_id`.
      parameters:
      - in: path
        name: pipeline_id
        description: ID of the pipeline to update.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.Pipeline'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type:
                  - string
                  - "null"
                  description: Name of the pipeline.
                description:
                  type:
                  - string
                  - "null"
                  description: Description of the pipeline.
              x-properties-order:
              - name
              - description
      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/edge-services/v1beta1/pipelines/{pipeline_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Pipelines
      operationId: DeletePipeline
      summary: Delete pipeline
      description: Delete an existing pipeline, specified by its `pipeline_id`. Deleting
        a pipeline is permanent, and cannot be undone. Note that all stages linked
        to the pipeline are also deleted.
      parameters:
      - in: path
        name: pipeline_id
        description: ID of the pipeline to delete.
        required: true
        schema:
          type: string
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /edge-services/v1beta1/pipelines/{pipeline_id}/backend-stages:
    get:
      tags:
      - Backend stages
      operationId: ListBackendStages
      summary: List backend stages
      description: List all backend stages, for a Scaleway Organization or Scaleway
        Project. By default, the backend stages returned in the list are ordered by
        creation date in ascending order, though this can be modified via the `order_by`
        field.
      parameters:
      - in: path
        name: pipeline_id
        description: Pipeline ID to filter for. Only backend stages from this pipeline
          will be returned.
        required: true
        schema:
          type: string
      - in: query
        name: order_by
        description: Sort order of backend stages in the response.
        schema:
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListBackendStagesRequest.OrderBy'
      - in: query
        name: page
        description: Page number to return, from the paginated results.
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        description: Number of backend stages to return per page.
        schema:
          type: integer
          format: uint32
      - in: query
        name: bucket_name
        description: Bucket name to filter for. Only backend stages from this Bucket
          will be returned.
        schema:
          type: string
      - in: query
        name: bucket_region
        description: Bucket region to filter for. Only backend stages with buckets
          in this region will be returned.
        schema:
          type: string
      - in: query
        name: lb_id
        description: Load Balancer ID to filter for. Only backend stages with this
          Load Balancer will be returned.
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListBackendStagesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/backend-stages"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/backend-stages" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Backend stages
      operationId: CreateBackendStage
      summary: Create backend stage
      description: Create a new backend stage. You must specify a type of backend
        (`scaleway_s3`, `scaleway_lb`, etc.) to configure the origin.
      parameters:
      - in: path
        name: pipeline_id
        description: Pipeline ID the Backend stage belongs to.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.BackendStage'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                scaleway_s3:
                  description: Scaleway Object Storage origin bucket (S3) linked to
                    the backend stage.
                  x-one-of: backend_config
                  oneOf:
                  - $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ScalewayS3BackendConfig'
                  - type: "null"
                scaleway_lb:
                  description: Scaleway Load Balancer origin linked to the backend
                    stage.
                  x-one-of: backend_config
                  oneOf:
                  - $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ScalewayLbBackendConfig'
                  - type: "null"
                scaleway_serverless_container:
                  description: Scaleway Serverless container origin linked to the
                    backend stage.
                  x-one-of: backend_config
                  oneOf:
                  - $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ScalewayServerlessContainerBackendConfig'
                  - type: "null"
                scaleway_serverless_function:
                  description: Scaleway Serverless function origin linked to the backend
                    stage.
                  x-one-of: backend_config
                  oneOf:
                  - $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ScalewayServerlessFunctionBackendConfig'
                  - type: "null"
              x-properties-order:
              - scaleway_s3
              - scaleway_lb
              - scaleway_serverless_container
              - scaleway_serverless_function
      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/edge-services/v1beta1/pipelines/{pipeline_id}/backend-stages"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/backend-stages" \
            X-Auth-Token:$SCW_SECRET_KEY
  /edge-services/v1beta1/pipelines/{pipeline_id}/cache-stages:
    get:
      tags:
      - Cache stages
      operationId: ListCacheStages
      summary: List cache stages
      description: List all cache stages, for a Scaleway Organization or Scaleway
        Project. By default, the cache stages returned in the list are ordered by
        creation date in ascending order, though this can be modified via the `order_by`
        field.
      parameters:
      - in: path
        name: pipeline_id
        description: Pipeline ID to filter for. Only cache stages from this pipeline
          will be returned.
        required: true
        schema:
          type: string
      - in: query
        name: order_by
        description: Sort order of cache stages in the response.
        schema:
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListCacheStagesRequest.OrderBy'
      - in: query
        name: page
        description: Page number to return, from the paginated results.
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        description: Number of cache stages to return per page.
        schema:
          type: integer
          format: uint32
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListCacheStagesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/cache-stages"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/cache-stages" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Cache stages
      operationId: CreateCacheStage
      summary: Create cache stage
      description: Create a new cache stage. You must specify the `fallback_ttl` field
        to customize the TTL of the cache.
      parameters:
      - in: path
        name: pipeline_id
        description: Pipeline ID the Cache stage belongs to. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.CacheStage'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                fallback_ttl:
                  type:
                  - string
                  - "null"
                  description: Time To Live (TTL) in seconds. Defines how long content
                    is cached. (in seconds)
                  example: 2.5s
                include_cookies:
                  type:
                  - boolean
                  - "null"
                  description: Defines whether responses to requests with cookies
                    must be stored in the cache.
                backend_stage_id:
                  type:
                  - string
                  - "null"
                  description: Backend stage ID the cache stage will be linked to.
                    (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
                waf_stage_id:
                  type:
                  - string
                  - "null"
                  description: (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
                route_stage_id:
                  type:
                  - string
                  - "null"
                  description: (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
              x-properties-order:
              - fallback_ttl
              - include_cookies
              - backend_stage_id
              - waf_stage_id
              - route_stage_id
      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/edge-services/v1beta1/pipelines/{pipeline_id}/cache-stages"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/cache-stages" \
            X-Auth-Token:$SCW_SECRET_KEY
  /edge-services/v1beta1/pipelines/{pipeline_id}/dns-stages:
    get:
      tags:
      - DNS stages
      operationId: ListDNSStages
      summary: List DNS stages
      description: List all DNS stages, for a Scaleway Organization or Scaleway Project.
        By default, the DNS stages returned in the list are ordered by creation date
        in ascending order, though this can be modified via the `order_by` field.
      parameters:
      - in: path
        name: pipeline_id
        description: Pipeline ID to filter for. Only DNS stages from this pipeline
          will be returned.
        required: true
        schema:
          type: string
      - in: query
        name: order_by
        description: Sort order of DNS stages in the response.
        schema:
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListDNSStagesRequest.OrderBy'
      - in: query
        name: page
        description: Page number to return, from the paginated results.
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        description: Number of DNS stages to return per page.
        schema:
          type: integer
          format: uint32
      - in: query
        name: fqdn
        description: Fully Qualified Domain Name to filter for (in the format subdomain.example.com).
          Only DNS stages with this FQDN will be returned.
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListDNSStagesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/dns-stages"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/dns-stages" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - DNS stages
      operationId: CreateDNSStage
      summary: Create DNS stage
      description: Create a new DNS stage. You must specify the `fqdns` field to customize
        the domain endpoint, using a domain you already own.
      parameters:
      - in: path
        name: pipeline_id
        description: Pipeline ID the DNS stage belongs to. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.DNSStage'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                fqdns:
                  type:
                  - array
                  - "null"
                  description: Custom Fully Qualified Domain Name to be configured
                    (only 1 FQDN can be setup for now).
                tls_stage_id:
                  type:
                  - string
                  - "null"
                  description: TLS stage ID the DNS stage will be linked to. (UUID
                    format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
                cache_stage_id:
                  type:
                  - string
                  - "null"
                  description: Cache stage ID the DNS stage will be linked to. (UUID
                    format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
                backend_stage_id:
                  type:
                  - string
                  - "null"
                  description: Backend stage ID the DNS stage will be linked to. (UUID
                    format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
                wildcard_domain:
                  type:
                  - boolean
                  - "null"
                  description: Support of wildcard (subdomains) for the given domain
                    (a wildcard certificate is required to make it work).
              x-properties-order:
              - fqdns
              - tls_stage_id
              - cache_stage_id
              - backend_stage_id
              - wildcard_domain
      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/edge-services/v1beta1/pipelines/{pipeline_id}/dns-stages"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/dns-stages" \
            X-Auth-Token:$SCW_SECRET_KEY
  /edge-services/v1beta1/pipelines/{pipeline_id}/head-stages:
    get:
      tags:
      - Pipelines
      operationId: ListHeadStages
      summary: List Head stage for your pipeline.
      parameters:
      - in: path
        name: pipeline_id
        description: ID of the pipeline to update. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: page
        description: Page number to return, from the paginated results.
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        description: Number of head stages to return per page.
        schema:
          type: integer
          format: uint32
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListHeadStagesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/head-stages"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/head-stages" \
            X-Auth-Token:$SCW_SECRET_KEY
  /edge-services/v1beta1/pipelines/{pipeline_id}/route-stages:
    get:
      tags:
      - Route stages
      operationId: ListRouteStages
      summary: List route stages
      description: List all route stages, for a given pipeline. By default, the route
        stages returned in the list are ordered by creation date in ascending order,
        though this can be modified via the `order_by` field.
      parameters:
      - in: path
        name: pipeline_id
        description: Pipeline ID to filter for. Only route stages from this pipeline
          will be returned.
        required: true
        schema:
          type: string
      - in: query
        name: order_by
        description: Sort order of route stages in the response.
        schema:
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListRouteStagesRequest.OrderBy'
      - in: query
        name: page
        description: Page number to return, from the paginated results.
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        description: Number of route stages to return per page.
        schema:
          type: integer
          format: uint32
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListRouteStagesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/route-stages"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/route-stages" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Route stages
      operationId: CreateRouteStage
      summary: Create route stage
      description: Create a new route stage. You must specify the `waf_stage_id` or
        `backend_stage_id` fields to customize the route.
      parameters:
      - in: path
        name: pipeline_id
        description: Pipeline ID the route stage belongs to. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.RouteStage'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                waf_stage_id:
                  type:
                  - string
                  - "null"
                  description: ID of the WAF stage HTTP requests should be forwarded
                    to when no rules are matched. (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
                backend_stage_id:
                  type:
                  - string
                  - "null"
                  description: ID of the backend stage HTTP requests should be forwarded
                    to when no rules are matched. (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
              x-properties-order:
              - waf_stage_id
              - backend_stage_id
      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/edge-services/v1beta1/pipelines/{pipeline_id}/route-stages"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/route-stages" \
            X-Auth-Token:$SCW_SECRET_KEY
  /edge-services/v1beta1/pipelines/{pipeline_id}/set-head-stage:
    post:
      tags:
      - Pipelines
      operationId: SetHeadStage
      summary: Configure a entry point to your pipeline. You must specify a `head
        stage` to form a stage-chain that goes all the way to the backend stage (origin),
        so the HTTP request will be processed according to the stages you created.
      description: You must specify either a `add_new_head_stage` (to add a new head
        stage), `remove_head_stage` (to remove a head stage) or `swap_head_stage`
        (to replace a head stage).
      parameters:
      - in: path
        name: pipeline_id
        description: ID of the pipeline 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.edge_services.v1beta1.HeadStageResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                add_new_head_stage:
                  description: Add a new head stage.
                  x-one-of: action
                  oneOf:
                  - $ref: '#/components/schemas/scaleway.edge_services.v1beta1.SetHeadStageRequest.AddNewHeadStage'
                  - type: "null"
                remove_head_stage:
                  description: Remove a head stage.
                  x-one-of: action
                  oneOf:
                  - $ref: '#/components/schemas/scaleway.edge_services.v1beta1.SetHeadStageRequest.RemoveHeadStage'
                  - type: "null"
                swap_head_stage:
                  description: Replace a head stage with a new one.
                  x-one-of: action
                  oneOf:
                  - $ref: '#/components/schemas/scaleway.edge_services.v1beta1.SetHeadStageRequest.SwapHeadStage'
                  - type: "null"
              x-properties-order:
              - add_new_head_stage
              - remove_head_stage
              - swap_head_stage
      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/edge-services/v1beta1/pipelines/{pipeline_id}/set-head-stage"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/set-head-stage" \
            X-Auth-Token:$SCW_SECRET_KEY
  /edge-services/v1beta1/pipelines/{pipeline_id}/tls-stages:
    get:
      tags:
      - TLS stages
      operationId: ListTLSStages
      summary: List TLS stages
      description: List all TLS stages, for a Scaleway Organization or Scaleway Project.
        By default, the TLS stages returned in the list are ordered by creation date
        in ascending order, though this can be modified via the `order_by` field.
      parameters:
      - in: path
        name: pipeline_id
        description: Pipeline ID to filter for. Only TLS stages from this pipeline
          will be returned.
        required: true
        schema:
          type: string
      - in: query
        name: order_by
        description: Sort order of TLS stages in the response.
        schema:
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListTLSStagesRequest.OrderBy'
      - in: query
        name: page
        description: Page number to return, from the paginated results.
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        description: Number of TLS stages to return per page.
        schema:
          type: integer
          format: uint32
      - in: query
        name: secret_id
        description: Secret ID to filter for. Only TLS stages with this Secret ID
          will be returned.
        schema:
          type: string
      - in: query
        name: secret_region
        description: Secret region to filter for. Only TLS stages with a Secret in
          this region will be returned.
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListTLSStagesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/tls-stages"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/tls-stages" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - TLS stages
      operationId: CreateTLSStage
      summary: Create TLS stage
      description: Create a new TLS stage. You must specify either the `secrets` or
        `managed_certificate` fields to customize the SSL/TLS certificate of your
        endpoint. Choose `secrets` if you are using a pre-existing certificate held
        in Scaleway Secret Manager, or `managed_certificate` to let Scaleway generate
        and manage a Let's Encrypt certificate for your customized endpoint.
      parameters:
      - in: path
        name: pipeline_id
        description: Pipeline ID the TLS stage belongs to. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.TLSStage'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                secrets:
                  type: array
                  description: Secret (from Scaleway Secret Manager) containing your
                    custom certificate.
                  items:
                    $ref: '#/components/schemas/scaleway.edge_services.v1beta1.TLSSecret'
                managed_certificate:
                  type:
                  - boolean
                  - "null"
                  description: True when Scaleway generates and manages a Let's Encrypt
                    certificate for the TLS stage/custom endpoint.
                cache_stage_id:
                  type:
                  - string
                  - "null"
                  description: Cache stage ID the TLS stage will be linked to. (UUID
                    format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
                backend_stage_id:
                  type:
                  - string
                  - "null"
                  description: Backend stage ID the TLS stage will be linked to. (UUID
                    format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
                route_stage_id:
                  type:
                  - string
                  - "null"
                  description: (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
                waf_stage_id:
                  type:
                  - string
                  - "null"
                  description: (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
              x-properties-order:
              - secrets
              - managed_certificate
              - cache_stage_id
              - backend_stage_id
              - route_stage_id
              - waf_stage_id
      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/edge-services/v1beta1/pipelines/{pipeline_id}/tls-stages"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/tls-stages" \
            X-Auth-Token:$SCW_SECRET_KEY
  /edge-services/v1beta1/pipelines/{pipeline_id}/waf-stages:
    get:
      tags:
      - WAF stages
      operationId: ListWafStages
      summary: List WAF stages
      description: List all WAF stages, for a Scaleway Organization or Scaleway Project.
        By default, the WAF stages returned in the list are ordered by creation date
        in ascending order, though this can be modified via the `order_by` field.
      parameters:
      - in: path
        name: pipeline_id
        description: Pipeline ID to filter for. Only WAF stages from this pipeline
          will be returned.
        required: true
        schema:
          type: string
      - in: query
        name: order_by
        description: Sort order of WAF stages in the response.
        schema:
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListWafStagesRequest.OrderBy'
      - in: query
        name: page
        description: Page number to return, from the paginated results.
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        description: Number of WAF stages to return per page.
        schema:
          type: integer
          format: uint32
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListWafStagesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/waf-stages"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/waf-stages" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - WAF stages
      operationId: CreateWafStage
      summary: Create WAF stage
      description: Create a new WAF stage. You must specify the `mode` and `paranoia_level`
        fields to customize the WAF.
      parameters:
      - in: path
        name: pipeline_id
        description: Pipeline ID the WAF stage belongs to. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.WafStage'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                mode:
                  description: Mode defining WAF behavior (`disable`/`log_only`/`enable`).
                  $ref: '#/components/schemas/scaleway.edge_services.v1beta1.WafStage.Mode'
                paranoia_level:
                  type: integer
                  description: Sensitivity level (`1`,`2`,`3`,`4`) to use when classifying
                    requests as malicious. With a high level, requests are more likely
                    to be classed as malicious, and false positives are expected.
                    With a lower level, requests are more likely to be classed as
                    benign.
                  format: uint32
                exclusion_rules:
                  description: List of OWASP® CRS rule IDs excluded from WAF.
                  $ref: '#/components/schemas/scaleway.edge_services.v1beta1.WafExclusionRules'
                backend_stage_id:
                  type:
                  - string
                  - "null"
                  description: ID of the backend stage to forward requests to after
                    the WAF stage. (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
              x-properties-order:
              - mode
              - paranoia_level
              - exclusion_rules
              - backend_stage_id
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"paranoia_level":42}' \
            "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/waf-stages"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/edge-services/v1beta1/pipelines/{pipeline_id}/waf-stages" \
            X-Auth-Token:$SCW_SECRET_KEY \
            paranoia_level:=42
  /edge-services/v1beta1/plans:
    get:
      tags:
      - Plans
      operationId: ListPlans
      summary: List plans
      description: List all available Edge Services subscription plans.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListPlansResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/plans"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/plans" \
            X-Auth-Token:$SCW_SECRET_KEY
  /edge-services/v1beta1/purge-requests:
    get:
      tags:
      - Purge requests
      operationId: ListPurgeRequests
      summary: List purge requests
      description: List all purge requests, for a Scaleway Organization or Scaleway
        Project. This enables you to retrieve a history of all previously-made purge
        requests. By default, the purge requests returned in the list are ordered
        by creation date in ascending order, though this can be modified via the `order_by`
        field.
      parameters:
      - in: query
        name: order_by
        description: Sort order of purge requests in the response.
        schema:
          $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListPurgeRequestsRequest.OrderBy'
      - in: query
        name: page
        description: Page number to return, from the paginated results.
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        description: Number of purge requests to return per page.
        schema:
          type: integer
          format: uint32
      - in: query
        name: organization_id
        description: Organization ID to filter for. Only purge requests from this
          Organization will be returned.
        schema:
          type: string
      - in: query
        name: project_id
        description: Project ID to filter for. Only purge requests from this Project
          will be returned.
        schema:
          type: string
      - in: query
        name: pipeline_id
        description: Pipeline ID to filter for. Only purge requests from this pipeline
          will be returned.
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListPurgeRequestsResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/purge-requests"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/purge-requests" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Purge requests
      operationId: CreatePurgeRequest
      summary: Create purge request
      description: Create a new purge request. You must specify either the `all` field
        (to purge all content) or a list of `assets` (to define the precise assets
        to purge).
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.PurgeRequest'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                pipeline_id:
                  type: string
                  description: Pipeline ID in which the purge request will be created.
                    (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                assets:
                  type:
                  - array
                  - "null"
                  description: List of asserts to purge.
                  x-one-of: target
                all:
                  type:
                  - boolean
                  - "null"
                  description: Defines whether to purge all content.
                  x-one-of: target
              required:
              - pipeline_id
              x-properties-order:
              - pipeline_id
              - assets
              - all
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"pipeline_id":"6170692e-7363-616c-6577-61792e636f6d"}' \
            "https://api.scaleway.com/edge-services/v1beta1/purge-requests"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/edge-services/v1beta1/purge-requests" \
            X-Auth-Token:$SCW_SECRET_KEY \
            pipeline_id="6170692e-7363-616c-6577-61792e636f6d"
  /edge-services/v1beta1/purge-requests/{purge_request_id}:
    get:
      tags:
      - Purge requests
      operationId: GetPurgeRequest
      summary: Get purge request
      description: Retrieve information about a purge request, specified by its `purge_request_id`.
        Its full details, including `status` and `target`, are returned in the response
        object.
      parameters:
      - in: path
        name: purge_request_id
        description: ID of the requested purge request. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.PurgeRequest'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/purge-requests/{purge_request_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/purge-requests/{purge_request_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /edge-services/v1beta1/route-stages/{route_stage_id}:
    get:
      tags:
      - Route stages
      operationId: GetRouteStage
      summary: Get route stage
      description: Retrieve information about an existing route stage, specified by
        its `route_stage_id`. The summary of the route stage (without route rules)
        is returned in the response object.
      parameters:
      - in: path
        name: route_stage_id
        description: ID of the requested route stage.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.RouteStage'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/route-stages/{route_stage_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/route-stages/{route_stage_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Route stages
      operationId: UpdateRouteStage
      summary: Update route stage
      description: Update the parameters of an existing route stage, specified by
        its `route_stage_id`.
      parameters:
      - in: path
        name: route_stage_id
        description: ID of the route stage to update.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.RouteStage'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                waf_stage_id:
                  type:
                  - string
                  - "null"
                  description: ID of the WAF stage HTTP requests should be forwarded
                    to when no rules are matched. (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
                backend_stage_id:
                  type:
                  - string
                  - "null"
                  description: ID of the backend stage HTTP requests should be forwarded
                    to when no rules are matched. (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
              x-properties-order:
              - waf_stage_id
              - backend_stage_id
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X PATCH \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/edge-services/v1beta1/route-stages/{route_stage_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/edge-services/v1beta1/route-stages/{route_stage_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Route stages
      operationId: DeleteRouteStage
      summary: Delete route stage
      description: Delete an existing route stage, specified by its `route_stage_id`.
        Deleting a route stage is permanent, and cannot be undone.
      parameters:
      - in: path
        name: route_stage_id
        description: ID of the route stage to delete.
        required: true
        schema:
          type: string
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/route-stages/{route_stage_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/edge-services/v1beta1/route-stages/{route_stage_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /edge-services/v1beta1/route-stages/{route_stage_id}/route-rules:
    get:
      tags:
      - Route stages
      operationId: ListRouteRules
      summary: List route rules
      description: List all route rules of an existing route stage, specified by its
        `route_stage_id`.
      parameters:
      - in: path
        name: route_stage_id
        description: Route stage ID to filter for. Only route rules from this route
          stage will be returned.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.ListRouteRulesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/route-stages/{route_stage_id}/route-rules"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/route-stages/{route_stage_id}/route-rules" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Route stages
      operationId: AddRouteRules
      summary: Add route rules
      description: Add route rules to an existing route stage, specified by its `route_stage_id`.
      parameters:
      - in: path
        name: route_stage_id
        description: ID of the route stage 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.edge_services.v1beta1.AddRouteRulesResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                route_rules:
                  type: array
                  description: List of rules to be checked against every HTTP request.
                    The first matching rule will forward the request to its specified
                    backend stage. If no rules are matched, the request is forwarded
                    to the stage defined by `waf_stage_id` or `backend_stage_id`.
                  items:
                    $ref: '#/components/schemas/scaleway.edge_services.v1beta1.SetRouteRulesRequest.RouteRule'
                after_position:
                  type:
                  - integer
                  - "null"
                  description: Add rules after the given position.
                  format: uint64
                  x-one-of: position
                before_position:
                  type:
                  - integer
                  - "null"
                  description: Add rules before the given position.
                  format: uint64
                  x-one-of: position
              x-properties-order:
              - route_rules
              - after_position
              - before_position
      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/edge-services/v1beta1/route-stages/{route_stage_id}/route-rules"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/edge-services/v1beta1/route-stages/{route_stage_id}/route-rules" \
            X-Auth-Token:$SCW_SECRET_KEY
    put:
      tags:
      - Route stages
      operationId: SetRouteRules
      summary: Set route rules
      description: Set the rules of an existing route stage, specified by its `route_stage_id`.
      parameters:
      - in: path
        name: route_stage_id
        description: ID of the route stage 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.edge_services.v1beta1.SetRouteRulesResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                route_rules:
                  type: array
                  description: List of rules to be checked against every HTTP request.
                    The first matching rule will forward the request to its specified
                    backend stage. If no rules are matched, the request is forwarded
                    to the stage defined by `waf_stage_id` or `backend_stage_id`.
                  items:
                    $ref: '#/components/schemas/scaleway.edge_services.v1beta1.SetRouteRulesRequest.RouteRule'
              x-properties-order:
              - route_rules
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X PUT \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/edge-services/v1beta1/route-stages/{route_stage_id}/route-rules"
      - lang: HTTPie
        source: |-
          http PUT "https://api.scaleway.com/edge-services/v1beta1/route-stages/{route_stage_id}/route-rules" \
            X-Auth-Token:$SCW_SECRET_KEY
  /edge-services/v1beta1/tls-stages/{tls_stage_id}:
    get:
      tags:
      - TLS stages
      operationId: GetTLSStage
      summary: Get TLS stage
      description: Retrieve information about an existing TLS stage, specified by
        its `tls_stage_id`. Its full details, including secrets and certificate expiration
        date are returned in the response object.
      parameters:
      - in: path
        name: tls_stage_id
        description: ID of the requested TLS stage.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.TLSStage'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/tls-stages/{tls_stage_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/tls-stages/{tls_stage_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - TLS stages
      operationId: UpdateTLSStage
      summary: Update TLS stage
      description: Update the parameters of an existing TLS stage, specified by its
        `tls_stage_id`. Both `tls_secrets_config` and `managed_certificate` parameters
        can be updated.
      parameters:
      - in: path
        name: tls_stage_id
        description: ID of the TLS stage to update.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.TLSStage'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tls_secrets_config:
                  description: Secret (from Scaleway Secret-Manager) containing your
                    custom certificate.
                  $ref: '#/components/schemas/scaleway.edge_services.v1beta1.TLSSecretsConfig'
                managed_certificate:
                  type:
                  - boolean
                  - "null"
                  description: True when Scaleway generates and manages a Let's Encrypt
                    certificate for the TLS stage/custom endpoint.
                cache_stage_id:
                  type:
                  - string
                  - "null"
                  description: Cache stage ID the TLS stage will be linked to. (UUID
                    format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
                backend_stage_id:
                  type:
                  - string
                  - "null"
                  description: Backend stage ID the TLS stage will be linked to. (UUID
                    format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
                route_stage_id:
                  type:
                  - string
                  - "null"
                  description: (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
                waf_stage_id:
                  type:
                  - string
                  - "null"
                  description: (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
              x-properties-order:
              - tls_secrets_config
              - managed_certificate
              - cache_stage_id
              - backend_stage_id
              - route_stage_id
              - waf_stage_id
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X PATCH \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/edge-services/v1beta1/tls-stages/{tls_stage_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/edge-services/v1beta1/tls-stages/{tls_stage_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - TLS stages
      operationId: DeleteTLSStage
      summary: Delete TLS stage
      description: Delete an existing TLS stage, specified by its `tls_stage_id`.
        Deleting a TLS stage is permanent, and cannot be undone.
      parameters:
      - in: path
        name: tls_stage_id
        description: ID of the TLS stage to delete.
        required: true
        schema:
          type: string
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/tls-stages/{tls_stage_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/edge-services/v1beta1/tls-stages/{tls_stage_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /edge-services/v1beta1/waf-stages/{waf_stage_id}:
    get:
      tags:
      - WAF stages
      operationId: GetWafStage
      summary: Get WAF stage
      description: Retrieve information about an existing WAF stage, specified by
        its `waf_stage_id`. Its full details are returned in the response object.
      parameters:
      - in: path
        name: waf_stage_id
        description: ID of the requested WAF stage.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.WafStage'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/waf-stages/{waf_stage_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/edge-services/v1beta1/waf-stages/{waf_stage_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - WAF stages
      operationId: UpdateWafStage
      summary: Update WAF stage
      description: Update the parameters of an existing WAF stage, specified by its
        `waf_stage_id`. Both `mode` and `paranoia_level` parameters can be updated.
      parameters:
      - in: path
        name: waf_stage_id
        description: ID of the WAF stage to update.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.edge_services.v1beta1.WafStage'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                mode:
                  description: Mode defining WAF behavior (`disable`/`log_only`/`enable`).
                  $ref: '#/components/schemas/scaleway.edge_services.v1beta1.WafStage.Mode'
                paranoia_level:
                  type:
                  - integer
                  - "null"
                  description: Sensitivity level (`1`,`2`,`3`,`4`) to use when classifying
                    requests as malicious. With a high level, requests are more likely
                    to be classed as malicious, and false positives are expected.
                    With a lower level, requests are more likely to be classed as
                    benign.
                  format: uint32
                exclusion_rules:
                  description: List of OWASP® CRS rule IDs excluded from WAF.
                  $ref: '#/components/schemas/scaleway.edge_services.v1beta1.WafExclusionRules'
                backend_stage_id:
                  type:
                  - string
                  - "null"
                  description: ID of the backend stage to forward requests to after
                    the WAF stage. (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                  x-one-of: next
              x-properties-order:
              - mode
              - paranoia_level
              - exclusion_rules
              - backend_stage_id
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X PATCH \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/edge-services/v1beta1/waf-stages/{waf_stage_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/edge-services/v1beta1/waf-stages/{waf_stage_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - WAF stages
      operationId: DeleteWafStage
      summary: Delete WAF stage
      description: Delete an existing WAF stage, specified by its `waf_stage_id`.
        Deleting a WAF stage is permanent, and cannot be undone.
      parameters:
      - in: path
        name: waf_stage_id
        description: ID of the WAF stage to delete.
        required: true
        schema:
          type: string
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/edge-services/v1beta1/waf-stages/{waf_stage_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/edge-services/v1beta1/waf-stages/{waf_stage_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
