39 Shape
A shape is a resource profile that specifies the number of CPU threads and the amount of memory (in MB) to be allocated to an instance. When you create an instance, by using a launch plan for example, you must specify the shape you want to use. For more information, see About Machine Images and Shapes in Using Oracle Cloud Infrastructure Compute Classic.
Before running the CLI commands described in this section, make sure that you've installed the CLI client and set up the required environment variables as described in Preparing to Use the CLI.
Commands
shape list
Retrieves the name of all the available shapes.
Required Role
To complete this task, you must have the Compute_Monitor
or Compute_Operations
role. If this role isn’t assigned to you or you’re not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Syntax
opc compute shape list
For help with the parameters and options of this command, run the command with the -h
option.
Example
This command retrieves the name for all available shapes.
opc -f table compute shape list
Sample Output
Note that this output is just an example. Some lines may be truncated with ellipses (...) for readability. For accurate and up-to-date information about each shape, see About Machine Images and Shapes in Using Oracle Cloud Infrastructure Compute Classic.
+------------+ NAME +------------+ oc3 oc4 oc5 oc6 ... +------------+
shape get
Retrieves the CPU and memory details of the specified shape.
Required Role
To complete this task, you must have the Compute_Monitor
or Compute_Operations
role. If this role isn’t assigned to you or you’re not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Syntax
opc compute shape get name
For help with the parameters and options of this command, run the command with the -h
option.
Example
opc -f json compute shape get oc3
Sample Output
This output is just an example. For accurate and up-to-date information about each shape, see About Machine Images and Shapes in Using Oracle Cloud Infrastructure Compute Classic.
The cpus
field shows the number of CPU threads and the ram
field shows the amount of memory in MBs. Ignore the io
attribute in the output. The disk I/O rate is the same across all shapes though the output may indicate otherwise.
{
"cpus": 2,
"gpus": 0,
"io": 200,
"is_root_ssd": false,
"name": "oc3",
"nds_iops_limit": 0,
"placement_requirements": [],
"ram": 7680,
"root_disk_size": 0,
"ssd_data_size": 0,
"uri": "https://api-z999.compute.us0.oraclecloud.com/shape/oc3"
}