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

oci.OsManagementHub.LifecycleStageDetachManagedInstancesManagement

Explore with Pulumi AI

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

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

    Detaches (removes) a managed instance from a lifecycle stage.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testLifecycleStageDetachManagedInstancesManagement = new oci.osmanagementhub.LifecycleStageDetachManagedInstancesManagement("test_lifecycle_stage_detach_managed_instances_management", {
        lifecycleStageId: testLifecycleStage.id,
        managedInstanceDetails: {
            managedInstances: lifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsManagedInstances,
            workRequestDetails: {
                description: lifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsDescription,
                displayName: lifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsDisplayName,
            },
        },
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_lifecycle_stage_detach_managed_instances_management = oci.os_management_hub.LifecycleStageDetachManagedInstancesManagement("test_lifecycle_stage_detach_managed_instances_management",
        lifecycle_stage_id=test_lifecycle_stage["id"],
        managed_instance_details={
            "managed_instances": lifecycle_stage_detach_managed_instances_management_managed_instance_details_managed_instances,
            "work_request_details": {
                "description": lifecycle_stage_detach_managed_instances_management_managed_instance_details_work_request_details_description,
                "display_name": lifecycle_stage_detach_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.NewLifecycleStageDetachManagedInstancesManagement(ctx, "test_lifecycle_stage_detach_managed_instances_management", &OsManagementHub.LifecycleStageDetachManagedInstancesManagementArgs{
    			LifecycleStageId: pulumi.Any(testLifecycleStage.Id),
    			ManagedInstanceDetails: &osmanagementhub.LifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsArgs{
    				ManagedInstances: pulumi.Any(lifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsManagedInstances),
    				WorkRequestDetails: &osmanagementhub.LifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsArgs{
    					Description: pulumi.Any(lifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsDescription),
    					DisplayName: pulumi.Any(lifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsDisplayName),
    				},
    			},
    		})
    		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 testLifecycleStageDetachManagedInstancesManagement = new Oci.OsManagementHub.LifecycleStageDetachManagedInstancesManagement("test_lifecycle_stage_detach_managed_instances_management", new()
        {
            LifecycleStageId = testLifecycleStage.Id,
            ManagedInstanceDetails = new Oci.OsManagementHub.Inputs.LifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsArgs
            {
                ManagedInstances = lifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsManagedInstances,
                WorkRequestDetails = new Oci.OsManagementHub.Inputs.LifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsArgs
                {
                    Description = lifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsDescription,
                    DisplayName = lifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsDisplayName,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.OsManagementHub.LifecycleStageDetachManagedInstancesManagement;
    import com.pulumi.oci.OsManagementHub.LifecycleStageDetachManagedInstancesManagementArgs;
    import com.pulumi.oci.OsManagementHub.inputs.LifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsArgs;
    import com.pulumi.oci.OsManagementHub.inputs.LifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsArgs;
    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 testLifecycleStageDetachManagedInstancesManagement = new LifecycleStageDetachManagedInstancesManagement("testLifecycleStageDetachManagedInstancesManagement", LifecycleStageDetachManagedInstancesManagementArgs.builder()
                .lifecycleStageId(testLifecycleStage.id())
                .managedInstanceDetails(LifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsArgs.builder()
                    .managedInstances(lifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsManagedInstances)
                    .workRequestDetails(LifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsArgs.builder()
                        .description(lifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsDescription)
                        .displayName(lifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsDisplayName)
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      testLifecycleStageDetachManagedInstancesManagement:
        type: oci:OsManagementHub:LifecycleStageDetachManagedInstancesManagement
        name: test_lifecycle_stage_detach_managed_instances_management
        properties:
          lifecycleStageId: ${testLifecycleStage.id}
          managedInstanceDetails:
            managedInstances: ${lifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsManagedInstances}
            workRequestDetails:
              description: ${lifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsDescription}
              displayName: ${lifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsDisplayName}
    

    Create LifecycleStageDetachManagedInstancesManagement Resource

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

    Constructor syntax

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

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

    LifecycleStageId string
    The OCID of the lifecycle stage.
    ManagedInstanceDetails LifecycleStageDetachManagedInstancesManagementManagedInstanceDetails
    The details about the managed instances.
    LifecycleStageId string
    The OCID of the lifecycle stage.
    ManagedInstanceDetails LifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsArgs
    The details about the managed instances.
    lifecycleStageId String
    The OCID of the lifecycle stage.
    managedInstanceDetails LifecycleStageDetachManagedInstancesManagementManagedInstanceDetails
    The details about the managed instances.
    lifecycleStageId string
    The OCID of the lifecycle stage.
    managedInstanceDetails LifecycleStageDetachManagedInstancesManagementManagedInstanceDetails
    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 LifecycleStageDetachManagedInstancesManagement 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 LifecycleStageDetachManagedInstancesManagement Resource

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

    LifecycleStageDetachManagedInstancesManagementManagedInstanceDetails, LifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsArgs

    ManagedInstances List<string>
    The list of managed instance OCIDs to be attached/detached.
    WorkRequestDetails LifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetails
    Provides the name and description of the job.
    ManagedInstances []string
    The list of managed instance OCIDs to be attached/detached.
    WorkRequestDetails LifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetails
    Provides the name and description of the job.
    managedInstances List<String>
    The list of managed instance OCIDs to be attached/detached.
    workRequestDetails LifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetails
    Provides the name and description of the job.
    managedInstances string[]
    The list of managed instance OCIDs to be attached/detached.
    workRequestDetails LifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetails
    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.LifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetails
    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.

    LifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetails, LifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsArgs

    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

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

    $ pulumi import oci:OsManagementHub/lifecycleStageDetachManagedInstancesManagement:LifecycleStageDetachManagedInstancesManagement test_lifecycle_stage_detach_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.14.0 published on Tuesday, Oct 29, 2024 by Pulumi