1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. OsManagementHub
  5. SoftwareSourceAddPackagesManagement
Oracle Cloud Infrastructure v2.14.0 published on Tuesday, Oct 29, 2024 by Pulumi

oci.OsManagementHub.SoftwareSourceAddPackagesManagement

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.14.0 published on Tuesday, Oct 29, 2024 by Pulumi

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

    Adds packages to a software source. This operation can only be done for custom and versioned custom software sources that are not created using filters. For a versioned custom software source, you can only add packages when the source is created. Once content is added to a versioned custom software source, it is immutable.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testSoftwareSourceAddPackagesManagement = new oci.osmanagementhub.SoftwareSourceAddPackagesManagement("test_software_source_add_packages_management", {
        packages: softwareSourceAddPackagesManagementPackages,
        softwareSourceId: testSoftwareSource.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_software_source_add_packages_management = oci.os_management_hub.SoftwareSourceAddPackagesManagement("test_software_source_add_packages_management",
        packages=software_source_add_packages_management_packages,
        software_source_id=test_software_source["id"])
    
    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.NewSoftwareSourceAddPackagesManagement(ctx, "test_software_source_add_packages_management", &OsManagementHub.SoftwareSourceAddPackagesManagementArgs{
    			Packages:         pulumi.Any(softwareSourceAddPackagesManagementPackages),
    			SoftwareSourceId: pulumi.Any(testSoftwareSource.Id),
    		})
    		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 testSoftwareSourceAddPackagesManagement = new Oci.OsManagementHub.SoftwareSourceAddPackagesManagement("test_software_source_add_packages_management", new()
        {
            Packages = softwareSourceAddPackagesManagementPackages,
            SoftwareSourceId = testSoftwareSource.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.OsManagementHub.SoftwareSourceAddPackagesManagement;
    import com.pulumi.oci.OsManagementHub.SoftwareSourceAddPackagesManagementArgs;
    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 testSoftwareSourceAddPackagesManagement = new SoftwareSourceAddPackagesManagement("testSoftwareSourceAddPackagesManagement", SoftwareSourceAddPackagesManagementArgs.builder()
                .packages(softwareSourceAddPackagesManagementPackages)
                .softwareSourceId(testSoftwareSource.id())
                .build());
    
        }
    }
    
    resources:
      testSoftwareSourceAddPackagesManagement:
        type: oci:OsManagementHub:SoftwareSourceAddPackagesManagement
        name: test_software_source_add_packages_management
        properties:
          packages: ${softwareSourceAddPackagesManagementPackages}
          softwareSourceId: ${testSoftwareSource.id}
    

    Create SoftwareSourceAddPackagesManagement Resource

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

    Constructor syntax

    new SoftwareSourceAddPackagesManagement(name: string, args: SoftwareSourceAddPackagesManagementArgs, opts?: CustomResourceOptions);
    @overload
    def SoftwareSourceAddPackagesManagement(resource_name: str,
                                            args: SoftwareSourceAddPackagesManagementArgs,
                                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def SoftwareSourceAddPackagesManagement(resource_name: str,
                                            opts: Optional[ResourceOptions] = None,
                                            packages: Optional[Sequence[str]] = None,
                                            software_source_id: Optional[str] = None)
    func NewSoftwareSourceAddPackagesManagement(ctx *Context, name string, args SoftwareSourceAddPackagesManagementArgs, opts ...ResourceOption) (*SoftwareSourceAddPackagesManagement, error)
    public SoftwareSourceAddPackagesManagement(string name, SoftwareSourceAddPackagesManagementArgs args, CustomResourceOptions? opts = null)
    public SoftwareSourceAddPackagesManagement(String name, SoftwareSourceAddPackagesManagementArgs args)
    public SoftwareSourceAddPackagesManagement(String name, SoftwareSourceAddPackagesManagementArgs args, CustomResourceOptions options)
    
    type: oci:OsManagementHub:SoftwareSourceAddPackagesManagement
    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 SoftwareSourceAddPackagesManagementArgs
    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 SoftwareSourceAddPackagesManagementArgs
    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 SoftwareSourceAddPackagesManagementArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SoftwareSourceAddPackagesManagementArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SoftwareSourceAddPackagesManagementArgs
    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 softwareSourceAddPackagesManagementResource = new Oci.OsManagementHub.SoftwareSourceAddPackagesManagement("softwareSourceAddPackagesManagementResource", new()
    {
        Packages = new[]
        {
            "string",
        },
        SoftwareSourceId = "string",
    });
    
    example, err := OsManagementHub.NewSoftwareSourceAddPackagesManagement(ctx, "softwareSourceAddPackagesManagementResource", &OsManagementHub.SoftwareSourceAddPackagesManagementArgs{
    	Packages: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	SoftwareSourceId: pulumi.String("string"),
    })
    
    var softwareSourceAddPackagesManagementResource = new SoftwareSourceAddPackagesManagement("softwareSourceAddPackagesManagementResource", SoftwareSourceAddPackagesManagementArgs.builder()
        .packages("string")
        .softwareSourceId("string")
        .build());
    
    software_source_add_packages_management_resource = oci.os_management_hub.SoftwareSourceAddPackagesManagement("softwareSourceAddPackagesManagementResource",
        packages=["string"],
        software_source_id="string")
    
    const softwareSourceAddPackagesManagementResource = new oci.osmanagementhub.SoftwareSourceAddPackagesManagement("softwareSourceAddPackagesManagementResource", {
        packages: ["string"],
        softwareSourceId: "string",
    });
    
    type: oci:OsManagementHub:SoftwareSourceAddPackagesManagement
    properties:
        packages:
            - string
        softwareSourceId: string
    

    SoftwareSourceAddPackagesManagement Resource Properties

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

    Inputs

    The SoftwareSourceAddPackagesManagement resource accepts the following input properties:

    Packages List<string>
    List of packages specified by the full package name (NEVRA.rpm).
    SoftwareSourceId 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 []string
    List of packages specified by the full package name (NEVRA.rpm).
    SoftwareSourceId 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 List<String>
    List of packages specified by the full package name (NEVRA.rpm).
    softwareSourceId 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 string[]
    List of packages specified by the full package name (NEVRA.rpm).
    softwareSourceId 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 Sequence[str]
    List of packages specified by the full package name (NEVRA.rpm).
    software_source_id 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 List<String>
    List of packages specified by the full package name (NEVRA.rpm).
    softwareSourceId 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 SoftwareSourceAddPackagesManagement 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 SoftwareSourceAddPackagesManagement Resource

    Get an existing SoftwareSourceAddPackagesManagement 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?: SoftwareSourceAddPackagesManagementState, opts?: CustomResourceOptions): SoftwareSourceAddPackagesManagement
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            packages: Optional[Sequence[str]] = None,
            software_source_id: Optional[str] = None) -> SoftwareSourceAddPackagesManagement
    func GetSoftwareSourceAddPackagesManagement(ctx *Context, name string, id IDInput, state *SoftwareSourceAddPackagesManagementState, opts ...ResourceOption) (*SoftwareSourceAddPackagesManagement, error)
    public static SoftwareSourceAddPackagesManagement Get(string name, Input<string> id, SoftwareSourceAddPackagesManagementState? state, CustomResourceOptions? opts = null)
    public static SoftwareSourceAddPackagesManagement get(String name, Output<String> id, SoftwareSourceAddPackagesManagementState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Packages List<string>
    List of packages specified by the full package name (NEVRA.rpm).
    SoftwareSourceId 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 []string
    List of packages specified by the full package name (NEVRA.rpm).
    SoftwareSourceId 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 List<String>
    List of packages specified by the full package name (NEVRA.rpm).
    softwareSourceId 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 string[]
    List of packages specified by the full package name (NEVRA.rpm).
    softwareSourceId 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 Sequence[str]
    List of packages specified by the full package name (NEVRA.rpm).
    software_source_id 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 List<String>
    List of packages specified by the full package name (NEVRA.rpm).
    softwareSourceId 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

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

    $ pulumi import oci:OsManagementHub/softwareSourceAddPackagesManagement:SoftwareSourceAddPackagesManagement test_software_source_add_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
    Oracle Cloud Infrastructure v2.14.0 published on Tuesday, Oct 29, 2024 by Pulumi