Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

getMainVersions

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

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = Output.Create(AliCloud.Emr.GetMainVersions.InvokeAsync(new AliCloud.Emr.GetMainVersionsArgs
        {
            ClusterTypes = 
            {
                "HADOOP",
                "ZOOKEEPER",
            },
            EmrVersion = "EMR-3.22.0",
        }));
        this.FirstMainVersion = @default.Apply(@default => @default.MainVersions?[0]?.EmrVersion);
        this.ThisClusterTypes = @default.Apply(@default => @default.MainVersions?[0]?.ClusterTypes);
    }

    [Output("firstMainVersion")]
    public Output<string> FirstMainVersion { get; set; }
    [Output("thisClusterTypes")]
    public Output<string> ThisClusterTypes { get; set; }
}
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{
			ClusterTypes: []string{
				"HADOOP",
				"ZOOKEEPER",
			},
			EmrVersion: pulumi.StringRef("EMR-3.22.0"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstMainVersion", _default.MainVersions[0].EmrVersion)
		ctx.Export("thisClusterTypes", _default.MainVersions[0].ClusterTypes)
		return nil
	})
}
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()
            .clusterTypes(            
                "HADOOP",
                "ZOOKEEPER")
            .emrVersion("EMR-3.22.0")
            .build());

        ctx.export("firstMainVersion", default_.mainVersions()[0].emrVersion());
        ctx.export("thisClusterTypes", default_.mainVersions()[0].clusterTypes());
    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.emr.get_main_versions(cluster_types=[
        "HADOOP",
        "ZOOKEEPER",
    ],
    emr_version="EMR-3.22.0")
pulumi.export("firstMainVersion", default.main_versions[0].emr_version)
pulumi.export("thisClusterTypes", default.main_versions[0].cluster_types)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultMainVersions = pulumi.output(alicloud.emr.getMainVersions({
    clusterTypes: [
        "HADOOP",
        "ZOOKEEPER",
    ],
    emrVersion: "EMR-3.22.0",
}));

export const firstMainVersion = defaultMainVersions.mainVersions[0].emrVersion;
export const thisClusterTypes = defaultMainVersions.mainVersions[0].clusterTypes;
variables:
  default:
    Fn::Invoke:
      Function: alicloud:emr:getMainVersions
      Arguments:
        clusterTypes:
          - HADOOP
          - ZOOKEEPER
        emrVersion: EMR-3.22.0
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
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
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
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
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
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

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
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.