Alibaba Cloud

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

getDiskTypes

The alicloud.emr.getDiskTypes data source provides a collection of data disk and system disk types available in Alibaba Cloud account when create a emr cluster.

NOTE: Available in 1.60.0+

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = Output.Create(AliCloud.Emr.GetDiskTypes.InvokeAsync(new AliCloud.Emr.GetDiskTypesArgs
        {
            ClusterType = "HADOOP",
            DestinationResource = "DataDisk",
            InstanceChargeType = "PostPaid",
            InstanceType = "ecs.g5.xlarge",
            ZoneId = "cn-huhehaote-a",
        }));
        this.DataDiskType = @default.Apply(@default => @default.Types?[0]?.Value);
    }

    [Output("dataDiskType")]
    public Output<string> DataDiskType { 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.GetDiskTypes(ctx, &emr.GetDiskTypesArgs{
			ClusterType:         "HADOOP",
			DestinationResource: "DataDisk",
			InstanceChargeType:  "PostPaid",
			InstanceType:        "ecs.g5.xlarge",
			ZoneId:              pulumi.StringRef("cn-huhehaote-a"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("dataDiskType", _default.Types[0].Value)
		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.GetDiskTypesArgs;
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.getDiskTypes(GetDiskTypesArgs.builder()
            .clusterType("HADOOP")
            .destinationResource("DataDisk")
            .instanceChargeType("PostPaid")
            .instanceType("ecs.g5.xlarge")
            .zoneId("cn-huhehaote-a")
            .build());

        ctx.export("dataDiskType", default_.types()[0].value());
    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.emr.get_disk_types(cluster_type="HADOOP",
    destination_resource="DataDisk",
    instance_charge_type="PostPaid",
    instance_type="ecs.g5.xlarge",
    zone_id="cn-huhehaote-a")
pulumi.export("dataDiskType", default.types[0].value)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultDiskTypes = pulumi.output(alicloud.emr.getDiskTypes({
    clusterType: "HADOOP",
    destinationResource: "DataDisk",
    instanceChargeType: "PostPaid",
    instanceType: "ecs.g5.xlarge",
    zoneId: "cn-huhehaote-a",
}));

export const dataDiskType = defaultDiskTypes.types[0].value;
variables:
  default:
    Fn::Invoke:
      Function: alicloud:emr:getDiskTypes
      Arguments:
        clusterType: HADOOP
        destinationResource: DataDisk
        instanceChargeType: PostPaid
        instanceType: ecs.g5.xlarge
        zoneId: cn-huhehaote-a
outputs:
  dataDiskType: ${default.types[0].value}

Using getDiskTypes

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 getDiskTypes(args: GetDiskTypesArgs, opts?: InvokeOptions): Promise<GetDiskTypesResult>
function getDiskTypesOutput(args: GetDiskTypesOutputArgs, opts?: InvokeOptions): Output<GetDiskTypesResult>
def get_disk_types(cluster_type: Optional[str] = None,
                   destination_resource: Optional[str] = None,
                   instance_charge_type: Optional[str] = None,
                   instance_type: Optional[str] = None,
                   output_file: Optional[str] = None,
                   zone_id: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetDiskTypesResult
def get_disk_types_output(cluster_type: Optional[pulumi.Input[str]] = None,
                   destination_resource: Optional[pulumi.Input[str]] = None,
                   instance_charge_type: Optional[pulumi.Input[str]] = None,
                   instance_type: Optional[pulumi.Input[str]] = None,
                   output_file: Optional[pulumi.Input[str]] = None,
                   zone_id: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetDiskTypesResult]
func GetDiskTypes(ctx *Context, args *GetDiskTypesArgs, opts ...InvokeOption) (*GetDiskTypesResult, error)
func GetDiskTypesOutput(ctx *Context, args *GetDiskTypesOutputArgs, opts ...InvokeOption) GetDiskTypesResultOutput

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

public static class GetDiskTypes 
{
    public static Task<GetDiskTypesResult> InvokeAsync(GetDiskTypesArgs args, InvokeOptions? opts = null)
    public static Output<GetDiskTypesResult> Invoke(GetDiskTypesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDiskTypesResult> getDiskTypes(GetDiskTypesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: alicloud:emr/getDiskTypes:getDiskTypes
  Arguments:
    # Arguments dictionary

The following arguments are supported:

ClusterType string

The cluster type of the emr cluster instance. Possible values: HADOOP, KAFKA, ZOOKEEPER, DRUID.

DestinationResource string

The destination resource of emr cluster instance

InstanceChargeType string

Filter the results by charge type. Valid values: PrePaid and PostPaid. Default to PostPaid.

InstanceType string

The ecs instance type of create emr cluster instance.

OutputFile string
ZoneId string

The Zone to create emr cluster instance.

ClusterType string

The cluster type of the emr cluster instance. Possible values: HADOOP, KAFKA, ZOOKEEPER, DRUID.

DestinationResource string

The destination resource of emr cluster instance

InstanceChargeType string

Filter the results by charge type. Valid values: PrePaid and PostPaid. Default to PostPaid.

InstanceType string

The ecs instance type of create emr cluster instance.

OutputFile string
ZoneId string

The Zone to create emr cluster instance.

clusterType String

The cluster type of the emr cluster instance. Possible values: HADOOP, KAFKA, ZOOKEEPER, DRUID.

destinationResource String

The destination resource of emr cluster instance

instanceChargeType String

Filter the results by charge type. Valid values: PrePaid and PostPaid. Default to PostPaid.

instanceType String

The ecs instance type of create emr cluster instance.

outputFile String
zoneId String

The Zone to create emr cluster instance.

clusterType string

The cluster type of the emr cluster instance. Possible values: HADOOP, KAFKA, ZOOKEEPER, DRUID.

destinationResource string

The destination resource of emr cluster instance

instanceChargeType string

Filter the results by charge type. Valid values: PrePaid and PostPaid. Default to PostPaid.

instanceType string

The ecs instance type of create emr cluster instance.

outputFile string
zoneId string

The Zone to create emr cluster instance.

cluster_type str

The cluster type of the emr cluster instance. Possible values: HADOOP, KAFKA, ZOOKEEPER, DRUID.

destination_resource str

The destination resource of emr cluster instance

instance_charge_type str

Filter the results by charge type. Valid values: PrePaid and PostPaid. Default to PostPaid.

instance_type str

The ecs instance type of create emr cluster instance.

output_file str
zone_id str

The Zone to create emr cluster instance.

clusterType String

The cluster type of the emr cluster instance. Possible values: HADOOP, KAFKA, ZOOKEEPER, DRUID.

destinationResource String

The destination resource of emr cluster instance

instanceChargeType String

Filter the results by charge type. Valid values: PrePaid and PostPaid. Default to PostPaid.

instanceType String

The ecs instance type of create emr cluster instance.

outputFile String
zoneId String

The Zone to create emr cluster instance.

getDiskTypes Result

The following output properties are available:

ClusterType string
DestinationResource string
Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

A list of data disk and system disk type IDs.

InstanceChargeType string
InstanceType string
Types List<Pulumi.AliCloud.Emr.Outputs.GetDiskTypesType>

A list of emr instance types. Each element contains the following attributes:

OutputFile string
ZoneId string
ClusterType string
DestinationResource string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of data disk and system disk type IDs.

InstanceChargeType string
InstanceType string
Types []GetDiskTypesType

A list of emr instance types. Each element contains the following attributes:

OutputFile string
ZoneId string
clusterType String
destinationResource String
id String

The provider-assigned unique ID for this managed resource.

ids List<String>

A list of data disk and system disk type IDs.

instanceChargeType String
instanceType String
types List<GetDiskTypesType>

A list of emr instance types. Each element contains the following attributes:

outputFile String
zoneId String
clusterType string
destinationResource string
id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of data disk and system disk type IDs.

instanceChargeType string
instanceType string
types GetDiskTypesType[]

A list of emr instance types. Each element contains the following attributes:

outputFile string
zoneId string
cluster_type str
destination_resource str
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]

A list of data disk and system disk type IDs.

instance_charge_type str
instance_type str
types Sequence[GetDiskTypesType]

A list of emr instance types. Each element contains the following attributes:

output_file str
zone_id str
clusterType String
destinationResource String
id String

The provider-assigned unique ID for this managed resource.

ids List<String>

A list of data disk and system disk type IDs.

instanceChargeType String
instanceType String
types List<Property Map>

A list of emr instance types. Each element contains the following attributes:

outputFile String
zoneId String

Supporting Types

GetDiskTypesType

Max int

The maximum value of the data disk to supported the specific instance type

Min int

The mininum value of the data disk to supported the specific instance type

Value string

The value of the data disk or system disk

Max int

The maximum value of the data disk to supported the specific instance type

Min int

The mininum value of the data disk to supported the specific instance type

Value string

The value of the data disk or system disk

max Integer

The maximum value of the data disk to supported the specific instance type

min Integer

The mininum value of the data disk to supported the specific instance type

value String

The value of the data disk or system disk

max number

The maximum value of the data disk to supported the specific instance type

min number

The mininum value of the data disk to supported the specific instance type

value string

The value of the data disk or system disk

max int

The maximum value of the data disk to supported the specific instance type

min int

The mininum value of the data disk to supported the specific instance type

value str

The value of the data disk or system disk

max Number

The maximum value of the data disk to supported the specific instance type

min Number

The mininum value of the data disk to supported the specific instance type

value String

The value of the data disk or system disk

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.