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

KeyDatatypeRequiredDescription
if-matchstringFor 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-idstringUnique 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-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;vaultId&quot;:&quot;\u003cstring\u003e&quot;,&quot;secretName&quot;:&quot;\u003cstring\u003e&quot;,&quot;compartmentId&quot;:&quot;\u003cstring\u003e&quot;,&quot;lifecycleState&quot;:&quot;DELETING&quot;,&quot;timeCreated&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;currentVersionNumber&quot;:&quot;\u003clong\u003e&quot;,&quot;definedTags&quot;:{&quot;mollit__&quot;:{&quot;occaecat_b43&quot;:{},&quot;elit332&quot;:{}}},&quot;description&quot;:&quot;\u003cstring\u003e&quot;,&quot;freeformTags&quot;:{&quot;elit4&quot;:&quot;\u003cstring\u003e&quot;},&quot;keyId&quot;:&quot;\u003cstring\u003e&quot;,&quot;lifecycleDetails&quot;:&quot;\u003cstring\u003e&quot;,&quot;metadata&quot;:{&quot;aute_44&quot;:{},&quot;dolor_17&quot;:{}},&quot;secretRules&quot;:[{&quot;ruleType&quot;:&quot;SECRET_REUSE_RULE&quot;},{&quot;ruleType&quot;:&quot;SECRET_EXPIRY_RULE&quot;}],&quot;timeOfCurrentVersionExpiry&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;timeOfDeletion&quot;:&quot;\u003cdateTime\u003e&quot;}