{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/scaleway.secret_manager.v1beta1.Secret",
  "title": "scaleway.secret_manager.v1beta1.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.\n* `ready`: the secret can be read, modified and deleted.\n* `locked`: no action can be performed on the secret. This status can only be applied and removed by Scaleway.",
      "enum": [
        "unknown_status",
        "ready",
        "locked"
      ],
      "default": "unknown_status"
    },
    "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
    },
    "managed": {
      "type": "boolean",
      "description": "Returns `true` for secrets that are managed by another product."
    },
    "protected": {
      "type": "boolean",
      "description": "Returns `true` for protected secrets that cannot be deleted."
    },
    "type": {
      "type": "string",
      "description": "Type of the secret.\nSee the `Secret.Type` enum for a description of values.",
      "enum": [
        "unknown_type",
        "opaque",
        "certificate",
        "key_value",
        "basic_credentials",
        "database_credentials",
        "ssh_key"
      ],
      "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 as many first level keys and scalar types as values (string, numeric, boolean) as you need.",
          "basic_credentials": "Flat JSON that allows you to set a username and a password.",
          "database_credentials": "Flat JSON that allows you to set an engine, username, password, host, database name, and port.",
          "ssh_key": "Flat JSON that allows you to set an SSH key."
        }
      },
      "default": "unknown_type"
    },
    "path": {
      "type": "string",
      "description": "Path of the secret.\nLocation of the secret in the directory structure."
    },
    "ephemeral_policy": {
      "type": "object",
      "description": "Ephemeral policy of the secret.\n(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.\nSee 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"
      ]
    },
    "used_by": {
      "type": "array",
      "description": "List of Scaleway resources that can access and manage the secret.",
      "items": {
        "$ref": "#/components/schemas/scaleway.secret_manager.v1beta1.Product"
      }
    },
    "deletion_requested_at": {
      "type": "string",
      "description": "Returns the time at which deletion was requested. (RFC 3339 format)",
      "format": "date-time",
      "example": "2022-03-22T12:34:56.123456Z",
      "nullable": true
    },
    "key_id": {
      "type": "string",
      "description": "ID of the Scaleway Key Manager key.\n(Optional.) The Scaleway Key Manager key ID used to encrypt and decrypt secret versions. (UUID format)",
      "example": "6170692e-7363-616c-6577-61792e636f6d",
      "nullable": true
    },
    "region": {
      "type": "string",
      "description": "Region of the secret."
    }
  },
  "x-properties-order": [
    "id",
    "project_id",
    "name",
    "status",
    "created_at",
    "updated_at",
    "tags",
    "version_count",
    "description",
    "managed",
    "protected",
    "type",
    "path",
    "ephemeral_policy",
    "used_by",
    "deletion_requested_at",
    "key_id",
    "region"
  ]
}