1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ContainerEngine
  5. getClusterWorkloadMappings
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.ContainerEngine.getClusterWorkloadMappings

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

This data source provides the list of Cluster Workload Mappings in Oracle Cloud Infrastructure Container Engine service.

List workloadMappings for a provisioned cluster.

Example Usage

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

const testClusterWorkloadMappings = oci.ContainerEngine.getClusterWorkloadMappings({
    clusterId: testCluster.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_cluster_workload_mappings = oci.ContainerEngine.get_cluster_workload_mappings(cluster_id=test_cluster["id"])
Copy
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.GetClusterWorkloadMappings(ctx, &containerengine.GetClusterWorkloadMappingsArgs{
			ClusterId: testCluster.Id,
		}, nil)
		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 testClusterWorkloadMappings = Oci.ContainerEngine.GetClusterWorkloadMappings.Invoke(new()
    {
        ClusterId = testCluster.Id,
    });

});
Copy
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.GetClusterWorkloadMappingsArgs;
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 testClusterWorkloadMappings = ContainerEngineFunctions.getClusterWorkloadMappings(GetClusterWorkloadMappingsArgs.builder()
            .clusterId(testCluster.id())
            .build());

    }
}
Copy
variables:
  testClusterWorkloadMappings:
    fn::invoke:
      function: oci:ContainerEngine:getClusterWorkloadMappings
      arguments:
        clusterId: ${testCluster.id}
Copy

Using getClusterWorkloadMappings

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 getClusterWorkloadMappings(args: GetClusterWorkloadMappingsArgs, opts?: InvokeOptions): Promise<GetClusterWorkloadMappingsResult>
function getClusterWorkloadMappingsOutput(args: GetClusterWorkloadMappingsOutputArgs, opts?: InvokeOptions): Output<GetClusterWorkloadMappingsResult>
Copy
def get_cluster_workload_mappings(cluster_id: Optional[str] = None,
                                  filters: Optional[Sequence[_containerengine.GetClusterWorkloadMappingsFilter]] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetClusterWorkloadMappingsResult
def get_cluster_workload_mappings_output(cluster_id: Optional[pulumi.Input[str]] = None,
                                  filters: Optional[pulumi.Input[Sequence[pulumi.Input[_containerengine.GetClusterWorkloadMappingsFilterArgs]]]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetClusterWorkloadMappingsResult]
Copy
func GetClusterWorkloadMappings(ctx *Context, args *GetClusterWorkloadMappingsArgs, opts ...InvokeOption) (*GetClusterWorkloadMappingsResult, error)
func GetClusterWorkloadMappingsOutput(ctx *Context, args *GetClusterWorkloadMappingsOutputArgs, opts ...InvokeOption) GetClusterWorkloadMappingsResultOutput
Copy

> Note: This function is named GetClusterWorkloadMappings in the Go SDK.

public static class GetClusterWorkloadMappings 
{
    public static Task<GetClusterWorkloadMappingsResult> InvokeAsync(GetClusterWorkloadMappingsArgs args, InvokeOptions? opts = null)
    public static Output<GetClusterWorkloadMappingsResult> Invoke(GetClusterWorkloadMappingsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetClusterWorkloadMappingsResult> getClusterWorkloadMappings(GetClusterWorkloadMappingsArgs args, InvokeOptions options)
public static Output<GetClusterWorkloadMappingsResult> getClusterWorkloadMappings(GetClusterWorkloadMappingsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:ContainerEngine/getClusterWorkloadMappings:getClusterWorkloadMappings
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ClusterId This property is required. string
The OCID of the cluster.
Filters Changes to this property will trigger replacement. List<GetClusterWorkloadMappingsFilter>
ClusterId This property is required. string
The OCID of the cluster.
Filters Changes to this property will trigger replacement. []GetClusterWorkloadMappingsFilter
clusterId This property is required. String
The OCID of the cluster.
filters Changes to this property will trigger replacement. List<GetClusterWorkloadMappingsFilter>
clusterId This property is required. string
The OCID of the cluster.
filters Changes to this property will trigger replacement. GetClusterWorkloadMappingsFilter[]
cluster_id This property is required. str
The OCID of the cluster.
filters Changes to this property will trigger replacement. Sequence[containerengine.GetClusterWorkloadMappingsFilter]
clusterId This property is required. String
The OCID of the cluster.
filters Changes to this property will trigger replacement. List<Property Map>

getClusterWorkloadMappings Result

The following output properties are available:

ClusterId string
The OCID of the cluster.
Id string
The provider-assigned unique ID for this managed resource.
WorkloadMappings List<GetClusterWorkloadMappingsWorkloadMapping>
The list of workload_mappings.
Filters List<GetClusterWorkloadMappingsFilter>
ClusterId string
The OCID of the cluster.
Id string
The provider-assigned unique ID for this managed resource.
WorkloadMappings []GetClusterWorkloadMappingsWorkloadMapping
The list of workload_mappings.
Filters []GetClusterWorkloadMappingsFilter
clusterId String
The OCID of the cluster.
id String
The provider-assigned unique ID for this managed resource.
workloadMappings List<GetClusterWorkloadMappingsWorkloadMapping>
The list of workload_mappings.
filters List<GetClusterWorkloadMappingsFilter>
clusterId string
The OCID of the cluster.
id string
The provider-assigned unique ID for this managed resource.
workloadMappings GetClusterWorkloadMappingsWorkloadMapping[]
The list of workload_mappings.
filters GetClusterWorkloadMappingsFilter[]
cluster_id str
The OCID of the cluster.
id str
The provider-assigned unique ID for this managed resource.
workload_mappings Sequence[containerengine.GetClusterWorkloadMappingsWorkloadMapping]
The list of workload_mappings.
filters Sequence[containerengine.GetClusterWorkloadMappingsFilter]
clusterId String
The OCID of the cluster.
id String
The provider-assigned unique ID for this managed resource.
workloadMappings List<Property Map>
The list of workload_mappings.
filters List<Property Map>

Supporting Types

GetClusterWorkloadMappingsFilter

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean

GetClusterWorkloadMappingsWorkloadMapping

ClusterId This property is required. string
The OCID of the cluster.
DefinedTags This property is required. Dictionary<string, string>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
FreeformTags This property is required. Dictionary<string, string>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
Id This property is required. string
The ocid of the workloadMapping.
MappedCompartmentId This property is required. string
The OCID of the mapped customer compartment.
MappedTenancyId This property is required. string
The OCID of the mapped customer tenancy.
Namespace This property is required. string
The namespace of the workloadMapping.
State This property is required. string
The state of the workloadMapping.
TimeCreated This property is required. string
The time the cluster was created.
ClusterId This property is required. string
The OCID of the cluster.
DefinedTags This property is required. map[string]string
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
FreeformTags This property is required. map[string]string
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
Id This property is required. string
The ocid of the workloadMapping.
MappedCompartmentId This property is required. string
The OCID of the mapped customer compartment.
MappedTenancyId This property is required. string
The OCID of the mapped customer tenancy.
Namespace This property is required. string
The namespace of the workloadMapping.
State This property is required. string
The state of the workloadMapping.
TimeCreated This property is required. string
The time the cluster was created.
clusterId This property is required. String
The OCID of the cluster.
definedTags This property is required. Map<String,String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
freeformTags This property is required. Map<String,String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id This property is required. String
The ocid of the workloadMapping.
mappedCompartmentId This property is required. String
The OCID of the mapped customer compartment.
mappedTenancyId This property is required. String
The OCID of the mapped customer tenancy.
namespace This property is required. String
The namespace of the workloadMapping.
state This property is required. String
The state of the workloadMapping.
timeCreated This property is required. String
The time the cluster was created.
clusterId This property is required. string
The OCID of the cluster.
definedTags This property is required. {[key: string]: string}
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
freeformTags This property is required. {[key: string]: string}
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id This property is required. string
The ocid of the workloadMapping.
mappedCompartmentId This property is required. string
The OCID of the mapped customer compartment.
mappedTenancyId This property is required. string
The OCID of the mapped customer tenancy.
namespace This property is required. string
The namespace of the workloadMapping.
state This property is required. string
The state of the workloadMapping.
timeCreated This property is required. string
The time the cluster was created.
cluster_id This property is required. str
The OCID of the cluster.
defined_tags This property is required. Mapping[str, str]
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
freeform_tags This property is required. Mapping[str, str]
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id This property is required. str
The ocid of the workloadMapping.
mapped_compartment_id This property is required. str
The OCID of the mapped customer compartment.
mapped_tenancy_id This property is required. str
The OCID of the mapped customer tenancy.
namespace This property is required. str
The namespace of the workloadMapping.
state This property is required. str
The state of the workloadMapping.
time_created This property is required. str
The time the cluster was created.
clusterId This property is required. String
The OCID of the cluster.
definedTags This property is required. Map<String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
freeformTags This property is required. Map<String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id This property is required. String
The ocid of the workloadMapping.
mappedCompartmentId This property is required. String
The OCID of the mapped customer compartment.
mappedTenancyId This property is required. String
The OCID of the mapped customer tenancy.
namespace This property is required. String
The namespace of the workloadMapping.
state This property is required. String
The state of the workloadMapping.
timeCreated This property is required. String
The time the cluster was created.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi