1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. OsManagement
  5. ManagedInstanceGroup
Oracle Cloud Infrastructure v1.24.0 published on Thursday, Feb 22, 2024 by Pulumi

oci.OsManagement.ManagedInstanceGroup

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.24.0 published on Thursday, Feb 22, 2024 by Pulumi

    This resource provides the Managed Instance Group resource in Oracle Cloud Infrastructure OS Management service.

    Creates a new Managed Instance Group on the management system. This will not contain any managed instances after it is first created, and they must be added later.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testManagedInstanceGroup = new Oci.OsManagement.ManagedInstanceGroup("testManagedInstanceGroup", new()
        {
            CompartmentId = @var.Compartment_id,
            DisplayName = @var.Managed_instance_group_display_name,
            DefinedTags = 
            {
                { "foo-namespace.bar-key", "value" },
            },
            Description = @var.Managed_instance_group_description,
            FreeformTags = 
            {
                { "bar-key", "value" },
            },
            OsFamily = @var.Managed_instance_group_os_family,
            ManagedInstanceIds = @var.Managed_instance_group_managed_instance_ids,
        });
    
    });
    
    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.NewManagedInstanceGroup(ctx, "testManagedInstanceGroup", &OsManagement.ManagedInstanceGroupArgs{
    			CompartmentId: pulumi.Any(_var.Compartment_id),
    			DisplayName:   pulumi.Any(_var.Managed_instance_group_display_name),
    			DefinedTags: pulumi.Map{
    				"foo-namespace.bar-key": pulumi.Any("value"),
    			},
    			Description: pulumi.Any(_var.Managed_instance_group_description),
    			FreeformTags: pulumi.Map{
    				"bar-key": pulumi.Any("value"),
    			},
    			OsFamily:           pulumi.Any(_var.Managed_instance_group_os_family),
    			ManagedInstanceIds: pulumi.Any(_var.Managed_instance_group_managed_instance_ids),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.OsManagement.ManagedInstanceGroup;
    import com.pulumi.oci.OsManagement.ManagedInstanceGroupArgs;
    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) {
            var testManagedInstanceGroup = new ManagedInstanceGroup("testManagedInstanceGroup", ManagedInstanceGroupArgs.builder()        
                .compartmentId(var_.compartment_id())
                .displayName(var_.managed_instance_group_display_name())
                .definedTags(Map.of("foo-namespace.bar-key", "value"))
                .description(var_.managed_instance_group_description())
                .freeformTags(Map.of("bar-key", "value"))
                .osFamily(var_.managed_instance_group_os_family())
                .managedInstanceIds(var_.managed_instance_group_managed_instance_ids())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_oci as oci
    
    test_managed_instance_group = oci.os_management.ManagedInstanceGroup("testManagedInstanceGroup",
        compartment_id=var["compartment_id"],
        display_name=var["managed_instance_group_display_name"],
        defined_tags={
            "foo-namespace.bar-key": "value",
        },
        description=var["managed_instance_group_description"],
        freeform_tags={
            "bar-key": "value",
        },
        os_family=var["managed_instance_group_os_family"],
        managed_instance_ids=var["managed_instance_group_managed_instance_ids"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testManagedInstanceGroup = new oci.osmanagement.ManagedInstanceGroup("testManagedInstanceGroup", {
        compartmentId: _var.compartment_id,
        displayName: _var.managed_instance_group_display_name,
        definedTags: {
            "foo-namespace.bar-key": "value",
        },
        description: _var.managed_instance_group_description,
        freeformTags: {
            "bar-key": "value",
        },
        osFamily: _var.managed_instance_group_os_family,
        managedInstanceIds: _var.managed_instance_group_managed_instance_ids,
    });
    
    resources:
      testManagedInstanceGroup:
        type: oci:OsManagement:ManagedInstanceGroup
        properties:
          #Required
          compartmentId: ${var.compartment_id}
          displayName: ${var.managed_instance_group_display_name}
          #Optional
          definedTags:
            foo-namespace.bar-key: value
          description: ${var.managed_instance_group_description}
          freeformTags:
            bar-key: value
          osFamily: ${var.managed_instance_group_os_family}
          managedInstanceIds: ${var.managed_instance_group_managed_instance_ids}
    

    Create ManagedInstanceGroup Resource

    new ManagedInstanceGroup(name: string, args: ManagedInstanceGroupArgs, opts?: CustomResourceOptions);
    @overload
    def ManagedInstanceGroup(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             compartment_id: Optional[str] = None,
                             defined_tags: Optional[Mapping[str, Any]] = None,
                             description: Optional[str] = None,
                             display_name: Optional[str] = None,
                             freeform_tags: Optional[Mapping[str, Any]] = None,
                             managed_instance_ids: Optional[Sequence[str]] = None,
                             os_family: Optional[str] = None)
    @overload
    def ManagedInstanceGroup(resource_name: str,
                             args: ManagedInstanceGroupArgs,
                             opts: Optional[ResourceOptions] = None)
    func NewManagedInstanceGroup(ctx *Context, name string, args ManagedInstanceGroupArgs, opts ...ResourceOption) (*ManagedInstanceGroup, error)
    public ManagedInstanceGroup(string name, ManagedInstanceGroupArgs args, CustomResourceOptions? opts = null)
    public ManagedInstanceGroup(String name, ManagedInstanceGroupArgs args)
    public ManagedInstanceGroup(String name, ManagedInstanceGroupArgs args, CustomResourceOptions options)
    
    type: oci:OsManagement:ManagedInstanceGroup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ManagedInstanceGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ManagedInstanceGroupArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ManagedInstanceGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ManagedInstanceGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ManagedInstanceGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ManagedInstanceGroup Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ManagedInstanceGroup resource accepts the following input properties:

    CompartmentId string
    (Updatable) OCID for the Compartment
    DisplayName string
    (Updatable) Managed Instance Group identifier
    DefinedTags Dictionary<string, object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    (Updatable) Information specified by the user about the managed instance group
    FreeformTags Dictionary<string, object>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    ManagedInstanceIds List<string>

    The list of managed instance OCIDs to be added to the managed instance group.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    OsFamily string
    The Operating System type of the managed instance(s) on which this scheduled job will operate. If not specified, this defaults to Linux.
    CompartmentId string
    (Updatable) OCID for the Compartment
    DisplayName string
    (Updatable) Managed Instance Group identifier
    DefinedTags map[string]interface{}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    (Updatable) Information specified by the user about the managed instance group
    FreeformTags map[string]interface{}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    ManagedInstanceIds []string

    The list of managed instance OCIDs to be added to the managed instance group.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    OsFamily string
    The Operating System type of the managed instance(s) on which this scheduled job will operate. If not specified, this defaults to Linux.
    compartmentId String
    (Updatable) OCID for the Compartment
    displayName String
    (Updatable) Managed Instance Group identifier
    definedTags Map<String,Object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    (Updatable) Information specified by the user about the managed instance group
    freeformTags Map<String,Object>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    managedInstanceIds List<String>

    The list of managed instance OCIDs to be added to the managed instance group.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    osFamily String
    The Operating System type of the managed instance(s) on which this scheduled job will operate. If not specified, this defaults to Linux.
    compartmentId string
    (Updatable) OCID for the Compartment
    displayName string
    (Updatable) Managed Instance Group identifier
    definedTags {[key: string]: any}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description string
    (Updatable) Information specified by the user about the managed instance group
    freeformTags {[key: string]: any}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    managedInstanceIds string[]

    The list of managed instance OCIDs to be added to the managed instance group.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    osFamily string
    The Operating System type of the managed instance(s) on which this scheduled job will operate. If not specified, this defaults to Linux.
    compartment_id str
    (Updatable) OCID for the Compartment
    display_name str
    (Updatable) Managed Instance Group identifier
    defined_tags Mapping[str, Any]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description str
    (Updatable) Information specified by the user about the managed instance group
    freeform_tags Mapping[str, Any]
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    managed_instance_ids Sequence[str]

    The list of managed instance OCIDs to be added to the managed instance group.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    os_family str
    The Operating System type of the managed instance(s) on which this scheduled job will operate. If not specified, this defaults to Linux.
    compartmentId String
    (Updatable) OCID for the Compartment
    displayName String
    (Updatable) Managed Instance Group identifier
    definedTags Map<Any>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    (Updatable) Information specified by the user about the managed instance group
    freeformTags Map<Any>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    managedInstanceIds List<String>

    The list of managed instance OCIDs to be added to the managed instance group.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    osFamily String
    The Operating System type of the managed instance(s) on which this scheduled job will operate. If not specified, this defaults to Linux.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ManagedInstanceGroup resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    ManagedInstanceCount int
    ManagedInstances List<ManagedInstanceGroupManagedInstance>
    list of Managed Instances in the group
    State string
    The current state of the Software Source.
    Id string
    The provider-assigned unique ID for this managed resource.
    ManagedInstanceCount int
    ManagedInstances []ManagedInstanceGroupManagedInstance
    list of Managed Instances in the group
    State string
    The current state of the Software Source.
    id String
    The provider-assigned unique ID for this managed resource.
    managedInstanceCount Integer
    managedInstances List<ManagedInstanceGroupManagedInstance>
    list of Managed Instances in the group
    state String
    The current state of the Software Source.
    id string
    The provider-assigned unique ID for this managed resource.
    managedInstanceCount number
    managedInstances ManagedInstanceGroupManagedInstance[]
    list of Managed Instances in the group
    state string
    The current state of the Software Source.
    id str
    The provider-assigned unique ID for this managed resource.
    managed_instance_count int
    managed_instances ManagedInstanceGroupManagedInstance]
    list of Managed Instances in the group
    state str
    The current state of the Software Source.
    id String
    The provider-assigned unique ID for this managed resource.
    managedInstanceCount Number
    managedInstances List<Property Map>
    list of Managed Instances in the group
    state String
    The current state of the Software Source.

    Look up Existing ManagedInstanceGroup Resource

    Get an existing ManagedInstanceGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ManagedInstanceGroupState, opts?: CustomResourceOptions): ManagedInstanceGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compartment_id: Optional[str] = None,
            defined_tags: Optional[Mapping[str, Any]] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, Any]] = None,
            managed_instance_count: Optional[int] = None,
            managed_instance_ids: Optional[Sequence[str]] = None,
            managed_instances: Optional[Sequence[_osmanagement.ManagedInstanceGroupManagedInstanceArgs]] = None,
            os_family: Optional[str] = None,
            state: Optional[str] = None) -> ManagedInstanceGroup
    func GetManagedInstanceGroup(ctx *Context, name string, id IDInput, state *ManagedInstanceGroupState, opts ...ResourceOption) (*ManagedInstanceGroup, error)
    public static ManagedInstanceGroup Get(string name, Input<string> id, ManagedInstanceGroupState? state, CustomResourceOptions? opts = null)
    public static ManagedInstanceGroup get(String name, Output<String> id, ManagedInstanceGroupState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CompartmentId string
    (Updatable) OCID for the Compartment
    DefinedTags Dictionary<string, object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    (Updatable) Information specified by the user about the managed instance group
    DisplayName string
    (Updatable) Managed Instance Group identifier
    FreeformTags Dictionary<string, object>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    ManagedInstanceCount int
    ManagedInstanceIds List<string>

    The list of managed instance OCIDs to be added to the managed instance group.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    ManagedInstances List<ManagedInstanceGroupManagedInstance>
    list of Managed Instances in the group
    OsFamily string
    The Operating System type of the managed instance(s) on which this scheduled job will operate. If not specified, this defaults to Linux.
    State string
    The current state of the Software Source.
    CompartmentId string
    (Updatable) OCID for the Compartment
    DefinedTags map[string]interface{}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    (Updatable) Information specified by the user about the managed instance group
    DisplayName string
    (Updatable) Managed Instance Group identifier
    FreeformTags map[string]interface{}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    ManagedInstanceCount int
    ManagedInstanceIds []string

    The list of managed instance OCIDs to be added to the managed instance group.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    ManagedInstances []ManagedInstanceGroupManagedInstanceArgs
    list of Managed Instances in the group
    OsFamily string
    The Operating System type of the managed instance(s) on which this scheduled job will operate. If not specified, this defaults to Linux.
    State string
    The current state of the Software Source.
    compartmentId String
    (Updatable) OCID for the Compartment
    definedTags Map<String,Object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    (Updatable) Information specified by the user about the managed instance group
    displayName String
    (Updatable) Managed Instance Group identifier
    freeformTags Map<String,Object>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    managedInstanceCount Integer
    managedInstanceIds List<String>

    The list of managed instance OCIDs to be added to the managed instance group.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    managedInstances List<ManagedInstanceGroupManagedInstance>
    list of Managed Instances in the group
    osFamily String
    The Operating System type of the managed instance(s) on which this scheduled job will operate. If not specified, this defaults to Linux.
    state String
    The current state of the Software Source.
    compartmentId string
    (Updatable) OCID for the Compartment
    definedTags {[key: string]: any}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description string
    (Updatable) Information specified by the user about the managed instance group
    displayName string
    (Updatable) Managed Instance Group identifier
    freeformTags {[key: string]: any}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    managedInstanceCount number
    managedInstanceIds string[]

    The list of managed instance OCIDs to be added to the managed instance group.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    managedInstances ManagedInstanceGroupManagedInstance[]
    list of Managed Instances in the group
    osFamily string
    The Operating System type of the managed instance(s) on which this scheduled job will operate. If not specified, this defaults to Linux.
    state string
    The current state of the Software Source.
    compartment_id str
    (Updatable) OCID for the Compartment
    defined_tags Mapping[str, Any]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description str
    (Updatable) Information specified by the user about the managed instance group
    display_name str
    (Updatable) Managed Instance Group identifier
    freeform_tags Mapping[str, Any]
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    managed_instance_count int
    managed_instance_ids Sequence[str]

    The list of managed instance OCIDs to be added to the managed instance group.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    managed_instances ManagedInstanceGroupManagedInstanceArgs]
    list of Managed Instances in the group
    os_family str
    The Operating System type of the managed instance(s) on which this scheduled job will operate. If not specified, this defaults to Linux.
    state str
    The current state of the Software Source.
    compartmentId String
    (Updatable) OCID for the Compartment
    definedTags Map<Any>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    (Updatable) Information specified by the user about the managed instance group
    displayName String
    (Updatable) Managed Instance Group identifier
    freeformTags Map<Any>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    managedInstanceCount Number
    managedInstanceIds List<String>

    The list of managed instance OCIDs to be added to the managed instance group.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    managedInstances List<Property Map>
    list of Managed Instances in the group
    osFamily String
    The Operating System type of the managed instance(s) on which this scheduled job will operate. If not specified, this defaults to Linux.
    state String
    The current state of the Software Source.

    Supporting Types

    ManagedInstanceGroupManagedInstance, ManagedInstanceGroupManagedInstanceArgs

    DisplayName string
    (Updatable) Managed Instance Group identifier
    Id string
    unique identifier that is immutable on creation
    DisplayName string
    (Updatable) Managed Instance Group identifier
    Id string
    unique identifier that is immutable on creation
    displayName String
    (Updatable) Managed Instance Group identifier
    id String
    unique identifier that is immutable on creation
    displayName string
    (Updatable) Managed Instance Group identifier
    id string
    unique identifier that is immutable on creation
    display_name str
    (Updatable) Managed Instance Group identifier
    id str
    unique identifier that is immutable on creation
    displayName String
    (Updatable) Managed Instance Group identifier
    id String
    unique identifier that is immutable on creation

    Import

    ManagedInstanceGroups can be imported using the id, e.g.

     $ pulumi import oci:OsManagement/managedInstanceGroup:ManagedInstanceGroup test_managed_instance_group "id"
    

    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.24.0 published on Thursday, Feb 22, 2024 by Pulumi