Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.emr.getMainVersions
Explore with Pulumi AI
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 dictionaryThe following arguments are supported:
- Cluster
Types 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"]
 - Emr
Version string - The version of the emr cluster instance. Possible values: 
EMR-4.0.0,EMR-3.23.0,EMR-3.22.0. - Output
File string - File name where to save data source results (after running 
pulumi preview). 
- Cluster
Types []string - 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 string - The version of the emr cluster instance. Possible values: 
EMR-4.0.0,EMR-3.23.0,EMR-3.22.0. - Output
File string - File name where to save data source results (after running 
pulumi preview). 
- cluster
Types 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"]
 - emr
Version String - The version of the emr cluster instance. Possible values: 
EMR-4.0.0,EMR-3.23.0,EMR-3.22.0. - output
File String - File name where to save data source results (after running 
pulumi preview). 
- cluster
Types string[] - 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 string - The version of the emr cluster instance. Possible values: 
EMR-4.0.0,EMR-3.23.0,EMR-3.22.0. - output
File 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). 
- cluster
Types 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"]
 - emr
Version String - The version of the emr cluster instance. Possible values: 
EMR-4.0.0,EMR-3.23.0,EMR-3.22.0. - output
File 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.
 - Main
Versions List<Pulumi.Ali Cloud. Emr. Outputs. Get Main Versions Main Version>  - A list of versions of the emr cluster instance. Each element contains the following attributes:
 - Cluster
Types List<string> - Emr
Version string - The version of the emr cluster instance.
 - Output
File string 
- Id string
 - The provider-assigned unique ID for this managed resource.
 - Ids []string
 - A list of emr instance types IDs.
 - Main
Versions []GetMain Versions Main Version  - A list of versions of the emr cluster instance. Each element contains the following attributes:
 - Cluster
Types []string - Emr
Version string - The version of the emr cluster instance.
 - Output
File string 
- id String
 - The provider-assigned unique ID for this managed resource.
 - ids List<String>
 - A list of emr instance types IDs.
 - main
Versions List<GetMain Versions Main Version>  - A list of versions of the emr cluster instance. Each element contains the following attributes:
 - cluster
Types List<String> - emr
Version String - The version of the emr cluster instance.
 - output
File String 
- id string
 - The provider-assigned unique ID for this managed resource.
 - ids string[]
 - A list of emr instance types IDs.
 - main
Versions GetMain Versions Main Version[]  - A list of versions of the emr cluster instance. Each element contains the following attributes:
 - cluster
Types string[] - emr
Version string - The version of the emr cluster instance.
 - output
File 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[GetMain Versions Main Version]  - 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.
 - main
Versions List<Property Map> - A list of versions of the emr cluster instance. Each element contains the following attributes:
 - cluster
Types List<String> - emr
Version String - The version of the emr cluster instance.
 - output
File String 
Supporting Types
GetMainVersionsMainVersion    
- Cluster
Types List<string> - A list of cluster types the emr cluster supported. Possible values: 
HADOOP,ZOOKEEPER,KAFKA,DRUID. - Emr
Version string - The version of the emr cluster instance. Possible values: 
EMR-4.0.0,EMR-3.23.0,EMR-3.22.0. - Image
Id string - The image id of the emr cluster instance.
 
- Cluster
Types []string - A list of cluster types the emr cluster supported. Possible values: 
HADOOP,ZOOKEEPER,KAFKA,DRUID. - Emr
Version string - The version of the emr cluster instance. Possible values: 
EMR-4.0.0,EMR-3.23.0,EMR-3.22.0. - Image
Id string - The image id of the emr cluster instance.
 
- cluster
Types List<String> - A list of cluster types the emr cluster supported. Possible values: 
HADOOP,ZOOKEEPER,KAFKA,DRUID. - emr
Version String - The version of the emr cluster instance. Possible values: 
EMR-4.0.0,EMR-3.23.0,EMR-3.22.0. - image
Id String - The image id of the emr cluster instance.
 
- cluster
Types string[] - A list of cluster types the emr cluster supported. Possible values: 
HADOOP,ZOOKEEPER,KAFKA,DRUID. - emr
Version string - The version of the emr cluster instance. Possible values: 
EMR-4.0.0,EMR-3.23.0,EMR-3.22.0. - image
Id 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.
 
- cluster
Types List<String> - A list of cluster types the emr cluster supported. Possible values: 
HADOOP,ZOOKEEPER,KAFKA,DRUID. - emr
Version String - The version of the emr cluster instance. Possible values: 
EMR-4.0.0,EMR-3.23.0,EMR-3.22.0. - image
Id 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 
alicloudTerraform Provider.