Skip to main content

instance_pools

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

Overview​

Nameinstance_pools
TypeResource
Idoci.compute.instance_pools

Fields​

The following fields are returned by SELECT queries:

The instance pool was retrieved.

NameDatatypeDescription
idstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the instance pool.
compartmentIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the instance pool.
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"}
instanceConfigurationIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the instance configuration associated with the instance pool.
instanceDisplayNameFormatterstringA user-friendly formatter for the instance pool's instances. Instance displaynames follow the format. The formatter does not retroactively change instance's displaynames, only instance displaynames in the future follow the format (x-default-description: null)
instanceHostnameFormatterstringA user-friendly formatter for the instance pool's instances. Instance hostnames follow the format. The formatter does not retroactively change instance's hostnames, only instance hostnames in the future follow the format (x-default-description: null)
lifecycleManagementobjectThe lifecycle management options for the instance pool.
lifecycleStatestringThe current state of the instance pool. (PROVISIONING, SCALING, STARTING, STOPPING, TERMINATING, STOPPED, TERMINATED, RUNNING)
loadBalancersarrayThe load balancers attached to the instance pool.
placementConfigurationsarrayThe placement configurations for the instance pool.
sizeintegerThe number of instances that should be in the instance pool.
timeCreatedstring (date-time)The date and time the instance pool 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
getselectinstancePoolId, regionGets the specified instance pool
listselectcompartmentId, regiondisplayName, limit, page, sortBy, sortOrder, lifecycleStateLists the instance pools in the specified compartment.
attachinsertinstancePoolId, region, loadBalancerId, backendSetName, port, vnicSelectionopc-retry-token, if-matchAttach a load balancer to the instance pool.<br />
createinsertregion, compartmentId, instanceConfigurationId, placementConfigurations, sizeopc-retry-tokenCreates an instance pool.<br /><br />To determine whether capacity is available for a specific shape before you create an instance pool,<br />use the [CreateComputeCapacityReport](#/en/iaas/latest/ComputeCapacityReport/CreateComputeCapacityReport)<br />operation.<br />
updateupdateinstancePoolId, regionopc-retry-token, if-matchUpdate the specified instance pool.<br /><br />The OCID of the instance pool remains the same.<br />
terminatedeleteinstancePoolId, regionif-matchTerminate the specified instance pool.<br /><br />Warning: When you delete an instance pool, the resources that were created by the pool are permanently<br />deleted, including associated instances, attached boot volumes, and block volumes.<br /><br />If an autoscaling configuration applies to the instance pool, the autoscaling configuration will be deleted<br />asynchronously after the pool is deleted. You can also manually delete the autoscaling configuration using<br />the DeleteAutoScalingConfiguration operation in the Autoscaling API.<br />
change_compartmentexecinstancePoolId, region, compartmentIdif-match, opc-request-id, opc-retry-tokenMoves an instance pool into a different compartment within the same tenancy. For<br />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 pool to a different compartment, associated resources such as the instances in<br />the pool, boot volumes, VNICs, and autoscaling configurations are not moved.<br />
detach_instance_pool_instanceexecinstancePoolId, region, instanceIdopc-retry-tokenDetaches an instance from an instance pool.<br />
detach_load_balancerexecinstancePoolId, region, loadBalancerId, backendSetNameopc-retry-token, if-matchDetach a load balancer from the instance pool.<br />
reset_instance_poolexecinstancePoolId, regionopc-retry-token, if-matchPerforms the reset (immediate power off and power on) action on the specified instance pool,<br />which performs the action on all the instances in the pool.<br />
softreset_instance_poolexecinstancePoolId, regionopc-retry-token, if-matchPerforms the softreset (ACPI shutdown and power on) action on the specified instance pool,<br />which performs the action on all the instances in the pool.<br /><br />Softreset gracefully reboots the instances by sending a shutdown command to the operating systems.<br />After waiting 15 minutes for the OS to shut down, the instances are powered off and then powered back on.<br />
softstop_instance_poolexecinstancePoolId, regionopc-retry-token, if-matchPerforms the softstop (ACPI shutdown and power on) action on the specified instance pool,<br />which performs the action on all the instances in the pool.<br /><br />Softstop gracefully reboots the instances by sending a shutdown command to the operating systems.<br />After waiting 15 minutes for the OS to shutdown, the instances are powered off and then powered back on.<br />
start_instance_poolexecinstancePoolId, regionopc-retry-token, if-matchPerforms the start (power on) action on the specified instance pool,<br />which performs the action on all the instances in the pool.<br />
stop_instance_poolexecinstancePoolId, regionopc-retry-token, if-matchPerforms the stop (immediate power off) action on the specified instance pool,<br />which performs the action on all the instances in the pool.<br />
termination_proceed_instance_pool_instanceexecinstancePoolId, region, instanceIdopc-retry-tokenMarks an instance in an instance pool to be ready for termination.<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.
instancePoolIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the instance pool.
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)
displayNamestringA filter to return only resources that match the given display name exactly.
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.
lifecycleStatestringA filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
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-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 pool

SELECT
id,
compartmentId,
definedTags,
displayName,
freeformTags,
instanceConfigurationId,
instanceDisplayNameFormatter,
instanceHostnameFormatter,
lifecycleManagement,
lifecycleState,
loadBalancers,
placementConfigurations,
size,
timeCreated
FROM oci.compute.instance_pools
WHERE instancePoolId = '{{ instancePoolId }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples​

Attach a load balancer to the instance pool.<br />

INSERT INTO oci.compute.instance_pools (
backendSetName,
loadBalancerId,
port,
vnicSelection,
instancePoolId,
region,
opc-retry-token,
if-match
)
SELECT
'{{ backendSetName }}' /* required */,
'{{ loadBalancerId }}' /* required */,
{{ port }} /* required */,
'{{ vnicSelection }}' /* required */,
'{{ instancePoolId }}',
'{{ region }}',
'{{ opc-retry-token }}',
'{{ if-match }}'
RETURNING
id,
compartmentId,
definedTags,
displayName,
freeformTags,
instanceConfigurationId,
instanceDisplayNameFormatter,
instanceHostnameFormatter,
lifecycleManagement,
lifecycleState,
loadBalancers,
placementConfigurations,
size,
timeCreated
;

UPDATE examples​

Update the specified instance pool.<br /><br />The OCID of the instance pool remains the same.<br />

UPDATE oci.compute.instance_pools
SET
definedTags = '{{ definedTags }}',
displayName = '{{ displayName }}',
freeformTags = '{{ freeformTags }}',
instanceConfigurationId = '{{ instanceConfigurationId }}',
instanceDisplayNameFormatter = '{{ instanceDisplayNameFormatter }}',
instanceHostnameFormatter = '{{ instanceHostnameFormatter }}',
lifecycleManagement = '{{ lifecycleManagement }}',
placementConfigurations = '{{ placementConfigurations }}',
size = {{ size }}
WHERE
instancePoolId = '{{ instancePoolId }}' --required
AND region = '{{ region }}' --required
AND opc-retry-token = '{{ opc-retry-token}}'
AND if-match = '{{ if-match}}'
RETURNING
id,
compartmentId,
definedTags,
displayName,
freeformTags,
instanceConfigurationId,
instanceDisplayNameFormatter,
instanceHostnameFormatter,
lifecycleManagement,
lifecycleState,
loadBalancers,
placementConfigurations,
size,
timeCreated;

DELETE examples​

Terminate the specified instance pool.<br /><br />Warning: When you delete an instance pool, the resources that were created by the pool are permanently<br />deleted, including associated instances, attached boot volumes, and block volumes.<br /><br />If an autoscaling configuration applies to the instance pool, the autoscaling configuration will be deleted<br />asynchronously after the pool is deleted. You can also manually delete the autoscaling configuration using<br />the DeleteAutoScalingConfiguration operation in the Autoscaling API.<br />

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

Lifecycle Methods​

Moves an instance pool into a different compartment within the same tenancy. For<br />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 pool to a different compartment, associated resources such as the instances in<br />the pool, boot volumes, VNICs, and autoscaling configurations are not moved.<br />

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