Create Compartment for the App infra

POST https://identity.{{region}}.oraclecloud.com/20160918/compartments/

Creates a new compartment in the specified compartment.

Important: Compartments cannot be deleted.

Specify the parent compartment's OCID as the compartment ID in the request object. Remember that the tenancy is simply the root compartment. For information about OCIDs, see Resource Identifiers.

You must also specify a name for the compartment, which must be unique across all compartments in your tenancy. You can use this name or the OCID when writing policies that apply to the compartment. For more information about policies, see How Policies Work.

You must also specify a description for the compartment (although it can be an empty string). It does not have to be unique, and you can change it anytime with UpdateCompartment.

After you send your request, the new object's lifecycleState will temporarily be CREATING. Before using the object, first make sure its lifecycleState has changed to ACTIVE.

Request Body

{"name"=>"End-To-End_AppDev", "compartmentId"=>"{{compartment_ocid}}", "description"=>"End-To-End Example - Compartment"}

HEADERS

KeyDatatypeRequiredDescription
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
Datestring(Required) Current Date
Authorizationstring(Required) Signature Authentication on Authorization header
x-content-sha256string(Required) Content sha256 for POST, PUT and PATCH operations

RESPONSES

status: OK

{"id":"elit","compartmentId":"proident Lorem","name":"nisi ipsum","description":"elit do ad in","timeCreated":"1972-02-15T10:25:24.856Z","lifecycleState":"CREATING","definedTags":{},"freeformTags":{},"inactiveStatus":70870037,"isAccessible":true}