Updates the properties of a specified Credential. The type and secret_name fields in auth are immutable and cannot be modified.
Prerequisites
Endpoint and authentication configured. For details, see Overview and authentication.
Endpoint
POST /vaults/{vault_id}/credentials/{credential_id}
Path parameters
vault_id string (必选)
Vault ID, format vlt_xxx
credential_id string (必选)
Credential ID, format cred_xxx
Request bodyauthobject (可选)Authentication information, always of the environment_variable type. The type and secret_name fields are immutable on update, and an empty secret_value means no change.display_name string (可选)Human-readable name of the Credential, max 255 charactersmetadata object (可选)Custom key-value pairs for business metadataauth.secret_name must match ^[a-zA-Z][a-zA-Z0-9_]*$: start with a letter; only letters, digits, and underscores. It is immutable on update. | Request example |
Response fieldsidstringCredential ID, format cred_xxxtype stringAlways credentialvault_id stringVault ID that the Credential belongs todisplay_name stringHuman-readable name of the Credentialauth objectAuthentication information with sensitive values maskedmetadata objectCustom key-value pairsarchived_at string | nullArchive timestamp; null if not archivedcreated_at stringCreation time, ISO 8601updated_at stringLast update time, ISO 8601request_id stringUnique request identifier | Response |
Error codes
| HTTP status | Error code | Description |
|---|---|---|
| 400 | InvalidParameter | Required parameter missing or invalid |
| 401 | InvalidApiKey | Invalid API key provided |