Skip to main content

instance_configurations

Creates, updates, deletes, gets or lists an instance_configurations resource.

Overview​

Nameinstance_configurations
TypeResource
Idoci.compute.instance_configurations

Fields​

The following fields are returned by SELECT queries:

The instance configuration was retrieved.

NameDatatypeDescription
idstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the instance configuration.
compartmentIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the instance configuration.
deferredFieldsarrayParameters that were not specified when the instance configuration was created, but that are required to launch an instance from the instance configuration. See the [LaunchInstanceConfiguration](#/en/iaas/latest/Instance/LaunchInstanceConfiguration) operation.
definedTagsobjectDefined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Operations": {"CostCenter": "42"}}
displayNamestringA user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
freeformTagsobjectFree-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"}
instanceDetailsobject
timeCreatedstring (date-time)The date and time the instance configuration was created, in the format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectinstanceConfigurationId, regionGets the specified instance configuration
listselectcompartmentId, regionlimit, page, sortBy, sortOrderLists the instance configurations in the specified compartment.<br />
launchinsertinstanceConfigurationId, region, instanceTypeopc-retry-token, opc-compute-cluster-idCreates an instance from an instance configuration.<br /><br />If the instance configuration does not include all of the parameters that are<br />required to create an instance, such as the availability domain and subnet ID, you must<br />provide these parameters when you create an instance from the instance configuration.<br />For more information, see the [InstanceConfiguration](#/en/iaas/latest/InstanceConfiguration/)<br />resource.<br /><br />To determine whether capacity is available for a specific shape before you create an instance,<br />use the [CreateComputeCapacityReport](#/en/iaas/latest/ComputeCapacityReport/CreateComputeCapacityReport)<br />operation.<br />
createinsertregion, compartmentIdopc-retry-tokenCreates an instance configuration. An instance configuration is a template that defines the<br />settings to use when creating Compute instances.<br />
updateupdateinstanceConfigurationId, regionopc-retry-token, if-matchUpdates the free-form tags, defined tags, and display name of an instance configuration.
deletedeleteinstanceConfigurationId, regionif-matchDeletes an instance configuration.
change_compartmentexecinstanceConfigurationId, region, compartmentIdif-match, opc-request-id, opc-retry-tokenMoves an instance configuration into a different compartment within the same tenancy.<br />For information about moving resources between compartments, see<br />[Moving Resources to a Different Compartment](/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).<br /><br />When you move an instance configuration to a different compartment, associated resources such as<br />instance pools are not moved.<br /><br />Important: Most of the properties for an existing instance configuration, including the compartment,<br />cannot be modified after you create the instance configuration. Although you can move an instance configuration<br />to a different compartment, you will not be able to use the instance configuration to manage instance pools<br />in the new compartment. If you want to update an instance configuration to point to a different compartment,<br />you should instead create a new instance configuration in the target compartment using<br />[CreateInstanceConfiguration](/iaas/api/#/en/iaas/20160918/InstanceConfiguration/CreateInstanceConfiguration).<br />

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.
instanceConfigurationIdstringThe OCID of the instance configuration.
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)
if-matchstringFor optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
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
opc-compute-cluster-idstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the [compute cluster](/iaas/Content/Compute/Tasks/compute-clusters.htm) that the instance will be created in.
opc-request-idstringUnique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
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 (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
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).
sortBystringThe field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.
sortOrderstringThe sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive.

SELECT examples​

Gets the specified instance configuration

SELECT
id,
compartmentId,
deferredFields,
definedTags,
displayName,
freeformTags,
instanceDetails,
timeCreated
FROM oci.compute.instance_configurations
WHERE instanceConfigurationId = '{{ instanceConfigurationId }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples​

Creates an instance from an instance configuration.<br /><br />If the instance configuration does not include all of the parameters that are<br />required to create an instance, such as the availability domain and subnet ID, you must<br />provide these parameters when you create an instance from the instance configuration.<br />For more information, see the [InstanceConfiguration](#/en/iaas/latest/InstanceConfiguration/)<br />resource.<br /><br />To determine whether capacity is available for a specific shape before you create an instance,<br />use the [CreateComputeCapacityReport](#/en/iaas/latest/ComputeCapacityReport/CreateComputeCapacityReport)<br />operation.<br />

INSERT INTO oci.compute.instance_configurations (
instanceType,
instanceConfigurationId,
region,
opc-retry-token,
opc-compute-cluster-id
)
SELECT
'{{ instanceType }}' /* required */,
'{{ instanceConfigurationId }}',
'{{ region }}',
'{{ opc-retry-token }}',
'{{ opc-compute-cluster-id }}'
RETURNING
id,
agentConfig,
availabilityConfig,
availabilityDomain,
capacityReservationId,
clusterPlacementGroupId,
compartmentId,
dedicatedVmHostId,
definedTags,
displayName,
extendedMetadata,
faultDomain,
freeformTags,
imageId,
instanceConfigurationId,
instanceOptions,
ipxeScript,
isAIEnterpriseEnabled,
launchMode,
launchOptions,
licensingConfigs,
lifecycleState,
metadata,
placementConstraintDetails,
platformConfig,
preemptibleInstanceConfig,
region,
securityAttributes,
securityAttributesState,
shape,
shapeConfig,
sourceDetails,
timeCreated,
timeMaintenanceRebootDue
;

UPDATE examples​

Updates the free-form tags, defined tags, and display name of an instance configuration.

UPDATE oci.compute.instance_configurations
SET
definedTags = '{{ definedTags }}',
displayName = '{{ displayName }}',
freeformTags = '{{ freeformTags }}'
WHERE
instanceConfigurationId = '{{ instanceConfigurationId }}' --required
AND region = '{{ region }}' --required
AND opc-retry-token = '{{ opc-retry-token}}'
AND if-match = '{{ if-match}}'
RETURNING
id,
compartmentId,
deferredFields,
definedTags,
displayName,
freeformTags,
instanceDetails,
timeCreated;

DELETE examples​

Deletes an instance configuration.

DELETE FROM oci.compute.instance_configurations
WHERE instanceConfigurationId = '{{ instanceConfigurationId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
;

Lifecycle Methods​

Moves an instance configuration into a different compartment within the same tenancy.<br />For information about moving resources between compartments, see<br />[Moving Resources to a Different Compartment](/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).<br /><br />When you move an instance configuration to a different compartment, associated resources such as<br />instance pools are not moved.<br /><br />Important: Most of the properties for an existing instance configuration, including the compartment,<br />cannot be modified after you create the instance configuration. Although you can move an instance configuration<br />to a different compartment, you will not be able to use the instance configuration to manage instance pools<br />in the new compartment. If you want to update an instance configuration to point to a different compartment,<br />you should instead create a new instance configuration in the target compartment using<br />[CreateInstanceConfiguration](/iaas/api/#/en/iaas/20160918/InstanceConfiguration/CreateInstanceConfiguration).<br />

EXEC oci.compute.instance_configurations.change_compartment
@instanceConfigurationId='{{ instanceConfigurationId }}' --required,
@region='{{ region }}' --required,
@if-match='{{ if-match }}',
@opc-request-id='{{ opc-request-id }}',
@opc-retry-token='{{ opc-retry-token }}'
@@json=
'{
"compartmentId": "{{ compartmentId }}"
}'
;