1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. OsManagementHub
  5. SoftwareSourceReplacePackagesManagement
Oracle Cloud Infrastructure v2.30.0 published on Monday, Apr 14, 2025 by Pulumi

oci.OsManagementHub.SoftwareSourceReplacePackagesManagement

Explore with Pulumi AI

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

Replaces packages in a software source with the provided list of packages. 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). If isLatestContentOnly is true, only the latest version of the package will be added, otherwise all versions of the package will be added.
  • 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 testSoftwareSourceReplacePackagesManagement = new oci.osmanagementhub.SoftwareSourceReplacePackagesManagement("test_software_source_replace_packages_management", {
    packages: softwareSourceReplacePackagesManagementPackages,
    softwareSourceId: testSoftwareSource.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_software_source_replace_packages_management = oci.os_management_hub.SoftwareSourceReplacePackagesManagement("test_software_source_replace_packages_management",
    packages=software_source_replace_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.NewSoftwareSourceReplacePackagesManagement(ctx, "test_software_source_replace_packages_management", &osmanagementhub.SoftwareSourceReplacePackagesManagementArgs{
			Packages:         pulumi.Any(softwareSourceReplacePackagesManagementPackages),
			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 testSoftwareSourceReplacePackagesManagement = new Oci.OsManagementHub.SoftwareSourceReplacePackagesManagement("test_software_source_replace_packages_management", new()
    {
        Packages = softwareSourceReplacePackagesManagementPackages,
        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.SoftwareSourceReplacePackagesManagement;
import com.pulumi.oci.OsManagementHub.SoftwareSourceReplacePackagesManagementArgs;
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 testSoftwareSourceReplacePackagesManagement = new SoftwareSourceReplacePackagesManagement("testSoftwareSourceReplacePackagesManagement", SoftwareSourceReplacePackagesManagementArgs.builder()
            .packages(softwareSourceReplacePackagesManagementPackages)
            .softwareSourceId(testSoftwareSource.id())
            .build());

    }
}
Copy
resources:
  testSoftwareSourceReplacePackagesManagement:
    type: oci:OsManagementHub:SoftwareSourceReplacePackagesManagement
    name: test_software_source_replace_packages_management
    properties:
      packages: ${softwareSourceReplacePackagesManagementPackages}
      softwareSourceId: ${testSoftwareSource.id}
Copy

Create SoftwareSourceReplacePackagesManagement Resource

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

Constructor syntax

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

@overload
def SoftwareSourceReplacePackagesManagement(resource_name: str,
                                            opts: Optional[ResourceOptions] = None,
                                            packages: Optional[Sequence[str]] = None,
                                            software_source_id: Optional[str] = None)
func NewSoftwareSourceReplacePackagesManagement(ctx *Context, name string, args SoftwareSourceReplacePackagesManagementArgs, opts ...ResourceOption) (*SoftwareSourceReplacePackagesManagement, error)
public SoftwareSourceReplacePackagesManagement(string name, SoftwareSourceReplacePackagesManagementArgs args, CustomResourceOptions? opts = null)
public SoftwareSourceReplacePackagesManagement(String name, SoftwareSourceReplacePackagesManagementArgs args)
public SoftwareSourceReplacePackagesManagement(String name, SoftwareSourceReplacePackagesManagementArgs args, CustomResourceOptions options)
type: oci:OsManagementHub:SoftwareSourceReplacePackagesManagement
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. SoftwareSourceReplacePackagesManagementArgs
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. SoftwareSourceReplacePackagesManagementArgs
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. SoftwareSourceReplacePackagesManagementArgs
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. SoftwareSourceReplacePackagesManagementArgs
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. SoftwareSourceReplacePackagesManagementArgs
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 softwareSourceReplacePackagesManagementResource = new Oci.OsManagementHub.SoftwareSourceReplacePackagesManagement("softwareSourceReplacePackagesManagementResource", new()
{
    Packages = new[]
    {
        "string",
    },
    SoftwareSourceId = "string",
});
Copy
example, err := OsManagementHub.NewSoftwareSourceReplacePackagesManagement(ctx, "softwareSourceReplacePackagesManagementResource", &OsManagementHub.SoftwareSourceReplacePackagesManagementArgs{
	Packages: pulumi.StringArray{
		pulumi.String("string"),
	},
	SoftwareSourceId: pulumi.String("string"),
})
Copy
var softwareSourceReplacePackagesManagementResource = new SoftwareSourceReplacePackagesManagement("softwareSourceReplacePackagesManagementResource", SoftwareSourceReplacePackagesManagementArgs.builder()
    .packages("string")
    .softwareSourceId("string")
    .build());
Copy
software_source_replace_packages_management_resource = oci.os_management_hub.SoftwareSourceReplacePackagesManagement("softwareSourceReplacePackagesManagementResource",
    packages=["string"],
    software_source_id="string")
Copy
const softwareSourceReplacePackagesManagementResource = new oci.osmanagementhub.SoftwareSourceReplacePackagesManagement("softwareSourceReplacePackagesManagementResource", {
    packages: ["string"],
    softwareSourceId: "string",
});
Copy
type: oci:OsManagementHub:SoftwareSourceReplacePackagesManagement
properties:
    packages:
        - string
    softwareSourceId: string
Copy

SoftwareSourceReplacePackagesManagement 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 SoftwareSourceReplacePackagesManagement 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 SoftwareSourceReplacePackagesManagement 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 SoftwareSourceReplacePackagesManagement Resource

Get an existing SoftwareSourceReplacePackagesManagement 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?: SoftwareSourceReplacePackagesManagementState, opts?: CustomResourceOptions): SoftwareSourceReplacePackagesManagement
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        packages: Optional[Sequence[str]] = None,
        software_source_id: Optional[str] = None) -> SoftwareSourceReplacePackagesManagement
func GetSoftwareSourceReplacePackagesManagement(ctx *Context, name string, id IDInput, state *SoftwareSourceReplacePackagesManagementState, opts ...ResourceOption) (*SoftwareSourceReplacePackagesManagement, error)
public static SoftwareSourceReplacePackagesManagement Get(string name, Input<string> id, SoftwareSourceReplacePackagesManagementState? state, CustomResourceOptions? opts = null)
public static SoftwareSourceReplacePackagesManagement get(String name, Output<String> id, SoftwareSourceReplacePackagesManagementState state, CustomResourceOptions options)
resources:  _:    type: oci:OsManagementHub:SoftwareSourceReplacePackagesManagement    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

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

$ pulumi import oci:OsManagementHub/softwareSourceReplacePackagesManagement:SoftwareSourceReplacePackagesManagement test_software_source_replace_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.