compute_host_groups
Creates, updates, deletes, gets or lists a compute_host_groups resource.
Overview​
| Name | compute_host_groups |
| Type | Resource |
| Id | oci.compute.compute_host_groups |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The information host details for the specific host group was retrieved.
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique host group |
availabilityDomain | string | The availability domain of a host group. Example: Uocm:PHX-AD-1 |
compartmentId | string | The OCID of the compartment that contains host group. |
configurations | array | A list of HostGroupConfiguration objects |
definedTags | object | Defined 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"}} |
displayName | string | A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. |
freeformTags | object | Free-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"} |
isTargetedPlacementRequired | boolean | A flag that allows customers to restrict placement for hosts attached to the group. If true, the only way to place on hosts is to target the specific host group. |
lifecycleState | string | The lifecycle state of the host group (ACTIVE, DELETED) |
systemTags | object | Defined 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"}} |
timeCreated | string (date-time) | The date and time the host group was created, in the format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z |
timeUpdated | string (date-time) | The date and time the host group was updated, in the format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z |
The list is being retrieved.
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique host group |
availabilityDomain | string | The availability domain of a host group. Example: Uocm:PHX-AD-1 |
compartmentId | string | The OCID of the compartment that contains host group. |
definedTags | object | Defined 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"}} |
displayName | string | A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. |
freeformTags | object | Free-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"} |
isTargetedPlacementRequired | boolean | A flag that allows customers to restrict placement for hosts attached to the group. If true, the only way to place on hosts is to target the specific host group. |
lifecycleState | string | The current state of the compute host group (x-obmcs-enumref: #/definitions/ComputeHostGroup/lifecycleState) |
systemTags | object | System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace": {"bar-key": "value"}} |
timeCreated | string (date-time) | The date and time the host group was created, in the format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z |
timeUpdated | string (date-time) | The date and time the host group was updated, 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | computeHostGroupId, region | opc-request-id | Gets information about the specified compute host group |
list | select | compartmentId, region | opc-request-id, page, limit | Lists the compute host groups that match the specified criteria and compartment. |
create | insert | region, availabilityDomain, displayName, compartmentId, isTargetedPlacementRequired | opc-request-id, opc-retry-token | Creates a new compute host group in the specified compartment and availability domain. |
update | update | computeHostGroupId, region | if-match, opc-request-id, opc-retry-token | Updates the specified compute host group details. |
delete | delete | computeHostGroupId, region | opc-request-id, if-match | Deletes the specified compute host group |
change_compartment | exec | computeHostGroupId, region, compartmentId | if-match, opc-request-id, opc-retry-token | Moves a compute host group into a different compartment. For information about moving resources between<br />compartments, see [Moving Resources to a Different Compartment](/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).<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.
| Name | Datatype | Description |
|---|---|---|
compartmentId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment. |
computeHostGroupId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compute host group. |
region | string | OCI 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-match | string | For 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. |
limit | integer | For 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-id | string | Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. |
opc-retry-token | string | A 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). |
page | string | For 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). |
SELECT examples​
- get
- list
Gets information about the specified compute host group
SELECT
id,
availabilityDomain,
compartmentId,
configurations,
definedTags,
displayName,
freeformTags,
isTargetedPlacementRequired,
lifecycleState,
systemTags,
timeCreated,
timeUpdated
FROM oci.compute.compute_host_groups
WHERE computeHostGroupId = '{{ computeHostGroupId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;
Lists the compute host groups that match the specified criteria and compartment.
SELECT
id,
availabilityDomain,
compartmentId,
definedTags,
displayName,
freeformTags,
isTargetedPlacementRequired,
lifecycleState,
systemTags,
timeCreated,
timeUpdated
FROM oci.compute.compute_host_groups
WHERE compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
AND page = '{{ page }}'
AND limit = '{{ limit }}'
;
INSERT examples​
- create
- Manifest
Creates a new compute host group in the specified compartment and availability domain.
INSERT INTO oci.compute.compute_host_groups (
availabilityDomain,
compartmentId,
configurations,
definedTags,
displayName,
freeformTags,
isTargetedPlacementRequired,
region,
opc-request-id,
opc-retry-token
)
SELECT
'{{ availabilityDomain }}' /* required */,
'{{ compartmentId }}' /* required */,
'{{ configurations }}',
'{{ definedTags }}',
'{{ displayName }}' /* required */,
'{{ freeformTags }}',
{{ isTargetedPlacementRequired }} /* required */,
'{{ region }}',
'{{ opc-request-id }}',
'{{ opc-retry-token }}'
RETURNING
id,
availabilityDomain,
compartmentId,
configurations,
definedTags,
displayName,
freeformTags,
isTargetedPlacementRequired,
lifecycleState,
systemTags,
timeCreated,
timeUpdated
;
# Description fields are for documentation purposes
- name: compute_host_groups
props:
- name: region
value: "{{ region }}"
description: Required parameter for the compute_host_groups resource.
- name: availabilityDomain
value: "{{ availabilityDomain }}"
description: |
The availability domain of a host group.
Example: `Uocm:PHX-AD-1`
- name: compartmentId
value: "{{ compartmentId }}"
description: |
The OCID of the compartment that contains host group.
- name: configurations
description: |
A list of HostGroupConfiguration objects
value:
- firmwareBundleId: "{{ firmwareBundleId }}"
recycleLevel: "{{ recycleLevel }}"
state: "{{ state }}"
target: "{{ target }}"
- name: definedTags
value: "{{ definedTags }}"
description: |
Defined 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"}}`
- name: displayName
value: "{{ displayName }}"
description: |
A user-friendly name. Does not have to be unique, and it's changeable.
Avoid entering confidential information.
- name: freeformTags
value: "{{ freeformTags }}"
description: |
Free-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"}`
- name: isTargetedPlacementRequired
value: {{ isTargetedPlacementRequired }}
description: |
A flag that allows customers to restrict placement for hosts attached to the group. If true, the only way to place on hosts is to target the specific host group.
- name: opc-request-id
value: "{{ opc-request-id }}"
description: Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
description: Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
- name: opc-retry-token
value: "{{ opc-retry-token }}"
description: A 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).
description: A 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).
UPDATE examples​
- update
Updates the specified compute host group details.
UPDATE oci.compute.compute_host_groups
SET
configurations = '{{ configurations }}',
definedTags = '{{ definedTags }}',
displayName = '{{ displayName }}',
freeformTags = '{{ freeformTags }}',
isTargetedPlacementRequired = {{ isTargetedPlacementRequired }}
WHERE
computeHostGroupId = '{{ computeHostGroupId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
AND opc-request-id = '{{ opc-request-id}}'
AND opc-retry-token = '{{ opc-retry-token}}'
RETURNING
id,
availabilityDomain,
compartmentId,
configurations,
definedTags,
displayName,
freeformTags,
isTargetedPlacementRequired,
lifecycleState,
systemTags,
timeCreated,
timeUpdated;
DELETE examples​
- delete
Deletes the specified compute host group
DELETE FROM oci.compute.compute_host_groups
WHERE computeHostGroupId = '{{ computeHostGroupId }}' --required
AND region = '{{ region }}' --required
AND opc-request-id = '{{ opc-request-id }}'
AND if-match = '{{ if-match }}'
;
Lifecycle Methods​
- change_compartment
Moves a compute host group into a different compartment. For information about moving resources between<br />compartments, see [Moving Resources to a Different Compartment](/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).<br />
EXEC oci.compute.compute_host_groups.change_compartment
@computeHostGroupId='{{ computeHostGroupId }}' --required,
@region='{{ region }}' --required,
@if-match='{{ if-match }}',
@opc-request-id='{{ opc-request-id }}',
@opc-retry-token='{{ opc-retry-token }}'
@@json=
'{
"compartmentId": "{{ compartmentId }}"
}'
;