1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. OsManagementHub
  5. SoftwareSourceRemovePackagesManagement
Oracle Cloud Infrastructure v2.32.0 published on Thursday, Apr 24, 2025 by Pulumi

oci.OsManagementHub.SoftwareSourceRemovePackagesManagement

Explore with Pulumi AI

This resource provides the Software Source Remove Packages Management resource in Oracle Cloud Infrastructure Os Management Hub service.

Removes packages from a software source. This operation can only be done for custom software sources that are not created using filters. Packages can be of the format:

  • name (for example: git). This removes all versions of the package.
  • name-version-release.architecture (for example: git-2.43.5-1.el8_10.x86_64)
  • name-epoch:version-release.architecture (for example: git-0:2.43.5-1.el8_10.x86_64)

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testSoftwareSourceRemovePackagesManagement = new oci.osmanagementhub.SoftwareSourceRemovePackagesManagement("test_software_source_remove_packages_management", {
    packages: softwareSourceRemovePackagesManagementPackages,
    softwareSourceId: testSoftwareSource.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_software_source_remove_packages_management = oci.os_management_hub.SoftwareSourceRemovePackagesManagement("test_software_source_remove_packages_management",
    packages=software_source_remove_packages_management_packages,
    software_source_id=test_software_source["id"])
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/osmanagementhub"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := osmanagementhub.NewSoftwareSourceRemovePackagesManagement(ctx, "test_software_source_remove_packages_management", &osmanagementhub.SoftwareSourceRemovePackagesManagementArgs{
			Packages:         pulumi.Any(softwareSourceRemovePackagesManagementPackages),
			SoftwareSourceId: pulumi.Any(testSoftwareSource.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testSoftwareSourceRemovePackagesManagement = new Oci.OsManagementHub.SoftwareSourceRemovePackagesManagement("test_software_source_remove_packages_management", new()
    {
        Packages = softwareSourceRemovePackagesManagementPackages,
        SoftwareSourceId = testSoftwareSource.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.OsManagementHub.SoftwareSourceRemovePackagesManagement;
import com.pulumi.oci.OsManagementHub.SoftwareSourceRemovePackagesManagementArgs;
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 testSoftwareSourceRemovePackagesManagement = new SoftwareSourceRemovePackagesManagement("testSoftwareSourceRemovePackagesManagement", SoftwareSourceRemovePackagesManagementArgs.builder()
            .packages(softwareSourceRemovePackagesManagementPackages)
            .softwareSourceId(testSoftwareSource.id())
            .build());

    }
}
Copy
resources:
  testSoftwareSourceRemovePackagesManagement:
    type: oci:OsManagementHub:SoftwareSourceRemovePackagesManagement
    name: test_software_source_remove_packages_management
    properties:
      packages: ${softwareSourceRemovePackagesManagementPackages}
      softwareSourceId: ${testSoftwareSource.id}
Copy

Create SoftwareSourceRemovePackagesManagement Resource

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

Constructor syntax

new SoftwareSourceRemovePackagesManagement(name: string, args: SoftwareSourceRemovePackagesManagementArgs, opts?: CustomResourceOptions);
@overload
def SoftwareSourceRemovePackagesManagement(resource_name: str,
                                           args: SoftwareSourceRemovePackagesManagementArgs,
                                           opts: Optional[ResourceOptions] = None)

@overload
def SoftwareSourceRemovePackagesManagement(resource_name: str,
                                           opts: Optional[ResourceOptions] = None,
                                           packages: Optional[Sequence[str]] = None,
                                           software_source_id: Optional[str] = None)
func NewSoftwareSourceRemovePackagesManagement(ctx *Context, name string, args SoftwareSourceRemovePackagesManagementArgs, opts ...ResourceOption) (*SoftwareSourceRemovePackagesManagement, error)
public SoftwareSourceRemovePackagesManagement(string name, SoftwareSourceRemovePackagesManagementArgs args, CustomResourceOptions? opts = null)
public SoftwareSourceRemovePackagesManagement(String name, SoftwareSourceRemovePackagesManagementArgs args)
public SoftwareSourceRemovePackagesManagement(String name, SoftwareSourceRemovePackagesManagementArgs args, CustomResourceOptions options)
type: oci:OsManagementHub:SoftwareSourceRemovePackagesManagement
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SoftwareSourceRemovePackagesManagementArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SoftwareSourceRemovePackagesManagementArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SoftwareSourceRemovePackagesManagementArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SoftwareSourceRemovePackagesManagementArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SoftwareSourceRemovePackagesManagementArgs
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 softwareSourceRemovePackagesManagementResource = new Oci.OsManagementHub.SoftwareSourceRemovePackagesManagement("softwareSourceRemovePackagesManagementResource", new()
{
    Packages = new[]
    {
        "string",
    },
    SoftwareSourceId = "string",
});
Copy
example, err := osmanagementhub.NewSoftwareSourceRemovePackagesManagement(ctx, "softwareSourceRemovePackagesManagementResource", &osmanagementhub.SoftwareSourceRemovePackagesManagementArgs{
	Packages: pulumi.StringArray{
		pulumi.String("string"),
	},
	SoftwareSourceId: pulumi.String("string"),
})
Copy
var softwareSourceRemovePackagesManagementResource = new SoftwareSourceRemovePackagesManagement("softwareSourceRemovePackagesManagementResource", SoftwareSourceRemovePackagesManagementArgs.builder()
    .packages("string")
    .softwareSourceId("string")
    .build());
Copy
software_source_remove_packages_management_resource = oci.os_management_hub.SoftwareSourceRemovePackagesManagement("softwareSourceRemovePackagesManagementResource",
    packages=["string"],
    software_source_id="string")
Copy
const softwareSourceRemovePackagesManagementResource = new oci.osmanagementhub.SoftwareSourceRemovePackagesManagement("softwareSourceRemovePackagesManagementResource", {
    packages: ["string"],
    softwareSourceId: "string",
});
Copy
type: oci:OsManagementHub:SoftwareSourceRemovePackagesManagement
properties:
    packages:
        - string
    softwareSourceId: string
Copy

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

Packages
This property is required.
Changes to this property will trigger replacement.
List<string>
List of packages specified by the name of the package (N) or the full package name (NVRA or NEVRA).
SoftwareSourceId
This property is required.
Changes to this property will trigger replacement.
string

The OCID of the software source.

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

Packages
This property is required.
Changes to this property will trigger replacement.
[]string
List of packages specified by the name of the package (N) or the full package name (NVRA or NEVRA).
SoftwareSourceId
This property is required.
Changes to this property will trigger replacement.
string

The OCID of the software source.

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

packages
This property is required.
Changes to this property will trigger replacement.
List<String>
List of packages specified by the name of the package (N) or the full package name (NVRA or NEVRA).
softwareSourceId
This property is required.
Changes to this property will trigger replacement.
String

The OCID of the software source.

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

packages
This property is required.
Changes to this property will trigger replacement.
string[]
List of packages specified by the name of the package (N) or the full package name (NVRA or NEVRA).
softwareSourceId
This property is required.
Changes to this property will trigger replacement.
string

The OCID of the software source.

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

packages
This property is required.
Changes to this property will trigger replacement.
Sequence[str]
List of packages specified by the name of the package (N) or the full package name (NVRA or NEVRA).
software_source_id
This property is required.
Changes to this property will trigger replacement.
str

The OCID of the software source.

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

packages
This property is required.
Changes to this property will trigger replacement.
List<String>
List of packages specified by the name of the package (N) or the full package name (NVRA or NEVRA).
softwareSourceId
This property is required.
Changes to this property will trigger replacement.
String

The OCID of the software source.

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

Outputs

All input properties are implicitly available as output properties. Additionally, the SoftwareSourceRemovePackagesManagement 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 SoftwareSourceRemovePackagesManagement Resource

Get an existing SoftwareSourceRemovePackagesManagement 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?: SoftwareSourceRemovePackagesManagementState, opts?: CustomResourceOptions): SoftwareSourceRemovePackagesManagement
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        packages: Optional[Sequence[str]] = None,
        software_source_id: Optional[str] = None) -> SoftwareSourceRemovePackagesManagement
func GetSoftwareSourceRemovePackagesManagement(ctx *Context, name string, id IDInput, state *SoftwareSourceRemovePackagesManagementState, opts ...ResourceOption) (*SoftwareSourceRemovePackagesManagement, error)
public static SoftwareSourceRemovePackagesManagement Get(string name, Input<string> id, SoftwareSourceRemovePackagesManagementState? state, CustomResourceOptions? opts = null)
public static SoftwareSourceRemovePackagesManagement get(String name, Output<String> id, SoftwareSourceRemovePackagesManagementState state, CustomResourceOptions options)
resources:  _:    type: oci:OsManagementHub:SoftwareSourceRemovePackagesManagement    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Packages Changes to this property will trigger replacement. List<string>
List of packages specified by the name of the package (N) or the full package name (NVRA or NEVRA).
SoftwareSourceId Changes to this property will trigger replacement. string

The OCID of the software source.

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

Packages Changes to this property will trigger replacement. []string
List of packages specified by the name of the package (N) or the full package name (NVRA or NEVRA).
SoftwareSourceId Changes to this property will trigger replacement. string

The OCID of the software source.

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

packages Changes to this property will trigger replacement. List<String>
List of packages specified by the name of the package (N) or the full package name (NVRA or NEVRA).
softwareSourceId Changes to this property will trigger replacement. String

The OCID of the software source.

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

packages Changes to this property will trigger replacement. string[]
List of packages specified by the name of the package (N) or the full package name (NVRA or NEVRA).
softwareSourceId Changes to this property will trigger replacement. string

The OCID of the software source.

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

packages Changes to this property will trigger replacement. Sequence[str]
List of packages specified by the name of the package (N) or the full package name (NVRA or NEVRA).
software_source_id Changes to this property will trigger replacement. str

The OCID of the software source.

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

packages Changes to this property will trigger replacement. List<String>
List of packages specified by the name of the package (N) or the full package name (NVRA or NEVRA).
softwareSourceId Changes to this property will trigger replacement. String

The OCID of the software source.

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

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

$ pulumi import oci:OsManagementHub/softwareSourceRemovePackagesManagement:SoftwareSourceRemovePackagesManagement test_software_source_remove_packages_management "id"
Copy

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.