1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. emr
  5. getDiskTypes
Alibaba Cloud v3.59.0 published on Friday, Jul 12, 2024 by Pulumi

alicloud.emr.getDiskTypes

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.59.0 published on Friday, Jul 12, 2024 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);
    
    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)
    
    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
    	})
    }
    
    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)),
        };
    });
    
    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());
        }
    }
    
    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}
    

    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
    File name where to save data source results (after running pulumi preview).
    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
    File name where to save data source results (after running pulumi preview).
    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
    File name where to save data source results (after running pulumi preview).
    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
    File name where to save data source results (after running pulumi preview).
    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
    File name where to save data source results (after running pulumi preview).
    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
    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 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
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.59.0 published on Friday, Jul 12, 2024 by Pulumi