oci.OsManagementHub.LifecycleStageDetachManagedInstancesManagement
Explore with Pulumi AI
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:
- Lifecycle
Stage stringId - The OCID of the lifecycle stage.
- Managed
Instance LifecycleDetails Stage Detach Managed Instances Management Managed Instance Details - The details about the managed instances.
- Lifecycle
Stage stringId - The OCID of the lifecycle stage.
- Managed
Instance LifecycleDetails Stage Detach Managed Instances Management Managed Instance Details Args - The details about the managed instances.
- lifecycle
Stage StringId - The OCID of the lifecycle stage.
- managed
Instance LifecycleDetails Stage Detach Managed Instances Management Managed Instance Details - The details about the managed instances.
- lifecycle
Stage stringId - The OCID of the lifecycle stage.
- managed
Instance LifecycleDetails Stage Detach Managed Instances Management Managed Instance Details - The details about the managed instances.
- lifecycle_
stage_ strid - The OCID of the lifecycle stage.
- managed_
instance_ osmanagementhub.details Lifecycle Stage Detach Managed Instances Management Managed Instance Details Args - The details about the managed instances.
- lifecycle
Stage StringId - The OCID of the lifecycle stage.
- managed
Instance Property MapDetails - 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.
- Lifecycle
Stage stringId - The OCID of the lifecycle stage.
- Managed
Instance LifecycleDetails Stage Detach Managed Instances Management Managed Instance Details - The details about the managed instances.
- Lifecycle
Stage stringId - The OCID of the lifecycle stage.
- Managed
Instance LifecycleDetails Stage Detach Managed Instances Management Managed Instance Details Args - The details about the managed instances.
- lifecycle
Stage StringId - The OCID of the lifecycle stage.
- managed
Instance LifecycleDetails Stage Detach Managed Instances Management Managed Instance Details - The details about the managed instances.
- lifecycle
Stage stringId - The OCID of the lifecycle stage.
- managed
Instance LifecycleDetails Stage Detach Managed Instances Management Managed Instance Details - The details about the managed instances.
- lifecycle_
stage_ strid - The OCID of the lifecycle stage.
- managed_
instance_ osmanagementhub.details Lifecycle Stage Detach Managed Instances Management Managed Instance Details Args - The details about the managed instances.
- lifecycle
Stage StringId - The OCID of the lifecycle stage.
- managed
Instance Property MapDetails - The details about the managed instances.
Supporting Types
LifecycleStageDetachManagedInstancesManagementManagedInstanceDetails, LifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsArgs
- Managed
Instances List<string> - The list of managed instance OCIDs to be attached/detached.
- Work
Request LifecycleDetails Stage Detach Managed Instances Management Managed Instance Details Work Request Details - Provides the name and description of the job.
- Managed
Instances []string - The list of managed instance OCIDs to be attached/detached.
- Work
Request LifecycleDetails Stage Detach Managed Instances Management Managed Instance Details Work Request Details - Provides the name and description of the job.
- managed
Instances List<String> - The list of managed instance OCIDs to be attached/detached.
- work
Request LifecycleDetails Stage Detach Managed Instances Management Managed Instance Details Work Request Details - Provides the name and description of the job.
- managed
Instances string[] - The list of managed instance OCIDs to be attached/detached.
- work
Request LifecycleDetails Stage Detach Managed Instances Management Managed Instance Details Work Request Details - Provides the name and description of the job.
- managed_
instances Sequence[str] - The list of managed instance OCIDs to be attached/detached.
- work_
request_ osmanagementhub.details Lifecycle Stage Detach Managed Instances Management Managed Instance Details Work Request Details - Provides the name and description of the job.
- managed
Instances List<String> - The list of managed instance OCIDs to be attached/detached.
- work
Request Property MapDetails - Provides the name and description of the job.
LifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetails, LifecycleStageDetachManagedInstancesManagementManagedInstanceDetailsWorkRequestDetailsArgs
- Description string
- User-specified information about the job. Avoid entering confidential information.
- Display
Name 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.
- Display
Name 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.
- display
Name 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.
- display
Name 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.
- display
Name 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.