Updates a secret's properties.
PUT {{baseUrl}}/secrets/:secretId
Updates the properties of a secret. Specifically, you can update the version number of the secret to make
that version number the current version. You can also update a secret's description, its free-form or defined tags, rules
and the secret contents. Updating the secret content automatically creates a new secret version. You cannot, however, update the current secret version number, secret contents, and secret rules at the
same time. Furthermore, the secret must in an ACTIVE
lifecycle state to be updated.
This operation is not supported by the Oracle Cloud Infrastructure Terraform Provider.
Request Body
{"currentVersionNumber"=>"<long>", "description"=>"<string>", "freeformTags"=>{"in9"=>"<string>"}, "secretContent"=>{"contentType"=>"BASE64", "name"=>"<string>", "stage"=>"CURRENT"}, "secretRules"=>[{"ruleType"=>"SECRET_EXPIRY_RULE"}, {"ruleType"=>"SECRET_REUSE_RULE"}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
if-match | string | For optimistic concurrency control. In the PUT or DELETE call for a | |
resource, set the if-match parameter to the value of the etag from a | |||
previous GET or POST response for that resource. The resource will be | |||
updated or deleted only if the etag you provide matches the resource's | |||
current etag value. | |||
opc-request-id | string | Unique identifier for the request. If provided, the returned request ID | |
will include this value. Otherwise, a random request ID will be | |||
generated by the service. | |||
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"id":"\u003cstring\u003e","vaultId":"\u003cstring\u003e","secretName":"\u003cstring\u003e","compartmentId":"\u003cstring\u003e","lifecycleState":"DELETING","timeCreated":"\u003cdateTime\u003e","currentVersionNumber":"\u003clong\u003e","definedTags":{"mollit__":{"occaecat_b43":{},"elit332":{}}},"description":"\u003cstring\u003e","freeformTags":{"elit4":"\u003cstring\u003e"},"keyId":"\u003cstring\u003e","lifecycleDetails":"\u003cstring\u003e","metadata":{"aute_44":{},"dolor_17":{}},"secretRules":[{"ruleType":"SECRET_REUSE_RULE"},{"ruleType":"SECRET_EXPIRY_RULE"}],"timeOfCurrentVersionExpiry":"\u003cdateTime\u003e","timeOfDeletion":"\u003cdateTime\u003e"}