1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. emr
  5. getDiskTypes
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.emr.getDiskTypes

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

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

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const _default = alicloud.emr.getDiskTypes({
    destinationResource: "DataDisk",
    instanceChargeType: "PostPaid",
    clusterType: "HADOOP",
    instanceType: "ecs.g5.xlarge",
    zoneId: "cn-huhehaote-a",
});
export const dataDiskType = _default.then(_default => _default.types?.[0]?.value);
Copy
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.emr.get_disk_types(destination_resource="DataDisk",
    instance_charge_type="PostPaid",
    cluster_type="HADOOP",
    instance_type="ecs.g5.xlarge",
    zone_id="cn-huhehaote-a")
pulumi.export("dataDiskType", default.types[0].value)
Copy
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{
			DestinationResource: "DataDisk",
			InstanceChargeType:  "PostPaid",
			ClusterType:         "HADOOP",
			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
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var @default = AliCloud.Emr.GetDiskTypes.Invoke(new()
    {
        DestinationResource = "DataDisk",
        InstanceChargeType = "PostPaid",
        ClusterType = "HADOOP",
        InstanceType = "ecs.g5.xlarge",
        ZoneId = "cn-huhehaote-a",
    });

    return new Dictionary<string, object?>
    {
        ["dataDiskType"] = @default.Apply(@default => @default.Apply(getDiskTypesResult => getDiskTypesResult.Types[0]?.Value)),
    };
});
Copy
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()
            .destinationResource("DataDisk")
            .instanceChargeType("PostPaid")
            .clusterType("HADOOP")
            .instanceType("ecs.g5.xlarge")
            .zoneId("cn-huhehaote-a")
            .build());

        ctx.export("dataDiskType", default_.types()[0].value());
    }
}
Copy
variables:
  default:
    fn::invoke:
      function: alicloud:emr:getDiskTypes
      arguments:
        destinationResource: DataDisk
        instanceChargeType: PostPaid
        clusterType: HADOOP
        instanceType: ecs.g5.xlarge
        zoneId: cn-huhehaote-a
outputs:
  dataDiskType: ${default.types[0].value}
Copy

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>
Copy
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]
Copy
func GetDiskTypes(ctx *Context, args *GetDiskTypesArgs, opts ...InvokeOption) (*GetDiskTypesResult, error)
func GetDiskTypesOutput(ctx *Context, args *GetDiskTypesOutputArgs, opts ...InvokeOption) GetDiskTypesResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetDiskTypesResult> getDiskTypes(GetDiskTypesArgs args, InvokeOptions options)
public static Output<GetDiskTypesResult> getDiskTypes(GetDiskTypesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:emr/getDiskTypes:getDiskTypes
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ClusterType This property is required. string
The cluster type of the emr cluster instance. Possible values: HADOOP, KAFKA, ZOOKEEPER, DRUID.
DestinationResource This property is required. string
The destination resource of emr cluster instance
InstanceChargeType This property is required. string
Filter the results by charge type. Valid values: PrePaid and PostPaid. Default to PostPaid.
InstanceType This property is required. string
The ecs instance type of create emr cluster instance.
OutputFile string
File name where to save data source results (after running pulumi preview).
ZoneId string
The Zone to create emr cluster instance.
ClusterType This property is required. string
The cluster type of the emr cluster instance. Possible values: HADOOP, KAFKA, ZOOKEEPER, DRUID.
DestinationResource This property is required. string
The destination resource of emr cluster instance
InstanceChargeType This property is required. string
Filter the results by charge type. Valid values: PrePaid and PostPaid. Default to PostPaid.
InstanceType This property is required. string
The ecs instance type of create emr cluster instance.
OutputFile string
File name where to save data source results (after running pulumi preview).
ZoneId string
The Zone to create emr cluster instance.
clusterType This property is required. String
The cluster type of the emr cluster instance. Possible values: HADOOP, KAFKA, ZOOKEEPER, DRUID.
destinationResource This property is required. String
The destination resource of emr cluster instance
instanceChargeType This property is required. String
Filter the results by charge type. Valid values: PrePaid and PostPaid. Default to PostPaid.
instanceType This property is required. String
The ecs instance type of create emr cluster instance.
outputFile String
File name where to save data source results (after running pulumi preview).
zoneId String
The Zone to create emr cluster instance.
clusterType This property is required. string
The cluster type of the emr cluster instance. Possible values: HADOOP, KAFKA, ZOOKEEPER, DRUID.
destinationResource This property is required. string
The destination resource of emr cluster instance
instanceChargeType This property is required. string
Filter the results by charge type. Valid values: PrePaid and PostPaid. Default to PostPaid.
instanceType This property is required. string
The ecs instance type of create emr cluster instance.
outputFile string
File name where to save data source results (after running pulumi preview).
zoneId string
The Zone to create emr cluster instance.
cluster_type This property is required. str
The cluster type of the emr cluster instance. Possible values: HADOOP, KAFKA, ZOOKEEPER, DRUID.
destination_resource This property is required. str
The destination resource of emr cluster instance
instance_charge_type This property is required. str
Filter the results by charge type. Valid values: PrePaid and PostPaid. Default to PostPaid.
instance_type This property is required. str
The ecs instance type of create emr cluster instance.
output_file str
File name where to save data source results (after running pulumi preview).
zone_id str
The Zone to create emr cluster instance.
clusterType This property is required. String
The cluster type of the emr cluster instance. Possible values: HADOOP, KAFKA, ZOOKEEPER, DRUID.
destinationResource This property is required. String
The destination resource of emr cluster instance
instanceChargeType This property is required. String
Filter the results by charge type. Valid values: PrePaid and PostPaid. Default to PostPaid.
instanceType This property is required. String
The ecs instance type of create emr cluster instance.
outputFile String
File name where to save data source results (after running pulumi preview).
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 This property is required. int
The maximum value of the data disk to supported the specific instance type
Min This property is required. int
The mininum value of the data disk to supported the specific instance type
Value This property is required. string
The value of the data disk or system disk
Max This property is required. int
The maximum value of the data disk to supported the specific instance type
Min This property is required. int
The mininum value of the data disk to supported the specific instance type
Value This property is required. string
The value of the data disk or system disk
max This property is required. Integer
The maximum value of the data disk to supported the specific instance type
min This property is required. Integer
The mininum value of the data disk to supported the specific instance type
value This property is required. String
The value of the data disk or system disk
max This property is required. number
The maximum value of the data disk to supported the specific instance type
min This property is required. number
The mininum value of the data disk to supported the specific instance type
value This property is required. string
The value of the data disk or system disk
max This property is required. int
The maximum value of the data disk to supported the specific instance type
min This property is required. int
The mininum value of the data disk to supported the specific instance type
value This property is required. str
The value of the data disk or system disk
max This property is required. Number
The maximum value of the data disk to supported the specific instance type
min This property is required. Number
The mininum value of the data disk to supported the specific instance type
value This property is required. String
The value of the data disk or system disk

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi