Secret

Update a Secret

post/secrets/{id}/update

Request

  • Base URL
    /v1.44 (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /v1.44/secrets/{id}/update
  • Auth
    none declared

Path parameters

idstring required

The ID or name of the secret

Query parameters

versioninteger required

The version number of the secret object being updated. This is required to avoid conflicting writes.

Request body

Namestring

User-defined name of the secret.

Labelsobject

User-defined key/value metadata.

Datastring

Base64-url-safe-encoded (RFC 4648) data to store as secret.

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

Example request

{
  "Labels": {
    "com.example.some-label": "some-value",
    "com.example.some-other-label": "some-other-value"
  },
  "Driver": {
    "Name": "some-driver",
    "Options": {
      "OptionA": "value for driver-specific option A",
      "OptionB": "value for driver-specific option B"
    }
  },
  "Templating": {
    "Name": "some-driver",
    "Options": {
      "OptionA": "value for driver-specific option A",
      "OptionB": "value for driver-specific option B"
    }
  }
}

Response

no error

Changes

No recorded changes to this operation across all 70 revisions of this API.