1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getEmr
tencentcloud 1.81.186 published on Thursday, Apr 24, 2025 by tencentcloudstack

tencentcloud.getEmr

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.186 published on Thursday, Apr 24, 2025 by tencentcloudstack

    Provides an available EMR for the user.

    The EMR data source fetch proper EMR from user’s EMR pool.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const myEmr = tencentcloud.getEmr({
        displayStrategy: "clusterList",
        instanceIds: ["emr-rnzqrleq"],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    my_emr = tencentcloud.get_emr(display_strategy="clusterList",
        instance_ids=["emr-rnzqrleq"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.GetEmr(ctx, &tencentcloud.GetEmrArgs{
    			DisplayStrategy: "clusterList",
    			InstanceIds: []string{
    				"emr-rnzqrleq",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var myEmr = Tencentcloud.GetEmr.Invoke(new()
        {
            DisplayStrategy = "clusterList",
            InstanceIds = new[]
            {
                "emr-rnzqrleq",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetEmrArgs;
    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 myEmr = TencentcloudFunctions.getEmr(GetEmrArgs.builder()
                .displayStrategy("clusterList")
                .instanceIds("emr-rnzqrleq")
                .build());
    
        }
    }
    
    variables:
      myEmr:
        fn::invoke:
          function: tencentcloud:getEmr
          arguments:
            displayStrategy: clusterList
            instanceIds:
              - emr-rnzqrleq
    

    Using getEmr

    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 getEmr(args: GetEmrArgs, opts?: InvokeOptions): Promise<GetEmrResult>
    function getEmrOutput(args: GetEmrOutputArgs, opts?: InvokeOptions): Output<GetEmrResult>
    def get_emr(display_strategy: Optional[str] = None,
                id: Optional[str] = None,
                instance_ids: Optional[Sequence[str]] = None,
                project_id: Optional[float] = None,
                result_output_file: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetEmrResult
    def get_emr_output(display_strategy: Optional[pulumi.Input[str]] = None,
                id: Optional[pulumi.Input[str]] = None,
                instance_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                project_id: Optional[pulumi.Input[float]] = None,
                result_output_file: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetEmrResult]
    func GetEmr(ctx *Context, args *GetEmrArgs, opts ...InvokeOption) (*GetEmrResult, error)
    func GetEmrOutput(ctx *Context, args *GetEmrOutputArgs, opts ...InvokeOption) GetEmrResultOutput

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

    public static class GetEmr 
    {
        public static Task<GetEmrResult> InvokeAsync(GetEmrArgs args, InvokeOptions? opts = null)
        public static Output<GetEmrResult> Invoke(GetEmrInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEmrResult> getEmr(GetEmrArgs args, InvokeOptions options)
    public static Output<GetEmrResult> getEmr(GetEmrArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getEmr:getEmr
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DisplayStrategy string
    Display strategy(e.g.:clusterList, monitorManage).
    Id string
    Id of instance.
    InstanceIds List<string>
    fetch all instances with same prefix(e.g.:emr-xxxxxx).
    ProjectId double
    Fetch all instances which owner same project. Default 0 meaning use default project id.
    ResultOutputFile string
    Used to save results.
    DisplayStrategy string
    Display strategy(e.g.:clusterList, monitorManage).
    Id string
    Id of instance.
    InstanceIds []string
    fetch all instances with same prefix(e.g.:emr-xxxxxx).
    ProjectId float64
    Fetch all instances which owner same project. Default 0 meaning use default project id.
    ResultOutputFile string
    Used to save results.
    displayStrategy String
    Display strategy(e.g.:clusterList, monitorManage).
    id String
    Id of instance.
    instanceIds List<String>
    fetch all instances with same prefix(e.g.:emr-xxxxxx).
    projectId Double
    Fetch all instances which owner same project. Default 0 meaning use default project id.
    resultOutputFile String
    Used to save results.
    displayStrategy string
    Display strategy(e.g.:clusterList, monitorManage).
    id string
    Id of instance.
    instanceIds string[]
    fetch all instances with same prefix(e.g.:emr-xxxxxx).
    projectId number
    Fetch all instances which owner same project. Default 0 meaning use default project id.
    resultOutputFile string
    Used to save results.
    display_strategy str
    Display strategy(e.g.:clusterList, monitorManage).
    id str
    Id of instance.
    instance_ids Sequence[str]
    fetch all instances with same prefix(e.g.:emr-xxxxxx).
    project_id float
    Fetch all instances which owner same project. Default 0 meaning use default project id.
    result_output_file str
    Used to save results.
    displayStrategy String
    Display strategy(e.g.:clusterList, monitorManage).
    id String
    Id of instance.
    instanceIds List<String>
    fetch all instances with same prefix(e.g.:emr-xxxxxx).
    projectId Number
    Fetch all instances which owner same project. Default 0 meaning use default project id.
    resultOutputFile String
    Used to save results.

    getEmr Result

    The following output properties are available:

    Clusters List<GetEmrCluster>
    A list of clusters will be exported and its every element contains the following attributes:
    DisplayStrategy string
    Id string
    Id of instance.
    InstanceIds List<string>
    ProjectId double
    Project id of instance.
    ResultOutputFile string
    Clusters []GetEmrClusterType
    A list of clusters will be exported and its every element contains the following attributes:
    DisplayStrategy string
    Id string
    Id of instance.
    InstanceIds []string
    ProjectId float64
    Project id of instance.
    ResultOutputFile string
    clusters List<GetEmrCluster>
    A list of clusters will be exported and its every element contains the following attributes:
    displayStrategy String
    id String
    Id of instance.
    instanceIds List<String>
    projectId Double
    Project id of instance.
    resultOutputFile String
    clusters GetEmrCluster[]
    A list of clusters will be exported and its every element contains the following attributes:
    displayStrategy string
    id string
    Id of instance.
    instanceIds string[]
    projectId number
    Project id of instance.
    resultOutputFile string
    clusters Sequence[GetEmrCluster]
    A list of clusters will be exported and its every element contains the following attributes:
    display_strategy str
    id str
    Id of instance.
    instance_ids Sequence[str]
    project_id float
    Project id of instance.
    result_output_file str
    clusters List<Property Map>
    A list of clusters will be exported and its every element contains the following attributes:
    displayStrategy String
    id String
    Id of instance.
    instanceIds List<String>
    projectId Number
    Project id of instance.
    resultOutputFile String

    Supporting Types

    GetEmrCluster

    AddTime string
    Add time of instance.
    ChargeType double
    Charge type of instance.
    ClusterId string
    Cluster id of instance.
    ClusterName string
    Cluster name of instance.
    Ftitle string
    Title of instance.
    Id double
    Id of instance.
    MasterIp string
    Master ip of instance.
    ProjectId double
    Fetch all instances which owner same project. Default 0 meaning use default project id.
    RegionId double
    Region id of instance.
    Status double
    Status of instance.
    Zone string
    Zone of instance.
    ZoneId double
    Zone id of instance.
    AddTime string
    Add time of instance.
    ChargeType float64
    Charge type of instance.
    ClusterId string
    Cluster id of instance.
    ClusterName string
    Cluster name of instance.
    Ftitle string
    Title of instance.
    Id float64
    Id of instance.
    MasterIp string
    Master ip of instance.
    ProjectId float64
    Fetch all instances which owner same project. Default 0 meaning use default project id.
    RegionId float64
    Region id of instance.
    Status float64
    Status of instance.
    Zone string
    Zone of instance.
    ZoneId float64
    Zone id of instance.
    addTime String
    Add time of instance.
    chargeType Double
    Charge type of instance.
    clusterId String
    Cluster id of instance.
    clusterName String
    Cluster name of instance.
    ftitle String
    Title of instance.
    id Double
    Id of instance.
    masterIp String
    Master ip of instance.
    projectId Double
    Fetch all instances which owner same project. Default 0 meaning use default project id.
    regionId Double
    Region id of instance.
    status Double
    Status of instance.
    zone String
    Zone of instance.
    zoneId Double
    Zone id of instance.
    addTime string
    Add time of instance.
    chargeType number
    Charge type of instance.
    clusterId string
    Cluster id of instance.
    clusterName string
    Cluster name of instance.
    ftitle string
    Title of instance.
    id number
    Id of instance.
    masterIp string
    Master ip of instance.
    projectId number
    Fetch all instances which owner same project. Default 0 meaning use default project id.
    regionId number
    Region id of instance.
    status number
    Status of instance.
    zone string
    Zone of instance.
    zoneId number
    Zone id of instance.
    add_time str
    Add time of instance.
    charge_type float
    Charge type of instance.
    cluster_id str
    Cluster id of instance.
    cluster_name str
    Cluster name of instance.
    ftitle str
    Title of instance.
    id float
    Id of instance.
    master_ip str
    Master ip of instance.
    project_id float
    Fetch all instances which owner same project. Default 0 meaning use default project id.
    region_id float
    Region id of instance.
    status float
    Status of instance.
    zone str
    Zone of instance.
    zone_id float
    Zone id of instance.
    addTime String
    Add time of instance.
    chargeType Number
    Charge type of instance.
    clusterId String
    Cluster id of instance.
    clusterName String
    Cluster name of instance.
    ftitle String
    Title of instance.
    id Number
    Id of instance.
    masterIp String
    Master ip of instance.
    projectId Number
    Fetch all instances which owner same project. Default 0 meaning use default project id.
    regionId Number
    Region id of instance.
    status Number
    Status of instance.
    zone String
    Zone of instance.
    zoneId Number
    Zone id of instance.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.186 published on Thursday, Apr 24, 2025 by tencentcloudstack