1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. emr
  5. getMainVersions
Alibaba Cloud v3.59.0 published on Friday, Jul 12, 2024 by Pulumi

alicloud.emr.getMainVersions

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.59.0 published on Friday, Jul 12, 2024 by Pulumi

    The alicloud.emr.getMainVersions data source provides a collection of emr main versions available in Alibaba Cloud account when create a emr cluster.

    NOTE: Available in 1.59.0+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const default = alicloud.emr.getMainVersions({
        emrVersion: "EMR-3.22.0",
        clusterTypes: [
            "HADOOP",
            "ZOOKEEPER",
        ],
    });
    export const firstMainVersion = _default.then(_default => _default.mainVersions?.[0]?.emrVersion);
    export const thisClusterTypes = _default.then(_default => _default.mainVersions?.[0]?.clusterTypes);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.emr.get_main_versions(emr_version="EMR-3.22.0",
        cluster_types=[
            "HADOOP",
            "ZOOKEEPER",
        ])
    pulumi.export("firstMainVersion", default.main_versions[0].emr_version)
    pulumi.export("thisClusterTypes", default.main_versions[0].cluster_types)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/emr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_default, err := emr.GetMainVersions(ctx, &emr.GetMainVersionsArgs{
    			EmrVersion: pulumi.StringRef("EMR-3.22.0"),
    			ClusterTypes: []string{
    				"HADOOP",
    				"ZOOKEEPER",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstMainVersion", _default.MainVersions[0].EmrVersion)
    		ctx.Export("thisClusterTypes", _default.MainVersions[0].ClusterTypes)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = AliCloud.Emr.GetMainVersions.Invoke(new()
        {
            EmrVersion = "EMR-3.22.0",
            ClusterTypes = new[]
            {
                "HADOOP",
                "ZOOKEEPER",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["firstMainVersion"] = @default.Apply(@default => @default.Apply(getMainVersionsResult => getMainVersionsResult.MainVersions[0]?.EmrVersion)),
            ["thisClusterTypes"] = @default.Apply(@default => @default.Apply(getMainVersionsResult => getMainVersionsResult.MainVersions[0]?.ClusterTypes)),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.emr.EmrFunctions;
    import com.pulumi.alicloud.emr.inputs.GetMainVersionsArgs;
    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 default = EmrFunctions.getMainVersions(GetMainVersionsArgs.builder()
                .emrVersion("EMR-3.22.0")
                .clusterTypes(            
                    "HADOOP",
                    "ZOOKEEPER")
                .build());
    
            ctx.export("firstMainVersion", default_.mainVersions()[0].emrVersion());
            ctx.export("thisClusterTypes", default_.mainVersions()[0].clusterTypes());
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: alicloud:emr:getMainVersions
          Arguments:
            emrVersion: EMR-3.22.0
            clusterTypes:
              - HADOOP
              - ZOOKEEPER
    outputs:
      firstMainVersion: ${default.mainVersions[0].emrVersion}
      thisClusterTypes: ${default.mainVersions[0].clusterTypes}
    

    Using getMainVersions

    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 getMainVersions(args: GetMainVersionsArgs, opts?: InvokeOptions): Promise<GetMainVersionsResult>
    function getMainVersionsOutput(args: GetMainVersionsOutputArgs, opts?: InvokeOptions): Output<GetMainVersionsResult>
    def get_main_versions(cluster_types: Optional[Sequence[str]] = None,
                          emr_version: Optional[str] = None,
                          output_file: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetMainVersionsResult
    def get_main_versions_output(cluster_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                          emr_version: Optional[pulumi.Input[str]] = None,
                          output_file: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetMainVersionsResult]
    func GetMainVersions(ctx *Context, args *GetMainVersionsArgs, opts ...InvokeOption) (*GetMainVersionsResult, error)
    func GetMainVersionsOutput(ctx *Context, args *GetMainVersionsOutputArgs, opts ...InvokeOption) GetMainVersionsResultOutput

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

    public static class GetMainVersions 
    {
        public static Task<GetMainVersionsResult> InvokeAsync(GetMainVersionsArgs args, InvokeOptions? opts = null)
        public static Output<GetMainVersionsResult> Invoke(GetMainVersionsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMainVersionsResult> getMainVersions(GetMainVersionsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:emr/getMainVersions:getMainVersions
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterTypes List<string>
    The supported clusterType of this emr version. Possible values may be any one or combination of these: ["HADOOP", "DRUID", "KAFKA", "ZOOKEEPER", "FLINK", "CLICKHOUSE"]
    EmrVersion string
    The version of the emr cluster instance. Possible values: EMR-4.0.0, EMR-3.23.0, EMR-3.22.0.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ClusterTypes []string
    The supported clusterType of this emr version. Possible values may be any one or combination of these: ["HADOOP", "DRUID", "KAFKA", "ZOOKEEPER", "FLINK", "CLICKHOUSE"]
    EmrVersion string
    The version of the emr cluster instance. Possible values: EMR-4.0.0, EMR-3.23.0, EMR-3.22.0.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    clusterTypes List<String>
    The supported clusterType of this emr version. Possible values may be any one or combination of these: ["HADOOP", "DRUID", "KAFKA", "ZOOKEEPER", "FLINK", "CLICKHOUSE"]
    emrVersion String
    The version of the emr cluster instance. Possible values: EMR-4.0.0, EMR-3.23.0, EMR-3.22.0.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    clusterTypes string[]
    The supported clusterType of this emr version. Possible values may be any one or combination of these: ["HADOOP", "DRUID", "KAFKA", "ZOOKEEPER", "FLINK", "CLICKHOUSE"]
    emrVersion string
    The version of the emr cluster instance. Possible values: EMR-4.0.0, EMR-3.23.0, EMR-3.22.0.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    cluster_types Sequence[str]
    The supported clusterType of this emr version. Possible values may be any one or combination of these: ["HADOOP", "DRUID", "KAFKA", "ZOOKEEPER", "FLINK", "CLICKHOUSE"]
    emr_version str
    The version of the emr cluster instance. Possible values: EMR-4.0.0, EMR-3.23.0, EMR-3.22.0.
    output_file str
    File name where to save data source results (after running pulumi preview).
    clusterTypes List<String>
    The supported clusterType of this emr version. Possible values may be any one or combination of these: ["HADOOP", "DRUID", "KAFKA", "ZOOKEEPER", "FLINK", "CLICKHOUSE"]
    emrVersion String
    The version of the emr cluster instance. Possible values: EMR-4.0.0, EMR-3.23.0, EMR-3.22.0.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getMainVersions Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of emr instance types IDs.
    MainVersions List<Pulumi.AliCloud.Emr.Outputs.GetMainVersionsMainVersion>
    A list of versions of the emr cluster instance. Each element contains the following attributes:
    ClusterTypes List<string>
    EmrVersion string
    The version of the emr cluster instance.
    OutputFile string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of emr instance types IDs.
    MainVersions []GetMainVersionsMainVersion
    A list of versions of the emr cluster instance. Each element contains the following attributes:
    ClusterTypes []string
    EmrVersion string
    The version of the emr cluster instance.
    OutputFile string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of emr instance types IDs.
    mainVersions List<GetMainVersionsMainVersion>
    A list of versions of the emr cluster instance. Each element contains the following attributes:
    clusterTypes List<String>
    emrVersion String
    The version of the emr cluster instance.
    outputFile String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of emr instance types IDs.
    mainVersions GetMainVersionsMainVersion[]
    A list of versions of the emr cluster instance. Each element contains the following attributes:
    clusterTypes string[]
    emrVersion string
    The version of the emr cluster instance.
    outputFile string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of emr instance types IDs.
    main_versions Sequence[GetMainVersionsMainVersion]
    A list of versions of the emr cluster instance. Each element contains the following attributes:
    cluster_types Sequence[str]
    emr_version str
    The version of the emr cluster instance.
    output_file str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of emr instance types IDs.
    mainVersions List<Property Map>
    A list of versions of the emr cluster instance. Each element contains the following attributes:
    clusterTypes List<String>
    emrVersion String
    The version of the emr cluster instance.
    outputFile String

    Supporting Types

    GetMainVersionsMainVersion

    ClusterTypes List<string>
    A list of cluster types the emr cluster supported. Possible values: HADOOP, ZOOKEEPER, KAFKA, DRUID.
    EmrVersion string
    The version of the emr cluster instance. Possible values: EMR-4.0.0, EMR-3.23.0, EMR-3.22.0.
    ImageId string
    The image id of the emr cluster instance.
    ClusterTypes []string
    A list of cluster types the emr cluster supported. Possible values: HADOOP, ZOOKEEPER, KAFKA, DRUID.
    EmrVersion string
    The version of the emr cluster instance. Possible values: EMR-4.0.0, EMR-3.23.0, EMR-3.22.0.
    ImageId string
    The image id of the emr cluster instance.
    clusterTypes List<String>
    A list of cluster types the emr cluster supported. Possible values: HADOOP, ZOOKEEPER, KAFKA, DRUID.
    emrVersion String
    The version of the emr cluster instance. Possible values: EMR-4.0.0, EMR-3.23.0, EMR-3.22.0.
    imageId String
    The image id of the emr cluster instance.
    clusterTypes string[]
    A list of cluster types the emr cluster supported. Possible values: HADOOP, ZOOKEEPER, KAFKA, DRUID.
    emrVersion string
    The version of the emr cluster instance. Possible values: EMR-4.0.0, EMR-3.23.0, EMR-3.22.0.
    imageId string
    The image id of the emr cluster instance.
    cluster_types Sequence[str]
    A list of cluster types the emr cluster supported. Possible values: HADOOP, ZOOKEEPER, KAFKA, DRUID.
    emr_version str
    The version of the emr cluster instance. Possible values: EMR-4.0.0, EMR-3.23.0, EMR-3.22.0.
    image_id str
    The image id of the emr cluster instance.
    clusterTypes List<String>
    A list of cluster types the emr cluster supported. Possible values: HADOOP, ZOOKEEPER, KAFKA, DRUID.
    emrVersion String
    The version of the emr cluster instance. Possible values: EMR-4.0.0, EMR-3.23.0, EMR-3.22.0.
    imageId String
    The image id of the emr cluster instance.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.59.0 published on Friday, Jul 12, 2024 by Pulumi