Creates a secret.

POST {{baseUrl}}/secrets

Creates a new secret according to the details of the request.

This operation is not supported by the Oracle Cloud Infrastructure Terraform Provider.

Request Body

{"vaultId"=>"<string>", "secretName"=>"<string>", "compartmentId"=>"{{compartment_ocid}}", "description"=>"<string>", "freeformTags"=>{"laborum_2a"=>"<string>"}, "keyId"=>"<string>", "secretContent"=>{"contentType"=>"BASE64", "name"=>"<string>", "stage"=>"CURRENT"}, "secretRules"=>[{"ruleType"=>"SECRET_EXPIRY_RULE"}, {"ruleType"=>"SECRET_EXPIRY_RULE"}]}

HEADERS

KeyDatatypeRequiredDescription
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.
opc-retry-tokenstringA token that uniquely identifies a request so it can be retried in case
of a timeout or server error without risk of executing that same action
again. Retry tokens expire after 24 hours, but can be invalidated
before then due to conflicting operations (e.g., if a resource has been
deleted and purged from the system, then a retry of the original
creation request may be rejected).
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;}