openapi: 3.0.0
info:
  title: Serverless Containers API
  description: "Scaleway Serverless Containers is a «Container As A Service» product
    which gives users the ability to deploy atomic serverless workloads and only pay
    for resources used while containers are running.\n\nIt provides many advantages,
    such as:\n\n- Containers are only executed when an event is triggered, which allows
    users to save money while code is not running\n- Auto-Scalability:\n  - Automated
    `Scaling up and down` based on user configuration (e.g. min: 0, max: 100 replicas
    of my container).\n  - Automated `Scaling to zero` when a container is not executed,
    which is cost-effective for the user and saves computing resources for the cloud
    provider.\n- Endpoint-only scaling\n\n### Serverless Framework\n\nThis page explains
    how to use the Scaleway Containers API, including a quickstart and the full API
    documentation. However, you may prefer to use the\n[Serverless Framework plugin](https://github.com/scaleway/serverless-scaleway-functions)
    enabling users to deploy their serverless workloads \nmuch more easily with a
    single `serverless deploy` command.\n\nIf what you are looking for is an easy
    way to deploy your code, you may prefer Serverless Framework.\n\nBelow, you will
    find a step-by-step guide on how to create a `namespace`, configure and deploy
    `containers`, and trigger your `containers` via HTTP and CRON.\n\n## Concepts\n\nRefer
    to our [dedicated concepts page](https://www.scaleway.com/en/docs/serverless/containers/concepts/)
    to find definitions of the different terms referring to Serverless Containers.\n##
    Quickstart\n\n(switchcolumn)\n(switchcolumn)\n\n1. Configure your environment
    variables.\n    ```bash\n    export $SCW_SECRET_KEY=\"<Secret key of your token>\"\n
    \   export SCW_DEFAULT_REGION=\"<Choose your location (pl-waw/nl-ams/fr-par)>\"\n
    \   export SCW_PROJECT_ID=\"<Your Project ID>\"\n    ```\n    <Message type=\"tip\">\n
    \     This is an optional step that seeks to simplify your usage of the Serverless
    Containers API. See [Regions](#availability-zones) below for help choosing a region.
    You can find your Project ID in the [Scaleway console](https://console.scaleway.com/Project/settings).\n
    \   </Message>\n\n2. Set the name for your namespace and configure your Project
    ID:\n    ```bash\n    curl -X POST \"https://api.scaleway.com/containers/v1beta1/regions/$SCW_DEFAULT_REGION/namespaces\"
    \\\n      -H \"accept: application/json\" \\\n      -H \"X-Auth-Token: $SCW_SECRET_KEY\"
    \\\n      -H \"Content-Type: application/json\" \\\n      -d \"{\n          \\\"name\\\":
    \\\"your-namespace-name\\\", \\\n          \\\"project_id\\\": \\\"$SCW_PROJECT_ID\\\",
    \\\n          \\\"environment_variables\\\": {\\\"YOUR_VARIABLE\\\": \\\"content\\\"}
    \\\n          }\"\n    ```\n\n3. **Copy the response's `id` field**, you will
    need it for the next steps. For the sake of simplicity, we will save the ID to
    a variable, which will be used in the following examples:\n    ```bash\n    export
    NAMESPACE_ID=\"<your namespace id>\"\n    ```\n    <Message type=\"note\">\n      We
    suppose you already have a working image here. It can be anything which listens
    on a env variable \\$PORT variable. Note that we run your container as user 1000,
    not root, so it must be runnable under these conditions.\n      For more information
    on how to push your image, refer to the [Container Registry documentation](https://www.scaleway.com/developers/api/registry/).\n
    \   </Message>\n\n4. **Edit the POST request payload** to use in the next step
    to create an Elastic Metal server. Modify the values in the example according
    to your requirements, using the information in the payload values section to help.
    For container resource criteria and default values, please refer to the [Containers
    Limitation documentation](https://www.scaleway.com/en/docs/serverless/containers/reference-content/containers-limitations/).\n
    \   ```json\n    {\n      \"namespace_id\": \"string\",\n      \"name\": \"string\",\n
    \     \"environment_variables\": {\n        \"<key>\": \"string\"\n      },\n
    \     \"min_scale\": \"integer\",\n      \"max_scale\": \"integer\",\n      \"memory_limit\":
    \"integer\",\n      \"cpu_limit\": \"integer\",\n      \"timeout\": \"integer\",\n
    \     \"privacy\": \"unknown_privacy\",\n      \"description\": \"string\",\n
    \     \"registry_image\": \"string\",\n      \"max_concurrency\": \"integer\",\n
    \     \"protocol\": \"unknown_protocol\",\n      \"port\": \"integer\",\n      \"secret_environment_variables\":
    [\n        {\n          \"key\": \"string\",\n          \"value\": \"string\"\n
    \       }\n      ],\n      \"http_option\": \"enabled\"\n    }\n    ```\n\n    |
    Parameter        | Description                                                        |\n
    \   | :--------------- | :-----------------------------------------------------------------
    |\n    | `region` | The region you want to target. Possible values are fr-par,
    nl-ams and pl-waw. |\n    | `namespace_id`| UUID of the namespace the container
    belongs to. |\n    | `name`| Name of the container. |\n    | `environment_variables`
    | **NULLABLE** Environment variables of the container. |\n    | `min_scale` |
    **NULLABLE** Minimum number of instances to scale the container to. |\n    | `max_scale`
    | **NULLABLE** Maximum number of instances to scale the container to. |\n    |
    `memory_limit`| **NULLABLE** Memory limit of the container in MiB. |\n    | `cpu_limit`|
    **NULLABLE** CPU limit of the container in mvCPU. |\n    | `timeout` | **NULLABLE**
    Request processing time limit for the container. (in seconds). |\n    | `privacy`
    | Privacy setting of the container. |\n    | `description` | **NULLABLE** Description
    of the container. |\n    | `registry_image`| **NULLABLE** Name of the registry
    image (e.g. \"rg.fr-par.scw.cloud/something/image:tag\"). |\n    | `max_concurrency`
    | **NULLABLE** Number of maximum concurrent executions of the container. |\n    |
    `protocol` | Protocol the container uses. Possible values are unknown_protocol,
    http1 and h2c. The default value is unknown_protocol. |\n    | `port` | **NULLABLE**
    Port the container listens on. |\n    | `secret_environment_variables` | Secret
    environment variables of the container. |\n    | `http_option` | Configure how
    HTTP and HTTPS requests are handled. Possible values:<br /> - `redirected`: Responds
    to HTTP request with a 301 redirect to ask the clients to use HTTPS.<br /> - `enabled`:
    Serve both HTTP and HTTPS traffic. |\n\n    <Message type=\"important\">\n      All
    parameters are `required`, except for those marked as nullable.\n    </Message>\n\n5.
    \ Run the following command to create your container. Make sure you include the
    payload you edited in the previous step.\n    ```bash\n    export REGISTRY_IMAGE=\"rg.fr-par.scw.cloud/myregistrynamespace/mycontainer:latest\"\n
    \   curl -X POST \\\n      -H \"X-Auth-Token: $SCW_SECRET_KEY\" \\\n      \"https://api.scaleway.com/containers/v1beta1/regions/$SCW_DEFAULT_REGION/containers\"
    \\\n      -d \"{\n          \"name\": MyContainer, \\\n          \"registry_image\":
    \"$REGISTRY_IMAGE\", \\\n          \"namespace_id\": \"$NAMESPACE_ID\", \\\n          \"memory_limit\":
    300, \\\n          \"cpu_limit\": 200, \\\n          \"min_scale\": 0, \\\n          \"max_scale\":
    20 \\\n          }\"\n    ```\n\n6. Run the following command to deploy your container:\n
    \   ```bash\n    curl -X POST \\\n      -H \"X-Auth-Token: $SCW_SECRET_KEY\" \\\n
    \     \"https://api.scaleway.com/containers/v1beta1/regions/$SCW_DEFAULT_REGION/containers/$CONTAINER_ID/deploy\"
    \\\n      -d \"{}\"\n    ```\n\n7. Run the following command to trigger your container.\n
    \   ```bash\n    curl -X GET \\\n      -H \"X-Auth-Token: $SCW_SECRET_KEY\" \\\n
    \     \"https://api.scaleway.com/containers/v1beta1/regions/$SCW_DEFAULT_REGION/containers/$CONTAINER_ID\"\n
    \   export CONTAINER_ENDPOINT=\"<endpoint>\"\n    curl -X GET \"$CONTAINER_ENDPOINT\"\n
    \   ```\n\n8. (optional) Connect to your Cockpit (Serverless Containers Logs dashboard)
    to see your logs: https://www.scaleway.com/en/docs/observability/cockpit/how-to/access-grafana-and-managed-dashboards/.\n\n9.
    (optional) Use the following call to destroy a namespace (along with all containers
    and crons):\n    ```bash\n    curl -s \\\n      -H \"X-Auth-Token: $SCW_SECRET_KEY\"
    \\\n      -X DELETE \"https://api.scaleway.com/containers/v1beta1/regions/$SCW_DEFAULT_REGION/namespaces/$NAMESPACE_ID\"\n
    \   ```\n\n(switchcolumn)\n<Message type=\"requirement\">\n  To perform the following
    steps, you must first ensure that:\n  - You have a [Scaleway account](https://console.scaleway.com/)\n
    \ - You have created an [API key](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/)
    and that the API key has sufficient [IAM permissions](https://www.scaleway.com/en/docs/identity-and-access-management/iam/reference-content/permission-sets/)
    to perform the actions described on this page\n  - You have [installed `curl`](https://curl.se/download.html)\n
    \ - You have [installed `jq`](https://stedolan.github.io/jq/) to improve readability
    of the API outputs\n</Message>\n(switchcolumn)\n\n## Technical information\n\nA
    **Container** in Scaleway Containers consists of multiple components:\n\n- **Environment
    variables**: Users may configure specific environment variables (Database host/credentials
    for example) which are safely encrypted in our Database, and will be mounted inside
    your containers. **Note** that environment variables set at `namespace` level
    will also be mounted (in every container). Environment variables written at `container`
    level override the ones set at `namespace` level (if two of them bear the same
    name for example).\n- **Docker image**: A Docker image contains all the elements
    required to run your software: code, a runtime environment, tools, scripts, libraries,
    etc.\n- **Resources**: Users may decide how much computing resource to allocate
    to each container -> `Memory Limit` (in MB). We will then allocate the right amount
    of `CPU` based on Memory Limit choice. The right choice for your container's resources
    is very important, as you will be billed based on compute usage over time and
    the number of Containers executions.\n\n### Product features\n- Fully isolated
    environments\n- Scaling to zero (saves money and computing resources while the
    code is not executed)\n- High Availability and scalability (automated and configurable,
    each container may scale automatically according to incoming workloads)\n- Multiple
    event sources:\n  - HTTP (request on our gateway will execute the container)\n
    \ - CRON (time-based job, runs according to configurable cron schedule)\n- Integrated
    to the Scaleway Container Registry product:\n  - Deploy any docker image from
    one of your registry namespace\n- Flexible resources: you can choose values separately
    for your memory and CPU within a range in respect with maximum and minimum allowed
    values in [Containers Limitation documentation](https://www.scaleway.com/en/docs/serverless/containers/reference-content/containers-limitations/).\n\n###
    Regions\n\nServerless Containers is available in the Paris, Amsterdam and Warsaw
    regions, which are represented by the following path parameters:\n\n* `fr-par`\n*
    `nl-ams`\n* `pl-waw`\n\n### CRON\n\nA `CRON` is a type of event which triggers
    a Scaleway Container: it is an `add-on` to your container.\n\nCRONs inside Scaleway
    Containers have the following properties:\n\n- `schedule`: UNIX Formatted CRON
    schedule. Your container will be executed based on this schedule. For example,
    `5 4 * * 0` means \"execute my container at 04:05 AM every Sunday\" (see this
    [page from Ubuntu's official documentation](https://doc.ubuntu-fr.org/cron)).
    The timezone is UTC+0.\n- `args`: JSON object passed to your container. You can
    use this property to define data that will be passed to your container's `event.body`
    object. For Containers, you might handle these arguments as the HTTP request's
    body.\n\nUnder the hood, CRON Triggers are [Kubernetes JOBs](https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/)
    sending HTTP POST requests to your container.\n\n### Authentication\n\nBy default
    new containers are `public` meaning that no credentials are required to invoke
    them.\n\nA container can be `private` or `public`. This can be configured through
    the `privacy` parameter.\n\nCalling a `private` container without authentication
    will return HTTP code `403`.\n\n### Logs\n\nContainers logs are sent to the project's
    [Cockpit](https://www.scaleway.com/en/developers/api/cockpit/).\n\nThe **Serverless
    Containers Logs** dashboard in Grafana can be used to see containers logs. More
    complex queries can be done using the \"Explore\" section of Grafana, and LogQL
    queries:\n\n```logql\n{resource_type=\"serverless_container\"}\n```\n\nAdditionally,
    the loki endpoint (`https://logs.cockpit.fr-par.scw.cloud`) can be used to query
    programmatically the containers logs using a [token](https://www.scaleway.com/en/docs/observability/cockpit/how-to/create-token/).\n\n##
    Going further\n\nFor more help using Scaleway Serverless containers, check out
    the following resources:\n\n* Our [main documentation](https://www.scaleway.com/en/docs/serverless/containers/)\n*
    The #serverless-containers channel on our [Slack Community](https://www.scaleway.com/en/docs/tutorials/scaleway-slack-community/)\n*
    Our [support ticketing system](https://www.scaleway.com/en/docs/console/account/how-to/open-a-support-ticket/)."
  version: v1beta1
servers:
- url: https://api.scaleway.com
tags:
- name: Namespaces
  description: A namespace is a project that allows you to group your containers.
    Containers in the same namespace can share environment variables and access tokens,
    defined at the namespace level.
- name: Containers
  description: "A container is a package of software that includes all dependencies:
    code, runtime, configuration, and system libraries so that it can run on any host
    system. \nScaleway provides you with custom Docker images that are entirely handled
    for you in the cloud. \nWith Containers, you can rely on your favorite technologies
    such as Django or Ruby On Rails.\n"
- name: Crons
  description: Crons allow you to schedule the execution of your containers.
- name: Domains
  description: You can customize the domain for your container by associating your
    container to a (sub)domain.
- name: Tokens
  description: Tokens allow you to manage access to your containers.
- name: Triggers
  description: Triggers enable to launch your containers using events from a message
    queue.
components:
  schemas:
    google.protobuf.StringValue:
      type: string
      nullable: true
    google.protobuf.UInt32Value:
      type: integer
      format: uint32
      nullable: true
    scaleway.containers.v1beta1.Container:
      type: object
      properties:
        id:
          type: string
          description: UUID of the container.
        name:
          type: string
          description: Name of the container.
        namespace_id:
          type: string
          description: UUID of the namespace the container belongs to.
        status:
          type: string
          description: Status of the container.
          enum:
          - unknown
          - ready
          - deleting
          - error
          - locked
          - creating
          - pending
          - created
          default: unknown
        environment_variables:
          type: object
          description: Environment variables of the container.
          properties:
            <environment_variableKey>:
              type: string
          additionalProperties: true
        min_scale:
          type: integer
          description: Minimum number of instances to scale the container to.
          format: uint32
        max_scale:
          type: integer
          description: Maximum number of instances to scale the container to.
          format: uint32
        memory_limit:
          type: integer
          description: Memory limit of the container in MB.
          format: uint32
        cpu_limit:
          type: integer
          description: CPU limit of the container in mvCPU.
          format: uint32
        timeout:
          type: string
          description: Processing time limit for the container. (in seconds)
          example: 2.5s
          nullable: true
        error_message:
          type: string
          description: Last error message of the container.
          nullable: true
        privacy:
          type: string
          description: Privacy setting of the container.
          enum:
          - unknown_privacy
          - public
          - private
          default: unknown_privacy
        description:
          type: string
          description: Description of the container.
          nullable: true
        registry_image:
          type: string
          description: Name of the registry image (e.g. "rg.fr-par.scw.cloud/something/image:tag").
        max_concurrency:
          type: integer
          description: Number of maximum concurrent executions of the container.
          format: uint32
        domain_name:
          type: string
          description: Domain name attributed to the contaioner.
        protocol:
          type: string
          description: Protocol the container uses.
          enum:
          - unknown_protocol
          - http1
          - h2c
          default: unknown_protocol
        port:
          type: integer
          description: Port the container listens on.
          format: uint32
        secret_environment_variables:
          type: array
          description: Secret environment variables of the container.
          items:
            $ref: '#/components/schemas/scaleway.containers.v1beta1.SecretHashedValue'
        http_option:
          type: string
          description: |-
            Configuration for the handling of HTTP and HTTPS requests.
            Possible values:
             - redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
             - enabled: Serve both HTTP and HTTPS traffic.
          enum:
          - unknown_http_option
          - enabled
          - redirected
          default: enabled
        sandbox:
          type: string
          description: Execution environment of the container.
          enum:
          - unknown_sandbox
          - v1
          - v2
          x-enum-descriptions:
            values:
              unknown_sandbox: Unknown sandbox
              v1: Legacy sandboxing with slower cold starts. Fully supports the Linux
                system call interface
              v2: Recommended sandboxing with faster cold starts
          default: unknown_sandbox
        local_storage_limit:
          type: integer
          description: Local storage limit of the container (in MB).
          format: uint32
        scaling_option:
          type: object
          description: |-
            Configuration used to decide when to scale up or down.
            Possible values:
            - concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.
            - cpu_usage_threshold: Scale depending on the CPU usage of a container instance.
            - memory_usage_threshold: Scale depending on the memory usage of a container instance.
          properties:
            concurrent_requests_threshold:
              type: integer
              format: uint32
              nullable: true
              x-one-of: scaling_rule
            cpu_usage_threshold:
              type: integer
              format: uint32
              nullable: true
              x-one-of: scaling_rule
            memory_usage_threshold:
              type: integer
              format: uint32
              nullable: true
              x-one-of: scaling_rule
          x-properties-order:
          - concurrent_requests_threshold
          - cpu_usage_threshold
          - memory_usage_threshold
        health_check:
          type: object
          description: Health check configuration of the container.
          properties:
            http:
              type: object
              description: HTTP health check configuration.
              properties:
                path:
                  type: string
                  description: Path to use for the HTTP health check.
              nullable: true
              x-properties-order:
              - path
              x-one-of: probe
            tcp:
              type: object
              description: TCP health check configuration.
              nullable: true
              x-one-of: probe
            failure_threshold:
              type: integer
              description: "Number of consecutive health check failures before considering
                the container unhealthy.\nDuring a deployment, if a newly created
                container fails to pass the health check, the deployment is aborted.
                \nAs a result, lowering this value can help to reduce the time it
                takes to detect a failed deployment."
              format: uint32
            interval:
              type: string
              description: Period between health checks. (in seconds)
              example: 2.5s
              nullable: true
          x-properties-order:
          - http
          - tcp
          - failure_threshold
          - interval
        created_at:
          type: string
          description: Creation date of the container. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        updated_at:
          type: string
          description: Last update date of the container. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        ready_at:
          type: string
          description: Last date when the container was successfully deployed and
            set to ready. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        region:
          type: string
          description: Region in which the container will be deployed.
      x-properties-order:
      - id
      - name
      - namespace_id
      - status
      - environment_variables
      - min_scale
      - max_scale
      - memory_limit
      - cpu_limit
      - timeout
      - error_message
      - privacy
      - description
      - registry_image
      - max_concurrency
      - domain_name
      - protocol
      - port
      - secret_environment_variables
      - http_option
      - sandbox
      - local_storage_limit
      - scaling_option
      - health_check
      - created_at
      - updated_at
      - ready_at
      - region
    scaleway.containers.v1beta1.Container.Protocol:
      type: string
      enum:
      - unknown_protocol
      - http1
      - h2c
      default: unknown_protocol
    scaleway.containers.v1beta1.Cron:
      type: object
      properties:
        id:
          type: string
          description: UUID of the cron.
        container_id:
          type: string
          description: UUID of the container invoked by this cron.
        schedule:
          type: string
          description: UNIX cron shedule.
        args:
          type: object
          description: Arguments to pass with the cron.
          properties:
            <fieldKey>:
              type: object
        status:
          type: string
          description: Status of the cron.
          enum:
          - unknown
          - ready
          - deleting
          - error
          - locked
          - creating
          - pending
          default: unknown
        name:
          type: string
          description: Name of the cron.
      x-properties-order:
      - id
      - container_id
      - schedule
      - args
      - status
      - name
    scaleway.containers.v1beta1.Domain:
      type: object
      properties:
        id:
          type: string
          description: UUID of the domain.
        hostname:
          type: string
          description: Domain assigned to the container.
        container_id:
          type: string
          description: UUID of the container.
        url:
          type: string
          description: URL (TBD).
        status:
          type: string
          description: Status of the domain.
          enum:
          - unknown
          - ready
          - deleting
          - error
          - creating
          - pending
          default: unknown
        error_message:
          type: string
          description: Last error message of the domain.
          nullable: true
      x-properties-order:
      - id
      - hostname
      - container_id
      - url
      - status
      - error_message
    scaleway.containers.v1beta1.ListContainersResponse:
      type: object
      properties:
        containers:
          type: array
          description: Array of containers.
          items:
            $ref: '#/components/schemas/scaleway.containers.v1beta1.Container'
        total_count:
          type: integer
          description: Total number of containers.
          format: uint32
      x-properties-order:
      - containers
      - total_count
    scaleway.containers.v1beta1.ListCronsResponse:
      type: object
      properties:
        crons:
          type: array
          description: Array of crons.
          items:
            $ref: '#/components/schemas/scaleway.containers.v1beta1.Cron'
        total_count:
          type: integer
          description: Total number of crons.
          format: uint32
      x-properties-order:
      - crons
      - total_count
    scaleway.containers.v1beta1.ListDomainsResponse:
      type: object
      properties:
        domains:
          type: array
          description: Array of domains.
          items:
            $ref: '#/components/schemas/scaleway.containers.v1beta1.Domain'
        total_count:
          type: integer
          description: Total number of domains.
          format: uint32
      x-properties-order:
      - domains
      - total_count
    scaleway.containers.v1beta1.ListNamespacesResponse:
      type: object
      properties:
        namespaces:
          type: array
          description: Array of the namespaces.
          items:
            $ref: '#/components/schemas/scaleway.containers.v1beta1.Namespace'
        total_count:
          type: integer
          description: Total number of namespaces.
          format: uint32
      x-properties-order:
      - namespaces
      - total_count
    scaleway.containers.v1beta1.ListTokensResponse:
      type: object
      properties:
        tokens:
          type: array
          items:
            $ref: '#/components/schemas/scaleway.containers.v1beta1.Token'
        total_count:
          type: integer
          format: uint32
      x-properties-order:
      - tokens
      - total_count
    scaleway.containers.v1beta1.ListTriggersResponse:
      type: object
      properties:
        total_count:
          type: integer
          description: Total count of existing triggers (matching any filters specified).
          format: uint32
        triggers:
          type: array
          description: Triggers on this page.
          items:
            $ref: '#/components/schemas/scaleway.containers.v1beta1.Trigger'
      x-properties-order:
      - total_count
      - triggers
    scaleway.containers.v1beta1.Namespace:
      type: object
      properties:
        id:
          type: string
          description: UUID of the namespace.
        name:
          type: string
          description: Name of the namespace.
        environment_variables:
          type: object
          description: Environment variables of the namespace.
          properties:
            <environment_variableKey>:
              type: string
          additionalProperties: true
        organization_id:
          type: string
          description: UUID of the Organization the namespace belongs to.
        project_id:
          type: string
          description: UUID of the Project the namespace belongs to.
        status:
          type: string
          description: Status of the namespace.
          enum:
          - unknown
          - ready
          - deleting
          - error
          - locked
          - creating
          - pending
          default: unknown
        registry_namespace_id:
          type: string
          description: UUID of the registry namespace.
        error_message:
          type: string
          description: Last error message of the namesace.
          nullable: true
        registry_endpoint:
          type: string
          description: Registry endpoint of the namespace.
        description:
          type: string
          description: Description of the endpoint.
          nullable: true
        secret_environment_variables:
          type: array
          description: Secret environment variables of the namespace.
          items:
            $ref: '#/components/schemas/scaleway.containers.v1beta1.SecretHashedValue'
        region:
          type: string
          description: Region in which the namespace will be created.
        tags:
          type: array
          description: '[ALPHA] List of tags applied to the Serverless Container Namespace.'
          items:
            type: string
        created_at:
          type: string
          description: Creation date of the namespace. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        updated_at:
          type: string
          description: Last update date of the namespace. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
      x-properties-order:
      - id
      - name
      - environment_variables
      - organization_id
      - project_id
      - status
      - registry_namespace_id
      - error_message
      - registry_endpoint
      - description
      - secret_environment_variables
      - region
      - tags
      - created_at
      - updated_at
    scaleway.containers.v1beta1.Secret:
      type: object
      properties:
        key:
          type: string
        value:
          $ref: '#/components/schemas/google.protobuf.StringValue'
      x-properties-order:
      - key
      - value
    scaleway.containers.v1beta1.SecretHashedValue:
      type: object
      properties:
        key:
          type: string
        hashed_value:
          type: string
      x-properties-order:
      - key
      - hashed_value
    scaleway.containers.v1beta1.Token:
      type: object
      properties:
        id:
          type: string
          description: UUID of the token.
        token:
          type: string
          description: Identifier of the token.
        container_id:
          type: string
          description: UUID of the container the token belongs to.
          nullable: true
          x-one-of: scope
        namespace_id:
          type: string
          description: UUID of the namespace the token belongs to.
          nullable: true
          x-one-of: scope
        public_key:
          type: string
          description: Public key of the token.
          deprecated: true
        status:
          type: string
          description: Status of the token.
          enum:
          - unknown
          - ready
          - deleting
          - error
          - creating
          default: unknown
        description:
          type: string
          description: Description of the token.
          nullable: true
        expires_at:
          type: string
          description: Expiry date of the token. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
      x-properties-order:
      - id
      - token
      - container_id
      - namespace_id
      - public_key
      - status
      - description
      - expires_at
    scaleway.containers.v1beta1.Trigger:
      type: object
      properties:
        id:
          type: string
          description: ID of the trigger.
        name:
          type: string
          description: Name of the trigger.
        description:
          type: string
          description: Description of the trigger.
        container_id:
          type: string
          description: ID of the container to trigger.
        input_type:
          type: string
          description: Type of the input.
          enum:
          - unknown_input_type
          - sqs
          - scw_sqs
          - nats
          - scw_nats
          x-enum-descriptions:
            values:
              unknown_input_type: Unknown input type
              scw_sqs: Scaleway Messaging and Queuing SQS queue
              scw_nats: Scaleway Messaging and Queuing NATS subject
          default: unknown_input_type
        status:
          type: string
          description: Status of the trigger.
          enum:
          - unknown_status
          - ready
          - deleting
          - error
          - creating
          - pending
          x-enum-descriptions:
            values:
              unknown_status: Unknown status
              ready: Ready status
              deleting: Deleting status
              error: Error status
              creating: Creating status
              pending: Pending status
          default: unknown_status
        error_message:
          type: string
          description: Error message of the trigger.
          nullable: true
        scw_sqs_config:
          type: object
          description: Configuration for a Scaleway Messaging and Queuing SQS queue.
          properties:
            queue:
              type: string
              description: Name of the SQS queue the trigger listens to.
            mnq_project_id:
              type: string
              description: ID of the Messaging and Queuing project.
            mnq_region:
              type: string
              description: |-
                Region in which the Messaging and Queuing project is activated.
                Currently, only the `fr-par` and `nl-ams` regions are available.
            mnq_credential_id:
              type: string
              description: ID of the Messaging and Queuing credentials used to read
                from the SQS queue.
              nullable: true
          nullable: true
          x-properties-order:
          - queue
          - mnq_project_id
          - mnq_region
          - mnq_credential_id
          x-one-of: config
        scw_nats_config:
          type: object
          description: Configuration for a Scaleway Messaging and Queuing NATS subject.
          properties:
            subject:
              type: string
              description: Name of the NATS subject the trigger listens to.
            mnq_nats_account_id:
              type: string
              description: ID of the Messaging and Queuing NATS account.
            mnq_project_id:
              type: string
              description: ID of the Messaging and Queuing project.
            mnq_region:
              type: string
              description: |-
                Region in which the Messaging and Queuing project is activated.
                Currently, only the `fr-par` and `nl-ams` regions are available.
            mnq_credential_id:
              type: string
              description: ID of the Messaging and Queuing credentials used to subscribe
                to the NATS subject.
              nullable: true
          nullable: true
          x-properties-order:
          - subject
          - mnq_nats_account_id
          - mnq_project_id
          - mnq_region
          - mnq_credential_id
          x-one-of: config
      x-properties-order:
      - id
      - name
      - description
      - container_id
      - input_type
      - status
      - error_message
      - scw_sqs_config
      - scw_nats_config
  securitySchemes:
    scaleway:
      in: header
      name: X-Auth-Token
      type: apiKey
paths:
  /containers/v1beta1/regions/{region}/containers:
    get:
      tags:
      - Containers
      operationId: ListContainers
      summary: List all your containers
      description: List all containers for a specified region.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: query
        name: page
        description: Page number.
        schema:
          type: integer
          description: Page number.
          format: int32
      - in: query
        name: page_size
        description: Number of containers per page.
        schema:
          type: integer
          description: Number of containers per page.
          format: uint32
      - in: query
        name: order_by
        description: Order of the containers.
        schema:
          type: string
          description: Order of the containers.
          enum:
          - created_at_asc
          - created_at_desc
          - name_asc
          - name_desc
          default: created_at_asc
      - in: query
        name: namespace_id
        description: UUID of the namespace the container belongs to.
        required: true
        schema:
          type: string
          description: UUID of the namespace the container belongs to.
      - in: query
        name: name
        description: Name of the container.
        schema:
          type: string
          description: Name of the container.
      - in: query
        name: organization_id
        description: UUID of the Organization the container belongs to.
        schema:
          type: string
          description: UUID of the Organization the container belongs to.
      - in: query
        name: project_id
        description: UUID of the Project the container belongs to.
        schema:
          type: string
          description: UUID of the Project the container belongs to.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.ListContainersResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/containers?namespace_id=string"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/containers/v1beta1/regions/fr-par/containers" \
            X-Auth-Token:$SCW_SECRET_KEY \
            namespace_id==string
    post:
      tags:
      - Containers
      operationId: CreateContainer
      summary: Create a new container
      description: Create a new container in the specified region.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Container'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                namespace_id:
                  type: string
                  description: UUID of the namespace the container belongs to.
                name:
                  type: string
                  description: Name of the container.
                environment_variables:
                  type: object
                  description: Environment variables of the container.
                  properties:
                    <key>:
                      type: string
                  nullable: true
                min_scale:
                  type: integer
                  description: Minimum number of instances to scale the container
                    to.
                  format: uint32
                  nullable: true
                max_scale:
                  type: integer
                  description: Maximum number of instances to scale the container
                    to.
                  format: uint32
                  nullable: true
                memory_limit:
                  type: integer
                  description: Memory limit of the container in MB.
                  format: uint32
                  nullable: true
                cpu_limit:
                  type: integer
                  description: CPU limit of the container in mvCPU.
                  format: uint32
                  nullable: true
                timeout:
                  type: string
                  description: Processing time limit for the container. (in seconds)
                  example: 2.5s
                  nullable: true
                privacy:
                  type: string
                  description: Privacy setting of the container.
                  enum:
                  - unknown_privacy
                  - public
                  - private
                  default: unknown_privacy
                description:
                  type: string
                  description: Description of the container.
                  nullable: true
                registry_image:
                  type: string
                  description: Name of the registry image (e.g. "rg.fr-par.scw.cloud/something/image:tag").
                  nullable: true
                max_concurrency:
                  type: integer
                  description: Number of maximum concurrent executions of the container.
                  deprecated: true
                  format: uint32
                  nullable: true
                protocol:
                  type: string
                  description: Protocol the container uses.
                  enum:
                  - unknown_protocol
                  - http1
                  - h2c
                  default: unknown_protocol
                port:
                  type: integer
                  description: Port the container listens on.
                  format: uint32
                  nullable: true
                secret_environment_variables:
                  type: array
                  description: Secret environment variables of the container.
                  items:
                    $ref: '#/components/schemas/scaleway.containers.v1beta1.Secret'
                http_option:
                  type: string
                  description: |-
                    Configure how HTTP and HTTPS requests are handled.
                    Possible values:
                     - redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
                     - enabled: Serve both HTTP and HTTPS traffic.
                  enum:
                  - unknown_http_option
                  - enabled
                  - redirected
                  default: enabled
                sandbox:
                  type: string
                  description: Execution environment of the container.
                  enum:
                  - unknown_sandbox
                  - v1
                  - v2
                  x-enum-descriptions:
                    values:
                      unknown_sandbox: Unknown sandbox
                      v1: Legacy sandboxing with slower cold starts. Fully supports
                        the Linux system call interface
                      v2: Recommended sandboxing with faster cold starts
                  default: unknown_sandbox
                local_storage_limit:
                  type: integer
                  description: Local storage limit of the container (in MB).
                  format: uint32
                  nullable: true
                scaling_option:
                  type: object
                  description: |-
                    Configuration used to decide when to scale up or down.
                    Possible values:
                    - concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.
                    - cpu_usage_threshold: Scale depending on the CPU usage of a container instance.
                    - memory_usage_threshold: Scale depending on the memory usage of a container instance.
                  properties:
                    concurrent_requests_threshold:
                      type: integer
                      format: uint32
                      nullable: true
                      x-one-of: scaling_rule
                    cpu_usage_threshold:
                      type: integer
                      format: uint32
                      nullable: true
                      x-one-of: scaling_rule
                    memory_usage_threshold:
                      type: integer
                      format: uint32
                      nullable: true
                      x-one-of: scaling_rule
                  x-properties-order:
                  - concurrent_requests_threshold
                  - cpu_usage_threshold
                  - memory_usage_threshold
                health_check:
                  type: object
                  description: Health check configuration of the container.
                  properties:
                    http:
                      type: object
                      description: HTTP health check configuration.
                      properties:
                        path:
                          type: string
                          description: Path to use for the HTTP health check.
                      nullable: true
                      x-properties-order:
                      - path
                      x-one-of: probe
                    tcp:
                      type: object
                      description: TCP health check configuration.
                      nullable: true
                      x-one-of: probe
                    failure_threshold:
                      type: integer
                      description: "Number of consecutive health check failures before
                        considering the container unhealthy.\nDuring a deployment,
                        if a newly created container fails to pass the health check,
                        the deployment is aborted. \nAs a result, lowering this value
                        can help to reduce the time it takes to detect a failed deployment."
                      format: uint32
                    interval:
                      type: string
                      description: Period between health checks. (in seconds)
                      example: 2.5s
                      nullable: true
                  x-properties-order:
                  - http
                  - tcp
                  - failure_threshold
                  - interval
              x-properties-order:
              - namespace_id
              - name
              - environment_variables
              - min_scale
              - max_scale
              - memory_limit
              - cpu_limit
              - timeout
              - privacy
              - description
              - registry_image
              - max_concurrency
              - protocol
              - port
              - secret_environment_variables
              - http_option
              - sandbox
              - local_storage_limit
              - scaling_option
              - health_check
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"name":"string","namespace_id":"string"}' \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/containers"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/containers/v1beta1/regions/fr-par/containers" \
            X-Auth-Token:$SCW_SECRET_KEY \
            name="string" \
            namespace_id="string"
  /containers/v1beta1/regions/{region}/containers/{container_id}:
    get:
      tags:
      - Containers
      operationId: GetContainer
      summary: Get a container
      description: Get the container associated with the specified ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: container_id
        description: UUID of the container to get.
        required: true
        schema:
          type: string
          description: UUID of the container to get.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Container'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/containers/{container_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/containers/v1beta1/regions/fr-par/containers/{container_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Containers
      operationId: UpdateContainer
      summary: Update an existing container
      description: Update the container associated with the specified ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: container_id
        description: UUID of the container to update.
        required: true
        schema:
          type: string
          description: UUID of the container to update.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Container'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                environment_variables:
                  type: object
                  description: Environment variables of the container.
                  properties:
                    <key>:
                      type: string
                  nullable: true
                min_scale:
                  type: integer
                  description: Minimum number of instances to scale the container
                    to.
                  format: uint32
                  nullable: true
                max_scale:
                  type: integer
                  description: Maximum number of instances to scale the container
                    to.
                  format: uint32
                  nullable: true
                memory_limit:
                  type: integer
                  description: Memory limit of the container in MB.
                  format: uint32
                  nullable: true
                cpu_limit:
                  type: integer
                  description: CPU limit of the container in mvCPU.
                  format: uint32
                  nullable: true
                timeout:
                  type: string
                  description: Processing time limit for the container. (in seconds)
                  example: 2.5s
                  nullable: true
                redeploy:
                  type: boolean
                  description: Defines whether to redeploy failed containers.
                  nullable: true
                privacy:
                  type: string
                  description: Privacy settings of the container.
                  enum:
                  - unknown_privacy
                  - public
                  - private
                  default: unknown_privacy
                description:
                  type: string
                  description: Description of the container.
                  nullable: true
                registry_image:
                  type: string
                  description: Name of the registry image (e.g. "rg.fr-par.scw.cloud/something/image:tag").
                  nullable: true
                max_concurrency:
                  type: integer
                  description: Number of maximum concurrent executions of the container.
                  deprecated: true
                  format: uint32
                  nullable: true
                protocol:
                  $ref: '#/components/schemas/scaleway.containers.v1beta1.Container.Protocol'
                port:
                  $ref: '#/components/schemas/google.protobuf.UInt32Value'
                secret_environment_variables:
                  type: array
                  items:
                    $ref: '#/components/schemas/scaleway.containers.v1beta1.Secret'
                http_option:
                  type: string
                  description: |-
                    Configure how HTTP and HTTPS requests are handled.
                    Possible values:
                     - redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
                     - enabled: Serve both HTTP and HTTPS traffic.
                  enum:
                  - unknown_http_option
                  - enabled
                  - redirected
                  default: unknown_http_option
                sandbox:
                  type: string
                  description: Execution environment of the container.
                  enum:
                  - unknown_sandbox
                  - v1
                  - v2
                  x-enum-descriptions:
                    values:
                      unknown_sandbox: Unknown sandbox
                      v1: Legacy sandboxing with slower cold starts. Fully supports
                        the Linux system call interface
                      v2: Recommended sandboxing with faster cold starts
                  default: unknown_sandbox
                local_storage_limit:
                  type: integer
                  description: Local storage limit of the container (in MB).
                  format: uint32
                  nullable: true
                scaling_option:
                  type: object
                  description: |-
                    Configuration used to decide when to scale up or down.
                    Possible values:
                    - concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.
                    - cpu_usage_threshold: Scale depending on the CPU usage of a container instance.
                    - memory_usage_threshold: Scale depending on the memory usage of a container instance.
                  properties:
                    concurrent_requests_threshold:
                      type: integer
                      format: uint32
                      nullable: true
                      x-one-of: scaling_rule
                    cpu_usage_threshold:
                      type: integer
                      format: uint32
                      nullable: true
                      x-one-of: scaling_rule
                    memory_usage_threshold:
                      type: integer
                      format: uint32
                      nullable: true
                      x-one-of: scaling_rule
                  x-properties-order:
                  - concurrent_requests_threshold
                  - cpu_usage_threshold
                  - memory_usage_threshold
                health_check:
                  type: object
                  description: Health check configuration of the container.
                  properties:
                    http:
                      type: object
                      description: HTTP health check configuration.
                      properties:
                        path:
                          type: string
                          description: Path to use for the HTTP health check.
                      nullable: true
                      x-properties-order:
                      - path
                      x-one-of: probe
                    tcp:
                      type: object
                      description: TCP health check configuration.
                      nullable: true
                      x-one-of: probe
                    failure_threshold:
                      type: integer
                      description: "Number of consecutive health check failures before
                        considering the container unhealthy.\nDuring a deployment,
                        if a newly created container fails to pass the health check,
                        the deployment is aborted. \nAs a result, lowering this value
                        can help to reduce the time it takes to detect a failed deployment."
                      format: uint32
                    interval:
                      type: string
                      description: Period between health checks. (in seconds)
                      example: 2.5s
                      nullable: true
                  x-properties-order:
                  - http
                  - tcp
                  - failure_threshold
                  - interval
              x-properties-order:
              - environment_variables
              - min_scale
              - max_scale
              - memory_limit
              - cpu_limit
              - timeout
              - redeploy
              - privacy
              - description
              - registry_image
              - max_concurrency
              - protocol
              - port
              - secret_environment_variables
              - http_option
              - sandbox
              - local_storage_limit
              - scaling_option
              - health_check
      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/containers/v1beta1/regions/fr-par/containers/{container_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/containers/v1beta1/regions/fr-par/containers/{container_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Containers
      operationId: DeleteContainer
      summary: Delete a container
      description: Delete the container associated with the specified ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: container_id
        description: UUID of the container to delete.
        required: true
        schema:
          type: string
          description: UUID of the container to delete.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Container'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/containers/{container_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/containers/v1beta1/regions/fr-par/containers/{container_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /containers/v1beta1/regions/{region}/containers/{container_id}/deploy:
    post:
      tags:
      - Containers
      operationId: DeployContainer
      summary: Deploy a container
      description: Deploy a container associated with the specified ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: container_id
        description: UUID of the container to deploy.
        required: true
        schema:
          type: string
          description: UUID of the container to deploy.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Container'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/containers/{container_id}/deploy"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/containers/v1beta1/regions/fr-par/containers/{container_id}/deploy" \
            X-Auth-Token:$SCW_SECRET_KEY
  /containers/v1beta1/regions/{region}/crons:
    get:
      tags:
      - Crons
      operationId: ListCrons
      summary: List all your crons
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: query
        name: page
        description: Page number.
        schema:
          type: integer
          description: Page number.
          format: int32
      - in: query
        name: page_size
        description: Number of crons per page.
        schema:
          type: integer
          description: Number of crons per page.
          format: uint32
      - in: query
        name: order_by
        description: Order of the crons.
        schema:
          type: string
          description: Order of the crons.
          enum:
          - created_at_asc
          - created_at_desc
          default: created_at_asc
      - in: query
        name: container_id
        description: UUID of the container invoked by the cron.
        required: true
        schema:
          type: string
          description: UUID of the container invoked by the cron.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.ListCronsResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/crons?container_id=string"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/containers/v1beta1/regions/fr-par/crons" \
            X-Auth-Token:$SCW_SECRET_KEY \
            container_id==string
    post:
      tags:
      - Crons
      operationId: CreateCron
      summary: Create a new cron
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Cron'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                container_id:
                  type: string
                  description: UUID of the container to invoke by the cron.
                schedule:
                  type: string
                  description: UNIX cron shedule.
                args:
                  type: object
                  description: Arguments to pass with the cron.
                  properties:
                    <fieldKey>:
                      type: object
                name:
                  type: string
                  description: Name of the cron to create.
                  nullable: true
              x-properties-order:
              - container_id
              - schedule
              - args
              - name
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"container_id":"string","schedule":"string"}' \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/crons"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/containers/v1beta1/regions/fr-par/crons" \
            X-Auth-Token:$SCW_SECRET_KEY \
            container_id="string" \
            schedule="string"
  /containers/v1beta1/regions/{region}/crons/{cron_id}:
    get:
      tags:
      - Crons
      operationId: GetCron
      summary: Get a cron
      description: Get the cron associated with the specified ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: cron_id
        description: UUID of the cron to get.
        required: true
        schema:
          type: string
          description: UUID of the cron to get.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Cron'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/crons/{cron_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/containers/v1beta1/regions/fr-par/crons/{cron_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Crons
      operationId: UpdateCron
      summary: Update an existing cron
      description: Update the cron associated with the specified ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: cron_id
        description: UUID of the cron to update.
        required: true
        schema:
          type: string
          description: UUID of the cron to update.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Cron'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                container_id:
                  type: string
                  description: UUID of the container invoked by the cron.
                  nullable: true
                schedule:
                  type: string
                  description: UNIX cron schedule.
                  nullable: true
                args:
                  type: object
                  description: Arguments to pass with the cron.
                  properties:
                    <fieldKey>:
                      type: object
                name:
                  type: string
                  description: Name of the cron.
                  nullable: true
              x-properties-order:
              - container_id
              - schedule
              - args
              - name
      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/containers/v1beta1/regions/fr-par/crons/{cron_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/containers/v1beta1/regions/fr-par/crons/{cron_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Crons
      operationId: DeleteCron
      summary: Delete an existing cron
      description: Delete the cron associated with the specified ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: cron_id
        description: UUID of the cron to delete.
        required: true
        schema:
          type: string
          description: UUID of the cron to delete.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Cron'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/crons/{cron_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/containers/v1beta1/regions/fr-par/crons/{cron_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /containers/v1beta1/regions/{region}/domains:
    get:
      tags:
      - Domains
      operationId: ListDomains
      summary: List all custom domains
      description: List all custom domains in a specified region.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: query
        name: page
        description: Page number.
        schema:
          type: integer
          description: Page number.
          format: int32
      - in: query
        name: page_size
        description: Number of domains per page.
        schema:
          type: integer
          description: Number of domains per page.
          format: uint32
      - in: query
        name: order_by
        description: Order of the domains.
        schema:
          type: string
          description: Order of the domains.
          enum:
          - created_at_asc
          - created_at_desc
          - hostname_asc
          - hostname_desc
          default: created_at_asc
      - in: query
        name: container_id
        description: UUID of the container the domain belongs to.
        required: true
        schema:
          type: string
          description: UUID of the container the domain belongs to.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.ListDomainsResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/domains?container_id=string"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/containers/v1beta1/regions/fr-par/domains" \
            X-Auth-Token:$SCW_SECRET_KEY \
            container_id==string
    post:
      tags:
      - Domains
      operationId: CreateDomain
      summary: Create a custom domain
      description: Create a custom domain for the container with the specified ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Domain'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                hostname:
                  type: string
                  description: Domain to assign.
                container_id:
                  type: string
                  description: UUID of the container to assign the domain to.
              x-properties-order:
              - hostname
              - container_id
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"container_id":"string","hostname":"string"}' \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/domains"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/containers/v1beta1/regions/fr-par/domains" \
            X-Auth-Token:$SCW_SECRET_KEY \
            container_id="string" \
            hostname="string"
  /containers/v1beta1/regions/{region}/domains/{domain_id}:
    get:
      tags:
      - Domains
      operationId: GetDomain
      summary: Get a custom domain
      description: Get a custom domain for the container with the specified ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: domain_id
        description: UUID of the domain to get.
        required: true
        schema:
          type: string
          description: UUID of the domain to get.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Domain'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/domains/{domain_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/containers/v1beta1/regions/fr-par/domains/{domain_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Domains
      operationId: DeleteDomain
      summary: Delete a custom domain
      description: Delete the custom domain with the specific ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: domain_id
        description: UUID of the domain to delete.
        required: true
        schema:
          type: string
          description: UUID of the domain to delete.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Domain'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/domains/{domain_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/containers/v1beta1/regions/fr-par/domains/{domain_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /containers/v1beta1/regions/{region}/namespaces:
    get:
      tags:
      - Namespaces
      operationId: ListNamespaces
      summary: List all your namespaces
      description: List all namespaces in a specified region.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: query
        name: page
        description: Page number.
        schema:
          type: integer
          description: Page number.
          format: int32
      - in: query
        name: page_size
        description: Number of namespaces per page.
        schema:
          type: integer
          description: Number of namespaces per page.
          format: uint32
      - in: query
        name: order_by
        description: Order of the namespaces.
        schema:
          type: string
          description: Order of the namespaces.
          enum:
          - created_at_asc
          - created_at_desc
          - name_asc
          - name_desc
          default: created_at_asc
      - in: query
        name: name
        description: Name of the namespaces.
        schema:
          type: string
          description: Name of the namespaces.
      - in: query
        name: organization_id
        description: UUID of the Organization the namespace belongs to.
        schema:
          type: string
          description: UUID of the Organization the namespace belongs to.
      - in: query
        name: project_id
        description: UUID of the Project the namespace belongs to.
        schema:
          type: string
          description: UUID of the Project the namespace belongs to.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.ListNamespacesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/namespaces"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/containers/v1beta1/regions/fr-par/namespaces" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Namespaces
      operationId: CreateNamespace
      summary: Create a new namespace
      description: Create a new namespace in a specified region.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Namespace'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Name of the namespace to create.
                environment_variables:
                  type: object
                  description: Environment variables of the namespace to create.
                  properties:
                    <key>:
                      type: string
                  nullable: true
                project_id:
                  type: string
                  description: UUID of the Project in which the namespace will be
                    created.
                description:
                  type: string
                  description: Description of the namespace to create.
                  nullable: true
                secret_environment_variables:
                  type: array
                  description: Secret environment variables of the namespace to create.
                  items:
                    $ref: '#/components/schemas/scaleway.containers.v1beta1.Secret'
                tags:
                  type: array
                  description: '[ALPHA] Tags of the Serverless Container Namespace.'
                  items:
                    type: string
              x-properties-order:
              - name
              - environment_variables
              - project_id
              - description
              - secret_environment_variables
              - tags
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"name":"string","project_id":"string"}' \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/namespaces"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/containers/v1beta1/regions/fr-par/namespaces" \
            X-Auth-Token:$SCW_SECRET_KEY \
            name="string" \
            project_id="string"
  /containers/v1beta1/regions/{region}/namespaces/{namespace_id}:
    get:
      tags:
      - Namespaces
      operationId: GetNamespace
      summary: Get a namespace
      description: Get the namespace associated with the specified ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: namespace_id
        description: UUID of the namespace to get.
        required: true
        schema:
          type: string
          description: UUID of the namespace to get.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Namespace'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/namespaces/{namespace_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/containers/v1beta1/regions/fr-par/namespaces/{namespace_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Namespaces
      operationId: UpdateNamespace
      summary: Update an existing namespace
      description: Update the space associated with the specified ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: namespace_id
        description: UUID of the namespace to update.
        required: true
        schema:
          type: string
          description: UUID of the namespace to update.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Namespace'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                environment_variables:
                  type: object
                  description: Environment variables of the namespace to update.
                  properties:
                    <key>:
                      type: string
                  nullable: true
                description:
                  type: string
                  description: Description of the namespace to update.
                  nullable: true
                secret_environment_variables:
                  type: array
                  description: Secret environment variables of the namespace to update.
                  items:
                    $ref: '#/components/schemas/scaleway.containers.v1beta1.Secret'
                tags:
                  type: array
                  description: '[ALPHA] Tags of the Serverless Container Namespace.'
                  nullable: true
                  items:
                    type: string
              x-properties-order:
              - environment_variables
              - description
              - secret_environment_variables
              - tags
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X PATCH \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/namespaces/{namespace_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/containers/v1beta1/regions/fr-par/namespaces/{namespace_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Namespaces
      operationId: DeleteNamespace
      summary: Delete an existing namespace
      description: Delete the namespace associated with the specified ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: namespace_id
        description: UUID of the namespace to delete.
        required: true
        schema:
          type: string
          description: UUID of the namespace to delete.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Namespace'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/namespaces/{namespace_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/containers/v1beta1/regions/fr-par/namespaces/{namespace_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /containers/v1beta1/regions/{region}/tokens:
    get:
      tags:
      - Tokens
      operationId: ListTokens
      summary: List all tokens
      description: List all tokens belonging to a specified Organization or Project.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: query
        name: page
        description: Page number.
        schema:
          type: integer
          description: Page number.
          format: int32
      - in: query
        name: page_size
        description: Number of tokens per page.
        schema:
          type: integer
          description: Number of tokens per page.
          format: uint32
      - in: query
        name: order_by
        description: Order of the tokens.
        schema:
          type: string
          description: Order of the tokens.
          enum:
          - created_at_asc
          - created_at_desc
          default: created_at_asc
      - in: query
        name: container_id
        description: UUID of the container the token belongs to.
        schema:
          type: string
          description: UUID of the container the token belongs to.
      - in: query
        name: namespace_id
        description: UUID of the namespace the token belongs to.
        schema:
          type: string
          description: UUID of the namespace the token belongs to.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.ListTokensResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/tokens"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/containers/v1beta1/regions/fr-par/tokens" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Tokens
      operationId: CreateToken
      summary: Create a new revocable token
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Token'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                container_id:
                  type: string
                  description: UUID of the container to create the token for.
                  nullable: true
                  x-one-of: scope
                namespace_id:
                  type: string
                  description: UUID of the namespace to create the token for.
                  nullable: true
                  x-one-of: scope
                description:
                  type: string
                  description: Description of the token.
                  nullable: true
                expires_at:
                  type: string
                  description: Expiry date of the token. (RFC 3339 format)
                  format: date-time
                  example: "2022-03-22T12:34:56.123456Z"
                  nullable: true
              x-properties-order:
              - container_id
              - namespace_id
              - description
              - expires_at
      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/containers/v1beta1/regions/fr-par/tokens"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/containers/v1beta1/regions/fr-par/tokens" \
            X-Auth-Token:$SCW_SECRET_KEY
  /containers/v1beta1/regions/{region}/tokens/{token_id}:
    get:
      tags:
      - Tokens
      operationId: GetToken
      summary: Get a token
      description: Get a token with a specified ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: token_id
        description: UUID of the token to get.
        required: true
        schema:
          type: string
          description: UUID of the token to get.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Token'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/tokens/{token_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/containers/v1beta1/regions/fr-par/tokens/{token_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Tokens
      operationId: DeleteToken
      summary: Delete a token
      description: Delete a token with a specified ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: token_id
        description: UUID of the token to delete.
        required: true
        schema:
          type: string
          description: UUID of the token to delete.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Token'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/tokens/{token_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/containers/v1beta1/regions/fr-par/tokens/{token_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /containers/v1beta1/regions/{region}/triggers:
    get:
      tags:
      - Triggers
      operationId: ListTriggers
      summary: List all triggers
      description: List all triggers belonging to a specified Organization or Project.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: query
        name: page
        description: Page number to return.
        schema:
          type: integer
          description: Page number to return.
          format: int32
      - in: query
        name: page_size
        description: Maximum number of triggers to return per page.
        schema:
          type: integer
          description: Maximum number of triggers to return per page.
          format: uint32
      - in: query
        name: order_by
        description: Order in which to return results.
        schema:
          type: string
          description: Order in which to return results.
          enum:
          - created_at_asc
          - created_at_desc
          x-enum-descriptions:
            values:
              created_at_asc: Order by creation date ascending
              created_at_desc: Order by creation date descending
          default: created_at_asc
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.ListTriggersResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/triggers"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/containers/v1beta1/regions/fr-par/triggers" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Triggers
      operationId: CreateTrigger
      summary: Create a trigger
      description: Create a new trigger for a specified container.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Trigger'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Name of the trigger.
                container_id:
                  type: string
                  description: ID of the container to trigger.
                description:
                  type: string
                  description: Description of the trigger.
                  nullable: true
                scw_sqs_config:
                  type: object
                  description: Configuration for a Scaleway Messaging and Queuing
                    SQS queue.
                  properties:
                    queue:
                      type: string
                      description: Name of the SQS queue the trigger should listen
                        to.
                    mnq_project_id:
                      type: string
                      description: |-
                        ID of the Messaging and Queuing project.
                        You must have activated SQS on this project.
                    mnq_region:
                      type: string
                      description: |-
                        Region in which the Messaging and Queuing project is activated.
                        Currently, only the `fr-par` and `nl-ams` regions are available.
                  nullable: true
                  required:
                  - queue
                  - mnq_project_id
                  - mnq_region
                  x-properties-order:
                  - queue
                  - mnq_project_id
                  - mnq_region
                  x-one-of: config
                scw_nats_config:
                  type: object
                  description: Configuration for a Scaleway Messaging and Queuing
                    NATS subject.
                  properties:
                    subject:
                      type: string
                      description: Name of the NATS subject the trigger should listen
                        to.
                    mnq_nats_account_id:
                      type: string
                      description: ID of the Messaging and Queuing NATS account.
                    mnq_project_id:
                      type: string
                      description: ID of the Messaging and Queuing project.
                    mnq_region:
                      type: string
                      description: |-
                        Region in which the Messaging and Queuing project is activated.
                        Currently, only the `fr-par` and `nl-ams` regions are available.
                  nullable: true
                  required:
                  - subject
                  - mnq_nats_account_id
                  - mnq_region
                  x-properties-order:
                  - subject
                  - mnq_nats_account_id
                  - mnq_project_id
                  - mnq_region
                  x-one-of: config
              required:
              - name
              - container_id
              x-properties-order:
              - name
              - container_id
              - description
              - scw_sqs_config
              - scw_nats_config
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"container_id":"string","name":"string"}' \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/triggers"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/containers/v1beta1/regions/fr-par/triggers" \
            X-Auth-Token:$SCW_SECRET_KEY \
            container_id="string" \
            name="string"
  /containers/v1beta1/regions/{region}/triggers/{trigger_id}:
    get:
      tags:
      - Triggers
      operationId: GetTrigger
      summary: Get a trigger
      description: Get a trigger with a specified ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: trigger_id
        description: ID of the trigger to get.
        required: true
        schema:
          type: string
          description: ID of the trigger to get.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Trigger'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/triggers/{trigger_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/containers/v1beta1/regions/fr-par/triggers/{trigger_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Triggers
      operationId: UpdateTrigger
      summary: Update a trigger
      description: Update a trigger with a specified ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: trigger_id
        description: ID of the trigger to update.
        required: true
        schema:
          type: string
          description: ID of the trigger to update.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Trigger'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Name of the trigger.
                  nullable: true
                description:
                  type: string
                  description: Description of the trigger.
                  nullable: true
              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/containers/v1beta1/regions/fr-par/triggers/{trigger_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/containers/v1beta1/regions/fr-par/triggers/{trigger_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Triggers
      operationId: DeleteTrigger
      summary: Delete a trigger
      description: Delete a trigger with a specified ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: trigger_id
        description: ID of the trigger to delete.
        required: true
        schema:
          type: string
          description: ID of the trigger to delete.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.containers.v1beta1.Trigger'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/containers/v1beta1/regions/fr-par/triggers/{trigger_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/containers/v1beta1/regions/fr-par/triggers/{trigger_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
