compute_hosts
Creates, updates, deletes, gets or lists a compute_hosts resource.
Overview​
| Name | compute_hosts |
| Type | Resource |
| Id | oci.compute.compute_hosts |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The information host details for the specific host was retrieved.
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique host |
additionalData | object | Additional data that can be exposed to the customer. Will include raw fault codes for strategic customers |
availabilityDomain | string | The availability domain of the compute host. Example: Uocm:US-CHICAGO-1-AD-2 |
capacityReservationId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) for the Capacity Reserver that is currently on host |
compartmentId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) for the compartment. This should always be the root compartment. |
computeHostGroupId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique host group associated with the Compute Bare Metal Host. |
configurationData | object | Compute Host Configuration Data |
configurationState | string | Configuration state of the Compute Bare Metal Host. (CONFORMANT, NON_CONFORMANT, CHECKING, PRE_APPLYING, APPLYING, UNKNOWN) (x-obmcs-top-level-enum: #/definitions/ConfigurationState) |
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. |
faultDomain | string | A fault domain is a grouping of hardware and infrastructure within an availability domain. Each availability domain contains three fault domains. Fault domains let you distribute your instances so that they are not on the same physical hardware within a single availability domain. A hardware failure or Compute hardware maintenance that affects one fault domain does not affect instances in other fault domains. This field is the Fault domain of the host |
firmwareBundleId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique firmware bundle associated with the Host. |
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"} |
gpuMemoryFabricId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique GPU Memory Fabric |
health | string | The heathy state of the host (HEALTHY, UNHEALTHY) |
hpcIslandId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island |
impactedComponentDetails | object | A list that contains impacted components related to an unhealthy host. An impacted component will be a free-form structure of key values pairs that will provide more or less details based on data tiering |
instanceId | string | The public [OCID](/iaas/Content/General/Concepts/identifiers.htm) for the Virtual Machine or Bare Metal instance |
lifecycleDetails | object | A free-form description detailing why the host is in its current state. |
lifecycleState | string | The lifecycle state of the host (AVAILABLE, OCCUPIED, PROVISIONING, REPAIR, UNAVAILABLE) |
localBlockId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block |
networkBlockId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block |
platform | string | The platform of the host |
recycleDetails | object | Shows details about the last recycle performed on this host. |
shape | string | The shape of host |
timeConfigurationCheck | string (date-time) | The date and time that the compute bare metal host configuration check was updated, in the format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z |
timeCreated | string (date-time) | The date and time that the compute host record 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 that the compute host record was updated, in the format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z |
The list of summary host details was created and retrieved.
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique host |
availabilityDomain | string | The availability domain of the compute host. Example: Uocm:US-CHICAGO-1-AD-2 |
capacityReservationId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) for the Capacity Reserver that is currently on host |
compartmentId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) for the compartment. This should always be the root compartment. |
computeHostGroupId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique 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. |
faultDomain | string | A fault domain is a grouping of hardware and infrastructure within an availability domain. Each availability domain contains three fault domains. Fault domains let you distribute your instances so that they are not on the same physical hardware within a single availability domain. A hardware failure or Compute hardware maintenance that affects one fault domain does not affect instances in other fault domains. This field is the Fault domain of the host |
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"} |
gpuMemoryFabricId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique GPU Memory Fabric |
hasImpactedComponents | boolean | While listing a host the user will know if they have an impacted component or not. The user will have to issue a get host to see details. |
health | string | The heathy state of the host (x-obmcs-enumref: #/definitions/ComputeHost/health) |
hpcIslandId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island |
instanceId | string | The public [OCID](/iaas/Content/General/Concepts/identifiers.htm) for the Virtual Machine or Bare Metal instance |
lifecycleState | string | The lifecycle state of the host (x-obmcs-enumref: #/definitions/ComputeHost/lifecycleState) |
localBlockId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block |
networkBlockId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block |
platform | string | The platform of the host |
recycleDetails | object | Shows details about the last recycle performed on this host. |
shape | string | The shape of host |
timeCreated | string (date-time) | The date and time that the compute host record 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 that the compute host record 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 | computeHostId, region | opc-request-id | Gets information about the specified compute host<br /> |
list | select | compartmentId, region | opc-request-id, availabilityDomain, displayName, networkResourceId, limit, page, sortBy, sortOrder, computeHostLifecycleState, computeHostHealth, computeHostGroupId, computeHostInSubtree | Generates a list of summary host details<br /> |
attach | insert | computeHostId, region, computeHostGroupId | if-match, opc-retry-token, opc-request-id | Attaches the Compute BM Host to a Host group |
update | update | computeHostId, region | if-match, opc-request-id, opc-retry-token | Customer can update the some fields for ComputeHost record<br /> |
apply_host_configuration | exec | computeHostId, region | if-match, opc-request-id, opc-retry-token | Triggers the asynchronous process that applies the host's target configuration |
change_compartment | exec | computeHostId, region, compartmentId | if-match, opc-request-id, opc-retry-token | Moves a compute host 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 /> |
check_host_configuration | exec | computeHostId, region | if-match, opc-request-id, opc-retry-token | Marks the host to be checked for conformance to its target configuration |
detach_compute_host_group_host | exec | computeHostId, region, computeHostGroupId | if-match, opc-retry-token, opc-request-id | Detaches the specified bare metal host from the compute host group |
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. |
computeHostId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compute host. |
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) |
availabilityDomain | string | The name of the availability domain. Example: Uocm:PHX-AD-1 |
computeHostGroupId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compute host group. |
computeHostHealth | string | A filter to return only ComputeHostSummary resources that match the given Compute Host health State OCID exactly. |
computeHostInSubtree | boolean | When set to true, all the compartments in the tenancy are traversed and the hosts in the specified tenancy and its compartments are fetched. Default is false. |
computeHostLifecycleState | string | A filter to return only ComputeHostSummary resources that match the given Compute Host lifecycle State OCID exactly. |
displayName | string | A filter to return only resources that match the given display name exactly. |
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 |
networkResourceId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compute host network resoruce. - Customer-unique HPC island ID - Customer-unique network block ID - Customer-unique local block ID |
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). |
sortBy | string | The 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. |
sortOrder | string | The sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive. |
SELECT examples​
- get
- list
Gets information about the specified compute host<br />
SELECT
id,
additionalData,
availabilityDomain,
capacityReservationId,
compartmentId,
computeHostGroupId,
configurationData,
configurationState,
definedTags,
displayName,
faultDomain,
firmwareBundleId,
freeformTags,
gpuMemoryFabricId,
health,
hpcIslandId,
impactedComponentDetails,
instanceId,
lifecycleDetails,
lifecycleState,
localBlockId,
networkBlockId,
platform,
recycleDetails,
shape,
timeConfigurationCheck,
timeCreated,
timeUpdated
FROM oci.compute.compute_hosts
WHERE computeHostId = '{{ computeHostId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;
Generates a list of summary host details<br />
SELECT
id,
availabilityDomain,
capacityReservationId,
compartmentId,
computeHostGroupId,
definedTags,
displayName,
faultDomain,
freeformTags,
gpuMemoryFabricId,
hasImpactedComponents,
health,
hpcIslandId,
instanceId,
lifecycleState,
localBlockId,
networkBlockId,
platform,
recycleDetails,
shape,
timeCreated,
timeUpdated
FROM oci.compute.compute_hosts
WHERE compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
AND availabilityDomain = '{{ availabilityDomain }}'
AND displayName = '{{ displayName }}'
AND networkResourceId = '{{ networkResourceId }}'
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
AND computeHostLifecycleState = '{{ computeHostLifecycleState }}'
AND computeHostHealth = '{{ computeHostHealth }}'
AND computeHostGroupId = '{{ computeHostGroupId }}'
AND computeHostInSubtree = '{{ computeHostInSubtree }}'
;
INSERT examples​
- attach
- Manifest
Attaches the Compute BM Host to a Host group
INSERT INTO oci.compute.compute_hosts (
computeHostGroupId,
computeHostId,
region,
if-match,
opc-retry-token,
opc-request-id
)
SELECT
'{{ computeHostGroupId }}' /* required */,
'{{ computeHostId }}',
'{{ region }}',
'{{ if-match }}',
'{{ opc-retry-token }}',
'{{ opc-request-id }}'
RETURNING
id,
additionalData,
availabilityDomain,
capacityReservationId,
compartmentId,
computeHostGroupId,
configurationData,
configurationState,
definedTags,
displayName,
faultDomain,
firmwareBundleId,
freeformTags,
gpuMemoryFabricId,
health,
hpcIslandId,
impactedComponentDetails,
instanceId,
lifecycleDetails,
lifecycleState,
localBlockId,
networkBlockId,
platform,
recycleDetails,
shape,
timeConfigurationCheck,
timeCreated,
timeUpdated
;
# Description fields are for documentation purposes
- name: compute_hosts
props:
- name: computeHostId
value: "{{ computeHostId }}"
description: Required parameter for the compute_hosts resource.
- name: region
value: "{{ region }}"
description: Required parameter for the compute_hosts resource.
- name: computeHostGroupId
value: "{{ computeHostGroupId }}"
description: |
'The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compute host group.'
- name: if-match
value: "{{ if-match }}"
description: 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.
description: 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.
- 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).
- 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.
UPDATE examples​
- update
Customer can update the some fields for ComputeHost record<br />
UPDATE oci.compute.compute_hosts
SET
definedTags = '{{ definedTags }}',
displayName = '{{ displayName }}',
freeformTags = '{{ freeformTags }}'
WHERE
computeHostId = '{{ computeHostId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
AND opc-request-id = '{{ opc-request-id}}'
AND opc-retry-token = '{{ opc-retry-token}}';
Lifecycle Methods​
- apply_host_configuration
- change_compartment
- check_host_configuration
- detach_compute_host_group_host
Triggers the asynchronous process that applies the host's target configuration
EXEC oci.compute.compute_hosts.apply_host_configuration
@computeHostId='{{ computeHostId }}' --required,
@region='{{ region }}' --required,
@if-match='{{ if-match }}',
@opc-request-id='{{ opc-request-id }}',
@opc-retry-token='{{ opc-retry-token }}'
;
Moves a compute host 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_hosts.change_compartment
@computeHostId='{{ computeHostId }}' --required,
@region='{{ region }}' --required,
@if-match='{{ if-match }}',
@opc-request-id='{{ opc-request-id }}',
@opc-retry-token='{{ opc-retry-token }}'
@@json=
'{
"compartmentId": "{{ compartmentId }}"
}'
;
Marks the host to be checked for conformance to its target configuration
EXEC oci.compute.compute_hosts.check_host_configuration
@computeHostId='{{ computeHostId }}' --required,
@region='{{ region }}' --required,
@if-match='{{ if-match }}',
@opc-request-id='{{ opc-request-id }}',
@opc-retry-token='{{ opc-retry-token }}'
;
Detaches the specified bare metal host from the compute host group
EXEC oci.compute.compute_hosts.detach_compute_host_group_host
@computeHostId='{{ computeHostId }}' --required,
@region='{{ region }}' --required,
@if-match='{{ if-match }}',
@opc-retry-token='{{ opc-retry-token }}',
@opc-request-id='{{ opc-request-id }}'
@@json=
'{
"computeHostGroupId": "{{ computeHostGroupId }}"
}'
;