Search or ask Docker

SecretSpec

SecretSpec schema in Docker Engine API 1.57.

View Markdown

Schema

Type: object

Data

Type: string

Data is the data to store as a secret, formatted as a standard base64-encoded (RFC 4648) string. It must be empty if the Driver field is set, in which case the data is loaded from an external secret store. The maximum allowed size is 500KB, as defined in MaxSecretSize.

This field is only used to create a secret, and is not returned by other endpoints.

All schema constraints and annotations
{
  "description": "Data is the data to store as a secret, formatted as a standard base64-encoded\n([RFC 4648](https://tools.ietf.org/html/rfc4648#section-4)) string.\nIt must be empty if the Driver field is set, in which case the data is\nloaded from an external secret store. The maximum allowed size is 500KB,\nas defined in [MaxSecretSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0/api/validation#MaxSecretSize).\n\nThis field is only used to _create_ a secret, and is not returned by\nother endpoints.\n",
  "example": "",
  "type": "string"
}
Driver

Schema: Driver

Name of the secrets driver used to fetch the secret's value from an external secret store.
All schema constraints and annotations
{
  "$ref": "#/components/schemas/Driver",
  "description": "Name of the secrets driver used to fetch the secret's value from an\nexternal secret store.\n"
}
Labels

Type: object

User-defined key/value metadata.
All schema constraints and annotations
{
  "additionalProperties": {
    "type": "string"
  },
  "description": "User-defined key/value metadata.",
  "example": {
    "com.example.some-label": "some-value",
    "com.example.some-other-label": "some-other-value"
  },
  "type": "object"
}
Name

Type: string

User-defined name of the secret.
All schema constraints and annotations
{
  "description": "User-defined name of the secret.",
  "type": "string"
}
Templating

Schema: Driver

Templating driver, if applicable

Templating controls whether and how to evaluate the config payload as a template. If no driver is set, no templating is used.

All schema constraints and annotations
{
  "$ref": "#/components/schemas/Driver",
  "description": "Templating driver, if applicable\n\nTemplating controls whether and how to evaluate the config payload as\na template. If no driver is set, no templating is used.\n"
}
All schema constraints and annotations
{
  "properties": {
    "Data": {
      "description": "Data is the data to store as a secret, formatted as a standard base64-encoded\n([RFC 4648](https://tools.ietf.org/html/rfc4648#section-4)) string.\nIt must be empty if the Driver field is set, in which case the data is\nloaded from an external secret store. The maximum allowed size is 500KB,\nas defined in [MaxSecretSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0/api/validation#MaxSecretSize).\n\nThis field is only used to _create_ a secret, and is not returned by\nother endpoints.\n",
      "example": "",
      "type": "string"
    },
    "Driver": {
      "$ref": "#/components/schemas/Driver",
      "description": "Name of the secrets driver used to fetch the secret's value from an\nexternal secret store.\n"
    },
    "Labels": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "User-defined key/value metadata.",
      "example": {
        "com.example.some-label": "some-value",
        "com.example.some-other-label": "some-other-value"
      },
      "type": "object"
    },
    "Name": {
      "description": "User-defined name of the secret.",
      "type": "string"
    },
    "Templating": {
      "$ref": "#/components/schemas/Driver",
      "description": "Templating driver, if applicable\n\nTemplating controls whether and how to evaluate the config payload as\na template. If no driver is set, no templating is used.\n"
    }
  },
  "type": "object"
}