Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 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[_containerengine.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[_containerengine.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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:ContainerEngine/getWorkRequests:getWorkRequests
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The OCID of the compartment.
- Cluster
Id string - The OCID of the cluster.
- Filters
List<Get
Work Requests Filter> - Resource
Id string - The OCID of the resource associated with a work request
- Resource
Type 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.
- Compartment
Id string - The OCID of the compartment.
- Cluster
Id string - The OCID of the cluster.
- Filters
[]Get
Work Requests Filter - Resource
Id string - The OCID of the resource associated with a work request
- Resource
Type 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 String - The OCID of the compartment.
- cluster
Id String - The OCID of the cluster.
- filters
List<Get
Work Requests Filter> - resource
Id String - The OCID of the resource associated with a work request
- resource
Type 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.
- compartment
Id string - The OCID of the compartment.
- cluster
Id string - The OCID of the cluster.
- filters
Get
Work Requests Filter[] - resource
Id string - The OCID of the resource associated with a work request
- resource
Type 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[containerengine.
Get Work 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.
- compartment
Id String - The OCID of the compartment.
- cluster
Id String - The OCID of the cluster.
- filters List<Property Map>
- resource
Id String - The OCID of the resource associated with a work request
- resource
Type 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:
- Compartment
Id string - The OCID of the compartment in which the work request exists.
- Id string
- The provider-assigned unique ID for this managed resource.
- Work
Requests List<GetWork Requests Work Request> - The list of work_requests.
- Cluster
Id string - Filters
List<Get
Work Requests Filter> - Resource
Id string - Resource
Type string - Statuses List<string>
- The current status of the work request.
- Compartment
Id string - The OCID of the compartment in which the work request exists.
- Id string
- The provider-assigned unique ID for this managed resource.
- Work
Requests []GetWork Requests Work Request - The list of work_requests.
- Cluster
Id string - Filters
[]Get
Work Requests Filter - Resource
Id string - Resource
Type string - Statuses []string
- The current status of the work request.
- compartment
Id String - The OCID of the compartment in which the work request exists.
- id String
- The provider-assigned unique ID for this managed resource.
- work
Requests List<GetWork Requests Work Request> - The list of work_requests.
- cluster
Id String - filters
List<Get
Work Requests Filter> - resource
Id String - resource
Type String - statuses List<String>
- The current status of the work request.
- compartment
Id string - The OCID of the compartment in which the work request exists.
- id string
- The provider-assigned unique ID for this managed resource.
- work
Requests GetWork Requests Work Request[] - The list of work_requests.
- cluster
Id string - filters
Get
Work Requests Filter[] - resource
Id string - resource
Type 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[containerengine.Get Work Requests Work Request] - The list of work_requests.
- cluster_
id str - filters
Sequence[containerengine.
Get Work Requests Filter] - resource_
id str - resource_
type str - statuses Sequence[str]
- The current status of the work request.
- compartment
Id String - The OCID of the compartment in which the work request exists.
- id String
- The provider-assigned unique ID for this managed resource.
- work
Requests List<Property Map> - The list of work_requests.
- cluster
Id String - filters List<Property Map>
- resource
Id String - resource
Type String - statuses List<String>
- The current status of the work request.
Supporting Types
GetWorkRequestsFilter
GetWorkRequestsWorkRequest
- Compartment
Id string - The OCID of the compartment.
- Id string
- The OCID of the work request.
- Operation
Type string - The type of work the work request is doing.
- Resources
List<Get
Work 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.
- Time
Accepted string - The time the work request was accepted.
- Time
Finished string - The time the work request was finished.
- Time
Started string - The time the work request was started.
- Compartment
Id string - The OCID of the compartment.
- Id string
- The OCID of the work request.
- Operation
Type string - The type of work the work request is doing.
- Resources
[]Get
Work 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.
- Time
Accepted string - The time the work request was accepted.
- Time
Finished string - The time the work request was finished.
- Time
Started string - The time the work request was started.
- compartment
Id String - The OCID of the compartment.
- id String
- The OCID of the work request.
- operation
Type String - The type of work the work request is doing.
- resources
List<Get
Work 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.
- time
Accepted String - The time the work request was accepted.
- time
Finished String - The time the work request was finished.
- time
Started String - The time the work request was started.
- compartment
Id string - The OCID of the compartment.
- id string
- The OCID of the work request.
- operation
Type string - The type of work the work request is doing.
- resources
Get
Work 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.
- time
Accepted string - The time the work request was accepted.
- time
Finished string - The time the work request was finished.
- time
Started 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[containerengine.
Get Work 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.
- compartment
Id String - The OCID of the compartment.
- id String
- The OCID of the work request.
- operation
Type 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.
- time
Accepted String - The time the work request was accepted.
- time
Finished String - The time the work request was finished.
- time
Started String - The time the work request was started.
GetWorkRequestsWorkRequestResource
- Action
Type string - The way in which this resource was affected by the work tracked by the work request.
- Entity
Type string - The resource type the work request affects.
- Entity
Uri 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 string - The way in which this resource was affected by the work tracked by the work request.
- Entity
Type string - The resource type the work request affects.
- Entity
Uri 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 String - The way in which this resource was affected by the work tracked by the work request.
- entity
Type String - The resource type the work request affects.
- entity
Uri 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 string - The way in which this resource was affected by the work tracked by the work request.
- entity
Type string - The resource type the work request affects.
- entity
Uri 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.
- action
Type String - The way in which this resource was affected by the work tracked by the work request.
- entity
Type String - The resource type the work request affects.
- entity
Uri 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
oci
Terraform Provider.