1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. emr
  5. getInstanceTypes
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.emr.getInstanceTypes

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    The alicloud.emr.getInstanceTypes data source provides a collection of ecs instance types available in Alibaba Cloud account when create a emr cluster.

    NOTE: Available in 1.59.0+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const default = alicloud.emr.getInstanceTypes({
        clusterType: "HADOOP",
        destinationResource: "InstanceType",
        instanceChargeType: "PostPaid",
        instanceType: "ecs.g5.2xlarge",
        supportLocalStorage: false,
        supportNodeTypes: [
            "MASTER",
            "CORE",
        ],
    });
    export const firstInstanceType = _default.then(_default => _default.types?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.emr.get_instance_types(cluster_type="HADOOP",
        destination_resource="InstanceType",
        instance_charge_type="PostPaid",
        instance_type="ecs.g5.2xlarge",
        support_local_storage=False,
        support_node_types=[
            "MASTER",
            "CORE",
        ])
    pulumi.export("firstInstanceType", default.types[0].id)
    
    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.GetInstanceTypes(ctx, &emr.GetInstanceTypesArgs{
    			ClusterType:         "HADOOP",
    			DestinationResource: "InstanceType",
    			InstanceChargeType:  "PostPaid",
    			InstanceType:        pulumi.StringRef("ecs.g5.2xlarge"),
    			SupportLocalStorage: pulumi.BoolRef(false),
    			SupportNodeTypes: []string{
    				"MASTER",
    				"CORE",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstInstanceType", _default.Types[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = AliCloud.Emr.GetInstanceTypes.Invoke(new()
        {
            ClusterType = "HADOOP",
            DestinationResource = "InstanceType",
            InstanceChargeType = "PostPaid",
            InstanceType = "ecs.g5.2xlarge",
            SupportLocalStorage = false,
            SupportNodeTypes = new[]
            {
                "MASTER",
                "CORE",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["firstInstanceType"] = @default.Apply(@default => @default.Apply(getInstanceTypesResult => getInstanceTypesResult.Types[0]?.Id)),
        };
    });
    
    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.GetInstanceTypesArgs;
    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.getInstanceTypes(GetInstanceTypesArgs.builder()
                .clusterType("HADOOP")
                .destinationResource("InstanceType")
                .instanceChargeType("PostPaid")
                .instanceType("ecs.g5.2xlarge")
                .supportLocalStorage(false)
                .supportNodeTypes(            
                    "MASTER",
                    "CORE")
                .build());
    
            ctx.export("firstInstanceType", default_.types()[0].id());
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: alicloud:emr:getInstanceTypes
          Arguments:
            clusterType: HADOOP
            destinationResource: InstanceType
            instanceChargeType: PostPaid
            instanceType: ecs.g5.2xlarge
            supportLocalStorage: false
            supportNodeTypes:
              - MASTER
              - CORE
    outputs:
      firstInstanceType: ${default.types[0].id}
    

    Using getInstanceTypes

    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 getInstanceTypes(args: GetInstanceTypesArgs, opts?: InvokeOptions): Promise<GetInstanceTypesResult>
    function getInstanceTypesOutput(args: GetInstanceTypesOutputArgs, opts?: InvokeOptions): Output<GetInstanceTypesResult>
    def get_instance_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,
                           support_local_storage: Optional[bool] = None,
                           support_node_types: Optional[Sequence[str]] = None,
                           zone_id: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetInstanceTypesResult
    def get_instance_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,
                           support_local_storage: Optional[pulumi.Input[bool]] = None,
                           support_node_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                           zone_id: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetInstanceTypesResult]
    func GetInstanceTypes(ctx *Context, args *GetInstanceTypesArgs, opts ...InvokeOption) (*GetInstanceTypesResult, error)
    func GetInstanceTypesOutput(ctx *Context, args *GetInstanceTypesOutputArgs, opts ...InvokeOption) GetInstanceTypesResultOutput

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

    public static class GetInstanceTypes 
    {
        public static Task<GetInstanceTypesResult> InvokeAsync(GetInstanceTypesArgs args, InvokeOptions? opts = null)
        public static Output<GetInstanceTypesResult> Invoke(GetInstanceTypesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetInstanceTypesResult> getInstanceTypes(GetInstanceTypesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:emr/getInstanceTypes:getInstanceTypes
      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
    Filter the specific ecs instance type to create emr cluster.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    SupportLocalStorage bool
    Whether the current storage disk is local or not.
    SupportNodeTypes List<string>
    The specific supported node type list. Possible values may be any one or combination of these: ["MASTER", "CORE", "TASK", "GATEWAY"]
    ZoneId string
    The supported resources of specific zoneId.
    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
    Filter the specific ecs instance type to create emr cluster.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    SupportLocalStorage bool
    Whether the current storage disk is local or not.
    SupportNodeTypes []string
    The specific supported node type list. Possible values may be any one or combination of these: ["MASTER", "CORE", "TASK", "GATEWAY"]
    ZoneId string
    The supported resources of specific zoneId.
    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
    Filter the specific ecs instance type to create emr cluster.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    supportLocalStorage Boolean
    Whether the current storage disk is local or not.
    supportNodeTypes List<String>
    The specific supported node type list. Possible values may be any one or combination of these: ["MASTER", "CORE", "TASK", "GATEWAY"]
    zoneId String
    The supported resources of specific zoneId.
    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
    Filter the specific ecs instance type to create emr cluster.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    supportLocalStorage boolean
    Whether the current storage disk is local or not.
    supportNodeTypes string[]
    The specific supported node type list. Possible values may be any one or combination of these: ["MASTER", "CORE", "TASK", "GATEWAY"]
    zoneId string
    The supported resources of specific zoneId.
    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
    Filter the specific ecs instance type to create emr cluster.
    output_file str
    File name where to save data source results (after running pulumi preview).
    support_local_storage bool
    Whether the current storage disk is local or not.
    support_node_types Sequence[str]
    The specific supported node type list. Possible values may be any one or combination of these: ["MASTER", "CORE", "TASK", "GATEWAY"]
    zone_id str
    The supported resources of specific zoneId.
    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
    Filter the specific ecs instance type to create emr cluster.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    supportLocalStorage Boolean
    Whether the current storage disk is local or not.
    supportNodeTypes List<String>
    The specific supported node type list. Possible values may be any one or combination of these: ["MASTER", "CORE", "TASK", "GATEWAY"]
    zoneId String
    The supported resources of specific zoneId.

    getInstanceTypes 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 emr instance types IDs.
    InstanceChargeType string
    Types List<Pulumi.AliCloud.Emr.Outputs.GetInstanceTypesType>
    A list of emr instance types. Each element contains the following attributes:
    InstanceType string
    OutputFile string
    SupportLocalStorage bool
    SupportNodeTypes List<string>
    ZoneId string
    The available zone id in Alibaba Cloud account
    ClusterType string
    DestinationResource string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of emr instance types IDs.
    InstanceChargeType string
    Types []GetInstanceTypesType
    A list of emr instance types. Each element contains the following attributes:
    InstanceType string
    OutputFile string
    SupportLocalStorage bool
    SupportNodeTypes []string
    ZoneId string
    The available zone id in Alibaba Cloud account
    clusterType String
    destinationResource String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of emr instance types IDs.
    instanceChargeType String
    types List<GetInstanceTypesType>
    A list of emr instance types. Each element contains the following attributes:
    instanceType String
    outputFile String
    supportLocalStorage Boolean
    supportNodeTypes List<String>
    zoneId String
    The available zone id in Alibaba Cloud account
    clusterType string
    destinationResource string
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of emr instance types IDs.
    instanceChargeType string
    types GetInstanceTypesType[]
    A list of emr instance types. Each element contains the following attributes:
    instanceType string
    outputFile string
    supportLocalStorage boolean
    supportNodeTypes string[]
    zoneId string
    The available zone id in Alibaba Cloud account
    cluster_type str
    destination_resource str
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of emr instance types IDs.
    instance_charge_type str
    types Sequence[GetInstanceTypesType]
    A list of emr instance types. Each element contains the following attributes:
    instance_type str
    output_file str
    support_local_storage bool
    support_node_types Sequence[str]
    zone_id str
    The available zone id in Alibaba Cloud account
    clusterType String
    destinationResource String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of emr instance types IDs.
    instanceChargeType String
    types List<Property Map>
    A list of emr instance types. Each element contains the following attributes:
    instanceType String
    outputFile String
    supportLocalStorage Boolean
    supportNodeTypes List<String>
    zoneId String
    The available zone id in Alibaba Cloud account

    Supporting Types

    GetInstanceTypesType

    Id string
    The ID of the instance type.
    LocalStorageCapacity int
    Local capacity of the applied ecs instance for emr cluster. Unit: GB.
    ZoneId string
    The supported resources of specific zoneId.
    Id string
    The ID of the instance type.
    LocalStorageCapacity int
    Local capacity of the applied ecs instance for emr cluster. Unit: GB.
    ZoneId string
    The supported resources of specific zoneId.
    id String
    The ID of the instance type.
    localStorageCapacity Integer
    Local capacity of the applied ecs instance for emr cluster. Unit: GB.
    zoneId String
    The supported resources of specific zoneId.
    id string
    The ID of the instance type.
    localStorageCapacity number
    Local capacity of the applied ecs instance for emr cluster. Unit: GB.
    zoneId string
    The supported resources of specific zoneId.
    id str
    The ID of the instance type.
    local_storage_capacity int
    Local capacity of the applied ecs instance for emr cluster. Unit: GB.
    zone_id str
    The supported resources of specific zoneId.
    id String
    The ID of the instance type.
    localStorageCapacity Number
    Local capacity of the applied ecs instance for emr cluster. Unit: GB.
    zoneId String
    The supported resources of specific zoneId.

    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.53.0 published on Wednesday, Apr 17, 2024 by Pulumi