Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.OsManagement.getManagedInstanceGroups
Explore with Pulumi AI
This data source provides the list of Managed Instance Groups in Oracle Cloud Infrastructure OS Management service.
Returns a list of all Managed Instance Groups.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testManagedInstanceGroups = oci.OsManagement.getManagedInstanceGroups({
    compartmentId: compartmentId,
    displayName: managedInstanceGroupDisplayName,
    osFamily: managedInstanceGroupOsFamily,
    state: managedInstanceGroupState,
});
import pulumi
import pulumi_oci as oci
test_managed_instance_groups = oci.OsManagement.get_managed_instance_groups(compartment_id=compartment_id,
    display_name=managed_instance_group_display_name,
    os_family=managed_instance_group_os_family,
    state=managed_instance_group_state)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/osmanagement"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := osmanagement.GetManagedInstanceGroups(ctx, &osmanagement.GetManagedInstanceGroupsArgs{
			CompartmentId: compartmentId,
			DisplayName:   pulumi.StringRef(managedInstanceGroupDisplayName),
			OsFamily:      pulumi.StringRef(managedInstanceGroupOsFamily),
			State:         pulumi.StringRef(managedInstanceGroupState),
		}, 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 testManagedInstanceGroups = Oci.OsManagement.GetManagedInstanceGroups.Invoke(new()
    {
        CompartmentId = compartmentId,
        DisplayName = managedInstanceGroupDisplayName,
        OsFamily = managedInstanceGroupOsFamily,
        State = managedInstanceGroupState,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.OsManagement.OsManagementFunctions;
import com.pulumi.oci.OsManagement.inputs.GetManagedInstanceGroupsArgs;
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 testManagedInstanceGroups = OsManagementFunctions.getManagedInstanceGroups(GetManagedInstanceGroupsArgs.builder()
            .compartmentId(compartmentId)
            .displayName(managedInstanceGroupDisplayName)
            .osFamily(managedInstanceGroupOsFamily)
            .state(managedInstanceGroupState)
            .build());
    }
}
variables:
  testManagedInstanceGroups:
    fn::invoke:
      function: oci:OsManagement:getManagedInstanceGroups
      arguments:
        compartmentId: ${compartmentId}
        displayName: ${managedInstanceGroupDisplayName}
        osFamily: ${managedInstanceGroupOsFamily}
        state: ${managedInstanceGroupState}
Using getManagedInstanceGroups
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 getManagedInstanceGroups(args: GetManagedInstanceGroupsArgs, opts?: InvokeOptions): Promise<GetManagedInstanceGroupsResult>
function getManagedInstanceGroupsOutput(args: GetManagedInstanceGroupsOutputArgs, opts?: InvokeOptions): Output<GetManagedInstanceGroupsResult>def get_managed_instance_groups(compartment_id: Optional[str] = None,
                                display_name: Optional[str] = None,
                                filters: Optional[Sequence[GetManagedInstanceGroupsFilter]] = None,
                                os_family: Optional[str] = None,
                                state: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetManagedInstanceGroupsResult
def get_managed_instance_groups_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                display_name: Optional[pulumi.Input[str]] = None,
                                filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetManagedInstanceGroupsFilterArgs]]]] = None,
                                os_family: Optional[pulumi.Input[str]] = None,
                                state: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetManagedInstanceGroupsResult]func GetManagedInstanceGroups(ctx *Context, args *GetManagedInstanceGroupsArgs, opts ...InvokeOption) (*GetManagedInstanceGroupsResult, error)
func GetManagedInstanceGroupsOutput(ctx *Context, args *GetManagedInstanceGroupsOutputArgs, opts ...InvokeOption) GetManagedInstanceGroupsResultOutput> Note: This function is named GetManagedInstanceGroups in the Go SDK.
public static class GetManagedInstanceGroups 
{
    public static Task<GetManagedInstanceGroupsResult> InvokeAsync(GetManagedInstanceGroupsArgs args, InvokeOptions? opts = null)
    public static Output<GetManagedInstanceGroupsResult> Invoke(GetManagedInstanceGroupsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetManagedInstanceGroupsResult> getManagedInstanceGroups(GetManagedInstanceGroupsArgs args, InvokeOptions options)
public static Output<GetManagedInstanceGroupsResult> getManagedInstanceGroups(GetManagedInstanceGroupsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:OsManagement/getManagedInstanceGroups:getManagedInstanceGroups
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The ID of the compartment in which to list resources.
- DisplayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- Filters
List<GetManaged Instance Groups Filter> 
- OsFamily string
- The OS family for which to list resources.
- State string
- The current lifecycle state for the object.
- CompartmentId string
- The ID of the compartment in which to list resources.
- DisplayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- Filters
[]GetManaged Instance Groups Filter 
- OsFamily string
- The OS family for which to list resources.
- State string
- The current lifecycle state for the object.
- compartmentId String
- The ID of the compartment in which to list resources.
- displayName String
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- filters
List<GetManaged Instance Groups Filter> 
- osFamily String
- The OS family for which to list resources.
- state String
- The current lifecycle state for the object.
- compartmentId string
- The ID of the compartment in which to list resources.
- displayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- filters
GetManaged Instance Groups Filter[] 
- osFamily string
- The OS family for which to list resources.
- state string
- The current lifecycle state for the object.
- compartment_id str
- The ID of the compartment in which to list resources.
- display_name str
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- filters
Sequence[GetManaged Instance Groups Filter] 
- os_family str
- The OS family for which to list resources.
- state str
- The current lifecycle state for the object.
- compartmentId String
- The ID of the compartment in which to list resources.
- displayName String
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- filters List<Property Map>
- osFamily String
- The OS family for which to list resources.
- state String
- The current lifecycle state for the object.
getManagedInstanceGroups Result
The following output properties are available:
- CompartmentId string
- OCID for the Compartment
- Id string
- The provider-assigned unique ID for this managed resource.
- ManagedInstance List<GetGroups Managed Instance Groups Managed Instance Group> 
- The list of managed_instance_groups.
- DisplayName string
- User friendly name
- Filters
List<GetManaged Instance Groups Filter> 
- OsFamily string
- The Operating System type of the managed instance.
- State string
- The current state of the Software Source.
- CompartmentId string
- OCID for the Compartment
- Id string
- The provider-assigned unique ID for this managed resource.
- ManagedInstance []GetGroups Managed Instance Groups Managed Instance Group 
- The list of managed_instance_groups.
- DisplayName string
- User friendly name
- Filters
[]GetManaged Instance Groups Filter 
- OsFamily string
- The Operating System type of the managed instance.
- State string
- The current state of the Software Source.
- compartmentId String
- OCID for the Compartment
- id String
- The provider-assigned unique ID for this managed resource.
- managedInstance List<GetGroups Managed Instance Groups Managed Instance Group> 
- The list of managed_instance_groups.
- displayName String
- User friendly name
- filters
List<GetManaged Instance Groups Filter> 
- osFamily String
- The Operating System type of the managed instance.
- state String
- The current state of the Software Source.
- compartmentId string
- OCID for the Compartment
- id string
- The provider-assigned unique ID for this managed resource.
- managedInstance GetGroups Managed Instance Groups Managed Instance Group[] 
- The list of managed_instance_groups.
- displayName string
- User friendly name
- filters
GetManaged Instance Groups Filter[] 
- osFamily string
- The Operating System type of the managed instance.
- state string
- The current state of the Software Source.
- compartment_id str
- OCID for the Compartment
- id str
- The provider-assigned unique ID for this managed resource.
- managed_instance_ Sequence[Getgroups Managed Instance Groups Managed Instance Group] 
- The list of managed_instance_groups.
- display_name str
- User friendly name
- filters
Sequence[GetManaged Instance Groups Filter] 
- os_family str
- The Operating System type of the managed instance.
- state str
- The current state of the Software Source.
- compartmentId String
- OCID for the Compartment
- id String
- The provider-assigned unique ID for this managed resource.
- managedInstance List<Property Map>Groups 
- The list of managed_instance_groups.
- displayName String
- User friendly name
- filters List<Property Map>
- osFamily String
- The Operating System type of the managed instance.
- state String
- The current state of the Software Source.
Supporting Types
GetManagedInstanceGroupsFilter    
GetManagedInstanceGroupsManagedInstanceGroup      
- CompartmentId string
- The ID of the compartment in which to list resources.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- Description string
- Information specified by the user about the managed instance group
- DisplayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- Dictionary<string, string>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- Id string
- unique identifier that is immutable on creation
- ManagedInstance intCount 
- ManagedInstance List<string>Ids 
- ManagedInstances List<GetManaged Instance Groups Managed Instance Group Managed Instance> 
- list of Managed Instances in the group
- OsFamily string
- The OS family for which to list resources.
- State string
- The current lifecycle state for the object.
- CompartmentId string
- The ID of the compartment in which to list resources.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- Description string
- Information specified by the user about the managed instance group
- DisplayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- map[string]string
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- Id string
- unique identifier that is immutable on creation
- ManagedInstance intCount 
- ManagedInstance []stringIds 
- ManagedInstances []GetManaged Instance Groups Managed Instance Group Managed Instance 
- list of Managed Instances in the group
- OsFamily string
- The OS family for which to list resources.
- State string
- The current lifecycle state for the object.
- compartmentId String
- The ID of the compartment in which to list resources.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- description String
- Information specified by the user about the managed instance group
- displayName String
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- Map<String,String>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id String
- unique identifier that is immutable on creation
- managedInstance IntegerCount 
- managedInstance List<String>Ids 
- managedInstances List<GetManaged Instance Groups Managed Instance Group Managed Instance> 
- list of Managed Instances in the group
- osFamily String
- The OS family for which to list resources.
- state String
- The current lifecycle state for the object.
- compartmentId string
- The ID of the compartment in which to list resources.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- description string
- Information specified by the user about the managed instance group
- displayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- {[key: string]: string}
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id string
- unique identifier that is immutable on creation
- managedInstance numberCount 
- managedInstance string[]Ids 
- managedInstances GetManaged Instance Groups Managed Instance Group Managed Instance[] 
- list of Managed Instances in the group
- osFamily string
- The OS family for which to list resources.
- state string
- The current lifecycle state for the object.
- compartment_id str
- The ID of the compartment in which to list resources.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- description str
- Information specified by the user about the managed instance group
- display_name str
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- Mapping[str, str]
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id str
- unique identifier that is immutable on creation
- managed_instance_ intcount 
- managed_instance_ Sequence[str]ids 
- managed_instances Sequence[GetManaged Instance Groups Managed Instance Group Managed Instance] 
- list of Managed Instances in the group
- os_family str
- The OS family for which to list resources.
- state str
- The current lifecycle state for the object.
- compartmentId String
- The ID of the compartment in which to list resources.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- description String
- Information specified by the user about the managed instance group
- displayName String
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- Map<String>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id String
- unique identifier that is immutable on creation
- managedInstance NumberCount 
- managedInstance List<String>Ids 
- managedInstances List<Property Map>
- list of Managed Instances in the group
- osFamily String
- The OS family for which to list resources.
- state String
- The current lifecycle state for the object.
GetManagedInstanceGroupsManagedInstanceGroupManagedInstance        
- DisplayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- Id string
- unique identifier that is immutable on creation
- DisplayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- Id string
- unique identifier that is immutable on creation
- displayName String
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- id String
- unique identifier that is immutable on creation
- displayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- id string
- unique identifier that is immutable on creation
- display_name str
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- id str
- unique identifier that is immutable on creation
- displayName String
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- id String
- unique identifier that is immutable on creation
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.