Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.ContainerEngine.getWorkRequests
Explore with Pulumi AI
This data source provides the list of Work Requests in Oracle Cloud Infrastructure Container Engine service.
List all work requests in a compartment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testWorkRequests = oci.ContainerEngine.getWorkRequests({
    compartmentId: compartmentId,
    clusterId: testCluster.id,
    resourceId: testResource.id,
    resourceType: workRequestResourceType,
    statuses: workRequestStatus,
});
import pulumi
import pulumi_oci as oci
test_work_requests = oci.ContainerEngine.get_work_requests(compartment_id=compartment_id,
    cluster_id=test_cluster["id"],
    resource_id=test_resource["id"],
    resource_type=work_request_resource_type,
    statuses=work_request_status)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/containerengine"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := containerengine.GetWorkRequests(ctx, &containerengine.GetWorkRequestsArgs{
			CompartmentId: compartmentId,
			ClusterId:     pulumi.StringRef(testCluster.Id),
			ResourceId:    pulumi.StringRef(testResource.Id),
			ResourceType:  pulumi.StringRef(workRequestResourceType),
			Statuses:      workRequestStatus,
		}, nil)
		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 testWorkRequests = Oci.ContainerEngine.GetWorkRequests.Invoke(new()
    {
        CompartmentId = compartmentId,
        ClusterId = testCluster.Id,
        ResourceId = testResource.Id,
        ResourceType = workRequestResourceType,
        Statuses = workRequestStatus,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.ContainerEngine.ContainerEngineFunctions;
import com.pulumi.oci.ContainerEngine.inputs.GetWorkRequestsArgs;
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) {
        final var testWorkRequests = ContainerEngineFunctions.getWorkRequests(GetWorkRequestsArgs.builder()
            .compartmentId(compartmentId)
            .clusterId(testCluster.id())
            .resourceId(testResource.id())
            .resourceType(workRequestResourceType)
            .statuses(workRequestStatus)
            .build());
    }
}
variables:
  testWorkRequests:
    fn::invoke:
      function: oci:ContainerEngine:getWorkRequests
      arguments:
        compartmentId: ${compartmentId}
        clusterId: ${testCluster.id}
        resourceId: ${testResource.id}
        resourceType: ${workRequestResourceType}
        statuses: ${workRequestStatus}
Using getWorkRequests
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getWorkRequests(args: GetWorkRequestsArgs, opts?: InvokeOptions): Promise<GetWorkRequestsResult>
function getWorkRequestsOutput(args: GetWorkRequestsOutputArgs, opts?: InvokeOptions): Output<GetWorkRequestsResult>def get_work_requests(cluster_id: Optional[str] = None,
                      compartment_id: Optional[str] = None,
                      filters: Optional[Sequence[GetWorkRequestsFilter]] = None,
                      resource_id: Optional[str] = None,
                      resource_type: Optional[str] = None,
                      statuses: Optional[Sequence[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> GetWorkRequestsResult
def get_work_requests_output(cluster_id: Optional[pulumi.Input[str]] = None,
                      compartment_id: Optional[pulumi.Input[str]] = None,
                      filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetWorkRequestsFilterArgs]]]] = None,
                      resource_id: Optional[pulumi.Input[str]] = None,
                      resource_type: Optional[pulumi.Input[str]] = None,
                      statuses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetWorkRequestsResult]func GetWorkRequests(ctx *Context, args *GetWorkRequestsArgs, opts ...InvokeOption) (*GetWorkRequestsResult, error)
func GetWorkRequestsOutput(ctx *Context, args *GetWorkRequestsOutputArgs, opts ...InvokeOption) GetWorkRequestsResultOutput> Note: This function is named GetWorkRequests in the Go SDK.
public static class GetWorkRequests 
{
    public static Task<GetWorkRequestsResult> InvokeAsync(GetWorkRequestsArgs args, InvokeOptions? opts = null)
    public static Output<GetWorkRequestsResult> Invoke(GetWorkRequestsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetWorkRequestsResult> getWorkRequests(GetWorkRequestsArgs args, InvokeOptions options)
public static Output<GetWorkRequestsResult> getWorkRequests(GetWorkRequestsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:ContainerEngine/getWorkRequests:getWorkRequests
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The OCID of the compartment.
- ClusterId string
- The OCID of the cluster.
- Filters
List<GetWork Requests Filter> 
- ResourceId string
- The OCID of the resource associated with a work request
- ResourceType string
- Type of the resource associated with a work request
- Statuses List<string>
- A work request status to filter on. Can have multiple parameters of this name.
- CompartmentId string
- The OCID of the compartment.
- ClusterId string
- The OCID of the cluster.
- Filters
[]GetWork Requests Filter 
- ResourceId string
- The OCID of the resource associated with a work request
- ResourceType string
- Type of the resource associated with a work request
- Statuses []string
- A work request status to filter on. Can have multiple parameters of this name.
- compartmentId String
- The OCID of the compartment.
- clusterId String
- The OCID of the cluster.
- filters
List<GetWork Requests Filter> 
- resourceId String
- The OCID of the resource associated with a work request
- resourceType String
- Type of the resource associated with a work request
- statuses List<String>
- A work request status to filter on. Can have multiple parameters of this name.
- compartmentId string
- The OCID of the compartment.
- clusterId string
- The OCID of the cluster.
- filters
GetWork Requests Filter[] 
- resourceId string
- The OCID of the resource associated with a work request
- resourceType string
- Type of the resource associated with a work request
- statuses string[]
- A work request status to filter on. Can have multiple parameters of this name.
- compartment_id str
- The OCID of the compartment.
- cluster_id str
- The OCID of the cluster.
- filters
Sequence[GetWork Requests Filter] 
- resource_id str
- The OCID of the resource associated with a work request
- resource_type str
- Type of the resource associated with a work request
- statuses Sequence[str]
- A work request status to filter on. Can have multiple parameters of this name.
- compartmentId String
- The OCID of the compartment.
- clusterId String
- The OCID of the cluster.
- filters List<Property Map>
- resourceId String
- The OCID of the resource associated with a work request
- resourceType String
- Type of the resource associated with a work request
- statuses List<String>
- A work request status to filter on. Can have multiple parameters of this name.
getWorkRequests Result
The following output properties are available:
- CompartmentId string
- The OCID of the compartment in which the work request exists.
- Id string
- The provider-assigned unique ID for this managed resource.
- WorkRequests List<GetWork Requests Work Request> 
- The list of work_requests.
- ClusterId string
- Filters
List<GetWork Requests Filter> 
- ResourceId string
- ResourceType string
- Statuses List<string>
- The current status of the work request.
- CompartmentId string
- The OCID of the compartment in which the work request exists.
- Id string
- The provider-assigned unique ID for this managed resource.
- WorkRequests []GetWork Requests Work Request 
- The list of work_requests.
- ClusterId string
- Filters
[]GetWork Requests Filter 
- ResourceId string
- ResourceType string
- Statuses []string
- The current status of the work request.
- compartmentId String
- The OCID of the compartment in which the work request exists.
- id String
- The provider-assigned unique ID for this managed resource.
- workRequests List<GetWork Requests Work Request> 
- The list of work_requests.
- clusterId String
- filters
List<GetWork Requests Filter> 
- resourceId String
- resourceType String
- statuses List<String>
- The current status of the work request.
- compartmentId string
- The OCID of the compartment in which the work request exists.
- id string
- The provider-assigned unique ID for this managed resource.
- workRequests GetWork Requests Work Request[] 
- The list of work_requests.
- clusterId string
- filters
GetWork Requests Filter[] 
- resourceId string
- resourceType string
- statuses string[]
- The current status of the work request.
- compartment_id str
- The OCID of the compartment in which the work request exists.
- id str
- The provider-assigned unique ID for this managed resource.
- work_requests Sequence[GetWork Requests Work Request] 
- The list of work_requests.
- cluster_id str
- filters
Sequence[GetWork Requests Filter] 
- resource_id str
- resource_type str
- statuses Sequence[str]
- The current status of the work request.
- compartmentId String
- The OCID of the compartment in which the work request exists.
- id String
- The provider-assigned unique ID for this managed resource.
- workRequests List<Property Map>
- The list of work_requests.
- clusterId String
- filters List<Property Map>
- resourceId String
- resourceType String
- statuses List<String>
- The current status of the work request.
Supporting Types
GetWorkRequestsFilter   
GetWorkRequestsWorkRequest    
- CompartmentId string
- The OCID of the compartment.
- Id string
- The OCID of the work request.
- OperationType string
- The type of work the work request is doing.
- Resources
List<GetWork Requests Work Request Resource> 
- The resources this work request affects.
- Status string
- A work request status to filter on. Can have multiple parameters of this name.
- TimeAccepted string
- The time the work request was accepted.
- TimeFinished string
- The time the work request was finished.
- TimeStarted string
- The time the work request was started.
- CompartmentId string
- The OCID of the compartment.
- Id string
- The OCID of the work request.
- OperationType string
- The type of work the work request is doing.
- Resources
[]GetWork Requests Work Request Resource 
- The resources this work request affects.
- Status string
- A work request status to filter on. Can have multiple parameters of this name.
- TimeAccepted string
- The time the work request was accepted.
- TimeFinished string
- The time the work request was finished.
- TimeStarted string
- The time the work request was started.
- compartmentId String
- The OCID of the compartment.
- id String
- The OCID of the work request.
- operationType String
- The type of work the work request is doing.
- resources
List<GetWork Requests Work Request Resource> 
- The resources this work request affects.
- status String
- A work request status to filter on. Can have multiple parameters of this name.
- timeAccepted String
- The time the work request was accepted.
- timeFinished String
- The time the work request was finished.
- timeStarted String
- The time the work request was started.
- compartmentId string
- The OCID of the compartment.
- id string
- The OCID of the work request.
- operationType string
- The type of work the work request is doing.
- resources
GetWork Requests Work Request Resource[] 
- The resources this work request affects.
- status string
- A work request status to filter on. Can have multiple parameters of this name.
- timeAccepted string
- The time the work request was accepted.
- timeFinished string
- The time the work request was finished.
- timeStarted string
- The time the work request was started.
- compartment_id str
- The OCID of the compartment.
- id str
- The OCID of the work request.
- operation_type str
- The type of work the work request is doing.
- resources
Sequence[GetWork Requests Work Request Resource] 
- The resources this work request affects.
- status str
- A work request status to filter on. Can have multiple parameters of this name.
- time_accepted str
- The time the work request was accepted.
- time_finished str
- The time the work request was finished.
- time_started str
- The time the work request was started.
- compartmentId String
- The OCID of the compartment.
- id String
- The OCID of the work request.
- operationType String
- The type of work the work request is doing.
- resources List<Property Map>
- The resources this work request affects.
- status String
- A work request status to filter on. Can have multiple parameters of this name.
- timeAccepted String
- The time the work request was accepted.
- timeFinished String
- The time the work request was finished.
- timeStarted String
- The time the work request was started.
GetWorkRequestsWorkRequestResource     
- ActionType string
- The way in which this resource was affected by the work tracked by the work request.
- EntityType string
- The resource type the work request affects.
- EntityUri string
- The URI path on which the user can issue a GET request to access the resource metadata.
- Identifier string
- The OCID of the resource the work request affects.
- ActionType string
- The way in which this resource was affected by the work tracked by the work request.
- EntityType string
- The resource type the work request affects.
- EntityUri string
- The URI path on which the user can issue a GET request to access the resource metadata.
- Identifier string
- The OCID of the resource the work request affects.
- actionType String
- The way in which this resource was affected by the work tracked by the work request.
- entityType String
- The resource type the work request affects.
- entityUri String
- The URI path on which the user can issue a GET request to access the resource metadata.
- identifier String
- The OCID of the resource the work request affects.
- actionType string
- The way in which this resource was affected by the work tracked by the work request.
- entityType string
- The resource type the work request affects.
- entityUri string
- The URI path on which the user can issue a GET request to access the resource metadata.
- identifier string
- The OCID of the resource the work request affects.
- action_type str
- The way in which this resource was affected by the work tracked by the work request.
- entity_type str
- The resource type the work request affects.
- entity_uri str
- The URI path on which the user can issue a GET request to access the resource metadata.
- identifier str
- The OCID of the resource the work request affects.
- actionType String
- The way in which this resource was affected by the work tracked by the work request.
- entityType String
- The resource type the work request affects.
- entityUri String
- The URI path on which the user can issue a GET request to access the resource metadata.
- identifier String
- The OCID of the resource the work request affects.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.