openapi: 3.1.0
info:
  title: Clusters for Apache Kafka®
  description: |-
    Clusters for Apache Kafka® is Scaleway's product to provide a secure, fully-managed infrastructure for your Apache Kafka® deployments. With our clusters, you can create data pipelines and event-driven architectures that run natively on Apache Kafka®, without having to manage the underlying infrastructure.

    The product is currently in Public Beta.




    ## Concepts

    Refer to our [dedicated concepts page](https://www.scaleway.com/en/docs/clusters-for-kafka/concepts/) to find definitions of the different terms referring to Clusters for Apache Kafka®.




    ## Quickstart

    1. Configure your environment variables.

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

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

    2. **Create a cluster**: Run the following command to create a cluster with a node on each AZ (3 nodes by default) with 20GB storage capacity per node. You can customize the details in the payload to your needs, using the table below to help. Note that you will need to have a [VPC and a Private Network](https://www.scaleway.com/en/developers/api/vpc/) before running this command.

        ```bash
        curl -X POST \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          -H "Content-Type: application/json" \
          -d '{
            "version": "4.0.0",
            "node_amount": 3,
            "multi_az": {},
            "name": "MyCluster",
            "user_name": "MyUser
            "password": "MySecurePassword",
            "project_id": $SCW_PROJECT_ID,
            "volume": {
                "size_bytes": 20000000000,
                "type": "sbs_5k"
            },
            "endpoints": [
                {
                    "private_network": {
                        "private_network_id": {Your PN ID}
                    }
                }
            ]
          }' \
          "https://api.scaleway.com/kafka/v1alpha1/regions/fr-par/clusters"
        ```

    3. **Get a list of your clusters**: Run the following command to get a list of all the clusters in your account, with their details:

        ```bash
        curl -X GET \
          -H "Content-Type: application/json" \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          "https://api.scaleway.com/kafka/v1alpha1/regions/fr-par/clusters"
        ```

    4. **Delete your cluster**: Run the following command to delete a cluster. Ensure that you replace `{resource-id}` in the URL with the ID of the cluster you want to delete.

        ```bash
        curl -X DELETE \
          -H "Content-Type: application/json" \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          "https://api.scaleway.com/kafka/v1alpha1/regions/fr-par/clusters/{resource-id}"
        ```
    ## Technical information

    ### Regions

    Scaleway's infrastructure spans different [regions and Availability Zones](https://www.scaleway.com/en/docs/account/reference-content/products-availability/).

    Clusters for Apache Kafka is currently available in the Paris region, which is represented by the following path parameter:

    - fr-par

    ## Technical limitations

    Find out about product limitations in our [FAQ](https://www.scaleway.com/en/docs/clusters-for-kafka/faq/#what-limitations-apply-during-the-public-beta).



    ## Going further

    For more information about Clusters for Apache Kafka®, you can check out the following pages:

    * [Clusters for Apache Kafka® Documentation](https://www.scaleway.com/en/docs/clusters-for-kafka/)
    * [Contact our support team](https://console.scaleway.com/support/tickets).
  version: v1alpha1
servers:
- url: https://api.scaleway.com
tags:
- name: Kafka Clusters
  description: |
    A Kafka cluster is composed of one or multiple dedicated compute nodes running a single Kafka broker.
- name: Node Types
  description: |
    Two node type ranges are available:

    * **Shared:** a complete and highly reliable node range with shared resources, made for scaling from development to production needs, at affordable prices.
    * **Dedicated:** Kafka nodes with dedicated vCPU for the most demanding workloads and mission-critical applications.
- name: Kafka Versions
  description: |
    A version of Apache Kafka®.
- name: Kafka Cluster Endpoints
  description: |
    Cluster endpoints enable connection to your cluster.
- name: Kafka Users
  description: |
    Kafka users enable authentication to your cluster.
components:
  schemas:
    scaleway.kafka.v1alpha1.Cluster:
      type: object
      properties:
        id:
          type: string
          description: UUID of the Kafka cluster. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        name:
          type: string
          description: Name of the Kafka cluster.
        project_id:
          type: string
          description: Project ID the Kafka cluster belongs to. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        organization_id:
          type: string
          description: Organisation ID the Kafka cluster belongs to. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        status:
          type: string
          description: Status of the Kafka cluster.
          enum:
          - unknown_status
          - ready
          - creating
          - configuring
          - deleting
          - error
          - locked
          - stopped
          - upgrading
          default: unknown_status
        version:
          type: string
          description: Kafka version of the Kafka cluster.
        tags:
          type: array
          description: List of tags applied to the Kafka cluster.
          items:
            type: string
        settings:
          type: array
          description: Advanced settings of the Kafka cluster.
          items:
            $ref: '#/components/schemas/scaleway.kafka.v1alpha1.Cluster.Setting'
        node_amount:
          type: integer
          description: Number of nodes in Kafka cluster.
          format: uint32
        node_type:
          type: string
          description: Node type of the Kafka cluster.
        volume:
          type: object
          description: Volumes of the Kafka cluster.
          properties:
            type:
              type: string
              description: Type of volume where data is stored.
              enum:
              - unknown_type
              - sbs_5k
              - sbs_15k
              default: unknown_type
            size_bytes:
              type: integer
              description: Volume size. (in bytes)
              format: uint64
          x-properties-order:
          - type
          - size_bytes
        endpoints:
          type: array
          description: List of Kafka cluster endpoints.
          items:
            $ref: '#/components/schemas/scaleway.kafka.v1alpha1.Endpoint'
        created_at:
          type: string
          description: Creation date (must follow the ISO 8601 format). (RFC 3339
            format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        updated_at:
          type: string
          description: Last update date (must follow the ISO 8601 format). (RFC 3339
            format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        region:
          type: string
          description: Region the Kafka cluster is in.
        multi_az:
          type: object
          description: MultiAZ tell the cluster is deployed on multiple availability
            zones in the region.
          nullable: true
          x-one-of: availability
        mono_az:
          type: object
          description: MonoAZ details.
          properties:
            zone:
              type: string
              description: Zone is the zone on which the cluster nodes are deployed.
              nullable: true
          nullable: true
          x-properties-order:
          - zone
          x-one-of: availability
      x-properties-order:
      - id
      - name
      - project_id
      - organization_id
      - status
      - version
      - tags
      - settings
      - node_amount
      - node_type
      - volume
      - endpoints
      - created_at
      - updated_at
      - region
      - multi_az
      - mono_az
    scaleway.kafka.v1alpha1.Cluster.Setting:
      type: object
      properties:
        name:
          type: string
          description: Name of the setting.
        bool_value:
          type: boolean
          description: Boolean value of the setting.
          nullable: true
          x-one-of: value
        string_value:
          type: string
          description: String value of the setting.
          nullable: true
          x-one-of: value
        int_value:
          type: integer
          description: Integer value of the setting.
          format: int32
          nullable: true
          x-one-of: value
        float_value:
          type: number
          description: Float value of the setting.
          format: float
          nullable: true
          x-one-of: value
      x-properties-order:
      - name
      - bool_value
      - string_value
      - int_value
      - float_value
    scaleway.kafka.v1alpha1.Endpoint:
      type: object
      properties:
        id:
          type: string
          description: UUID of the endpoint. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        dns_records:
          type: array
          description: List of DNS records of the endpoint.
          items:
            type: string
        port:
          type: integer
          description: TCP port of the endpoint.
          format: uint32
        private_network:
          type: object
          description: Private Network endpoint details.
          properties:
            private_network_id:
              type: string
              description: UUID of the Private Network. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
          nullable: true
          x-properties-order:
          - private_network_id
          x-one-of: details
        public_network:
          type: object
          description: Public endpoint details.
          nullable: true
          x-one-of: details
      x-properties-order:
      - id
      - dns_records
      - port
      - private_network
      - public_network
    scaleway.kafka.v1alpha1.EndpointSpec:
      type: object
      properties:
        public_network:
          type: object
          nullable: true
          x-one-of: details
        private_network:
          type: object
          properties:
            private_network_id:
              type: string
              description: UUID of the Private Network.
          nullable: true
          x-properties-order:
          - private_network_id
          x-one-of: details
      x-properties-order:
      - public_network
      - private_network
    scaleway.kafka.v1alpha1.ListClustersResponse:
      type: object
      properties:
        clusters:
          type: array
          description: List of all Kafka cluster available in an Organization or Project.
          items:
            $ref: '#/components/schemas/scaleway.kafka.v1alpha1.Cluster'
        total_count:
          type: integer
          description: Total count of Kafka cluster available in an Organization or
            Project.
          format: uint64
      x-properties-order:
      - clusters
      - total_count
    scaleway.kafka.v1alpha1.ListNodeTypesResponse:
      type: object
      properties:
        node_types:
          type: array
          description: Types of the node.
          items:
            $ref: '#/components/schemas/scaleway.kafka.v1alpha1.NodeType'
        total_count:
          type: integer
          description: Total count of node types available.
          format: uint64
      x-properties-order:
      - node_types
      - total_count
    scaleway.kafka.v1alpha1.ListUsersRequest.OrderBy:
      type: string
      enum:
      - name_asc
      - name_desc
      default: name_asc
    scaleway.kafka.v1alpha1.ListUsersResponse:
      type: object
      properties:
        users:
          type: array
          items:
            $ref: '#/components/schemas/scaleway.kafka.v1alpha1.User'
        total_count:
          type: integer
          format: uint64
      x-properties-order:
      - users
      - total_count
    scaleway.kafka.v1alpha1.ListVersionsResponse:
      type: object
      properties:
        versions:
          type: array
          description: Available Kafka versions.
          items:
            $ref: '#/components/schemas/scaleway.kafka.v1alpha1.Version'
        total_count:
          type: integer
          description: Total count of Kafka versions available.
          format: uint64
      x-properties-order:
      - versions
      - total_count
    scaleway.kafka.v1alpha1.NodeType:
      type: object
      properties:
        name:
          type: string
          description: Node type name identifier.
        stock_status:
          type: string
          description: Current stock status for the node type.
          enum:
          - unknown_stock
          - low_stock
          - out_of_stock
          - available
          default: unknown_stock
        description:
          type: string
          description: Current specifications of the node type offer.
        vcpus:
          type: integer
          description: Number of virtual CPUs of the node type.
          format: uint32
        memory_bytes:
          type: integer
          description: Quantity of RAM. (in bytes)
          format: uint64
        available_volume_types:
          type: array
          description: Available storage options for the node type.
          items:
            $ref: '#/components/schemas/scaleway.kafka.v1alpha1.NodeType.VolumeType'
        disabled:
          type: boolean
          description: Defines whether the node type is currently disabled.
        beta:
          type: boolean
          description: Defines whether the node type is currently in beta.
        cluster_range:
          type: string
          description: Cluster range associated with the node type offer.
      x-properties-order:
      - name
      - stock_status
      - description
      - vcpus
      - memory_bytes
      - available_volume_types
      - disabled
      - beta
      - cluster_range
    scaleway.kafka.v1alpha1.NodeType.VolumeType:
      type: object
      properties:
        type:
          type: string
          description: Volume type.
          enum:
          - unknown_type
          - sbs_5k
          - sbs_15k
          default: unknown_type
        description:
          type: string
          description: The description of the volume.
        min_size_bytes:
          type: integer
          description: Minimum size required for the volume. (in bytes)
          format: uint64
        max_size_bytes:
          type: integer
          description: Maximum size required for the volume. (in bytes)
          format: uint64
        chunk_size_bytes:
          type: integer
          description: Minimum increment level for a Block Storage volume size. (in
            bytes)
          format: uint64
      x-properties-order:
      - type
      - description
      - min_size_bytes
      - max_size_bytes
      - chunk_size_bytes
    scaleway.kafka.v1alpha1.User:
      type: object
      properties:
        username:
          type: string
      x-properties-order:
      - username
    scaleway.kafka.v1alpha1.Version:
      type: object
      properties:
        version:
          type: string
          description: Kafka version.
        end_of_life_at:
          type: string
          description: Date of End of Life for the version. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        available_settings:
          type: array
          description: Cluster configuration settings you are able to change for clusters
            running this version. Each item in `available_settings` describes one
            configurable cluster setting.
          items:
            $ref: '#/components/schemas/scaleway.kafka.v1alpha1.Version.AvailableSetting'
      x-properties-order:
      - version
      - end_of_life_at
      - available_settings
    scaleway.kafka.v1alpha1.Version.AvailableSetting:
      type: object
      properties:
        name:
          type: string
          description: Kafka cluster setting name.
        hot_configurable:
          type: boolean
          description: Defines whether this setting can be applied without needing
            a restart.
        description:
          type: string
          description: Setting description.
        bool_property:
          type: object
          description: Boolean property, if the setting is a boolean.
          properties:
            default_value:
              type: boolean
          nullable: true
          x-properties-order:
          - default_value
          x-one-of: property
        string_property:
          type: object
          description: String property, if the setting is a string.
          properties:
            string_constraint:
              type: string
              nullable: true
            default_value:
              type: string
          nullable: true
          x-properties-order:
          - string_constraint
          - default_value
          x-one-of: property
        int_property:
          type: object
          description: Integer property, if the setting is an integer.
          properties:
            min:
              type: integer
              format: int32
            max:
              type: integer
              format: int32
            default_value:
              type: integer
              format: int32
            unit:
              type: string
              nullable: true
          nullable: true
          x-properties-order:
          - min
          - max
          - default_value
          - unit
          x-one-of: property
        float_property:
          type: object
          description: Float property, if the setting is a float.
          properties:
            min:
              type: number
              format: float
            max:
              type: number
              format: float
            default_value:
              type: number
              format: float
            unit:
              type: string
              nullable: true
          nullable: true
          x-properties-order:
          - min
          - max
          - default_value
          - unit
          x-one-of: property
      x-properties-order:
      - name
      - hot_configurable
      - description
      - bool_property
      - string_property
      - int_property
      - float_property
    scaleway.std.File:
      type: object
      properties:
        name:
          type: string
        content_type:
          type: string
        content:
          type: string
      x-properties-order:
      - name
      - content_type
      - content
  securitySchemes:
    scaleway:
      in: header
      name: X-Auth-Token
      type: apiKey
paths:
  /kafka/v1alpha1/regions/{region}/clusters:
    get:
      tags:
      - Kafka Clusters
      operationId: ListClusters
      summary: List Kafka clusters
      description: List all Kafka clusters in the specified region. By default, the
        clusters returned in the list are ordered by creation date in ascending order,
        though this can be modified via the order_by field. You can define additional
        parameters for your query, such as `tags` and `name`. For the `name` parameter,
        the value you include will be checked against the whole name string to see
        if it includes the string you put in the parameter.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: query
        name: tags
        description: List Kafka cluster with a given tag.
        schema:
          type: array
          items:
            type: string
      - in: query
        name: name
        description: Lists Kafka clusters that match a name pattern.
        schema:
          type: string
      - in: query
        name: order_by
        description: Criteria to use when ordering Kafka cluster listings.
        schema:
          type: string
          enum:
          - created_at_asc
          - created_at_desc
          - name_asc
          - name_desc
          - status_asc
          - status_desc
          default: created_at_asc
      - in: query
        name: organization_id
        description: Organization ID of the Kafka cluster.
        schema:
          type: string
      - in: query
        name: project_id
        description: Project ID.
        schema:
          type: string
      - in: query
        name: page
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        schema:
          type: integer
          format: uint32
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.kafka.v1alpha1.ListClustersResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/clusters"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/clusters" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Kafka Clusters
      operationId: CreateCluster
      summary: Create a Kafka cluster
      description: Create a new Kafka cluster.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.kafka.v1alpha1.Cluster'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  type: string
                  description: The ID of the Project in which the Kafka cluster will
                    be created.
                name:
                  type: string
                  description: Name of the Kafka cluster.
                version:
                  type: string
                  description: Version of Kafka.
                tags:
                  type: array
                  description: Tags to apply to the Kafka cluster.
                  items:
                    type: string
                node_amount:
                  type: integer
                  description: Number of nodes to use for the Kafka cluster.
                  format: uint32
                node_type:
                  type: string
                  description: Type of node to use for the Kafka cluster.
                volume:
                  type: object
                  description: Kafka volume information.
                  properties:
                    size_bytes:
                      type: integer
                      description: Volume size. (in bytes)
                      format: uint64
                    type:
                      type: string
                      description: Type of volume where data is stored.
                      enum:
                      - unknown_type
                      - sbs_5k
                      - sbs_15k
                      default: unknown_type
                  x-properties-order:
                  - size_bytes
                  - type
                endpoints:
                  type: array
                  description: One or multiple EndpointSpec used to expose your Kafka
                    cluster.
                  items:
                    $ref: '#/components/schemas/scaleway.kafka.v1alpha1.EndpointSpec'
                user_name:
                  type: string
                  description: Username for the kafka user.
                  nullable: true
                password:
                  type: string
                  description: Password for the kafka user.
                  nullable: true
                multi_az:
                  type: object
                  description: MultiAZ tell the cluster is deployed on multiple availability
                    zones in the region.
                  nullable: true
                  x-one-of: availability
                mono_az:
                  type: object
                  description: MonoAZ details.
                  properties:
                    zone:
                      type: string
                      description: Zone is the zone on which the cluster nodes are
                        deployed.
                      nullable: true
                  nullable: true
                  x-properties-order:
                  - zone
                  x-one-of: availability
              required:
              - version
              - node_amount
              - node_type
              x-properties-order:
              - project_id
              - name
              - version
              - tags
              - node_amount
              - node_type
              - volume
              - endpoints
              - user_name
              - password
              - multi_az
              - mono_az
      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",
              "node_amount": 42,
              "node_type": "string",
              "project_id": "string",
              "version": "string"
            }' \
            "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/clusters"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/clusters" \
            X-Auth-Token:$SCW_SECRET_KEY \
            name="string" \
            node_amount:=42 \
            node_type="string" \
            project_id="string" \
            version="string"
  /kafka/v1alpha1/regions/{region}/clusters/{cluster_id}:
    get:
      tags:
      - Kafka Clusters
      operationId: GetCluster
      summary: Get a Kafka cluster
      description: Retrieve information about a given Kafka cluster, specified by
        the `region` and `cluster_id` parameters. Its full details, including name,
        status, IP address and port, are returned in the response object.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: cluster_id
        description: UUID of the Kafka Cluster.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.kafka.v1alpha1.Cluster'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/clusters/{cluster_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/clusters/{cluster_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Kafka Clusters
      operationId: UpdateCluster
      summary: Update a Kafka cluster
      description: Update the parameters of a Kafka cluster.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: cluster_id
        description: UUID of the Kafka Clusters to update.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.kafka.v1alpha1.Cluster'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Name of the Kafka Cluster.
                  nullable: true
                tags:
                  type: array
                  description: Tags of a Kafka Cluster.
                  nullable: true
                  items:
                    type: string
                version:
                  type: string
                  description: Version of Kafka.
                  nullable: true
              x-properties-order:
              - name
              - tags
              - version
      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/kafka/v1alpha1/regions/{region}/clusters/{cluster_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/clusters/{cluster_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Kafka Clusters
      operationId: DeleteCluster
      summary: Delete a Kafka cluster
      description: Delete a given Kafka cluster, specified by the `region` and `cluster_id`
        parameters. Deleting a Kafka cluster is permanent, and cannot be undone. Note
        that upon deletion all your data will be lost.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: cluster_id
        description: UUID of the Kafka Cluster to delete.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.kafka.v1alpha1.Cluster'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/clusters/{cluster_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/clusters/{cluster_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /kafka/v1alpha1/regions/{region}/clusters/{cluster_id}/certificate-authority:
    get:
      tags:
      - Kafka Clusters
      operationId: GetClusterCertificateAuthority
      summary: Get a Kafka cluster's certificate authority
      description: Retrieve certificate authority for a given Kafka cluster, specified
        by the `region` and `cluster_id` parameters. The response object contains
        the certificate in PEM format. The certificate is required to validate the
        sever from the client side during TLS connection.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: cluster_id
        description: UUID of the Kafka Cluster.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.std.File'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/clusters/{cluster_id}/certificate-authority"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/clusters/{cluster_id}/certificate-authority" \
            X-Auth-Token:$SCW_SECRET_KEY
  /kafka/v1alpha1/regions/{region}/clusters/{cluster_id}/renew-certificate-authority:
    post:
      tags:
      - Kafka Clusters
      operationId: RenewClusterCertificateAuthority
      summary: Renew the Kafka cluster's certificate authority
      description: Request to renew the certificate authority for a given Kafka cluster,
        specified by the `region` and `cluster_id` parameters. The certificate authority
        will be renewed within a few minutes.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: cluster_id
        description: UUID of the Kafka Cluster.
        required: true
        schema:
          type: string
      responses:
        "204":
          description: ""
      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/kafka/v1alpha1/regions/{region}/clusters/{cluster_id}/renew-certificate-authority"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/clusters/{cluster_id}/renew-certificate-authority" \
            X-Auth-Token:$SCW_SECRET_KEY
  /kafka/v1alpha1/regions/{region}/clusters/{cluster_id}/users:
    get:
      tags:
      - Kafka Users
      operationId: ListUsers
      description: Retrieve a list of deployment users.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: cluster_id
        required: true
        schema:
          type: string
      - in: query
        name: page
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        schema:
          type: integer
          format: uint32
      - in: query
        name: order_by
        schema:
          $ref: '#/components/schemas/scaleway.kafka.v1alpha1.ListUsersRequest.OrderBy'
      - in: query
        name: name
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.kafka.v1alpha1.ListUsersResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/clusters/{cluster_id}/users"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/clusters/{cluster_id}/users" \
            X-Auth-Token:$SCW_SECRET_KEY
  /kafka/v1alpha1/regions/{region}/clusters/{cluster_id}/users/{username}:
    patch:
      tags:
      - Kafka Users
      operationId: UpdateUser
      description: Update an existing user.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: cluster_id
        description: ID of the cluster in which to update the user's password.
        required: true
        schema:
          type: string
      - in: path
        name: username
        description: Username of the Kafka cluster user.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.kafka.v1alpha1.User'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                password:
                  type: string
                  description: New password for the Kafka cluster user.
                  nullable: true
              x-properties-order:
              - password
      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/kafka/v1alpha1/regions/{region}/clusters/{cluster_id}/users/{username}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/clusters/{cluster_id}/users/{username}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /kafka/v1alpha1/regions/{region}/endpoints:
    post:
      tags:
      - Kafka Cluster Endpoints
      operationId: CreateEndpoint
      summary: Create a new Kafka cluster endpoint
      description: Create a new endpoint for a Kafka cluster. You can add `public_network`
        or `private_network` specifications to the body of the request. Note that
        currently only `private_network` is supported.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.kafka.v1alpha1.Endpoint'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                cluster_id:
                  type: string
                  description: UUID of the Kafka Cluster.
                endpoint:
                  type: object
                  description: Endpoint object (`EndpointSpec`) used to expose your
                    Kafka EndpointSpec.
                  properties:
                    public_network:
                      type: object
                      nullable: true
                      x-one-of: details
                    private_network:
                      type: object
                      properties:
                        private_network_id:
                          type: string
                          description: UUID of the Private Network.
                      nullable: true
                      x-properties-order:
                      - private_network_id
                      x-one-of: details
                  x-properties-order:
                  - public_network
                  - private_network
              required:
              - cluster_id
              - endpoint
              x-properties-order:
              - cluster_id
              - endpoint
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"cluster_id":"string","endpoint":{"private_network":{"private_network_id":"string"},"public_network":{}}}' \
            "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/endpoints"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/endpoints" \
            X-Auth-Token:$SCW_SECRET_KEY \
            cluster_id="string" \
            endpoint:='{"private_network":{"private_network_id":"string"},"public_network":{}}'
  /kafka/v1alpha1/regions/{region}/endpoints/{endpoint_id}:
    delete:
      tags:
      - Kafka Cluster Endpoints
      operationId: DeleteEndpoint
      summary: Delete a Kafka cluster endpoint
      description: Delete the endpoint of a Kafka cluster. You must specify the `endpoint_id`
        parameter of the endpoint you want to delete. Note that you might need to
        update any environment configurations that point to the deleted endpoint.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: endpoint_id
        description: UUID of the endpoint to delete.
        required: true
        schema:
          type: string
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/endpoints/{endpoint_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/endpoints/{endpoint_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /kafka/v1alpha1/regions/{region}/node-types:
    get:
      tags:
      - Node Types
      operationId: ListNodeTypes
      summary: List available node types
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: query
        name: include_disabled_types
        description: Defines whether or not to include disabled types.
        schema:
          type: boolean
      - in: query
        name: page
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        schema:
          type: integer
          format: uint32
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.kafka.v1alpha1.ListNodeTypesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/node-types"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/node-types" \
            X-Auth-Token:$SCW_SECRET_KEY
  /kafka/v1alpha1/regions/{region}/versions:
    get:
      tags:
      - Kafka Versions
      operationId: ListVersions
      summary: List Kafka versions
      description: List all available versions of Kafka at the current time.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: query
        name: version
        description: Kafka version to filter for.
        schema:
          type: string
      - in: query
        name: page
        description: The page number to return, from the paginated results.
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        description: The number of items to return.
        schema:
          type: integer
          format: uint32
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.kafka.v1alpha1.ListVersionsResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/versions"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/kafka/v1alpha1/regions/{region}/versions" \
            X-Auth-Token:$SCW_SECRET_KEY
