1. Packages
  2. Packages
  3. Oracle Cloud Infrastructure
  4. API Docs
  5. OsManagementHub
  6. DynamicSetRemovePackagesManagement
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 Remove Packages Management 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/RemovePackages

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

    Removes specified software packages from all managed instances in the dynamic set.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testDynamicSetRemovePackagesManagement = new oci.osmanagementhub.DynamicSetRemovePackagesManagement("test_dynamic_set_remove_packages_management", {
        dynamicSetId: testDynamicSet.id,
        packageNames: dynamicSetRemovePackagesManagementPackageNames,
        managedInstances: dynamicSetRemovePackagesManagementManagedInstances,
        workRequestDetails: {
            description: dynamicSetRemovePackagesManagementWorkRequestDetailsDescription,
            displayName: dynamicSetRemovePackagesManagementWorkRequestDetailsDisplayName,
        },
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_dynamic_set_remove_packages_management = oci.osmanagementhub.DynamicSetRemovePackagesManagement("test_dynamic_set_remove_packages_management",
        dynamic_set_id=test_dynamic_set["id"],
        package_names=dynamic_set_remove_packages_management_package_names,
        managed_instances=dynamic_set_remove_packages_management_managed_instances,
        work_request_details={
            "description": dynamic_set_remove_packages_management_work_request_details_description,
            "display_name": dynamic_set_remove_packages_management_work_request_details_display_name,
        })
    
    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.NewDynamicSetRemovePackagesManagement(ctx, "test_dynamic_set_remove_packages_management", &osmanagementhub.DynamicSetRemovePackagesManagementArgs{
    			DynamicSetId:     pulumi.Any(testDynamicSet.Id),
    			PackageNames:     pulumi.Any(dynamicSetRemovePackagesManagementPackageNames),
    			ManagedInstances: pulumi.Any(dynamicSetRemovePackagesManagementManagedInstances),
    			WorkRequestDetails: &osmanagementhub.DynamicSetRemovePackagesManagementWorkRequestDetailsArgs{
    				Description: pulumi.Any(dynamicSetRemovePackagesManagementWorkRequestDetailsDescription),
    				DisplayName: pulumi.Any(dynamicSetRemovePackagesManagementWorkRequestDetailsDisplayName),
    			},
    		})
    		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 testDynamicSetRemovePackagesManagement = new Oci.OsManagementHub.DynamicSetRemovePackagesManagement("test_dynamic_set_remove_packages_management", new()
        {
            DynamicSetId = testDynamicSet.Id,
            PackageNames = dynamicSetRemovePackagesManagementPackageNames,
            ManagedInstances = dynamicSetRemovePackagesManagementManagedInstances,
            WorkRequestDetails = new Oci.OsManagementHub.Inputs.DynamicSetRemovePackagesManagementWorkRequestDetailsArgs
            {
                Description = dynamicSetRemovePackagesManagementWorkRequestDetailsDescription,
                DisplayName = dynamicSetRemovePackagesManagementWorkRequestDetailsDisplayName,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.OsManagementHub.DynamicSetRemovePackagesManagement;
    import com.pulumi.oci.OsManagementHub.DynamicSetRemovePackagesManagementArgs;
    import com.pulumi.oci.OsManagementHub.inputs.DynamicSetRemovePackagesManagementWorkRequestDetailsArgs;
    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 testDynamicSetRemovePackagesManagement = new DynamicSetRemovePackagesManagement("testDynamicSetRemovePackagesManagement", DynamicSetRemovePackagesManagementArgs.builder()
                .dynamicSetId(testDynamicSet.id())
                .packageNames(dynamicSetRemovePackagesManagementPackageNames)
                .managedInstances(dynamicSetRemovePackagesManagementManagedInstances)
                .workRequestDetails(DynamicSetRemovePackagesManagementWorkRequestDetailsArgs.builder()
                    .description(dynamicSetRemovePackagesManagementWorkRequestDetailsDescription)
                    .displayName(dynamicSetRemovePackagesManagementWorkRequestDetailsDisplayName)
                    .build())
                .build());
    
        }
    }
    
    resources:
      testDynamicSetRemovePackagesManagement:
        type: oci:OsManagementHub:DynamicSetRemovePackagesManagement
        name: test_dynamic_set_remove_packages_management
        properties:
          dynamicSetId: ${testDynamicSet.id}
          packageNames: ${dynamicSetRemovePackagesManagementPackageNames}
          managedInstances: ${dynamicSetRemovePackagesManagementManagedInstances}
          workRequestDetails:
            description: ${dynamicSetRemovePackagesManagementWorkRequestDetailsDescription}
            displayName: ${dynamicSetRemovePackagesManagementWorkRequestDetailsDisplayName}
    

    Create DynamicSetRemovePackagesManagement Resource

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

    Constructor syntax

    new DynamicSetRemovePackagesManagement(name: string, args: DynamicSetRemovePackagesManagementArgs, opts?: CustomResourceOptions);
    @overload
    def DynamicSetRemovePackagesManagement(resource_name: str,
                                           args: DynamicSetRemovePackagesManagementArgs,
                                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def DynamicSetRemovePackagesManagement(resource_name: str,
                                           opts: Optional[ResourceOptions] = None,
                                           dynamic_set_id: Optional[str] = None,
                                           package_names: Optional[Sequence[str]] = None,
                                           managed_instances: Optional[Sequence[str]] = None,
                                           work_request_details: Optional[DynamicSetRemovePackagesManagementWorkRequestDetailsArgs] = None)
    func NewDynamicSetRemovePackagesManagement(ctx *Context, name string, args DynamicSetRemovePackagesManagementArgs, opts ...ResourceOption) (*DynamicSetRemovePackagesManagement, error)
    public DynamicSetRemovePackagesManagement(string name, DynamicSetRemovePackagesManagementArgs args, CustomResourceOptions? opts = null)
    public DynamicSetRemovePackagesManagement(String name, DynamicSetRemovePackagesManagementArgs args)
    public DynamicSetRemovePackagesManagement(String name, DynamicSetRemovePackagesManagementArgs args, CustomResourceOptions options)
    
    type: oci:OsManagementHub:DynamicSetRemovePackagesManagement
    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 DynamicSetRemovePackagesManagementArgs
    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 DynamicSetRemovePackagesManagementArgs
    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 DynamicSetRemovePackagesManagementArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DynamicSetRemovePackagesManagementArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DynamicSetRemovePackagesManagementArgs
    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 dynamicSetRemovePackagesManagementResource = new Oci.OsManagementHub.DynamicSetRemovePackagesManagement("dynamicSetRemovePackagesManagementResource", new()
    {
        DynamicSetId = "string",
        PackageNames = new[]
        {
            "string",
        },
        ManagedInstances = new[]
        {
            "string",
        },
        WorkRequestDetails = new Oci.OsManagementHub.Inputs.DynamicSetRemovePackagesManagementWorkRequestDetailsArgs
        {
            Description = "string",
            DisplayName = "string",
        },
    });
    
    example, err := osmanagementhub.NewDynamicSetRemovePackagesManagement(ctx, "dynamicSetRemovePackagesManagementResource", &osmanagementhub.DynamicSetRemovePackagesManagementArgs{
    	DynamicSetId: pulumi.String("string"),
    	PackageNames: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ManagedInstances: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	WorkRequestDetails: &osmanagementhub.DynamicSetRemovePackagesManagementWorkRequestDetailsArgs{
    		Description: pulumi.String("string"),
    		DisplayName: pulumi.String("string"),
    	},
    })
    
    var dynamicSetRemovePackagesManagementResource = new DynamicSetRemovePackagesManagement("dynamicSetRemovePackagesManagementResource", DynamicSetRemovePackagesManagementArgs.builder()
        .dynamicSetId("string")
        .packageNames("string")
        .managedInstances("string")
        .workRequestDetails(DynamicSetRemovePackagesManagementWorkRequestDetailsArgs.builder()
            .description("string")
            .displayName("string")
            .build())
        .build());
    
    dynamic_set_remove_packages_management_resource = oci.osmanagementhub.DynamicSetRemovePackagesManagement("dynamicSetRemovePackagesManagementResource",
        dynamic_set_id="string",
        package_names=["string"],
        managed_instances=["string"],
        work_request_details={
            "description": "string",
            "display_name": "string",
        })
    
    const dynamicSetRemovePackagesManagementResource = new oci.osmanagementhub.DynamicSetRemovePackagesManagement("dynamicSetRemovePackagesManagementResource", {
        dynamicSetId: "string",
        packageNames: ["string"],
        managedInstances: ["string"],
        workRequestDetails: {
            description: "string",
            displayName: "string",
        },
    });
    
    type: oci:OsManagementHub:DynamicSetRemovePackagesManagement
    properties:
        dynamicSetId: string
        managedInstances:
            - string
        packageNames:
            - string
        workRequestDetails:
            description: string
            displayName: string
    

    DynamicSetRemovePackagesManagement 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 DynamicSetRemovePackagesManagement resource accepts the following input properties:

    DynamicSetId string
    The OCID of the dynamic set. This filter returns resources associated with this dynamic set.
    PackageNames List<string>
    The list of package names.
    ManagedInstances List<string>
    The list of managed instance OCIDs to be attached/detached.
    WorkRequestDetails DynamicSetRemovePackagesManagementWorkRequestDetails
    Provides the name and description of the job.
    DynamicSetId string
    The OCID of the dynamic set. This filter returns resources associated with this dynamic set.
    PackageNames []string
    The list of package names.
    ManagedInstances []string
    The list of managed instance OCIDs to be attached/detached.
    WorkRequestDetails DynamicSetRemovePackagesManagementWorkRequestDetailsArgs
    Provides the name and description of the job.
    dynamicSetId String
    The OCID of the dynamic set. This filter returns resources associated with this dynamic set.
    packageNames List<String>
    The list of package names.
    managedInstances List<String>
    The list of managed instance OCIDs to be attached/detached.
    workRequestDetails DynamicSetRemovePackagesManagementWorkRequestDetails
    Provides the name and description of the job.
    dynamicSetId string
    The OCID of the dynamic set. This filter returns resources associated with this dynamic set.
    packageNames string[]
    The list of package names.
    managedInstances string[]
    The list of managed instance OCIDs to be attached/detached.
    workRequestDetails DynamicSetRemovePackagesManagementWorkRequestDetails
    Provides the name and description of the job.
    dynamic_set_id str
    The OCID of the dynamic set. This filter returns resources associated with this dynamic set.
    package_names Sequence[str]
    The list of package names.
    managed_instances Sequence[str]
    The list of managed instance OCIDs to be attached/detached.
    work_request_details DynamicSetRemovePackagesManagementWorkRequestDetailsArgs
    Provides the name and description of the job.
    dynamicSetId String
    The OCID of the dynamic set. This filter returns resources associated with this dynamic set.
    packageNames List<String>
    The list of package names.
    managedInstances List<String>
    The list of managed instance OCIDs to be attached/detached.
    workRequestDetails Property Map
    Provides the name and description of the job.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing DynamicSetRemovePackagesManagement Resource

    Get an existing DynamicSetRemovePackagesManagement 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?: DynamicSetRemovePackagesManagementState, opts?: CustomResourceOptions): DynamicSetRemovePackagesManagement
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            dynamic_set_id: Optional[str] = None,
            managed_instances: Optional[Sequence[str]] = None,
            package_names: Optional[Sequence[str]] = None,
            work_request_details: Optional[DynamicSetRemovePackagesManagementWorkRequestDetailsArgs] = None) -> DynamicSetRemovePackagesManagement
    func GetDynamicSetRemovePackagesManagement(ctx *Context, name string, id IDInput, state *DynamicSetRemovePackagesManagementState, opts ...ResourceOption) (*DynamicSetRemovePackagesManagement, error)
    public static DynamicSetRemovePackagesManagement Get(string name, Input<string> id, DynamicSetRemovePackagesManagementState? state, CustomResourceOptions? opts = null)
    public static DynamicSetRemovePackagesManagement get(String name, Output<String> id, DynamicSetRemovePackagesManagementState state, CustomResourceOptions options)
    resources:  _:    type: oci:OsManagementHub:DynamicSetRemovePackagesManagement    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:
    DynamicSetId string
    The OCID of the dynamic set. This filter returns resources associated with this dynamic set.
    ManagedInstances List<string>
    The list of managed instance OCIDs to be attached/detached.
    PackageNames List<string>
    The list of package names.
    WorkRequestDetails DynamicSetRemovePackagesManagementWorkRequestDetails
    Provides the name and description of the job.
    DynamicSetId string
    The OCID of the dynamic set. This filter returns resources associated with this dynamic set.
    ManagedInstances []string
    The list of managed instance OCIDs to be attached/detached.
    PackageNames []string
    The list of package names.
    WorkRequestDetails DynamicSetRemovePackagesManagementWorkRequestDetailsArgs
    Provides the name and description of the job.
    dynamicSetId String
    The OCID of the dynamic set. This filter returns resources associated with this dynamic set.
    managedInstances List<String>
    The list of managed instance OCIDs to be attached/detached.
    packageNames List<String>
    The list of package names.
    workRequestDetails DynamicSetRemovePackagesManagementWorkRequestDetails
    Provides the name and description of the job.
    dynamicSetId string
    The OCID of the dynamic set. This filter returns resources associated with this dynamic set.
    managedInstances string[]
    The list of managed instance OCIDs to be attached/detached.
    packageNames string[]
    The list of package names.
    workRequestDetails DynamicSetRemovePackagesManagementWorkRequestDetails
    Provides the name and description of the job.
    dynamic_set_id str
    The OCID of the dynamic set. This filter returns resources associated with this dynamic set.
    managed_instances Sequence[str]
    The list of managed instance OCIDs to be attached/detached.
    package_names Sequence[str]
    The list of package names.
    work_request_details DynamicSetRemovePackagesManagementWorkRequestDetailsArgs
    Provides the name and description of the job.
    dynamicSetId String
    The OCID of the dynamic set. This filter returns resources associated with this dynamic set.
    managedInstances List<String>
    The list of managed instance OCIDs to be attached/detached.
    packageNames List<String>
    The list of package names.
    workRequestDetails Property Map
    Provides the name and description of the job.

    Supporting Types

    DynamicSetRemovePackagesManagementWorkRequestDetails, DynamicSetRemovePackagesManagementWorkRequestDetailsArgs

    Description string
    User-specified information about the job. Avoid entering confidential information.
    DisplayName string

    A user-friendly name for the job. The name does not have to be unique. Avoid entering confidential information.

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

    Description string
    User-specified information about the job. Avoid entering confidential information.
    DisplayName string

    A user-friendly name for the job. The name does not have to be unique. Avoid entering confidential information.

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

    description String
    User-specified information about the job. Avoid entering confidential information.
    displayName String

    A user-friendly name for the job. The name does not have to be unique. Avoid entering confidential information.

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

    description string
    User-specified information about the job. Avoid entering confidential information.
    displayName string

    A user-friendly name for the job. The name does not have to be unique. Avoid entering confidential information.

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

    description str
    User-specified information about the job. Avoid entering confidential information.
    display_name str

    A user-friendly name for the job. The name does not have to be unique. Avoid entering confidential information.

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

    description String
    User-specified information about the job. Avoid entering confidential information.
    displayName String

    A user-friendly name for the job. The name does not have to be unique. Avoid entering confidential information.

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

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

    $ pulumi import oci:OsManagementHub/dynamicSetRemovePackagesManagement:DynamicSetRemovePackagesManagement test_dynamic_set_remove_packages_management "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.