1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. OsManagementHub
  5. WorkRequestRerunManagement
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

oci.OsManagementHub.WorkRequestRerunManagement

Explore with Pulumi AI

This resource provides the Work Request Rerun Management resource in Oracle Cloud Infrastructure Os Management Hub service.

Reruns a failed work for the specified work request OCID. Rerunning restarts the work on failed targets.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testWorkRequestRerunManagement = new oci.osmanagementhub.WorkRequestRerunManagement("test_work_request_rerun_management", {
    workRequestId: testWorkRequest.id,
    managedInstances: workRequestRerunManagementManagedInstances,
    workRequestDetails: {
        description: workRequestRerunManagementWorkRequestDetailsDescription,
        displayName: workRequestRerunManagementWorkRequestDetailsDisplayName,
    },
});
Copy
import pulumi
import pulumi_oci as oci

test_work_request_rerun_management = oci.os_management_hub.WorkRequestRerunManagement("test_work_request_rerun_management",
    work_request_id=test_work_request["id"],
    managed_instances=work_request_rerun_management_managed_instances,
    work_request_details={
        "description": work_request_rerun_management_work_request_details_description,
        "display_name": work_request_rerun_management_work_request_details_display_name,
    })
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.NewWorkRequestRerunManagement(ctx, "test_work_request_rerun_management", &osmanagementhub.WorkRequestRerunManagementArgs{
			WorkRequestId:    pulumi.Any(testWorkRequest.Id),
			ManagedInstances: pulumi.Any(workRequestRerunManagementManagedInstances),
			WorkRequestDetails: &osmanagementhub.WorkRequestRerunManagementWorkRequestDetailsArgs{
				Description: pulumi.Any(workRequestRerunManagementWorkRequestDetailsDescription),
				DisplayName: pulumi.Any(workRequestRerunManagementWorkRequestDetailsDisplayName),
			},
		})
		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 testWorkRequestRerunManagement = new Oci.OsManagementHub.WorkRequestRerunManagement("test_work_request_rerun_management", new()
    {
        WorkRequestId = testWorkRequest.Id,
        ManagedInstances = workRequestRerunManagementManagedInstances,
        WorkRequestDetails = new Oci.OsManagementHub.Inputs.WorkRequestRerunManagementWorkRequestDetailsArgs
        {
            Description = workRequestRerunManagementWorkRequestDetailsDescription,
            DisplayName = workRequestRerunManagementWorkRequestDetailsDisplayName,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.OsManagementHub.WorkRequestRerunManagement;
import com.pulumi.oci.OsManagementHub.WorkRequestRerunManagementArgs;
import com.pulumi.oci.OsManagementHub.inputs.WorkRequestRerunManagementWorkRequestDetailsArgs;
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 testWorkRequestRerunManagement = new WorkRequestRerunManagement("testWorkRequestRerunManagement", WorkRequestRerunManagementArgs.builder()
            .workRequestId(testWorkRequest.id())
            .managedInstances(workRequestRerunManagementManagedInstances)
            .workRequestDetails(WorkRequestRerunManagementWorkRequestDetailsArgs.builder()
                .description(workRequestRerunManagementWorkRequestDetailsDescription)
                .displayName(workRequestRerunManagementWorkRequestDetailsDisplayName)
                .build())
            .build());

    }
}
Copy
resources:
  testWorkRequestRerunManagement:
    type: oci:OsManagementHub:WorkRequestRerunManagement
    name: test_work_request_rerun_management
    properties:
      workRequestId: ${testWorkRequest.id}
      managedInstances: ${workRequestRerunManagementManagedInstances}
      workRequestDetails:
        description: ${workRequestRerunManagementWorkRequestDetailsDescription}
        displayName: ${workRequestRerunManagementWorkRequestDetailsDisplayName}
Copy

Create WorkRequestRerunManagement Resource

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

Constructor syntax

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

@overload
def WorkRequestRerunManagement(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               work_request_id: Optional[str] = None,
                               managed_instances: Optional[Sequence[str]] = None,
                               work_request_details: Optional[_osmanagementhub.WorkRequestRerunManagementWorkRequestDetailsArgs] = None)
func NewWorkRequestRerunManagement(ctx *Context, name string, args WorkRequestRerunManagementArgs, opts ...ResourceOption) (*WorkRequestRerunManagement, error)
public WorkRequestRerunManagement(string name, WorkRequestRerunManagementArgs args, CustomResourceOptions? opts = null)
public WorkRequestRerunManagement(String name, WorkRequestRerunManagementArgs args)
public WorkRequestRerunManagement(String name, WorkRequestRerunManagementArgs args, CustomResourceOptions options)
type: oci:OsManagementHub:WorkRequestRerunManagement
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. WorkRequestRerunManagementArgs
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. WorkRequestRerunManagementArgs
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. WorkRequestRerunManagementArgs
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. WorkRequestRerunManagementArgs
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. WorkRequestRerunManagementArgs
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 workRequestRerunManagementResource = new Oci.OsManagementHub.WorkRequestRerunManagement("workRequestRerunManagementResource", new()
{
    WorkRequestId = "string",
    ManagedInstances = new[]
    {
        "string",
    },
    WorkRequestDetails = new Oci.OsManagementHub.Inputs.WorkRequestRerunManagementWorkRequestDetailsArgs
    {
        Description = "string",
        DisplayName = "string",
    },
});
Copy
example, err := OsManagementHub.NewWorkRequestRerunManagement(ctx, "workRequestRerunManagementResource", &OsManagementHub.WorkRequestRerunManagementArgs{
	WorkRequestId: pulumi.String("string"),
	ManagedInstances: pulumi.StringArray{
		pulumi.String("string"),
	},
	WorkRequestDetails: &osmanagementhub.WorkRequestRerunManagementWorkRequestDetailsArgs{
		Description: pulumi.String("string"),
		DisplayName: pulumi.String("string"),
	},
})
Copy
var workRequestRerunManagementResource = new WorkRequestRerunManagement("workRequestRerunManagementResource", WorkRequestRerunManagementArgs.builder()
    .workRequestId("string")
    .managedInstances("string")
    .workRequestDetails(WorkRequestRerunManagementWorkRequestDetailsArgs.builder()
        .description("string")
        .displayName("string")
        .build())
    .build());
Copy
work_request_rerun_management_resource = oci.os_management_hub.WorkRequestRerunManagement("workRequestRerunManagementResource",
    work_request_id="string",
    managed_instances=["string"],
    work_request_details={
        "description": "string",
        "display_name": "string",
    })
Copy
const workRequestRerunManagementResource = new oci.osmanagementhub.WorkRequestRerunManagement("workRequestRerunManagementResource", {
    workRequestId: "string",
    managedInstances: ["string"],
    workRequestDetails: {
        description: "string",
        displayName: "string",
    },
});
Copy
type: oci:OsManagementHub:WorkRequestRerunManagement
properties:
    managedInstances:
        - string
    workRequestDetails:
        description: string
        displayName: string
    workRequestId: string
Copy

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

WorkRequestId
This property is required.
Changes to this property will trigger replacement.
string

The OCID of the work request.

** 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

ManagedInstances Changes to this property will trigger replacement. List<string>
List of managed instance OCIDs to affected by the rerun of the work request.
WorkRequestDetails Changes to this property will trigger replacement. WorkRequestRerunManagementWorkRequestDetails
Provides the name and description of the job.
WorkRequestId
This property is required.
Changes to this property will trigger replacement.
string

The OCID of the work request.

** 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

ManagedInstances Changes to this property will trigger replacement. []string
List of managed instance OCIDs to affected by the rerun of the work request.
WorkRequestDetails Changes to this property will trigger replacement. WorkRequestRerunManagementWorkRequestDetailsArgs
Provides the name and description of the job.
workRequestId
This property is required.
Changes to this property will trigger replacement.
String

The OCID of the work request.

** 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

managedInstances Changes to this property will trigger replacement. List<String>
List of managed instance OCIDs to affected by the rerun of the work request.
workRequestDetails Changes to this property will trigger replacement. WorkRequestRerunManagementWorkRequestDetails
Provides the name and description of the job.
workRequestId
This property is required.
Changes to this property will trigger replacement.
string

The OCID of the work request.

** 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

managedInstances Changes to this property will trigger replacement. string[]
List of managed instance OCIDs to affected by the rerun of the work request.
workRequestDetails Changes to this property will trigger replacement. WorkRequestRerunManagementWorkRequestDetails
Provides the name and description of the job.
work_request_id
This property is required.
Changes to this property will trigger replacement.
str

The OCID of the work request.

** 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

managed_instances Changes to this property will trigger replacement. Sequence[str]
List of managed instance OCIDs to affected by the rerun of the work request.
work_request_details Changes to this property will trigger replacement. osmanagementhub.WorkRequestRerunManagementWorkRequestDetailsArgs
Provides the name and description of the job.
workRequestId
This property is required.
Changes to this property will trigger replacement.
String

The OCID of the work request.

** 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

managedInstances Changes to this property will trigger replacement. List<String>
List of managed instance OCIDs to affected by the rerun of the work request.
workRequestDetails Changes to this property will trigger replacement. Property Map
Provides the name and description of the job.

Outputs

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

Get an existing WorkRequestRerunManagement 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?: WorkRequestRerunManagementState, opts?: CustomResourceOptions): WorkRequestRerunManagement
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        managed_instances: Optional[Sequence[str]] = None,
        work_request_details: Optional[_osmanagementhub.WorkRequestRerunManagementWorkRequestDetailsArgs] = None,
        work_request_id: Optional[str] = None) -> WorkRequestRerunManagement
func GetWorkRequestRerunManagement(ctx *Context, name string, id IDInput, state *WorkRequestRerunManagementState, opts ...ResourceOption) (*WorkRequestRerunManagement, error)
public static WorkRequestRerunManagement Get(string name, Input<string> id, WorkRequestRerunManagementState? state, CustomResourceOptions? opts = null)
public static WorkRequestRerunManagement get(String name, Output<String> id, WorkRequestRerunManagementState state, CustomResourceOptions options)
resources:  _:    type: oci:OsManagementHub:WorkRequestRerunManagement    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:
ManagedInstances Changes to this property will trigger replacement. List<string>
List of managed instance OCIDs to affected by the rerun of the work request.
WorkRequestDetails Changes to this property will trigger replacement. WorkRequestRerunManagementWorkRequestDetails
Provides the name and description of the job.
WorkRequestId Changes to this property will trigger replacement. string

The OCID of the work request.

** 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

ManagedInstances Changes to this property will trigger replacement. []string
List of managed instance OCIDs to affected by the rerun of the work request.
WorkRequestDetails Changes to this property will trigger replacement. WorkRequestRerunManagementWorkRequestDetailsArgs
Provides the name and description of the job.
WorkRequestId Changes to this property will trigger replacement. string

The OCID of the work request.

** 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

managedInstances Changes to this property will trigger replacement. List<String>
List of managed instance OCIDs to affected by the rerun of the work request.
workRequestDetails Changes to this property will trigger replacement. WorkRequestRerunManagementWorkRequestDetails
Provides the name and description of the job.
workRequestId Changes to this property will trigger replacement. String

The OCID of the work request.

** 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

managedInstances Changes to this property will trigger replacement. string[]
List of managed instance OCIDs to affected by the rerun of the work request.
workRequestDetails Changes to this property will trigger replacement. WorkRequestRerunManagementWorkRequestDetails
Provides the name and description of the job.
workRequestId Changes to this property will trigger replacement. string

The OCID of the work request.

** 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

managed_instances Changes to this property will trigger replacement. Sequence[str]
List of managed instance OCIDs to affected by the rerun of the work request.
work_request_details Changes to this property will trigger replacement. osmanagementhub.WorkRequestRerunManagementWorkRequestDetailsArgs
Provides the name and description of the job.
work_request_id Changes to this property will trigger replacement. str

The OCID of the work request.

** 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

managedInstances Changes to this property will trigger replacement. List<String>
List of managed instance OCIDs to affected by the rerun of the work request.
workRequestDetails Changes to this property will trigger replacement. Property Map
Provides the name and description of the job.
workRequestId Changes to this property will trigger replacement. String

The OCID of the work request.

** 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

Supporting Types

WorkRequestRerunManagementWorkRequestDetails
, WorkRequestRerunManagementWorkRequestDetailsArgs

Description Changes to this property will trigger replacement. string
User-specified information about the job. Avoid entering confidential information.
DisplayName Changes to this property will trigger replacement. string
A user-friendly name for the job. The name does not have to be unique. Avoid entering confidential information.
Description Changes to this property will trigger replacement. string
User-specified information about the job. Avoid entering confidential information.
DisplayName Changes to this property will trigger replacement. string
A user-friendly name for the job. The name does not have to be unique. Avoid entering confidential information.
description Changes to this property will trigger replacement. String
User-specified information about the job. Avoid entering confidential information.
displayName Changes to this property will trigger replacement. String
A user-friendly name for the job. The name does not have to be unique. Avoid entering confidential information.
description Changes to this property will trigger replacement. string
User-specified information about the job. Avoid entering confidential information.
displayName Changes to this property will trigger replacement. string
A user-friendly name for the job. The name does not have to be unique. Avoid entering confidential information.
description Changes to this property will trigger replacement. str
User-specified information about the job. Avoid entering confidential information.
display_name Changes to this property will trigger replacement. str
A user-friendly name for the job. The name does not have to be unique. Avoid entering confidential information.
description Changes to this property will trigger replacement. String
User-specified information about the job. Avoid entering confidential information.
displayName Changes to this property will trigger replacement. String
A user-friendly name for the job. The name does not have to be unique. Avoid entering confidential information.

Import

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

$ pulumi import oci:OsManagementHub/workRequestRerunManagement:WorkRequestRerunManagement test_work_request_rerun_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.