1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ContainerEngine
  5. getClusterWorkloadMapping
Oracle Cloud Infrastructure v1.34.0 published on Friday, May 3, 2024 by Pulumi

oci.ContainerEngine.getClusterWorkloadMapping

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.34.0 published on Friday, May 3, 2024 by Pulumi

    This data source provides details about a specific Cluster Workload Mapping resource in Oracle Cloud Infrastructure Container Engine service.

    Get the specified workloadMapping for a cluster.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testClusterWorkloadMapping = oci.ContainerEngine.getClusterWorkloadMapping({
        clusterId: testCluster.id,
        workloadMappingId: testWorkloadMapping.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_cluster_workload_mapping = oci.ContainerEngine.get_cluster_workload_mapping(cluster_id=test_cluster["id"],
        workload_mapping_id=test_workload_mapping["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/ContainerEngine"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ContainerEngine.GetClusterWorkloadMapping(ctx, &containerengine.GetClusterWorkloadMappingArgs{
    			ClusterId:         testCluster.Id,
    			WorkloadMappingId: testWorkloadMapping.Id,
    		}, 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 testClusterWorkloadMapping = Oci.ContainerEngine.GetClusterWorkloadMapping.Invoke(new()
        {
            ClusterId = testCluster.Id,
            WorkloadMappingId = testWorkloadMapping.Id,
        });
    
    });
    
    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.GetClusterWorkloadMappingArgs;
    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 testClusterWorkloadMapping = ContainerEngineFunctions.getClusterWorkloadMapping(GetClusterWorkloadMappingArgs.builder()
                .clusterId(testCluster.id())
                .workloadMappingId(testWorkloadMapping.id())
                .build());
    
        }
    }
    
    variables:
      testClusterWorkloadMapping:
        fn::invoke:
          Function: oci:ContainerEngine:getClusterWorkloadMapping
          Arguments:
            clusterId: ${testCluster.id}
            workloadMappingId: ${testWorkloadMapping.id}
    

    Using getClusterWorkloadMapping

    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 getClusterWorkloadMapping(args: GetClusterWorkloadMappingArgs, opts?: InvokeOptions): Promise<GetClusterWorkloadMappingResult>
    function getClusterWorkloadMappingOutput(args: GetClusterWorkloadMappingOutputArgs, opts?: InvokeOptions): Output<GetClusterWorkloadMappingResult>
    def get_cluster_workload_mapping(cluster_id: Optional[str] = None,
                                     workload_mapping_id: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetClusterWorkloadMappingResult
    def get_cluster_workload_mapping_output(cluster_id: Optional[pulumi.Input[str]] = None,
                                     workload_mapping_id: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetClusterWorkloadMappingResult]
    func GetClusterWorkloadMapping(ctx *Context, args *GetClusterWorkloadMappingArgs, opts ...InvokeOption) (*GetClusterWorkloadMappingResult, error)
    func GetClusterWorkloadMappingOutput(ctx *Context, args *GetClusterWorkloadMappingOutputArgs, opts ...InvokeOption) GetClusterWorkloadMappingResultOutput

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

    public static class GetClusterWorkloadMapping 
    {
        public static Task<GetClusterWorkloadMappingResult> InvokeAsync(GetClusterWorkloadMappingArgs args, InvokeOptions? opts = null)
        public static Output<GetClusterWorkloadMappingResult> Invoke(GetClusterWorkloadMappingInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetClusterWorkloadMappingResult> getClusterWorkloadMapping(GetClusterWorkloadMappingArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:ContainerEngine/getClusterWorkloadMapping:getClusterWorkloadMapping
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterId string
    The OCID of the cluster.
    WorkloadMappingId string
    The OCID of the workloadMapping.
    ClusterId string
    The OCID of the cluster.
    WorkloadMappingId string
    The OCID of the workloadMapping.
    clusterId String
    The OCID of the cluster.
    workloadMappingId String
    The OCID of the workloadMapping.
    clusterId string
    The OCID of the cluster.
    workloadMappingId string
    The OCID of the workloadMapping.
    cluster_id str
    The OCID of the cluster.
    workload_mapping_id str
    The OCID of the workloadMapping.
    clusterId String
    The OCID of the cluster.
    workloadMappingId String
    The OCID of the workloadMapping.

    getClusterWorkloadMapping Result

    The following output properties are available:

    ClusterId string
    The OCID of the cluster.
    DefinedTags Dictionary<string, object>
    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 Dictionary<string, object>
    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 string
    The ocid of the workloadMapping.
    MappedCompartmentId string
    The OCID of the mapped customer compartment.
    MappedTenancyId string
    The OCID of the mapped customer tenancy.
    Namespace string
    The namespace of the workloadMapping.
    State string
    The state of the workloadMapping.
    TimeCreated string
    The time the cluster was created.
    WorkloadMappingId string
    ClusterId string
    The OCID of the cluster.
    DefinedTags map[string]interface{}
    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 map[string]interface{}
    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 string
    The ocid of the workloadMapping.
    MappedCompartmentId string
    The OCID of the mapped customer compartment.
    MappedTenancyId string
    The OCID of the mapped customer tenancy.
    Namespace string
    The namespace of the workloadMapping.
    State string
    The state of the workloadMapping.
    TimeCreated string
    The time the cluster was created.
    WorkloadMappingId string
    clusterId String
    The OCID of the cluster.
    definedTags Map<String,Object>
    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 Map<String,Object>
    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 String
    The ocid of the workloadMapping.
    mappedCompartmentId String
    The OCID of the mapped customer compartment.
    mappedTenancyId String
    The OCID of the mapped customer tenancy.
    namespace String
    The namespace of the workloadMapping.
    state String
    The state of the workloadMapping.
    timeCreated String
    The time the cluster was created.
    workloadMappingId String
    clusterId string
    The OCID of the cluster.
    definedTags {[key: string]: any}
    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 {[key: string]: any}
    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 string
    The ocid of the workloadMapping.
    mappedCompartmentId string
    The OCID of the mapped customer compartment.
    mappedTenancyId string
    The OCID of the mapped customer tenancy.
    namespace string
    The namespace of the workloadMapping.
    state string
    The state of the workloadMapping.
    timeCreated string
    The time the cluster was created.
    workloadMappingId string
    cluster_id str
    The OCID of the cluster.
    defined_tags Mapping[str, Any]
    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 Mapping[str, Any]
    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 str
    The ocid of the workloadMapping.
    mapped_compartment_id str
    The OCID of the mapped customer compartment.
    mapped_tenancy_id str
    The OCID of the mapped customer tenancy.
    namespace str
    The namespace of the workloadMapping.
    state str
    The state of the workloadMapping.
    time_created str
    The time the cluster was created.
    workload_mapping_id str
    clusterId String
    The OCID of the cluster.
    definedTags Map<Any>
    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 Map<Any>
    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 String
    The ocid of the workloadMapping.
    mappedCompartmentId String
    The OCID of the mapped customer compartment.
    mappedTenancyId String
    The OCID of the mapped customer tenancy.
    namespace String
    The namespace of the workloadMapping.
    state String
    The state of the workloadMapping.
    timeCreated String
    The time the cluster was created.
    workloadMappingId String

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.34.0 published on Friday, May 3, 2024 by Pulumi