Creating a Dynamic Set
Define the matching rule conditions that identify which instances to include in the dynamic set for OS Management Hub.
Navigate
- Navigate to the Dynamic sets list page.
- Select Create.
Add basic details
Provide the basic information for the dynamic set, and then select Next.
- Name: Enter a name for the dynamic set. You change the name at any time. The name doesn't need to be unique, because an Oracle Cloud Identifier (OCID) uniquely identifies the set. Avoid entering confidential information.
- Description: (Optional) Enter a description for the dynamic set. Avoid entering confidential information.
- Create in compartment: Select the compartment for the dynamic set to reside in.
- Tags: Add tags to this resource.
If you have permissions to create a resource, then you also have permissions to apply free-form tags to that resource. To apply a defined tag, you must have permissions to use the tag namespace. For more information about tagging, see Resource Tags. If you're not sure whether to apply tags, ask an administrator or skip this option. You can apply tags later.
Select compartments
Limit the dynamic set to instances from the selected compartments.
- Compartment: Select the compartment to include in the dynamic set. Optionally, enable Include child compartments. To include the entire tenancy, select the root compartment and include subcompartments.
- To add more compartments, select Add compartment.
Define matching conditions
Select the matching conditions used to identify which instances to include in the set.
Option 1: Define specific conditions
Select how the conditions are matched:
- Match any conditions: Includes instances that match at least one of the rule conditions. Use this to define a set with a broad scope, as it acts like a logical OR (such as Condition 1 OR Condition 2 OR Condition 3).
- Match all conditions: Includes instances that meet all the defined conditions. Use this to define a set with a narrow scope, defining a set with a narrow scope, as it acts like a logical AND (such as Condition 1 AND Condition 2 AND Condition 3).
Select the conditions. Define a minimum of one condition.
-
Tags: Includes instances based on a specific tag. For OCI instances, this is the tag on the Compute instance. For on-premises or third-party cloud instances, this is the tag on the Management Agent resource.
- For OCI instances, this evaluates the tag on the Compute instance.
- For on-premises or third-party cloud instances, this evaluates the tag on the Management Agent resource.
- OS version: Includes instances running the specified OS version.
- Architecture: Includes instances with the specified hardware architecture.
- Location: Includes instances in the specified location.
- Status: Includes instances that are in the specified operational state.
- Group: Includes instances that are members of the specified group.
- Reboot status: Includes instances that are in the specified reboot state.
- Instance name: Includes instances
that have the specified name.
- The name must match exactly for the instance to be included. Wildcards aren't allowed.
Option 2: Include all instances in compartment
Select this option to include all instances in the selected compartments. No specific conditions are defined, but all instances in the compartment are included in the dynamic set.
Preview dynamic set members
Before creating the dynamic set, you can preview the set members.
Review and create
Review the details of the dynamic set. Make any changes as needed, and then select Create.
View the new set in the Dynamic sets list page.
Use the oci os-management-hub dynamic-set dynamic-set create command and required parameters to create a dynamic set.
oci os-management-hub dynamic-set dynamic-set create --compartment-id ocid --display-name text --match-type [ANY,ALL] --matching-rule json --target-compartments json [OPTIONS]For a complete list of flags and variable options for CLI commands, see the Command Line Reference.
Run the CreateDynamicSet operation to create a dynamic set.