Oracle Cloud Infrastructure v3.3.0 published on Thursday, Jul 17, 2025 by Pulumi
oci.Core.getComputeHostGroups
Explore with Pulumi AI
This data source provides the list of Compute Host Groups in Oracle Cloud Infrastructure Core service.
Lists the compute host groups that match the specified criteria and compartment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testComputeHostGroups = oci.Core.getComputeHostGroups({
compartmentId: compartmentId,
});
import pulumi
import pulumi_oci as oci
test_compute_host_groups = oci.Core.get_compute_host_groups(compartment_id=compartment_id)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := core.GetComputeHostGroups(ctx, &core.GetComputeHostGroupsArgs{
CompartmentId: compartmentId,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testComputeHostGroups = Oci.Core.GetComputeHostGroups.Invoke(new()
{
CompartmentId = compartmentId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Core.CoreFunctions;
import com.pulumi.oci.Core.inputs.GetComputeHostGroupsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var testComputeHostGroups = CoreFunctions.getComputeHostGroups(GetComputeHostGroupsArgs.builder()
.compartmentId(compartmentId)
.build());
}
}
variables:
testComputeHostGroups:
fn::invoke:
function: oci:Core:getComputeHostGroups
arguments:
compartmentId: ${compartmentId}
Using getComputeHostGroups
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getComputeHostGroups(args: GetComputeHostGroupsArgs, opts?: InvokeOptions): Promise<GetComputeHostGroupsResult>
function getComputeHostGroupsOutput(args: GetComputeHostGroupsOutputArgs, opts?: InvokeOptions): Output<GetComputeHostGroupsResult>
def get_compute_host_groups(compartment_id: Optional[str] = None,
filters: Optional[Sequence[GetComputeHostGroupsFilter]] = None,
opts: Optional[InvokeOptions] = None) -> GetComputeHostGroupsResult
def get_compute_host_groups_output(compartment_id: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetComputeHostGroupsFilterArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetComputeHostGroupsResult]
func GetComputeHostGroups(ctx *Context, args *GetComputeHostGroupsArgs, opts ...InvokeOption) (*GetComputeHostGroupsResult, error)
func GetComputeHostGroupsOutput(ctx *Context, args *GetComputeHostGroupsOutputArgs, opts ...InvokeOption) GetComputeHostGroupsResultOutput
> Note: This function is named GetComputeHostGroups
in the Go SDK.
public static class GetComputeHostGroups
{
public static Task<GetComputeHostGroupsResult> InvokeAsync(GetComputeHostGroupsArgs args, InvokeOptions? opts = null)
public static Output<GetComputeHostGroupsResult> Invoke(GetComputeHostGroupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetComputeHostGroupsResult> getComputeHostGroups(GetComputeHostGroupsArgs args, InvokeOptions options)
public static Output<GetComputeHostGroupsResult> getComputeHostGroups(GetComputeHostGroupsArgs args, InvokeOptions options)
fn::invoke:
function: oci:Core/getComputeHostGroups:getComputeHostGroups
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The OCID of the compartment.
- Filters
List<Get
Compute Host Groups Filter>
- Compartment
Id string - The OCID of the compartment.
- Filters
[]Get
Compute Host Groups Filter
- compartment
Id String - The OCID of the compartment.
- filters
List<Get
Compute Host Groups Filter>
- compartment
Id string - The OCID of the compartment.
- filters
Get
Compute Host Groups Filter[]
- compartment_
id str - The OCID of the compartment.
- filters
Sequence[Get
Compute Host Groups Filter]
- compartment
Id String - The OCID of the compartment.
- filters List<Property Map>
getComputeHostGroups Result
The following output properties are available:
- Compartment
Id string - The OCID of the compartment that contains host group.
- Compute
Host List<GetGroup Collections Compute Host Groups Compute Host Group Collection> - The list of compute_host_group_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
List<Get
Compute Host Groups Filter>
- Compartment
Id string - The OCID of the compartment that contains host group.
- Compute
Host []GetGroup Collections Compute Host Groups Compute Host Group Collection - The list of compute_host_group_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
[]Get
Compute Host Groups Filter
- compartment
Id String - The OCID of the compartment that contains host group.
- compute
Host List<GetGroup Collections Compute Host Groups Compute Host Group Collection> - The list of compute_host_group_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- filters
List<Get
Compute Host Groups Filter>
- compartment
Id string - The OCID of the compartment that contains host group.
- compute
Host GetGroup Collections Compute Host Groups Compute Host Group Collection[] - The list of compute_host_group_collection.
- id string
- The provider-assigned unique ID for this managed resource.
- filters
Get
Compute Host Groups Filter[]
- compartment_
id str - The OCID of the compartment that contains host group.
- compute_
host_ Sequence[Getgroup_ collections Compute Host Groups Compute Host Group Collection] - The list of compute_host_group_collection.
- id str
- The provider-assigned unique ID for this managed resource.
- filters
Sequence[Get
Compute Host Groups Filter]
- compartment
Id String - The OCID of the compartment that contains host group.
- compute
Host List<Property Map>Group Collections - The list of compute_host_group_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- filters List<Property Map>
Supporting Types
GetComputeHostGroupsComputeHostGroupCollection
GetComputeHostGroupsComputeHostGroupCollectionItem
- Availability
Domain string - The availability domain of a host group. Example:
Uocm:PHX-AD-1
- Compartment
Id string - The OCID of the compartment.
- Configurations
List<Get
Compute Host Groups Compute Host Group Collection Item Configuration> - Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Dictionary<string, string>
- 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. Example:
{"Department": "Finance"}
- Id string
- The OCID for the Customer-unique host group
- Is
Targeted boolPlacement Required - 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.
- State string
- The lifecycle state of the host group
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Time
Created string - The date and time the host group was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Time
Updated string - The date and time the host group was updated, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Availability
Domain string - The availability domain of a host group. Example:
Uocm:PHX-AD-1
- Compartment
Id string - The OCID of the compartment.
- Configurations
[]Get
Compute Host Groups Compute Host Group Collection Item Configuration - map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- map[string]string
- 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. Example:
{"Department": "Finance"}
- Id string
- The OCID for the Customer-unique host group
- Is
Targeted boolPlacement Required - 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.
- State string
- The lifecycle state of the host group
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Time
Created string - The date and time the host group was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Time
Updated string - The date and time the host group was updated, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- availability
Domain String - The availability domain of a host group. Example:
Uocm:PHX-AD-1
- compartment
Id String - The OCID of the compartment.
- configurations
List<Get
Compute Host Groups Compute Host Group Collection Item Configuration> - Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Map<String,String>
- 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. Example:
{"Department": "Finance"}
- id String
- The OCID for the Customer-unique host group
- is
Targeted BooleanPlacement Required - 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.
- state String
- The lifecycle state of the host group
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- time
Created String - The date and time the host group was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- time
Updated String - The date and time the host group was updated, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- availability
Domain string - The availability domain of a host group. Example:
Uocm:PHX-AD-1
- compartment
Id string - The OCID of the compartment.
- configurations
Get
Compute Host Groups Compute Host Group Collection Item Configuration[] - {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- {[key: string]: string}
- 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. Example:
{"Department": "Finance"}
- id string
- The OCID for the Customer-unique host group
- is
Targeted booleanPlacement Required - 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.
- state string
- The lifecycle state of the host group
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- time
Created string - The date and time the host group was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- time
Updated string - The date and time the host group was updated, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- availability_
domain str - The availability domain of a host group. Example:
Uocm:PHX-AD-1
- compartment_
id str - The OCID of the compartment.
- configurations
Sequence[Get
Compute Host Groups Compute Host Group Collection Item Configuration] - Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display_
name str - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Mapping[str, str]
- 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. Example:
{"Department": "Finance"}
- id str
- The OCID for the Customer-unique host group
- is_
targeted_ boolplacement_ required - 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.
- state str
- The lifecycle state of the host group
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- time_
created str - The date and time the host group was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- time_
updated str - The date and time the host group was updated, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- availability
Domain String - The availability domain of a host group. Example:
Uocm:PHX-AD-1
- compartment
Id String - The OCID of the compartment.
- configurations List<Property Map>
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Map<String>
- 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. Example:
{"Department": "Finance"}
- id String
- The OCID for the Customer-unique host group
- is
Targeted BooleanPlacement Required - 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.
- state String
- The lifecycle state of the host group
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- time
Created String - The date and time the host group was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- time
Updated String - The date and time the host group was updated, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
GetComputeHostGroupsComputeHostGroupCollectionItemConfiguration
- Firmware
Bundle stringId - Recycle
Level string - Target string
- Firmware
Bundle stringId - Recycle
Level string - Target string
- firmware
Bundle StringId - recycle
Level String - target String
- firmware
Bundle stringId - recycle
Level string - target string
- firmware_
bundle_ strid - recycle_
level str - target str
- firmware
Bundle StringId - recycle
Level String - target String
GetComputeHostGroupsFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.