1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. OsManagement
  5. getManagedInstanceGroups
Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi

oci.OsManagement.getManagedInstanceGroups

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi

    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: _var.compartment_id,
        displayName: _var.managed_instance_group_display_name,
        osFamily: _var.managed_instance_group_os_family,
        state: _var.managed_instance_group_state,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_managed_instance_groups = oci.OsManagement.get_managed_instance_groups(compartment_id=var["compartment_id"],
        display_name=var["managed_instance_group_display_name"],
        os_family=var["managed_instance_group_os_family"],
        state=var["managed_instance_group_state"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/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: _var.Compartment_id,
    			DisplayName:   pulumi.StringRef(_var.Managed_instance_group_display_name),
    			OsFamily:      pulumi.StringRef(_var.Managed_instance_group_os_family),
    			State:         pulumi.StringRef(_var.Managed_instance_group_state),
    		}, 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 = @var.Compartment_id,
            DisplayName = @var.Managed_instance_group_display_name,
            OsFamily = @var.Managed_instance_group_os_family,
            State = @var.Managed_instance_group_state,
        });
    
    });
    
    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(var_.compartment_id())
                .displayName(var_.managed_instance_group_display_name())
                .osFamily(var_.managed_instance_group_os_family())
                .state(var_.managed_instance_group_state())
                .build());
    
        }
    }
    
    variables:
      testManagedInstanceGroups:
        fn::invoke:
          Function: oci:OsManagement:getManagedInstanceGroups
          Arguments:
            compartmentId: ${var.compartment_id}
            displayName: ${var.managed_instance_group_display_name}
            osFamily: ${var.managed_instance_group_os_family}
            state: ${var.managed_instance_group_state}
    

    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[_osmanagement.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[_osmanagement.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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:OsManagement/getManagedInstanceGroups:getManagedInstanceGroups
      arguments:
        # arguments dictionary

    The 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<GetManagedInstanceGroupsFilter>
    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 []GetManagedInstanceGroupsFilter
    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<GetManagedInstanceGroupsFilter>
    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 GetManagedInstanceGroupsFilter[]
    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 GetManagedInstanceGroupsFilter]
    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.
    ManagedInstanceGroups List<GetManagedInstanceGroupsManagedInstanceGroup>
    The list of managed_instance_groups.
    DisplayName string
    User friendly name
    Filters List<GetManagedInstanceGroupsFilter>
    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.
    ManagedInstanceGroups []GetManagedInstanceGroupsManagedInstanceGroup
    The list of managed_instance_groups.
    DisplayName string
    User friendly name
    Filters []GetManagedInstanceGroupsFilter
    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.
    managedInstanceGroups List<GetManagedInstanceGroupsManagedInstanceGroup>
    The list of managed_instance_groups.
    displayName String
    User friendly name
    filters List<GetManagedInstanceGroupsFilter>
    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.
    managedInstanceGroups GetManagedInstanceGroupsManagedInstanceGroup[]
    The list of managed_instance_groups.
    displayName string
    User friendly name
    filters GetManagedInstanceGroupsFilter[]
    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_groups GetManagedInstanceGroupsManagedInstanceGroup]
    The list of managed_instance_groups.
    display_name str
    User friendly name
    filters GetManagedInstanceGroupsFilter]
    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.
    managedInstanceGroups List<Property Map>
    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

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetManagedInstanceGroupsManagedInstanceGroup

    CompartmentId string
    The ID of the compartment in which to list resources.
    DefinedTags Dictionary<string, object>
    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
    FreeformTags Dictionary<string, object>
    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
    ManagedInstanceCount int
    ManagedInstanceIds List<string>
    ManagedInstances List<GetManagedInstanceGroupsManagedInstanceGroupManagedInstance>
    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.
    DefinedTags map[string]interface{}
    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
    FreeformTags map[string]interface{}
    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
    ManagedInstanceCount int
    ManagedInstanceIds []string
    ManagedInstances []GetManagedInstanceGroupsManagedInstanceGroupManagedInstance
    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.
    definedTags Map<String,Object>
    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
    freeformTags Map<String,Object>
    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
    managedInstanceCount Integer
    managedInstanceIds List<String>
    managedInstances List<GetManagedInstanceGroupsManagedInstanceGroupManagedInstance>
    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.
    definedTags {[key: string]: any}
    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
    freeformTags {[key: string]: any}
    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
    managedInstanceCount number
    managedInstanceIds string[]
    managedInstances GetManagedInstanceGroupsManagedInstanceGroupManagedInstance[]
    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.
    defined_tags Mapping[str, Any]
    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
    freeform_tags Mapping[str, Any]
    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_count int
    managed_instance_ids Sequence[str]
    managed_instances GetManagedInstanceGroupsManagedInstanceGroupManagedInstance]
    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.
    definedTags Map<Any>
    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
    freeformTags Map<Any>
    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
    managedInstanceCount Number
    managedInstanceIds List<String>
    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 oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi