1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. OsManagementHub
  5. LifecycleStageAttachManagedInstancesManagement
Oracle Cloud Infrastructure v2.18.0 published on Friday, Nov 22, 2024 by Pulumi

oci.OsManagementHub.LifecycleStageAttachManagedInstancesManagement

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.18.0 published on Friday, Nov 22, 2024 by Pulumi

    This resource provides the Lifecycle Stage Attach Managed Instances Management resource in Oracle Cloud Infrastructure Os Management Hub service.

    Attaches (adds) managed instances to a lifecycle stage. Once added, you can apply operations to all managed instances in the lifecycle stage.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testLifecycleStageAttachManagedInstancesManagement = new oci.osmanagementhub.LifecycleStageAttachManagedInstancesManagement("test_lifecycle_stage_attach_managed_instances_management", {
        lifecycleStageId: testLifecycleStage.id,
        managedInstanceDetails: {
            managedInstances: lifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsManagedInstances,
            workRequestDetails: {
                description: lifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsDescription,
                displayName: lifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsDisplayName,
            },
        },
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_lifecycle_stage_attach_managed_instances_management = oci.os_management_hub.LifecycleStageAttachManagedInstancesManagement("test_lifecycle_stage_attach_managed_instances_management",
        lifecycle_stage_id=test_lifecycle_stage["id"],
        managed_instance_details={
            "managed_instances": lifecycle_stage_attach_managed_instances_management_managed_instance_details_managed_instances,
            "work_request_details": {
                "description": lifecycle_stage_attach_managed_instances_management_managed_instance_details_work_request_details_description,
                "display_name": lifecycle_stage_attach_managed_instances_management_managed_instance_details_work_request_details_display_name,
            },
        })
    
    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.NewLifecycleStageAttachManagedInstancesManagement(ctx, "test_lifecycle_stage_attach_managed_instances_management", &OsManagementHub.LifecycleStageAttachManagedInstancesManagementArgs{
    			LifecycleStageId: pulumi.Any(testLifecycleStage.Id),
    			ManagedInstanceDetails: &osmanagementhub.LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsArgs{
    				ManagedInstances: pulumi.Any(lifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsManagedInstances),
    				WorkRequestDetails: &osmanagementhub.LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsArgs{
    					Description: pulumi.Any(lifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsDescription),
    					DisplayName: pulumi.Any(lifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsDisplayName),
    				},
    			},
    		})
    		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 testLifecycleStageAttachManagedInstancesManagement = new Oci.OsManagementHub.LifecycleStageAttachManagedInstancesManagement("test_lifecycle_stage_attach_managed_instances_management", new()
        {
            LifecycleStageId = testLifecycleStage.Id,
            ManagedInstanceDetails = new Oci.OsManagementHub.Inputs.LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsArgs
            {
                ManagedInstances = lifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsManagedInstances,
                WorkRequestDetails = new Oci.OsManagementHub.Inputs.LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsArgs
                {
                    Description = lifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsDescription,
                    DisplayName = lifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsDisplayName,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.OsManagementHub.LifecycleStageAttachManagedInstancesManagement;
    import com.pulumi.oci.OsManagementHub.LifecycleStageAttachManagedInstancesManagementArgs;
    import com.pulumi.oci.OsManagementHub.inputs.LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsArgs;
    import com.pulumi.oci.OsManagementHub.inputs.LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsArgs;
    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 testLifecycleStageAttachManagedInstancesManagement = new LifecycleStageAttachManagedInstancesManagement("testLifecycleStageAttachManagedInstancesManagement", LifecycleStageAttachManagedInstancesManagementArgs.builder()
                .lifecycleStageId(testLifecycleStage.id())
                .managedInstanceDetails(LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsArgs.builder()
                    .managedInstances(lifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsManagedInstances)
                    .workRequestDetails(LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsArgs.builder()
                        .description(lifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsDescription)
                        .displayName(lifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsDisplayName)
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      testLifecycleStageAttachManagedInstancesManagement:
        type: oci:OsManagementHub:LifecycleStageAttachManagedInstancesManagement
        name: test_lifecycle_stage_attach_managed_instances_management
        properties:
          lifecycleStageId: ${testLifecycleStage.id}
          managedInstanceDetails:
            managedInstances: ${lifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsManagedInstances}
            workRequestDetails:
              description: ${lifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsDescription}
              displayName: ${lifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsDisplayName}
    

    Create LifecycleStageAttachManagedInstancesManagement Resource

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

    Constructor syntax

    new LifecycleStageAttachManagedInstancesManagement(name: string, args: LifecycleStageAttachManagedInstancesManagementArgs, opts?: CustomResourceOptions);
    @overload
    def LifecycleStageAttachManagedInstancesManagement(resource_name: str,
                                                       args: LifecycleStageAttachManagedInstancesManagementArgs,
                                                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def LifecycleStageAttachManagedInstancesManagement(resource_name: str,
                                                       opts: Optional[ResourceOptions] = None,
                                                       lifecycle_stage_id: Optional[str] = None,
                                                       managed_instance_details: Optional[_osmanagementhub.LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsArgs] = None)
    func NewLifecycleStageAttachManagedInstancesManagement(ctx *Context, name string, args LifecycleStageAttachManagedInstancesManagementArgs, opts ...ResourceOption) (*LifecycleStageAttachManagedInstancesManagement, error)
    public LifecycleStageAttachManagedInstancesManagement(string name, LifecycleStageAttachManagedInstancesManagementArgs args, CustomResourceOptions? opts = null)
    public LifecycleStageAttachManagedInstancesManagement(String name, LifecycleStageAttachManagedInstancesManagementArgs args)
    public LifecycleStageAttachManagedInstancesManagement(String name, LifecycleStageAttachManagedInstancesManagementArgs args, CustomResourceOptions options)
    
    type: oci:OsManagementHub:LifecycleStageAttachManagedInstancesManagement
    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 LifecycleStageAttachManagedInstancesManagementArgs
    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 LifecycleStageAttachManagedInstancesManagementArgs
    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 LifecycleStageAttachManagedInstancesManagementArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LifecycleStageAttachManagedInstancesManagementArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LifecycleStageAttachManagedInstancesManagementArgs
    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 lifecycleStageAttachManagedInstancesManagementResource = new Oci.OsManagementHub.LifecycleStageAttachManagedInstancesManagement("lifecycleStageAttachManagedInstancesManagementResource", new()
    {
        LifecycleStageId = "string",
        ManagedInstanceDetails = new Oci.OsManagementHub.Inputs.LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsArgs
        {
            ManagedInstances = new[]
            {
                "string",
            },
            WorkRequestDetails = new Oci.OsManagementHub.Inputs.LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsArgs
            {
                Description = "string",
                DisplayName = "string",
            },
        },
    });
    
    example, err := OsManagementHub.NewLifecycleStageAttachManagedInstancesManagement(ctx, "lifecycleStageAttachManagedInstancesManagementResource", &OsManagementHub.LifecycleStageAttachManagedInstancesManagementArgs{
    	LifecycleStageId: pulumi.String("string"),
    	ManagedInstanceDetails: &osmanagementhub.LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsArgs{
    		ManagedInstances: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		WorkRequestDetails: &osmanagementhub.LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsArgs{
    			Description: pulumi.String("string"),
    			DisplayName: pulumi.String("string"),
    		},
    	},
    })
    
    var lifecycleStageAttachManagedInstancesManagementResource = new LifecycleStageAttachManagedInstancesManagement("lifecycleStageAttachManagedInstancesManagementResource", LifecycleStageAttachManagedInstancesManagementArgs.builder()
        .lifecycleStageId("string")
        .managedInstanceDetails(LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsArgs.builder()
            .managedInstances("string")
            .workRequestDetails(LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsArgs.builder()
                .description("string")
                .displayName("string")
                .build())
            .build())
        .build());
    
    lifecycle_stage_attach_managed_instances_management_resource = oci.os_management_hub.LifecycleStageAttachManagedInstancesManagement("lifecycleStageAttachManagedInstancesManagementResource",
        lifecycle_stage_id="string",
        managed_instance_details={
            "managed_instances": ["string"],
            "work_request_details": {
                "description": "string",
                "display_name": "string",
            },
        })
    
    const lifecycleStageAttachManagedInstancesManagementResource = new oci.osmanagementhub.LifecycleStageAttachManagedInstancesManagement("lifecycleStageAttachManagedInstancesManagementResource", {
        lifecycleStageId: "string",
        managedInstanceDetails: {
            managedInstances: ["string"],
            workRequestDetails: {
                description: "string",
                displayName: "string",
            },
        },
    });
    
    type: oci:OsManagementHub:LifecycleStageAttachManagedInstancesManagement
    properties:
        lifecycleStageId: string
        managedInstanceDetails:
            managedInstances:
                - string
            workRequestDetails:
                description: string
                displayName: string
    

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

    LifecycleStageId string
    The OCID of the lifecycle stage.
    ManagedInstanceDetails LifecycleStageAttachManagedInstancesManagementManagedInstanceDetails
    The details about the managed instances.
    LifecycleStageId string
    The OCID of the lifecycle stage.
    ManagedInstanceDetails LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsArgs
    The details about the managed instances.
    lifecycleStageId String
    The OCID of the lifecycle stage.
    managedInstanceDetails LifecycleStageAttachManagedInstancesManagementManagedInstanceDetails
    The details about the managed instances.
    lifecycleStageId string
    The OCID of the lifecycle stage.
    managedInstanceDetails LifecycleStageAttachManagedInstancesManagementManagedInstanceDetails
    The details about the managed instances.
    lifecycleStageId String
    The OCID of the lifecycle stage.
    managedInstanceDetails Property Map
    The details about the managed instances.

    Outputs

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

    Get an existing LifecycleStageAttachManagedInstancesManagement 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?: LifecycleStageAttachManagedInstancesManagementState, opts?: CustomResourceOptions): LifecycleStageAttachManagedInstancesManagement
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            lifecycle_stage_id: Optional[str] = None,
            managed_instance_details: Optional[_osmanagementhub.LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsArgs] = None) -> LifecycleStageAttachManagedInstancesManagement
    func GetLifecycleStageAttachManagedInstancesManagement(ctx *Context, name string, id IDInput, state *LifecycleStageAttachManagedInstancesManagementState, opts ...ResourceOption) (*LifecycleStageAttachManagedInstancesManagement, error)
    public static LifecycleStageAttachManagedInstancesManagement Get(string name, Input<string> id, LifecycleStageAttachManagedInstancesManagementState? state, CustomResourceOptions? opts = null)
    public static LifecycleStageAttachManagedInstancesManagement get(String name, Output<String> id, LifecycleStageAttachManagedInstancesManagementState 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:
    LifecycleStageId string
    The OCID of the lifecycle stage.
    ManagedInstanceDetails LifecycleStageAttachManagedInstancesManagementManagedInstanceDetails
    The details about the managed instances.
    LifecycleStageId string
    The OCID of the lifecycle stage.
    ManagedInstanceDetails LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsArgs
    The details about the managed instances.
    lifecycleStageId String
    The OCID of the lifecycle stage.
    managedInstanceDetails LifecycleStageAttachManagedInstancesManagementManagedInstanceDetails
    The details about the managed instances.
    lifecycleStageId string
    The OCID of the lifecycle stage.
    managedInstanceDetails LifecycleStageAttachManagedInstancesManagementManagedInstanceDetails
    The details about the managed instances.
    lifecycleStageId String
    The OCID of the lifecycle stage.
    managedInstanceDetails Property Map
    The details about the managed instances.

    Supporting Types

    LifecycleStageAttachManagedInstancesManagementManagedInstanceDetails, LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsArgs

    ManagedInstances List<string>
    The list of managed instance OCIDs to be attached/detached.
    WorkRequestDetails LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetails
    Provides the name and description of the job.
    ManagedInstances []string
    The list of managed instance OCIDs to be attached/detached.
    WorkRequestDetails LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetails
    Provides the name and description of the job.
    managedInstances List<String>
    The list of managed instance OCIDs to be attached/detached.
    workRequestDetails LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetails
    Provides the name and description of the job.
    managedInstances string[]
    The list of managed instance OCIDs to be attached/detached.
    workRequestDetails LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetails
    Provides the name and description of the job.
    managed_instances Sequence[str]
    The list of managed instance OCIDs to be attached/detached.
    work_request_details osmanagementhub.LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetails
    Provides the name and description of the job.
    managedInstances List<String>
    The list of managed instance OCIDs to be attached/detached.
    workRequestDetails Property Map
    Provides the name and description of the job.

    LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetails, LifecycleStageAttachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsArgs

    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

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

    $ pulumi import oci:OsManagementHub/lifecycleStageAttachManagedInstancesManagement:LifecycleStageAttachManagedInstancesManagement test_lifecycle_stage_attach_managed_instances_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.18.0 published on Friday, Nov 22, 2024 by Pulumi