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
Key | Datatype | Required | Description |
---|---|---|---|
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. | |||
opc-retry-token | string | A 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-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"}