Skip to main content

shapes

Creates, updates, deletes, gets or lists a shapes resource.

Overview​

Nameshapes
TypeResource
Idoci.compute.shapes

Fields​

The following fields are returned by SELECT queries:

A compute instance shape that can be used in [LaunchInstance](#/en/iaas/latest/Instance/LaunchInstance).<br />For more information, see [Overview of the Compute Service](/iaas/Content/Compute/Concepts/computeoverview.htm) and<br />[Compute Shapes](/iaas/Content/Compute/References/computeshapes.htm).<br />

NameDatatypeDescription
availabilityDomainstringThe shape's availability domain.
baselineOcpuUtilizationsarrayFor a subcore burstable VM, the supported baseline OCPU utilization for instances that use this shape.
billingTypestringHow instances that use this shape are charged. (ALWAYS_FREE, LIMITED_FREE, PAID)
gpuDescriptionstringA short description of the graphics processing unit (GPU) available for this shape. If the shape does not have any GPUs, this field is null.
gpusintegerThe number of GPUs available for this shape.
isBilledForStoppedInstancebooleanWhether billing continues when the instances that use this shape are in the stopped state.
isFlexiblebooleanWhether the shape supports creating flexible instances. A [flexible shape](/iaas/Content/Compute/References/computeshapes.htm#flexible) is a shape that lets you customize the number of OCPUs and the amount of memory when launching or resizing your instance.
isLiveMigrationSupportedbooleanWhether live migration is supported for this shape.
isSubcorebooleanWhether the shape supports creating subcore or burstable instances. A [burstable instance](/iaas/Content/Compute/References/burstable-instances.htm) is a virtual machine (VM) instance that provides a baseline level of CPU performance with the ability to burst to a higher level to support occasional spikes in usage.
localDiskDescriptionstringA short description of the local disks available for this shape. If the shape does not have any local disks, this field is null.
localDisksintegerThe number of local disks available for this shape.
localDisksTotalSizeInGBsnumber (float)The aggregate size of the local disks available for this shape, in gigabytes. If the shape does not have any local disks, this field is null.
maxVnicAttachmentOptionsobjectFor a flexible shape, the number of VNIC attachments that are available for instances that use this shape. If this field is null, then this shape has a fixed maximum number of VNIC attachments equal to maxVnicAttachments.
maxVnicAttachmentsintegerThe maximum number of VNIC attachments available for this shape.
memoryInGBsnumber (float)The default amount of memory available for this shape, in gigabytes.
memoryOptionsobjectFor a flexible shape, the amount of memory available for instances that use this shape. If this field is null, then this shape has a fixed amount of memory equivalent to memoryInGBs.
minTotalBaselineOcpusRequirednumber (int32)For a subcore burstable VM, the minimum total baseline OCPUs required. The total baseline OCPUs is equal to baselineOcpuUtilization chosen multiplied by the number of OCPUs chosen.
networkPortsintegerThe number of physical network interface card (NIC) ports available for this shape.
networkingBandwidthInGbpsnumber (float)The networking bandwidth available for this shape, in gigabits per second.
networkingBandwidthOptionsobjectFor a flexible shape, the amount of networking bandwidth available for instances that use this shape. If this field is null, then this shape has a fixed amount of bandwidth equivalent to networkingBandwidthInGbps.
ocpuOptionsobjectFor a flexible shape, the number of OCPUs available for instances that use this shape. If this field is null, then this shape has a fixed number of OCPUs equal to ocpus.
ocpusnumber (float)The default number of OCPUs available for this shape.
platformConfigOptionsobjectThe list of supported platform configuration options for this shape.
platformNamesarrayThe list of platform names that can be used for this shapes
processorDescriptionstringA short description of the shape's processor (CPU).
quotaNamesarrayThe list of of compartment quotas for the shape.
rdmaBandwidthInGbpsintegerThe networking bandwidth available for the remote direct memory access (RDMA) network for this shape, in gigabits per second.
rdmaPortsintegerThe number of networking ports available for the remote direct memory access (RDMA) network between nodes in a high performance computing (HPC) cluster network. If the shape does not support cluster networks, this value is 0.
recommendedAlternativesarrayThe list of shapes and shape details (if applicable) that Oracle recommends that you use as an alternative to the current shape.
resizeCompatibleShapesarrayThe list of compatible shapes that this shape can be changed to. For more information, see [Changing the Shape of an Instance](/iaas/Content/Compute/Tasks/resizinginstances.htm).
shapestringThe name of the shape. You can enumerate all available shapes by calling [ListShapes](#/en/iaas/latest/Shape/ListShapes).

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectcompartmentId, regionavailabilityDomain, limit, page, imageId, shapeLists the shapes that can be used to launch an instance within the specified compartment. You can<br />filter the list by compatibility with a specific image.<br />
remove_image_shape_compatibility_entryexecimageId, shapeName, regionRemoves a shape from the compatible shapes list for the image.
add_image_shape_compatibility_entryexecimageId, shapeName, regionAdds a shape to the compatible shapes list for the image.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
compartmentIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
imageIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the image.
regionstringOCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION)
shapeNamestringShape name.
availabilityDomainstringThe name of the availability domain. Example: Uocm:PHX-AD-1
imageIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of an image.
limitintegerFor list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). Example: 50
pagestringFor list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine).
shapestringShape name.

SELECT examples​

Lists the shapes that can be used to launch an instance within the specified compartment. You can<br />filter the list by compatibility with a specific image.<br />

SELECT
availabilityDomain,
baselineOcpuUtilizations,
billingType,
gpuDescription,
gpus,
isBilledForStoppedInstance,
isFlexible,
isLiveMigrationSupported,
isSubcore,
localDiskDescription,
localDisks,
localDisksTotalSizeInGBs,
maxVnicAttachmentOptions,
maxVnicAttachments,
memoryInGBs,
memoryOptions,
minTotalBaselineOcpusRequired,
networkPorts,
networkingBandwidthInGbps,
networkingBandwidthOptions,
ocpuOptions,
ocpus,
platformConfigOptions,
platformNames,
processorDescription,
quotaNames,
rdmaBandwidthInGbps,
rdmaPorts,
recommendedAlternatives,
resizeCompatibleShapes,
shape
FROM oci.compute.shapes
WHERE compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND availabilityDomain = '{{ availabilityDomain }}'
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND imageId = '{{ imageId }}'
AND shape = '{{ shape }}'
;

Lifecycle Methods​

Removes a shape from the compatible shapes list for the image.

EXEC oci.compute.shapes.remove_image_shape_compatibility_entry
@imageId='{{ imageId }}' --required,
@shapeName='{{ shapeName }}' --required,
@region='{{ region }}' --required
;