GetCompartment

get

/20160918/compartments/{compartment_id}

Get the specified compartment's information. This operation does not return a list of all the resources inside the compartment. There is no single API operation that lists all resources of all types in a compartment. To find out what resources are in a compartment, use the List operation for each resource type, specifying the OCID of the compartment as a parameter in the request. For example, call the Compute service ListInstances operation or the Block Storage service ListVolumes operation.

Request

Supported Media Types
Path Parameters
Query Parameters
  • This parameter is required to retrieve securityZoneId associated with the compartment.
    Allowed Values: [ "securityZone" ]
Back to Top

Response

Supported Media Types

200 Response

The compartment was retrieved.
Headers
  • For optimistic concurrency control. See if-match.
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Compartment
Type: object
A compartment is a collection of related resources. Compartments are a fundamental component for organizing and isolating cloud resources. For example, use compartments to separate resources for one project or business unit from another, or to manage access to the resources through the use of IAM Service policies.

A common approach is to create a compartment for each major part of your organization. To place a resource in a compartment, simply specify the compartment OCID when you create the resource. For example, to launch an instance into a particular compartment, specify the OCID of that compartment in the LaunchInstance request.

Avoid entering confidential information when you supply string values using the API.

Show Source
Nested Schema : definedTags
Type: object
Additional Properties Allowed
Show Source
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"Operations": {"CostCenter": "42"}}
Nested Schema : freeformTags
Type: object
Additional Properties Allowed
Show Source
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
Nested Schema : additionalProperties
Type: object
Additional Properties Allowed
Show Source
Key-value pair representing a defined tag key and value, scoped to a namespace. Example: {"CostCenter": "42"}
Nested Schema : additionalProperties
Type: object
The value of the tag. Only the String type is supported.

400 Response

Bad Request
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

403 Response

Forbidden
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

404 Response

Not Found
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

500 Response

Internal Server Error
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

Default Response

An error has occurred.
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source
Back to Top