openapi: 3.0.0
info:
  title: Secret Manager API
  description: |-
    Scaleway’s Secret Manager allows you to conveniently store, access and share sensitive data such as passwords, API keys and certificates. With Secret Manager you can manage secrets which are logical containers made up of zero or more immutable versions, that hold sensitive data. Your data is encrypted both in transit and at rest and it is automatically replicated to multiple zones within your region of choice.

    (switchcolumn)
    (switchcolumn)
    ## Concepts

    Refer to our [dedicated concepts page](https://www.scaleway.com/en/docs/identity-and-access-management/secret-manager/concepts/) to find definitions of the different terms referring to Secret Manager.

    (switchcolumn)
    (switchcolumn)
    ## Quickstart

    1. **Configure your environment variables.**

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

        ```bash
        export SCW_ACCESS_KEY="<API access key>"
        export SCW_SECRET_KEY="<API secret key>"
        export SCW_PROJECT_ID="<Scaleway Project ID>
        ```
    2. **Create a secret**. Run the following command to create a secret:

        ```bash
        curl "https://api.scaleway.com/secret-manager/v1alpha1/regions/$REGION/secrets" \
          -H "Content-Type: application/json" \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          -d '{
            "name": "my-secret",
            "project_id": "'"$PROJECT_ID"'"
          }'
        ```
    3. **Create a secret version**. Run the following command to create a version of your secret:

        ```bash
        curl "https://api.scaleway.com/secret-manager/v1alpha1/regions/$REGION/secrets/<SECRET_ID>/versions" \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          -d "{\"data\":\"$(echo -n "p@sSw0Rd_" | base64)\"}"
        ```
    4. **Access data from your latest secret version**. Run the following command to access the     data of your most recent secret version:

        ```bash
        curl "https://api.scaleway.com/secret-manager/v1alpha1/regions/$REGION/secrets/<SECRET_ID>/versions/latest/access" \
          -H "Content-Type: application/json" \
          -H "X-Auth-Token: $SCW_SECRET_KEY"
        ```

        <Message type="note">
          Requests can either target a specific version or the latest.
        </Message>

    (switchcolumn)

    <Message type="requirement">
      - You have your [Organization and your Project ID](https://console.scaleway.com/project/settings)
     - You have [created an API key](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/)
     - You have [installed `curl`](https://curl.se/download.html)
     - 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
    </Message>

    (switchcolumn)
    ## Technical information

    ### Regions

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

    Secret Manager is available in the Paris, Amsterdam and Warsaw regions, which are represented by the following path parameters:

    - fr-par
    - nl-ams
    - pl-waw

    ## Technical limitations

    - Operations on secrets and versions are limited to CRUDL
    - A secret's payload size is limited to 64KiB

    ## Going further

    For more information about Secret Manager, you can check out the following pages:

    * [Secret Manager Documentation](https://www.scaleway.com/en/docs/identity-and-access-management/secret-manager/)
    * [Scaleway Slack Community](https://scaleway-community.slack.com/) join the #secret-manager channel
    * [Contact our support team](https://console.scaleway.com/support/tickets).
  version: v1alpha1
servers:
- url: https://api.scaleway.com
tags:
- name: Secrets
  description: Secrets are logical containers made up of zero or more immutable versions,
    that contain sensitive data
- name: Secret Versions
  description: Versions store the sensitive data contained in your secrets (API keys,
    passwords, or certificates)
- name: Folders
  description: Folders are a way to organize logically the secrets in a hierarchy
components:
  schemas:
    google.protobuf.Int32Value:
      type: integer
      format: int32
      nullable: true
    scaleway.secret_manager.v1alpha1.AccessSecretVersionResponse:
      type: object
      properties:
        secret_id:
          type: string
          description: ID of the secret. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        revision:
          type: integer
          description: |-
            Version number.
            The first version of the secret is numbered 1, and all subsequent revisions augment by 1.
          format: uint32
        data:
          type: string
          description: The base64-encoded secret payload of the version.
        data_crc32:
          type: integer
          description: |-
            The CRC32 checksum of the data as a base-10 integer.
            This field is only available if a CRC32 was supplied during the creation of the version.
          format: uint32
          nullable: true
      x-properties-order:
      - secret_id
      - revision
      - data
      - data_crc32
    scaleway.secret_manager.v1alpha1.Folder:
      type: object
      properties:
        id:
          type: string
          description: ID of the folder. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        project_id:
          type: string
          description: ID of the Project containing the folder. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        name:
          type: string
          description: Name of the folder.
        path:
          type: string
          description: |-
            Path of the folder.
            Location of the folder in the directory structure.
        created_at:
          type: string
          description: Date and time of the folder's creation. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        region:
          type: string
          description: Region of the folder.
      x-properties-order:
      - id
      - project_id
      - name
      - path
      - created_at
      - region
    scaleway.secret_manager.v1alpha1.ListFoldersRequest.OrderBy:
      type: string
      enum:
      - created_at_asc
      - created_at_desc
      - name_asc
      - name_desc
      default: created_at_asc
    scaleway.secret_manager.v1alpha1.ListFoldersResponse:
      type: object
      properties:
        folders:
          type: array
          description: List of folders.
          items:
            $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.Folder'
        total_count:
          type: integer
          description: Count of all folders matching the requested criteria.
          format: uint32
      x-properties-order:
      - folders
      - total_count
    scaleway.secret_manager.v1alpha1.ListSecretVersionsResponse:
      type: object
      properties:
        versions:
          type: array
          description: Single page of versions.
          items:
            $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.SecretVersion'
        total_count:
          type: integer
          description: Number of versions.
          format: uint32
      x-properties-order:
      - versions
      - total_count
    scaleway.secret_manager.v1alpha1.ListSecretsRequest.OrderBy:
      type: string
      enum:
      - name_asc
      - name_desc
      - created_at_asc
      - created_at_desc
      - updated_at_asc
      - updated_at_desc
      default: name_asc
    scaleway.secret_manager.v1alpha1.ListSecretsResponse:
      type: object
      properties:
        secrets:
          type: array
          description: Single page of secrets matching the requested criteria.
          items:
            $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.Secret'
        total_count:
          type: integer
          description: Count of all secrets matching the requested criteria.
          format: uint32
      x-properties-order:
      - secrets
      - total_count
    scaleway.secret_manager.v1alpha1.ListTagsResponse:
      type: object
      properties:
        tags:
          type: array
          description: List of tags.
          items:
            type: string
        total_count:
          type: integer
          description: Count of all tags matching the requested criteria.
          format: uint32
      x-properties-order:
      - tags
      - total_count
    scaleway.secret_manager.v1alpha1.Secret:
      type: object
      properties:
        id:
          type: string
          description: ID of the secret. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        project_id:
          type: string
          description: ID of the Project containing the secret. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        name:
          type: string
          description: Name of the secret.
        status:
          type: string
          description: |-
            Current status of the secret.
            * `ready`: the secret can be read, modified and deleted.
            * `locked`: no action can be performed on the secret. This status can only be applied and removed by Scaleway.
          enum:
          - ready
          - locked
          default: ready
        created_at:
          type: string
          description: Date and time of the secret's creation. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        updated_at:
          type: string
          description: Last update of the secret. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        tags:
          type: array
          description: List of the secret's tags.
          items:
            type: string
        version_count:
          type: integer
          description: Number of versions for this secret.
          format: uint32
        description:
          type: string
          description: Updated description of the secret.
          nullable: true
        is_managed:
          type: boolean
          description: Returns `true` for secrets that are managed by another product.
        is_protected:
          type: boolean
          description: Returns `true` for protected secrets that cannot be deleted.
        type:
          type: string
          description: |-
            Type of the secret.
            See `Secret.Type` enum for description of values.
          enum:
          - unknown_secret_type
          - opaque
          - certificate
          - key_value
          x-enum-descriptions:
            values:
              opaque: Default type.
              certificate: List of concatenated PEM blocks. They can contain certificates,
                private keys or any other PEM block types.
              key_value: Flat JSON that allows you to set any number of first level
                key and a scalar type as a value (string, numeric, boolean).
          default: unknown_secret_type
        path:
          type: string
          description: |-
            Path of the secret.
            Location of the secret in the directory structure.
        ephemeral_policy:
          type: object
          description: |-
            Ephemeral policy of the secret.
            (Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
          properties:
            time_to_live:
              type: string
              description: Time frame, from one second and up to one year, during
                which the secret's versions are valid. (in seconds)
              example: 2.5s
              nullable: true
            expires_once_accessed:
              type: boolean
              description: Returns `true` if the version expires after a single user
                access.
              nullable: true
            action:
              type: string
              description: |-
                Action to perform when the version of a secret expires.
                See the `EphemeralPolicy.Action` enum for a description of values.
              enum:
              - unknown_action
              - delete
              - disable
              x-enum-descriptions:
                values:
                  delete: The version is deleted once it expires.
                  disable: The version is disabled once it expires.
              default: unknown_action
          x-properties-order:
          - time_to_live
          - expires_once_accessed
          - action
        region:
          type: string
          description: Region of the secret.
      x-properties-order:
      - id
      - project_id
      - name
      - status
      - created_at
      - updated_at
      - tags
      - version_count
      - description
      - is_managed
      - is_protected
      - type
      - path
      - ephemeral_policy
      - region
    scaleway.secret_manager.v1alpha1.SecretVersion:
      type: object
      properties:
        revision:
          type: integer
          description: |-
            Version number.
            The first version of the secret is numbered 1, and all subsequent revisions augment by 1.
          format: uint32
        secret_id:
          type: string
          description: ID of the secret. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        status:
          type: string
          description: |-
            Current status of the version.
            * `unknown`: the version is in an invalid state.
            * `enabled`: the version is accessible.
            * `disabled`: the version is not accessible but can be enabled.
            * `destroyed`: the version is permanently deleted. It is not possible to recover it.
          enum:
          - unknown
          - enabled
          - disabled
          - destroyed
          default: unknown
        created_at:
          type: string
          description: Date and time of the version's creation. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        updated_at:
          type: string
          description: Last update of the version. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        description:
          type: string
          description: Description of the version.
          nullable: true
        is_latest:
          type: boolean
          description: Returns `true` if the version is the latest.
        ephemeral_properties:
          type: object
          description: |-
            Properties of the ephemeral version.
            Returns the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.
          properties:
            expires_at:
              type: string
              description: |-
                The version's expiration date.
                (Optional.) If not specified, the version does not have an expiration date. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            expires_once_accessed:
              type: boolean
              description: |-
                Returns `true` if the version expires after a single user access.
                (Optional.) If not specified, the version can be accessed an unlimited amount of times.
              nullable: true
            action:
              type: string
              description: |-
                Action to perform when the version of a secret expires.
                See `EphemeralPolicy.Action` enum for a description of values.
              enum:
              - unknown_action
              - delete
              - disable
              x-enum-descriptions:
                values:
                  delete: The version is deleted once it expires.
                  disable: The version is disabled once it expires.
              default: unknown_action
          x-properties-order:
          - expires_at
          - expires_once_accessed
          - action
      x-properties-order:
      - revision
      - secret_id
      - status
      - created_at
      - updated_at
      - description
      - is_latest
      - ephemeral_properties
    scaleway.secret_manager.v1alpha1.SecretVersion.Status:
      type: string
      enum:
      - unknown
      - enabled
      - disabled
      - destroyed
      default: unknown
  securitySchemes:
    scaleway:
      in: header
      name: X-Auth-Token
      type: apiKey
paths:
  /secret-manager/v1alpha1/regions/{region}/folders:
    get:
      tags:
      - Folders
      operationId: ListFolders
      summary: List folders
      description: Retrieve the list of folders created within a 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: project_id
        description: Filter by Project ID (optional). (UUID format)
        schema:
          type: string
          description: Filter by Project ID (optional). (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: path
        description: Filter by path (optional).
        schema:
          type: string
          description: Filter by path (optional).
      - in: query
        name: page
        schema:
          $ref: '#/components/schemas/google.protobuf.Int32Value'
      - in: query
        name: page_size
        schema:
          type: integer
          format: uint32
      - in: query
        name: order_by
        schema:
          $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.ListFoldersRequest.OrderBy'
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.ListFoldersResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/folders"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/folders" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Folders
      operationId: CreateFolder
      summary: Create folder
      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.secret_manager.v1alpha1.Folder'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  type: string
                  description: ID of the Project containing the folder. (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                name:
                  type: string
                  description: Name of the folder.
                path:
                  type: string
                  description: |-
                    Path of the folder.
                    (Optional.) Location of the folder in the directory structure. If not specified, the path is `/`.
                  nullable: true
              x-properties-order:
              - project_id
              - name
              - path
      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":"6170692e-7363-616c-6577-61792e636f6d"}' \
            "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/folders"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/folders" \
            X-Auth-Token:$SCW_SECRET_KEY \
            name="string" \
            project_id="6170692e-7363-616c-6577-61792e636f6d"
  /secret-manager/v1alpha1/regions/{region}/folders/{folder_id}:
    delete:
      tags:
      - Folders
      operationId: DeleteFolder
      summary: Delete a given folder specified by the `region` and `folder_id` parameters
      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: folder_id
        description: ID of the folder. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the folder. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/folders/{folder_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/folders/{folder_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /secret-manager/v1alpha1/regions/{region}/secrets:
    get:
      tags:
      - Secrets
      operationId: ListSecrets
      summary: List secrets
      description: Retrieve the list of secrets created within an Organization and/or
        Project. You must specify either the `organization_id` or the `project_id`
        and the `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: organization_id
        description: Filter by Organization ID (optional). (UUID format)
        schema:
          type: string
          description: Filter by Organization ID (optional). (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: project_id
        description: Filter by Project ID (optional). (UUID format)
        schema:
          type: string
          description: Filter by Project ID (optional). (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: order_by
        schema:
          $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.ListSecretsRequest.OrderBy'
      - in: query
        name: page
        schema:
          $ref: '#/components/schemas/google.protobuf.Int32Value'
      - in: query
        name: page_size
        schema:
          type: integer
          format: uint32
      - in: query
        name: tags
        description: List of tags to filter on (optional).
        schema:
          type: array
          description: List of tags to filter on (optional).
          items:
            type: string
      - in: query
        name: name
        description: Filter by secret name (optional).
        schema:
          type: string
          description: Filter by secret name (optional).
      - in: query
        name: is_managed
        description: Filter by managed / not managed (optional).
        schema:
          type: boolean
          description: Filter by managed / not managed (optional).
      - in: query
        name: path
        description: Filter by path (optional).
        schema:
          type: string
          description: Filter by path (optional).
      - in: query
        name: is_ephemeral
        description: Filter by ephemeral / not ephemeral (optional).
        schema:
          type: boolean
          description: Filter by ephemeral / not ephemeral (optional).
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.ListSecretsResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Secrets
      operationId: CreateSecret
      summary: Create a secret
      description: You must specify the `region` to create a secret.
      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.secret_manager.v1alpha1.Secret'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  type: string
                  description: ID of the Project containing the secret. (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                name:
                  type: string
                  description: Name of the secret.
                tags:
                  type: array
                  description: List of the secret's tags.
                  items:
                    type: string
                description:
                  type: string
                  description: Description of the secret.
                  nullable: true
                type:
                  type: string
                  description: |-
                    Type of the secret.
                    (Optional.) See `Secret.Type` enum for description of values. If not specified, the type is `Opaque`.
                  enum:
                  - unknown_secret_type
                  - opaque
                  - certificate
                  - key_value
                  x-enum-descriptions:
                    values:
                      opaque: Default type.
                      certificate: List of concatenated PEM blocks. They can contain
                        certificates, private keys or any other PEM block types.
                      key_value: Flat JSON that allows you to set any number of first
                        level key and a scalar type as a value (string, numeric, boolean).
                  default: unknown_secret_type
                path:
                  type: string
                  description: |-
                    Path of the secret.
                    (Optional.) Location of the secret in the directory structure. If not specified, the path is `/`.
                  nullable: true
                ephemeral_policy:
                  type: object
                  description: |-
                    Ephemeral policy of the secret.
                    (Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
                  properties:
                    time_to_live:
                      type: string
                      description: Time frame, from one second and up to one year,
                        during which the secret's versions are valid. (in seconds)
                      example: 2.5s
                      nullable: true
                    expires_once_accessed:
                      type: boolean
                      description: Returns `true` if the version expires after a single
                        user access.
                      nullable: true
                    action:
                      type: string
                      description: |-
                        Action to perform when the version of a secret expires.
                        See the `EphemeralPolicy.Action` enum for a description of values.
                      enum:
                      - unknown_action
                      - delete
                      - disable
                      x-enum-descriptions:
                        values:
                          delete: The version is deleted once it expires.
                          disable: The version is disabled once it expires.
                      default: unknown_action
                  x-properties-order:
                  - time_to_live
                  - expires_once_accessed
                  - action
                is_protected:
                  type: boolean
                  description: |-
                    Returns `true` if secret protection is enabled on a given secret.
                    A protected secret cannot be deleted.
              x-properties-order:
              - project_id
              - name
              - tags
              - description
              - type
              - path
              - ephemeral_policy
              - is_protected
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "is_protected": false,
              "name": "string",
              "project_id": "6170692e-7363-616c-6577-61792e636f6d"
            }' \
            "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets" \
            X-Auth-Token:$SCW_SECRET_KEY \
            is_protected:=false \
            name="string" \
            project_id="6170692e-7363-616c-6577-61792e636f6d"
  /secret-manager/v1alpha1/regions/{region}/secrets-by-name/{secret_name}:
    get:
      tags:
      - Secrets
      operationId: GetSecretByName
      summary: Get metadata using the secret's name
      description: |-
        Retrieve the metadata of a secret specified by the `region` and `secret_name` parameters.

        GetSecretByName usage is now deprecated.

        Scaleway recommends that you use the `ListSecrets` request with the `name` filter.
      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: secret_name
        description: Name of the secret.
        required: true
        schema:
          type: string
          description: Name of the secret.
      - in: query
        name: project_id
        description: |-
          ID of the Project to target.
          (Optional.) If not specified, Secret Manager will look for the secret in all Projects. (UUID format)
        schema:
          type: string
          description: |-
            ID of the Project to target.
            (Optional.) If not specified, Secret Manager will look for the secret in all Projects. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.Secret'
      security:
      - scaleway: []
      deprecated: true
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets-by-name/{secret_name}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets-by-name/{secret_name}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /secret-manager/v1alpha1/regions/{region}/secrets-by-name/{secret_name}/versions:
    get:
      tags:
      - Secret Versions
      operationId: ListSecretVersionsByName
      summary: List versions of a secret using the secret's name
      description: |-
        Retrieve the list of a given secret's versions specified by the `secret_name`,`region` and `project_id` parameters.

        This method is deprecated.

        Scaleway recommends that you use the `ListSecrets` request with the `name` filter to specify the secret version desired, then use the `ListSecretVersions` request.
      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: secret_name
        description: Name of the secret.
        required: true
        schema:
          type: string
          description: Name of the secret.
      - in: query
        name: page
        schema:
          $ref: '#/components/schemas/google.protobuf.Int32Value'
      - in: query
        name: page_size
        schema:
          type: integer
          format: uint32
      - in: query
        name: status
        description: Filter results by status.
        schema:
          type: array
          description: Filter results by status.
          items:
            $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.SecretVersion.Status'
      - in: query
        name: project_id
        description: |-
          ID of the Project to target.
          (Optional.) If not specified, Secret Manager will look for the secret in all Projects. (UUID format)
        schema:
          type: string
          description: |-
            ID of the Project to target.
            (Optional.) If not specified, Secret Manager will look for the secret in all Projects. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.ListSecretVersionsResponse'
      security:
      - scaleway: []
      deprecated: true
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets-by-name/{secret_name}/versions"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets-by-name/{secret_name}/versions" \
            X-Auth-Token:$SCW_SECRET_KEY
  /secret-manager/v1alpha1/regions/{region}/secrets-by-name/{secret_name}/versions/{revision}:
    get:
      tags:
      - Secret Versions
      operationId: GetSecretVersionByName
      summary: Get metadata of a secret's version using the secret's name
      description: |-
        Retrieve the metadata of a secret's given version specified by the `region`, `secret_name`, `revision` and `project_id` parameters.

        This method is deprecated.

        Scaleway recommends that you use the `ListSecrets` request with the `name` filter to specify the secret version desired, then use the `GetSecretVersion` request.
      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: secret_name
        description: Name of the secret.
        required: true
        schema:
          type: string
          description: Name of the secret.
      - in: path
        name: revision
        description: |-
          Version number.
          The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
          - a number (the revision number)
          - "latest" (the latest revision)
          - "latest_enabled" (the latest enabled revision).
        required: true
        schema:
          type: string
          description: |-
            Version number.
            The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
            - a number (the revision number)
            - "latest" (the latest revision)
            - "latest_enabled" (the latest enabled revision).
      - in: query
        name: project_id
        description: |-
          ID of the Project to target.
          (Optional.) If not specified, Secret Manager will look for the secret version in all Projects. (UUID format)
        schema:
          type: string
          description: |-
            ID of the Project to target.
            (Optional.) If not specified, Secret Manager will look for the secret version in all Projects. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.SecretVersion'
      security:
      - scaleway: []
      deprecated: true
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets-by-name/{secret_name}/versions/{revision}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets-by-name/{secret_name}/versions/{revision}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /secret-manager/v1alpha1/regions/{region}/secrets-by-name/{secret_name}/versions/{revision}/access:
    get:
      tags:
      - Secret Versions
      operationId: AccessSecretVersionByName
      summary: Access a secret's version using the secret's name
      description: |-
        Access sensitive data in a secret's version specified by the `region`, `secret_name`, `revision` and `project_id` parameters.

        This method is deprecated.

        Scaleway recommends that you use the `ListSecrets` request with the `name` filter to specify the secret version desired, then use the `AccessSecretVersion` request.
      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: secret_name
        description: Name of the secret.
        required: true
        schema:
          type: string
          description: Name of the secret.
      - in: path
        name: revision
        description: |-
          Version number.
          The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
          - a number (the revision number)
          - "latest" (the latest revision)
          - "latest_enabled" (the latest enabled revision).
        required: true
        schema:
          type: string
          description: |-
            Version number.
            The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
            - a number (the revision number)
            - "latest" (the latest revision)
            - "latest_enabled" (the latest enabled revision).
      - in: query
        name: project_id
        description: |-
          ID of the Project to target.
          (Optional.) If not specified, Secret Manager will look for the secret version in all Projects. (UUID format)
        schema:
          type: string
          description: |-
            ID of the Project to target.
            (Optional.) If not specified, Secret Manager will look for the secret version in all Projects. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.AccessSecretVersionResponse'
      security:
      - scaleway: []
      deprecated: true
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets-by-name/{secret_name}/versions/{revision}/access"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets-by-name/{secret_name}/versions/{revision}/access" \
            X-Auth-Token:$SCW_SECRET_KEY
  /secret-manager/v1alpha1/regions/{region}/secrets/{secret_id}:
    get:
      tags:
      - Secrets
      operationId: GetSecret
      summary: Get metadata using the secret's ID
      description: Retrieve the metadata of a secret specified by the `region` and
        `secret_id` parameters.
      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: secret_id
        description: ID of the secret. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the secret. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.Secret'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Secrets
      operationId: UpdateSecret
      summary: Update metadata of a secret
      description: Edit a secret's metadata such as name, tag(s), description and
        ephemeral policy. The secret to update is specified by the `secret_id` and
        `region` parameters.
      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: secret_id
        description: ID of the secret. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the secret. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.Secret'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Secret's updated name (optional).
                  nullable: true
                tags:
                  type: array
                  description: Secret's updated list of tags (optional).
                  nullable: true
                  items:
                    type: string
                description:
                  type: string
                  description: Description of the secret.
                  nullable: true
                path:
                  type: string
                  description: |-
                    Path of the folder.
                    (Optional.) Location of the folder in the directory structure. If not specified, the path is `/`.
                  nullable: true
                ephemeral_policy:
                  type: object
                  description: |-
                    Ephemeral policy of the secret.
                    (Optional.) Policy that defines whether/when a secret's versions expire.
                  properties:
                    time_to_live:
                      type: string
                      description: Time frame, from one second and up to one year,
                        during which the secret's versions are valid. (in seconds)
                      example: 2.5s
                      nullable: true
                    expires_once_accessed:
                      type: boolean
                      description: Returns `true` if the version expires after a single
                        user access.
                      nullable: true
                    action:
                      type: string
                      description: |-
                        Action to perform when the version of a secret expires.
                        See the `EphemeralPolicy.Action` enum for a description of values.
                      enum:
                      - unknown_action
                      - delete
                      - disable
                      x-enum-descriptions:
                        values:
                          delete: The version is deleted once it expires.
                          disable: The version is disabled once it expires.
                      default: unknown_action
                  x-properties-order:
                  - time_to_live
                  - expires_once_accessed
                  - action
              x-properties-order:
              - name
              - tags
              - description
              - path
              - ephemeral_policy
      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/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Secrets
      operationId: DeleteSecret
      summary: Delete a secret
      description: Delete a given secret specified by the `region` and `secret_id`
        parameters.
      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: secret_id
        description: ID of the secret. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the secret. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /secret-manager/v1alpha1/regions/{region}/secrets/{secret_id}/add-owner:
    post:
      tags:
      - Secrets
      operationId: AddSecretOwner
      summary: Allow a product to use the secret
      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: secret_id
        description: ID of the secret. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the secret. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "204":
          description: ""
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                product_name:
                  type: string
                  description: '(Deprecated: use `product` field) Name of the product
                    to add.'
                  deprecated: true
                product:
                  type: string
                  description: |-
                    ID of the product to add.
                    See `Product` enum for description of values.
                  enum:
                  - unknown
                  - edge_services
                  default: unknown
              x-properties-order:
              - product_name
              - product
      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/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/add-owner"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/add-owner" \
            X-Auth-Token:$SCW_SECRET_KEY
  /secret-manager/v1alpha1/regions/{region}/secrets/{secret_id}/generate-password:
    post:
      tags:
      - Secret Versions
      operationId: GeneratePassword
      summary: Generate a password in a new version
      description: Generate a password for the given secret specified by the `region`
        and `secret_id` parameters. This will also create a new version of the secret
        that will store the password.
      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: secret_id
        description: ID of the secret. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the secret. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.SecretVersion'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  type: string
                  description: Description of the version.
                  nullable: true
                disable_previous:
                  type: boolean
                  description: |-
                    (Optional.) Disable the previous secret version.
                    This has no effect if there is no previous version or if the previous version was already disabled.
                  nullable: true
                length:
                  type: integer
                  description: Length of the password to generate (between 1 and 1024
                    characters).
                  format: uint32
                no_lowercase_letters:
                  type: boolean
                  description: (Optional.) Exclude lower case letters by default in
                    the password character set.
                  nullable: true
                no_uppercase_letters:
                  type: boolean
                  description: (Optional.) Exclude upper case letters by default in
                    the password character set.
                  nullable: true
                no_digits:
                  type: boolean
                  description: (Optional.) Exclude digits by default in the password
                    character set.
                  nullable: true
                additional_chars:
                  type: string
                  description: (Optional.) Additional ASCII characters to be included
                    in the password character set.
                  nullable: true
              x-properties-order:
              - description
              - disable_previous
              - length
              - no_lowercase_letters
              - no_uppercase_letters
              - no_digits
              - additional_chars
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"length":42}' \
            "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/generate-password"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/generate-password" \
            X-Auth-Token:$SCW_SECRET_KEY \
            length:=42
  /secret-manager/v1alpha1/regions/{region}/secrets/{secret_id}/protect:
    post:
      tags:
      - Secrets
      operationId: ProtectSecret
      summary: Protect a secret
      description: Protect a given secret specified by the `secret_id` parameter.
        A protected secret can be read and modified but cannot be deleted.
      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: secret_id
        description: ID of the secret to protect. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the secret to protect. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.Secret'
      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/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/protect"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/protect" \
            X-Auth-Token:$SCW_SECRET_KEY
  /secret-manager/v1alpha1/regions/{region}/secrets/{secret_id}/unprotect:
    post:
      tags:
      - Secrets
      operationId: UnprotectSecret
      summary: Unprotect a secret
      description: Unprotect a given secret specified by the `secret_id` parameter.
        An unprotected secret can be read, modified and deleted.
      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: secret_id
        description: ID of the secret to unprotect. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the secret to unprotect. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.Secret'
      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/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/unprotect"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/unprotect" \
            X-Auth-Token:$SCW_SECRET_KEY
  /secret-manager/v1alpha1/regions/{region}/secrets/{secret_id}/versions:
    get:
      tags:
      - Secret Versions
      operationId: ListSecretVersions
      summary: List versions of a secret using the secret's ID
      description: Retrieve the list of a given secret's versions specified by the
        `secret_id` and `region` parameters.
      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: secret_id
        description: ID of the secret. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the secret. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: page
        schema:
          $ref: '#/components/schemas/google.protobuf.Int32Value'
      - in: query
        name: page_size
        schema:
          type: integer
          format: uint32
      - in: query
        name: status
        description: Filter results by status.
        schema:
          type: array
          description: Filter results by status.
          items:
            $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.SecretVersion.Status'
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.ListSecretVersionsResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/versions"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/versions" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Secret Versions
      operationId: CreateSecretVersion
      summary: Create a version
      description: Create a version of a given secret specified by the `region` and
        `secret_id` parameters.
      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: secret_id
        description: ID of the secret. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the secret. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.SecretVersion'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: string
                  description: The base64-encoded secret payload of the version.
                description:
                  type: string
                  description: Description of the version.
                  nullable: true
                disable_previous:
                  type: boolean
                  description: |-
                    Disable the previous secret version.
                    (Optional.) If there is no previous version or if the previous version was already disabled, does nothing.
                  nullable: true
                password_generation:
                  type: object
                  description: |-
                    Options to generate a password.
                    (Optional.) If specified, a random password will be generated. The `data` and `data_crc32` fields must be empty. By default, the generator will use upper and lower case letters, and digits. This behavior can be tuned using the generation parameters.
                  deprecated: true
                  properties:
                    length:
                      type: integer
                      description: Length of the password to generate (between 1 and
                        1024).
                      format: uint32
                    no_lowercase_letters:
                      type: boolean
                      description: Do not include lower case letters by default in
                        the alphabet.
                    no_uppercase_letters:
                      type: boolean
                      description: Do not include upper case letters by default in
                        the alphabet.
                    no_digits:
                      type: boolean
                      description: Do not include digits by default in the alphabet.
                    additional_chars:
                      type: string
                      description: Additional ascii characters to be included in the
                        alphabet.
                  x-properties-order:
                  - length
                  - no_lowercase_letters
                  - no_uppercase_letters
                  - no_digits
                  - additional_chars
                data_crc32:
                  type: integer
                  description: |-
                    (Optional.) The CRC32 checksum of the data as a base-10 integer.
                    If specified, Secret Manager will verify the integrity of the data received against the given CRC32 checksum. An error is returned if the CRC32 does not match. If, however, the CRC32 matches, it will be stored and returned along with the SecretVersion on future access requests.
                  format: uint32
                  nullable: true
              x-properties-order:
              - data
              - description
              - disable_previous
              - password_generation
              - data_crc32
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"data":"string"}' \
            "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/versions"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/versions" \
            X-Auth-Token:$SCW_SECRET_KEY \
            data="string"
  /secret-manager/v1alpha1/regions/{region}/secrets/{secret_id}/versions/{revision}:
    get:
      tags:
      - Secret Versions
      operationId: GetSecretVersion
      summary: Get metadata of a secret's version using the secret's ID
      description: Retrieve the metadata of a secret's given version specified by
        the `region`, `secret_id` and `revision` parameters.
      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: secret_id
        description: ID of the secret. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the secret. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: path
        name: revision
        description: |-
          Version number.
          The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
          - a number (the revision number)
          - "latest" (the latest revision)
          - "latest_enabled" (the latest enabled revision).
        required: true
        schema:
          type: string
          description: |-
            Version number.
            The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
            - a number (the revision number)
            - "latest" (the latest revision)
            - "latest_enabled" (the latest enabled revision).
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.SecretVersion'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/versions/{revision}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/versions/{revision}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Secret Versions
      operationId: UpdateSecretVersion
      summary: Update metadata of a version
      description: Edit the metadata of a secret's given version, specified by the
        `region`, `secret_id` and `revision` parameters.
      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: secret_id
        description: ID of the secret. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the secret. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: path
        name: revision
        description: |-
          Version number.
          The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
          - a number (the revision number)
          - "latest" (the latest revision)
          - "latest_enabled" (the latest enabled revision).
        required: true
        schema:
          type: string
          description: |-
            Version number.
            The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
            - a number (the revision number)
            - "latest" (the latest revision)
            - "latest_enabled" (the latest enabled revision).
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.SecretVersion'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  type: string
                  description: Description of the version.
                  nullable: true
                ephemeral_properties:
                  type: object
                  description: |-
                    Ephemeral properties of the version.
                    (Optional.) Properties that defines the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.
                  properties:
                    expires_at:
                      type: string
                      description: |-
                        The version's expiration date.
                        (Optional.) If not specified, the version does not have an expiration date. (RFC 3339 format)
                      format: date-time
                      example: "2022-03-22T12:34:56.123456Z"
                      nullable: true
                    expires_once_accessed:
                      type: boolean
                      description: |-
                        Returns `true` if the version expires after a single user access.
                        (Optional.) If not specified, the version can be accessed an unlimited amount of times.
                      nullable: true
                    action:
                      type: string
                      description: |-
                        Action to perform when the version of a secret expires.
                        See `EphemeralPolicy.Action` enum for a description of values.
                      enum:
                      - unknown_action
                      - delete
                      - disable
                      x-enum-descriptions:
                        values:
                          delete: The version is deleted once it expires.
                          disable: The version is disabled once it expires.
                      default: unknown_action
                  x-properties-order:
                  - expires_at
                  - expires_once_accessed
                  - action
              x-properties-order:
              - description
              - ephemeral_properties
      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/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/versions/{revision}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/versions/{revision}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /secret-manager/v1alpha1/regions/{region}/secrets/{secret_id}/versions/{revision}/access:
    get:
      tags:
      - Secret Versions
      operationId: AccessSecretVersion
      summary: Access a secret's version using the secret's ID
      description: Access sensitive data in a secret's version specified by the `region`,
        `secret_id` and `revision` parameters.
      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: secret_id
        description: ID of the secret. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the secret. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: path
        name: revision
        description: |-
          Version number.
          The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
          - a number (the revision number)
          - "latest" (the latest revision)
          - "latest_enabled" (the latest enabled revision).
        required: true
        schema:
          type: string
          description: |-
            Version number.
            The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
            - a number (the revision number)
            - "latest" (the latest revision)
            - "latest_enabled" (the latest enabled revision).
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.AccessSecretVersionResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/versions/{revision}/access"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/versions/{revision}/access" \
            X-Auth-Token:$SCW_SECRET_KEY
  /secret-manager/v1alpha1/regions/{region}/secrets/{secret_id}/versions/{revision}/destroy:
    post:
      tags:
      - Secret Versions
      operationId: DestroySecretVersion
      summary: Delete a version
      description: Delete a secret's version and the sensitive data contained in it.
        Deleting a version is permanent and cannot be undone.
      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: secret_id
        description: ID of the secret. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the secret. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: path
        name: revision
        description: |-
          Version number.
          The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
          - a number (the revision number)
          - "latest" (the latest revision)
          - "latest_enabled" (the latest enabled revision).
        required: true
        schema:
          type: string
          description: |-
            Version number.
            The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
            - a number (the revision number)
            - "latest" (the latest revision)
            - "latest_enabled" (the latest enabled revision).
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.SecretVersion'
      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/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/versions/{revision}/destroy"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/versions/{revision}/destroy" \
            X-Auth-Token:$SCW_SECRET_KEY
  /secret-manager/v1alpha1/regions/{region}/secrets/{secret_id}/versions/{revision}/disable:
    post:
      tags:
      - Secret Versions
      operationId: DisableSecretVersion
      summary: Disable a version
      description: Make a specific version inaccessible. You must specify the `region`,
        `secret_id` and `revision` parameters.
      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: secret_id
        description: ID of the secret. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the secret. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: path
        name: revision
        description: |-
          Version number.
          The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
          - a number (the revision number)
          - "latest" (the latest revision)
          - "latest_enabled" (the latest enabled revision).
        required: true
        schema:
          type: string
          description: |-
            Version number.
            The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
            - a number (the revision number)
            - "latest" (the latest revision)
            - "latest_enabled" (the latest enabled revision).
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.SecretVersion'
      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/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/versions/{revision}/disable"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/versions/{revision}/disable" \
            X-Auth-Token:$SCW_SECRET_KEY
  /secret-manager/v1alpha1/regions/{region}/secrets/{secret_id}/versions/{revision}/enable:
    post:
      tags:
      - Secret Versions
      operationId: EnableSecretVersion
      summary: Enable a version
      description: Make a specific version accessible. You must specify the `region`,
        `secret_id` and `revision` parameters.
      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: secret_id
        description: ID of the secret. (UUID format)
        required: true
        schema:
          type: string
          description: ID of the secret. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: path
        name: revision
        description: |-
          Version number.
          The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
          - a number (the revision number)
          - "latest" (the latest revision)
          - "latest_enabled" (the latest enabled revision).
        required: true
        schema:
          type: string
          description: |-
            Version number.
            The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
            - a number (the revision number)
            - "latest" (the latest revision)
            - "latest_enabled" (the latest enabled revision).
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.SecretVersion'
      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/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/versions/{revision}/enable"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/secrets/{secret_id}/versions/{revision}/enable" \
            X-Auth-Token:$SCW_SECRET_KEY
  /secret-manager/v1alpha1/regions/{region}/tags:
    get:
      tags:
      - Secrets
      operationId: ListTags
      summary: List tags
      description: List all tags associated with secrets within a given 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: project_id
        description: |-
          ID of the Project to target.
          (Optional.) If not specified, Secret Manager will look for tags in all Projects. (UUID format)
        schema:
          type: string
          description: |-
            ID of the Project to target.
            (Optional.) If not specified, Secret Manager will look for tags in all Projects. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: page
        schema:
          $ref: '#/components/schemas/google.protobuf.Int32Value'
      - in: query
        name: page_size
        schema:
          type: integer
          format: uint32
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.secret_manager.v1alpha1.ListTagsResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/tags"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/secret-manager/v1alpha1/regions/fr-par/tags" \
            X-Auth-Token:$SCW_SECRET_KEY
