Update a Secret Run in API Explorer
Query parameters
-
The version number of the secret object being updated. This is required to avoid conflicting writes.
Body
The spec of the secret to update. Currently, only the Labels field can be updated. All other fields must remain unchanged from the SecretInspect endpoint response values.
-
User-defined name of the secret.
-
User-defined key/value metadata.
-
Data is the data to store as a secret, formatted as a Base64-url-safe-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.
-
Name of the secrets driver used to fetch the secret's value from an external secret store.
-
Name of the secrets driver used to fetch the secret's value from an external secret store.
curl \
--request POST 'http://api.example.com/v1.49/secrets/{id}/update?version=42' \
--header "Content-Type: application/json" \
--data '{"Name":"string","Labels":{"com.example.some-label":"some-value","com.example.some-other-label":"some-other-value"},"Data":"string","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"}}}'
{
"Name": "string",
"Labels": {
"com.example.some-label": "some-value",
"com.example.some-other-label": "some-other-value"
},
"Data": "string",
"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"
}
}
}
{
"message": "Something went wrong."
}
{
"message": "Something went wrong."
}
{
"message": "Something went wrong."
}
{
"message": "Something went wrong."
}
{
"message": "Something went wrong."
}
{
"message": "Something went wrong."
}
{
"message": "Something went wrong."
}
{
"message": "Something went wrong."
}