Alibaba Cloud
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:
- 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
- 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
- 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
- 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
- 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
- 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
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
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.