1. Packages
  2. Packages
  3. Oracle Cloud Infrastructure
  4. API Docs
  5. OsManagementHub
  6. DynamicSet
Viewing docs for Oracle Cloud Infrastructure v4.8.0
published on Friday, Apr 24, 2026 by Pulumi
oci logo
Viewing docs for Oracle Cloud Infrastructure v4.8.0
published on Friday, Apr 24, 2026 by Pulumi

    This resource provides the Dynamic Set resource in Oracle Cloud Infrastructure Os Management Hub service. Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/osmh/latest/DynamicSet

    Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/os_management_hub

    Creates a new dynamic set.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testDynamicSet = new oci.osmanagementhub.DynamicSet("test_dynamic_set", {
        compartmentId: compartmentId,
        matchType: dynamicSetMatchType,
        matchingRule: {
            architectures: dynamicSetMatchingRuleArchitectures,
            displayNames: dynamicSetMatchingRuleDisplayNames,
            isRebootRequired: dynamicSetMatchingRuleIsRebootRequired,
            locations: dynamicSetMatchingRuleLocations,
            managedInstanceGroupIds: dynamicSetMatchingRuleManagedInstanceGroupIds,
            managedInstanceIds: dynamicSetMatchingRuleManagedInstanceIds,
            osFamilies: dynamicSetMatchingRuleOsFamilies,
            osNames: dynamicSetMatchingRuleOsNames,
            statuses: dynamicSetMatchingRuleStatuses,
            tags: [{
                type: dynamicSetMatchingRuleTagsType,
                key: dynamicSetMatchingRuleTagsKey,
                namespace: dynamicSetMatchingRuleTagsNamespace,
                value: dynamicSetMatchingRuleTagsValue,
            }],
        },
        targetCompartments: [{
            compartmentId: compartmentId,
            doesIncludeChildren: dynamicSetTargetCompartmentsDoesIncludeChildren,
        }],
        definedTags: {
            "Operations.CostCenter": "42",
        },
        description: dynamicSetDescription,
        displayName: dynamicSetDisplayName,
        freeformTags: {
            Department: "Finance",
        },
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_dynamic_set = oci.osmanagementhub.DynamicSet("test_dynamic_set",
        compartment_id=compartment_id,
        match_type=dynamic_set_match_type,
        matching_rule={
            "architectures": dynamic_set_matching_rule_architectures,
            "display_names": dynamic_set_matching_rule_display_names,
            "is_reboot_required": dynamic_set_matching_rule_is_reboot_required,
            "locations": dynamic_set_matching_rule_locations,
            "managed_instance_group_ids": dynamic_set_matching_rule_managed_instance_group_ids,
            "managed_instance_ids": dynamic_set_matching_rule_managed_instance_ids,
            "os_families": dynamic_set_matching_rule_os_families,
            "os_names": dynamic_set_matching_rule_os_names,
            "statuses": dynamic_set_matching_rule_statuses,
            "tags": [{
                "type": dynamic_set_matching_rule_tags_type,
                "key": dynamic_set_matching_rule_tags_key,
                "namespace": dynamic_set_matching_rule_tags_namespace,
                "value": dynamic_set_matching_rule_tags_value,
            }],
        },
        target_compartments=[{
            "compartment_id": compartment_id,
            "does_include_children": dynamic_set_target_compartments_does_include_children,
        }],
        defined_tags={
            "Operations.CostCenter": "42",
        },
        description=dynamic_set_description,
        display_name=dynamic_set_display_name,
        freeform_tags={
            "Department": "Finance",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v4/go/oci/osmanagementhub"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := osmanagementhub.NewDynamicSet(ctx, "test_dynamic_set", &osmanagementhub.DynamicSetArgs{
    			CompartmentId: pulumi.Any(compartmentId),
    			MatchType:     pulumi.Any(dynamicSetMatchType),
    			MatchingRule: &osmanagementhub.DynamicSetMatchingRuleArgs{
    				Architectures:           pulumi.Any(dynamicSetMatchingRuleArchitectures),
    				DisplayNames:            pulumi.Any(dynamicSetMatchingRuleDisplayNames),
    				IsRebootRequired:        pulumi.Any(dynamicSetMatchingRuleIsRebootRequired),
    				Locations:               pulumi.Any(dynamicSetMatchingRuleLocations),
    				ManagedInstanceGroupIds: pulumi.Any(dynamicSetMatchingRuleManagedInstanceGroupIds),
    				ManagedInstanceIds:      pulumi.Any(dynamicSetMatchingRuleManagedInstanceIds),
    				OsFamilies:              pulumi.Any(dynamicSetMatchingRuleOsFamilies),
    				OsNames:                 pulumi.Any(dynamicSetMatchingRuleOsNames),
    				Statuses:                pulumi.Any(dynamicSetMatchingRuleStatuses),
    				Tags: osmanagementhub.DynamicSetMatchingRuleTagArray{
    					&osmanagementhub.DynamicSetMatchingRuleTagArgs{
    						Type:      pulumi.Any(dynamicSetMatchingRuleTagsType),
    						Key:       pulumi.Any(dynamicSetMatchingRuleTagsKey),
    						Namespace: pulumi.Any(dynamicSetMatchingRuleTagsNamespace),
    						Value:     pulumi.Any(dynamicSetMatchingRuleTagsValue),
    					},
    				},
    			},
    			TargetCompartments: osmanagementhub.DynamicSetTargetCompartmentArray{
    				&osmanagementhub.DynamicSetTargetCompartmentArgs{
    					CompartmentId:       pulumi.Any(compartmentId),
    					DoesIncludeChildren: pulumi.Any(dynamicSetTargetCompartmentsDoesIncludeChildren),
    				},
    			},
    			DefinedTags: pulumi.StringMap{
    				"Operations.CostCenter": pulumi.String("42"),
    			},
    			Description: pulumi.Any(dynamicSetDescription),
    			DisplayName: pulumi.Any(dynamicSetDisplayName),
    			FreeformTags: pulumi.StringMap{
    				"Department": pulumi.String("Finance"),
    			},
    		})
    		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 testDynamicSet = new Oci.OsManagementHub.DynamicSet("test_dynamic_set", new()
        {
            CompartmentId = compartmentId,
            MatchType = dynamicSetMatchType,
            MatchingRule = new Oci.OsManagementHub.Inputs.DynamicSetMatchingRuleArgs
            {
                Architectures = dynamicSetMatchingRuleArchitectures,
                DisplayNames = dynamicSetMatchingRuleDisplayNames,
                IsRebootRequired = dynamicSetMatchingRuleIsRebootRequired,
                Locations = dynamicSetMatchingRuleLocations,
                ManagedInstanceGroupIds = dynamicSetMatchingRuleManagedInstanceGroupIds,
                ManagedInstanceIds = dynamicSetMatchingRuleManagedInstanceIds,
                OsFamilies = dynamicSetMatchingRuleOsFamilies,
                OsNames = dynamicSetMatchingRuleOsNames,
                Statuses = dynamicSetMatchingRuleStatuses,
                Tags = new[]
                {
                    new Oci.OsManagementHub.Inputs.DynamicSetMatchingRuleTagArgs
                    {
                        Type = dynamicSetMatchingRuleTagsType,
                        Key = dynamicSetMatchingRuleTagsKey,
                        Namespace = dynamicSetMatchingRuleTagsNamespace,
                        Value = dynamicSetMatchingRuleTagsValue,
                    },
                },
            },
            TargetCompartments = new[]
            {
                new Oci.OsManagementHub.Inputs.DynamicSetTargetCompartmentArgs
                {
                    CompartmentId = compartmentId,
                    DoesIncludeChildren = dynamicSetTargetCompartmentsDoesIncludeChildren,
                },
            },
            DefinedTags = 
            {
                { "Operations.CostCenter", "42" },
            },
            Description = dynamicSetDescription,
            DisplayName = dynamicSetDisplayName,
            FreeformTags = 
            {
                { "Department", "Finance" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.OsManagementHub.DynamicSet;
    import com.pulumi.oci.OsManagementHub.DynamicSetArgs;
    import com.pulumi.oci.OsManagementHub.inputs.DynamicSetMatchingRuleArgs;
    import com.pulumi.oci.OsManagementHub.inputs.DynamicSetTargetCompartmentArgs;
    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 testDynamicSet = new DynamicSet("testDynamicSet", DynamicSetArgs.builder()
                .compartmentId(compartmentId)
                .matchType(dynamicSetMatchType)
                .matchingRule(DynamicSetMatchingRuleArgs.builder()
                    .architectures(dynamicSetMatchingRuleArchitectures)
                    .displayNames(dynamicSetMatchingRuleDisplayNames)
                    .isRebootRequired(dynamicSetMatchingRuleIsRebootRequired)
                    .locations(dynamicSetMatchingRuleLocations)
                    .managedInstanceGroupIds(dynamicSetMatchingRuleManagedInstanceGroupIds)
                    .managedInstanceIds(dynamicSetMatchingRuleManagedInstanceIds)
                    .osFamilies(dynamicSetMatchingRuleOsFamilies)
                    .osNames(dynamicSetMatchingRuleOsNames)
                    .statuses(dynamicSetMatchingRuleStatuses)
                    .tags(DynamicSetMatchingRuleTagArgs.builder()
                        .type(dynamicSetMatchingRuleTagsType)
                        .key(dynamicSetMatchingRuleTagsKey)
                        .namespace(dynamicSetMatchingRuleTagsNamespace)
                        .value(dynamicSetMatchingRuleTagsValue)
                        .build())
                    .build())
                .targetCompartments(DynamicSetTargetCompartmentArgs.builder()
                    .compartmentId(compartmentId)
                    .doesIncludeChildren(dynamicSetTargetCompartmentsDoesIncludeChildren)
                    .build())
                .definedTags(Map.of("Operations.CostCenter", "42"))
                .description(dynamicSetDescription)
                .displayName(dynamicSetDisplayName)
                .freeformTags(Map.of("Department", "Finance"))
                .build());
    
        }
    }
    
    resources:
      testDynamicSet:
        type: oci:OsManagementHub:DynamicSet
        name: test_dynamic_set
        properties:
          compartmentId: ${compartmentId}
          matchType: ${dynamicSetMatchType}
          matchingRule:
            architectures: ${dynamicSetMatchingRuleArchitectures}
            displayNames: ${dynamicSetMatchingRuleDisplayNames}
            isRebootRequired: ${dynamicSetMatchingRuleIsRebootRequired}
            locations: ${dynamicSetMatchingRuleLocations}
            managedInstanceGroupIds: ${dynamicSetMatchingRuleManagedInstanceGroupIds}
            managedInstanceIds: ${dynamicSetMatchingRuleManagedInstanceIds}
            osFamilies: ${dynamicSetMatchingRuleOsFamilies}
            osNames: ${dynamicSetMatchingRuleOsNames}
            statuses: ${dynamicSetMatchingRuleStatuses}
            tags:
              - type: ${dynamicSetMatchingRuleTagsType}
                key: ${dynamicSetMatchingRuleTagsKey}
                namespace: ${dynamicSetMatchingRuleTagsNamespace}
                value: ${dynamicSetMatchingRuleTagsValue}
          targetCompartments:
            - compartmentId: ${compartmentId}
              doesIncludeChildren: ${dynamicSetTargetCompartmentsDoesIncludeChildren}
          definedTags:
            Operations.CostCenter: '42'
          description: ${dynamicSetDescription}
          displayName: ${dynamicSetDisplayName}
          freeformTags:
            Department: Finance
    

    Create DynamicSet Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DynamicSet(name: string, args: DynamicSetArgs, opts?: CustomResourceOptions);
    @overload
    def DynamicSet(resource_name: str,
                   args: DynamicSetArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def DynamicSet(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   compartment_id: Optional[str] = None,
                   match_type: Optional[str] = None,
                   matching_rule: Optional[DynamicSetMatchingRuleArgs] = None,
                   target_compartments: Optional[Sequence[DynamicSetTargetCompartmentArgs]] = None,
                   defined_tags: Optional[Mapping[str, str]] = None,
                   description: Optional[str] = None,
                   display_name: Optional[str] = None,
                   freeform_tags: Optional[Mapping[str, str]] = None)
    func NewDynamicSet(ctx *Context, name string, args DynamicSetArgs, opts ...ResourceOption) (*DynamicSet, error)
    public DynamicSet(string name, DynamicSetArgs args, CustomResourceOptions? opts = null)
    public DynamicSet(String name, DynamicSetArgs args)
    public DynamicSet(String name, DynamicSetArgs args, CustomResourceOptions options)
    
    type: oci:OsManagementHub:DynamicSet
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DynamicSetArgs
    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 DynamicSetArgs
    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 DynamicSetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DynamicSetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DynamicSetArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var dynamicSetResource = new Oci.OsManagementHub.DynamicSet("dynamicSetResource", new()
    {
        CompartmentId = "string",
        MatchType = "string",
        MatchingRule = new Oci.OsManagementHub.Inputs.DynamicSetMatchingRuleArgs
        {
            Architectures = new[]
            {
                "string",
            },
            DisplayNames = new[]
            {
                "string",
            },
            IsRebootRequired = false,
            Locations = new[]
            {
                "string",
            },
            ManagedInstanceGroupIds = new[]
            {
                "string",
            },
            ManagedInstanceIds = new[]
            {
                "string",
            },
            OsFamilies = new[]
            {
                "string",
            },
            OsNames = new[]
            {
                "string",
            },
            Statuses = new[]
            {
                "string",
            },
            Tags = new[]
            {
                new Oci.OsManagementHub.Inputs.DynamicSetMatchingRuleTagArgs
                {
                    Type = "string",
                    Key = "string",
                    Namespace = "string",
                    Value = "string",
                },
            },
        },
        TargetCompartments = new[]
        {
            new Oci.OsManagementHub.Inputs.DynamicSetTargetCompartmentArgs
            {
                CompartmentId = "string",
                DoesIncludeChildren = false,
            },
        },
        DefinedTags = 
        {
            { "string", "string" },
        },
        Description = "string",
        DisplayName = "string",
        FreeformTags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := osmanagementhub.NewDynamicSet(ctx, "dynamicSetResource", &osmanagementhub.DynamicSetArgs{
    	CompartmentId: pulumi.String("string"),
    	MatchType:     pulumi.String("string"),
    	MatchingRule: &osmanagementhub.DynamicSetMatchingRuleArgs{
    		Architectures: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		DisplayNames: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		IsRebootRequired: pulumi.Bool(false),
    		Locations: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		ManagedInstanceGroupIds: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		ManagedInstanceIds: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		OsFamilies: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		OsNames: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Statuses: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Tags: osmanagementhub.DynamicSetMatchingRuleTagArray{
    			&osmanagementhub.DynamicSetMatchingRuleTagArgs{
    				Type:      pulumi.String("string"),
    				Key:       pulumi.String("string"),
    				Namespace: pulumi.String("string"),
    				Value:     pulumi.String("string"),
    			},
    		},
    	},
    	TargetCompartments: osmanagementhub.DynamicSetTargetCompartmentArray{
    		&osmanagementhub.DynamicSetTargetCompartmentArgs{
    			CompartmentId:       pulumi.String("string"),
    			DoesIncludeChildren: pulumi.Bool(false),
    		},
    	},
    	DefinedTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	DisplayName: pulumi.String("string"),
    	FreeformTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var dynamicSetResource = new DynamicSet("dynamicSetResource", DynamicSetArgs.builder()
        .compartmentId("string")
        .matchType("string")
        .matchingRule(DynamicSetMatchingRuleArgs.builder()
            .architectures("string")
            .displayNames("string")
            .isRebootRequired(false)
            .locations("string")
            .managedInstanceGroupIds("string")
            .managedInstanceIds("string")
            .osFamilies("string")
            .osNames("string")
            .statuses("string")
            .tags(DynamicSetMatchingRuleTagArgs.builder()
                .type("string")
                .key("string")
                .namespace("string")
                .value("string")
                .build())
            .build())
        .targetCompartments(DynamicSetTargetCompartmentArgs.builder()
            .compartmentId("string")
            .doesIncludeChildren(false)
            .build())
        .definedTags(Map.of("string", "string"))
        .description("string")
        .displayName("string")
        .freeformTags(Map.of("string", "string"))
        .build());
    
    dynamic_set_resource = oci.osmanagementhub.DynamicSet("dynamicSetResource",
        compartment_id="string",
        match_type="string",
        matching_rule={
            "architectures": ["string"],
            "display_names": ["string"],
            "is_reboot_required": False,
            "locations": ["string"],
            "managed_instance_group_ids": ["string"],
            "managed_instance_ids": ["string"],
            "os_families": ["string"],
            "os_names": ["string"],
            "statuses": ["string"],
            "tags": [{
                "type": "string",
                "key": "string",
                "namespace": "string",
                "value": "string",
            }],
        },
        target_compartments=[{
            "compartment_id": "string",
            "does_include_children": False,
        }],
        defined_tags={
            "string": "string",
        },
        description="string",
        display_name="string",
        freeform_tags={
            "string": "string",
        })
    
    const dynamicSetResource = new oci.osmanagementhub.DynamicSet("dynamicSetResource", {
        compartmentId: "string",
        matchType: "string",
        matchingRule: {
            architectures: ["string"],
            displayNames: ["string"],
            isRebootRequired: false,
            locations: ["string"],
            managedInstanceGroupIds: ["string"],
            managedInstanceIds: ["string"],
            osFamilies: ["string"],
            osNames: ["string"],
            statuses: ["string"],
            tags: [{
                type: "string",
                key: "string",
                namespace: "string",
                value: "string",
            }],
        },
        targetCompartments: [{
            compartmentId: "string",
            doesIncludeChildren: false,
        }],
        definedTags: {
            string: "string",
        },
        description: "string",
        displayName: "string",
        freeformTags: {
            string: "string",
        },
    });
    
    type: oci:OsManagementHub:DynamicSet
    properties:
        compartmentId: string
        definedTags:
            string: string
        description: string
        displayName: string
        freeformTags:
            string: string
        matchType: string
        matchingRule:
            architectures:
                - string
            displayNames:
                - string
            isRebootRequired: false
            locations:
                - string
            managedInstanceGroupIds:
                - string
            managedInstanceIds:
                - string
            osFamilies:
                - string
            osNames:
                - string
            statuses:
                - string
            tags:
                - key: string
                  namespace: string
                  type: string
                  value: string
        targetCompartments:
            - compartmentId: string
              doesIncludeChildren: false
    

    DynamicSet Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The DynamicSet resource accepts the following input properties:

    CompartmentId string
    (Updatable) The OCID of the compartment that contains the dynamic set.
    MatchType string
    (Updatable) Include either any or all attributes.
    MatchingRule DynamicSetMatchingRule
    (Updatable) An object that defines the set of rules that identifies the target instances in a dynamic set.
    TargetCompartments List<DynamicSetTargetCompartment>
    (Updatable) The list of compartment details.
    DefinedTags Dictionary<string, string>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    (Updatable) User-specified description for the dynamic set.
    DisplayName string
    (Updatable) User-friendly name for the dynamic set.
    FreeformTags Dictionary<string, string>
    (Updatable) 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"}
    CompartmentId string
    (Updatable) The OCID of the compartment that contains the dynamic set.
    MatchType string
    (Updatable) Include either any or all attributes.
    MatchingRule DynamicSetMatchingRuleArgs
    (Updatable) An object that defines the set of rules that identifies the target instances in a dynamic set.
    TargetCompartments []DynamicSetTargetCompartmentArgs
    (Updatable) The list of compartment details.
    DefinedTags map[string]string
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    (Updatable) User-specified description for the dynamic set.
    DisplayName string
    (Updatable) User-friendly name for the dynamic set.
    FreeformTags map[string]string
    (Updatable) 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"}
    compartmentId String
    (Updatable) The OCID of the compartment that contains the dynamic set.
    matchType String
    (Updatable) Include either any or all attributes.
    matchingRule DynamicSetMatchingRule
    (Updatable) An object that defines the set of rules that identifies the target instances in a dynamic set.
    targetCompartments List<DynamicSetTargetCompartment>
    (Updatable) The list of compartment details.
    definedTags Map<String,String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    (Updatable) User-specified description for the dynamic set.
    displayName String
    (Updatable) User-friendly name for the dynamic set.
    freeformTags Map<String,String>
    (Updatable) 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"}
    compartmentId string
    (Updatable) The OCID of the compartment that contains the dynamic set.
    matchType string
    (Updatable) Include either any or all attributes.
    matchingRule DynamicSetMatchingRule
    (Updatable) An object that defines the set of rules that identifies the target instances in a dynamic set.
    targetCompartments DynamicSetTargetCompartment[]
    (Updatable) The list of compartment details.
    definedTags {[key: string]: string}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description string
    (Updatable) User-specified description for the dynamic set.
    displayName string
    (Updatable) User-friendly name for the dynamic set.
    freeformTags {[key: string]: string}
    (Updatable) 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"}
    compartment_id str
    (Updatable) The OCID of the compartment that contains the dynamic set.
    match_type str
    (Updatable) Include either any or all attributes.
    matching_rule DynamicSetMatchingRuleArgs
    (Updatable) An object that defines the set of rules that identifies the target instances in a dynamic set.
    target_compartments Sequence[DynamicSetTargetCompartmentArgs]
    (Updatable) The list of compartment details.
    defined_tags Mapping[str, str]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description str
    (Updatable) User-specified description for the dynamic set.
    display_name str
    (Updatable) User-friendly name for the dynamic set.
    freeform_tags Mapping[str, str]
    (Updatable) 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"}
    compartmentId String
    (Updatable) The OCID of the compartment that contains the dynamic set.
    matchType String
    (Updatable) Include either any or all attributes.
    matchingRule Property Map
    (Updatable) An object that defines the set of rules that identifies the target instances in a dynamic set.
    targetCompartments List<Property Map>
    (Updatable) The list of compartment details.
    definedTags Map<String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    (Updatable) User-specified description for the dynamic set.
    displayName String
    (Updatable) User-friendly name for the dynamic set.
    freeformTags Map<String>
    (Updatable) 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"}

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    ScheduledJobCount string
    Number of scheduled jobs currently targeting this dynamic set.
    State string
    The current state of the event.
    SystemTags Dictionary<string, string>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The date and time the dynamic set was created (in RFC 3339 format).
    TimeUpdated string
    The date and time the dynamic set was last updated (in RFC 3339 format).
    Id string
    The provider-assigned unique ID for this managed resource.
    ScheduledJobCount string
    Number of scheduled jobs currently targeting this dynamic set.
    State string
    The current state of the event.
    SystemTags map[string]string
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The date and time the dynamic set was created (in RFC 3339 format).
    TimeUpdated string
    The date and time the dynamic set was last updated (in RFC 3339 format).
    id String
    The provider-assigned unique ID for this managed resource.
    scheduledJobCount String
    Number of scheduled jobs currently targeting this dynamic set.
    state String
    The current state of the event.
    systemTags Map<String,String>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The date and time the dynamic set was created (in RFC 3339 format).
    timeUpdated String
    The date and time the dynamic set was last updated (in RFC 3339 format).
    id string
    The provider-assigned unique ID for this managed resource.
    scheduledJobCount string
    Number of scheduled jobs currently targeting this dynamic set.
    state string
    The current state of the event.
    systemTags {[key: string]: string}
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated string
    The date and time the dynamic set was created (in RFC 3339 format).
    timeUpdated string
    The date and time the dynamic set was last updated (in RFC 3339 format).
    id str
    The provider-assigned unique ID for this managed resource.
    scheduled_job_count str
    Number of scheduled jobs currently targeting this dynamic set.
    state str
    The current state of the event.
    system_tags Mapping[str, str]
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    time_created str
    The date and time the dynamic set was created (in RFC 3339 format).
    time_updated str
    The date and time the dynamic set was last updated (in RFC 3339 format).
    id String
    The provider-assigned unique ID for this managed resource.
    scheduledJobCount String
    Number of scheduled jobs currently targeting this dynamic set.
    state String
    The current state of the event.
    systemTags Map<String>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The date and time the dynamic set was created (in RFC 3339 format).
    timeUpdated String
    The date and time the dynamic set was last updated (in RFC 3339 format).

    Look up Existing DynamicSet Resource

    Get an existing DynamicSet 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?: DynamicSetState, opts?: CustomResourceOptions): DynamicSet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compartment_id: Optional[str] = None,
            defined_tags: Optional[Mapping[str, str]] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, str]] = None,
            match_type: Optional[str] = None,
            matching_rule: Optional[DynamicSetMatchingRuleArgs] = None,
            scheduled_job_count: Optional[str] = None,
            state: Optional[str] = None,
            system_tags: Optional[Mapping[str, str]] = None,
            target_compartments: Optional[Sequence[DynamicSetTargetCompartmentArgs]] = None,
            time_created: Optional[str] = None,
            time_updated: Optional[str] = None) -> DynamicSet
    func GetDynamicSet(ctx *Context, name string, id IDInput, state *DynamicSetState, opts ...ResourceOption) (*DynamicSet, error)
    public static DynamicSet Get(string name, Input<string> id, DynamicSetState? state, CustomResourceOptions? opts = null)
    public static DynamicSet get(String name, Output<String> id, DynamicSetState state, CustomResourceOptions options)
    resources:  _:    type: oci:OsManagementHub:DynamicSet    get:      id: ${id}
    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) The OCID of the compartment that contains the dynamic set.
    DefinedTags Dictionary<string, string>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    (Updatable) User-specified description for the dynamic set.
    DisplayName string
    (Updatable) User-friendly name for the dynamic set.
    FreeformTags Dictionary<string, string>
    (Updatable) 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"}
    MatchType string
    (Updatable) Include either any or all attributes.
    MatchingRule DynamicSetMatchingRule
    (Updatable) An object that defines the set of rules that identifies the target instances in a dynamic set.
    ScheduledJobCount string
    Number of scheduled jobs currently targeting this dynamic set.
    State string
    The current state of the event.
    SystemTags Dictionary<string, string>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    TargetCompartments List<DynamicSetTargetCompartment>
    (Updatable) The list of compartment details.
    TimeCreated string
    The date and time the dynamic set was created (in RFC 3339 format).
    TimeUpdated string
    The date and time the dynamic set was last updated (in RFC 3339 format).
    CompartmentId string
    (Updatable) The OCID of the compartment that contains the dynamic set.
    DefinedTags map[string]string
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    (Updatable) User-specified description for the dynamic set.
    DisplayName string
    (Updatable) User-friendly name for the dynamic set.
    FreeformTags map[string]string
    (Updatable) 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"}
    MatchType string
    (Updatable) Include either any or all attributes.
    MatchingRule DynamicSetMatchingRuleArgs
    (Updatable) An object that defines the set of rules that identifies the target instances in a dynamic set.
    ScheduledJobCount string
    Number of scheduled jobs currently targeting this dynamic set.
    State string
    The current state of the event.
    SystemTags map[string]string
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    TargetCompartments []DynamicSetTargetCompartmentArgs
    (Updatable) The list of compartment details.
    TimeCreated string
    The date and time the dynamic set was created (in RFC 3339 format).
    TimeUpdated string
    The date and time the dynamic set was last updated (in RFC 3339 format).
    compartmentId String
    (Updatable) The OCID of the compartment that contains the dynamic set.
    definedTags Map<String,String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    (Updatable) User-specified description for the dynamic set.
    displayName String
    (Updatable) User-friendly name for the dynamic set.
    freeformTags Map<String,String>
    (Updatable) 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"}
    matchType String
    (Updatable) Include either any or all attributes.
    matchingRule DynamicSetMatchingRule
    (Updatable) An object that defines the set of rules that identifies the target instances in a dynamic set.
    scheduledJobCount String
    Number of scheduled jobs currently targeting this dynamic set.
    state String
    The current state of the event.
    systemTags Map<String,String>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    targetCompartments List<DynamicSetTargetCompartment>
    (Updatable) The list of compartment details.
    timeCreated String
    The date and time the dynamic set was created (in RFC 3339 format).
    timeUpdated String
    The date and time the dynamic set was last updated (in RFC 3339 format).
    compartmentId string
    (Updatable) The OCID of the compartment that contains the dynamic set.
    definedTags {[key: string]: string}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description string
    (Updatable) User-specified description for the dynamic set.
    displayName string
    (Updatable) User-friendly name for the dynamic set.
    freeformTags {[key: string]: string}
    (Updatable) 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"}
    matchType string
    (Updatable) Include either any or all attributes.
    matchingRule DynamicSetMatchingRule
    (Updatable) An object that defines the set of rules that identifies the target instances in a dynamic set.
    scheduledJobCount string
    Number of scheduled jobs currently targeting this dynamic set.
    state string
    The current state of the event.
    systemTags {[key: string]: string}
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    targetCompartments DynamicSetTargetCompartment[]
    (Updatable) The list of compartment details.
    timeCreated string
    The date and time the dynamic set was created (in RFC 3339 format).
    timeUpdated string
    The date and time the dynamic set was last updated (in RFC 3339 format).
    compartment_id str
    (Updatable) The OCID of the compartment that contains the dynamic set.
    defined_tags Mapping[str, str]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description str
    (Updatable) User-specified description for the dynamic set.
    display_name str
    (Updatable) User-friendly name for the dynamic set.
    freeform_tags Mapping[str, str]
    (Updatable) 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"}
    match_type str
    (Updatable) Include either any or all attributes.
    matching_rule DynamicSetMatchingRuleArgs
    (Updatable) An object that defines the set of rules that identifies the target instances in a dynamic set.
    scheduled_job_count str
    Number of scheduled jobs currently targeting this dynamic set.
    state str
    The current state of the event.
    system_tags Mapping[str, str]
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    target_compartments Sequence[DynamicSetTargetCompartmentArgs]
    (Updatable) The list of compartment details.
    time_created str
    The date and time the dynamic set was created (in RFC 3339 format).
    time_updated str
    The date and time the dynamic set was last updated (in RFC 3339 format).
    compartmentId String
    (Updatable) The OCID of the compartment that contains the dynamic set.
    definedTags Map<String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    (Updatable) User-specified description for the dynamic set.
    displayName String
    (Updatable) User-friendly name for the dynamic set.
    freeformTags Map<String>
    (Updatable) 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"}
    matchType String
    (Updatable) Include either any or all attributes.
    matchingRule Property Map
    (Updatable) An object that defines the set of rules that identifies the target instances in a dynamic set.
    scheduledJobCount String
    Number of scheduled jobs currently targeting this dynamic set.
    state String
    The current state of the event.
    systemTags Map<String>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    targetCompartments List<Property Map>
    (Updatable) The list of compartment details.
    timeCreated String
    The date and time the dynamic set was created (in RFC 3339 format).
    timeUpdated String
    The date and time the dynamic set was last updated (in RFC 3339 format).

    Supporting Types

    DynamicSetMatchingRule, DynamicSetMatchingRuleArgs

    Architectures List<string>
    (Updatable) The list of managed instance architectures.
    DisplayNames List<string>
    (Updatable) The list of managed instance display names.
    IsRebootRequired bool
    (Updatable) Indicates if the managed instance needs to be rebooted.
    Locations List<string>
    (Updatable) The list of managed instance locations.
    ManagedInstanceGroupIds List<string>
    (Updatable) The list of managed instance group IDs.
    ManagedInstanceIds List<string>
    (Updatable) The list of managed instance ids.
    OsFamilies List<string>
    (Updatable) The list of managed instance OS families.
    OsNames List<string>
    (Updatable) The list of managed instance OS names.
    Statuses List<string>
    (Updatable) The list of managed instance statuses.
    Tags List<DynamicSetMatchingRuleTag>
    (Updatable) The list of the managed instance tags.
    Architectures []string
    (Updatable) The list of managed instance architectures.
    DisplayNames []string
    (Updatable) The list of managed instance display names.
    IsRebootRequired bool
    (Updatable) Indicates if the managed instance needs to be rebooted.
    Locations []string
    (Updatable) The list of managed instance locations.
    ManagedInstanceGroupIds []string
    (Updatable) The list of managed instance group IDs.
    ManagedInstanceIds []string
    (Updatable) The list of managed instance ids.
    OsFamilies []string
    (Updatable) The list of managed instance OS families.
    OsNames []string
    (Updatable) The list of managed instance OS names.
    Statuses []string
    (Updatable) The list of managed instance statuses.
    Tags []DynamicSetMatchingRuleTag
    (Updatable) The list of the managed instance tags.
    architectures List<String>
    (Updatable) The list of managed instance architectures.
    displayNames List<String>
    (Updatable) The list of managed instance display names.
    isRebootRequired Boolean
    (Updatable) Indicates if the managed instance needs to be rebooted.
    locations List<String>
    (Updatable) The list of managed instance locations.
    managedInstanceGroupIds List<String>
    (Updatable) The list of managed instance group IDs.
    managedInstanceIds List<String>
    (Updatable) The list of managed instance ids.
    osFamilies List<String>
    (Updatable) The list of managed instance OS families.
    osNames List<String>
    (Updatable) The list of managed instance OS names.
    statuses List<String>
    (Updatable) The list of managed instance statuses.
    tags List<DynamicSetMatchingRuleTag>
    (Updatable) The list of the managed instance tags.
    architectures string[]
    (Updatable) The list of managed instance architectures.
    displayNames string[]
    (Updatable) The list of managed instance display names.
    isRebootRequired boolean
    (Updatable) Indicates if the managed instance needs to be rebooted.
    locations string[]
    (Updatable) The list of managed instance locations.
    managedInstanceGroupIds string[]
    (Updatable) The list of managed instance group IDs.
    managedInstanceIds string[]
    (Updatable) The list of managed instance ids.
    osFamilies string[]
    (Updatable) The list of managed instance OS families.
    osNames string[]
    (Updatable) The list of managed instance OS names.
    statuses string[]
    (Updatable) The list of managed instance statuses.
    tags DynamicSetMatchingRuleTag[]
    (Updatable) The list of the managed instance tags.
    architectures Sequence[str]
    (Updatable) The list of managed instance architectures.
    display_names Sequence[str]
    (Updatable) The list of managed instance display names.
    is_reboot_required bool
    (Updatable) Indicates if the managed instance needs to be rebooted.
    locations Sequence[str]
    (Updatable) The list of managed instance locations.
    managed_instance_group_ids Sequence[str]
    (Updatable) The list of managed instance group IDs.
    managed_instance_ids Sequence[str]
    (Updatable) The list of managed instance ids.
    os_families Sequence[str]
    (Updatable) The list of managed instance OS families.
    os_names Sequence[str]
    (Updatable) The list of managed instance OS names.
    statuses Sequence[str]
    (Updatable) The list of managed instance statuses.
    tags Sequence[DynamicSetMatchingRuleTag]
    (Updatable) The list of the managed instance tags.
    architectures List<String>
    (Updatable) The list of managed instance architectures.
    displayNames List<String>
    (Updatable) The list of managed instance display names.
    isRebootRequired Boolean
    (Updatable) Indicates if the managed instance needs to be rebooted.
    locations List<String>
    (Updatable) The list of managed instance locations.
    managedInstanceGroupIds List<String>
    (Updatable) The list of managed instance group IDs.
    managedInstanceIds List<String>
    (Updatable) The list of managed instance ids.
    osFamilies List<String>
    (Updatable) The list of managed instance OS families.
    osNames List<String>
    (Updatable) The list of managed instance OS names.
    statuses List<String>
    (Updatable) The list of managed instance statuses.
    tags List<Property Map>
    (Updatable) The list of the managed instance tags.

    DynamicSetMatchingRuleTag, DynamicSetMatchingRuleTagArgs

    Type string
    (Updatable) The type of the tag. Common values include defined or freeform.
    Key string
    (Updatable) The key of the tag.
    Namespace string
    (Updatable) The namespace of the tag.
    Value string
    (Updatable) The value associated with the tag key.
    Type string
    (Updatable) The type of the tag. Common values include defined or freeform.
    Key string
    (Updatable) The key of the tag.
    Namespace string
    (Updatable) The namespace of the tag.
    Value string
    (Updatable) The value associated with the tag key.
    type String
    (Updatable) The type of the tag. Common values include defined or freeform.
    key String
    (Updatable) The key of the tag.
    namespace String
    (Updatable) The namespace of the tag.
    value String
    (Updatable) The value associated with the tag key.
    type string
    (Updatable) The type of the tag. Common values include defined or freeform.
    key string
    (Updatable) The key of the tag.
    namespace string
    (Updatable) The namespace of the tag.
    value string
    (Updatable) The value associated with the tag key.
    type str
    (Updatable) The type of the tag. Common values include defined or freeform.
    key str
    (Updatable) The key of the tag.
    namespace str
    (Updatable) The namespace of the tag.
    value str
    (Updatable) The value associated with the tag key.
    type String
    (Updatable) The type of the tag. Common values include defined or freeform.
    key String
    (Updatable) The key of the tag.
    namespace String
    (Updatable) The namespace of the tag.
    value String
    (Updatable) The value associated with the tag key.

    DynamicSetTargetCompartment, DynamicSetTargetCompartmentArgs

    CompartmentId string
    (Updatable) The OCID of the compartment.
    DoesIncludeChildren bool

    (Updatable) Indicates if the child compartments are included in the matching rule.

    ** 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

    CompartmentId string
    (Updatable) The OCID of the compartment.
    DoesIncludeChildren bool

    (Updatable) Indicates if the child compartments are included in the matching rule.

    ** 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

    compartmentId String
    (Updatable) The OCID of the compartment.
    doesIncludeChildren Boolean

    (Updatable) Indicates if the child compartments are included in the matching rule.

    ** 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

    compartmentId string
    (Updatable) The OCID of the compartment.
    doesIncludeChildren boolean

    (Updatable) Indicates if the child compartments are included in the matching rule.

    ** 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

    compartment_id str
    (Updatable) The OCID of the compartment.
    does_include_children bool

    (Updatable) Indicates if the child compartments are included in the matching rule.

    ** 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

    compartmentId String
    (Updatable) The OCID of the compartment.
    doesIncludeChildren Boolean

    (Updatable) Indicates if the child compartments are included in the matching rule.

    ** 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

    Import

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

    $ pulumi import oci:OsManagementHub/dynamicSet:DynamicSet test_dynamic_set "id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Viewing docs for Oracle Cloud Infrastructure v4.8.0
    published on Friday, Apr 24, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.