Module emr

This page documents the language specification for the alicloud package. If you're looking for help working with the inputs, outputs, or functions of alicloud resources in a Pulumi program, please see the resource documentation for examples and API reference.

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-alicloud repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-alicloud repo.

Resources

Functions

Others

Resources

Resource Cluster

class Cluster extends CustomResource

Provides a EMR Cluster resource. With this you can create, read, and release EMR Cluster.

NOTE: Available in 1.57.0+.

Example Usage

1. Create A Cluster
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultMainVersions = alicloud.emr.getMainVersions({});
const defaultInstanceTypes = defaultMainVersions.then(defaultMainVersions => alicloud.emr.getInstanceTypes({
    destinationResource: "InstanceType",
    clusterType: defaultMainVersions.mainVersions[0].clusterTypes[0],
    supportLocalStorage: false,
    instanceChargeType: "PostPaid",
    supportNodeTypes: [
        "MASTER",
        "CORE",
        "TASK",
    ],
}));
const dataDisk = Promise.all([defaultMainVersions, defaultInstanceTypes, defaultInstanceTypes]).then(([defaultMainVersions, defaultInstanceTypes, defaultInstanceTypes1]) => alicloud.emr.getDiskTypes({
    destinationResource: "DataDisk",
    clusterType: defaultMainVersions.mainVersions[0].clusterTypes[0],
    instanceChargeType: "PostPaid",
    instanceType: defaultInstanceTypes.types[0].id,
    zoneId: defaultInstanceTypes1.types[0].zoneId,
}));
const systemDisk = Promise.all([defaultMainVersions, defaultInstanceTypes, defaultInstanceTypes]).then(([defaultMainVersions, defaultInstanceTypes, defaultInstanceTypes1]) => alicloud.emr.getDiskTypes({
    destinationResource: "SystemDisk",
    clusterType: defaultMainVersions.mainVersions[0].clusterTypes[0],
    instanceChargeType: "PostPaid",
    instanceType: defaultInstanceTypes.types[0].id,
    zoneId: defaultInstanceTypes1.types[0].zoneId,
}));
const vpc: alicloud.vpc.Network[];
for (const range = {value: 0}; range.value < (_var.vpc_id == "" ? 1 : 0 == true); range.value++) {
    vpc.push(new alicloud.vpc.Network(`vpc-${range.value}`, {cidrBlock: _var.vpc_cidr}));
}
const defaultSecurityGroup: alicloud.ecs.SecurityGroup[];
for (const range = {value: 0}; range.value < (_var.security_group_id == "" ? 1 : 0 == true); range.value++) {
    defaultSecurityGroup.push(new alicloud.ecs.SecurityGroup(`defaultSecurityGroup-${range.value}`, {vpcId: _var.vpc_id == "" ? vpc.id : _var.vpc_id}));
}
// VSwitch Resource for Module
const vswitch: alicloud.vpc.Switch[];
for (const range = {value: 0}; range.value < (_var.vswitch_id == "" ? 1 : 0 == true); range.value++) {
    vswitch.push(new alicloud.vpc.Switch(`vswitch-${range.value}`, {
        availabilityZone: _var.availability_zone == "" ? defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.types[0].zoneId) : _var.availability_zone,
        cidrBlock: _var.vswitch_cidr,
        vpcId: _var.vpc_id == "" ? vpc.id : _var.vpc_id,
    }));
}
// Ram role Resource for Module
const defaultRole = new alicloud.ram.Role("defaultRole", {
    document: `    {
        "Statement": [
        {
            "Action": "sts:AssumeRole",
            "Effect": "Allow",
            "Principal": {
            "Service": [
                "emr.aliyuncs.com",
                "ecs.aliyuncs.com"
            ]
            }
        }
        ],
        "Version": "1"
    }
`,
    description: "this is a role test.",
    force: true,
});
const defaultCluster = new alicloud.emr.Cluster("defaultCluster", {
    emrVer: defaultMainVersions.then(defaultMainVersions => defaultMainVersions.mainVersions[0].emrVersion),
    clusterType: defaultMainVersions.then(defaultMainVersions => defaultMainVersions.mainVersions[0].clusterTypes[0]),
    host_group: [
        {
            hostGroupName: "masterGroup",
            hostGroupType: "MASTER",
            nodeCount: "2",
            instanceType: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.types[0].id),
            diskType: dataDisk.then(dataDisk => dataDisk.types[0].value),
            diskCapacity: Promise.all([dataDisk, dataDisk]).then(([dataDisk, dataDisk1]) => dataDisk.types[0].min > 160 ? dataDisk1.types[0].min : 160),
            diskCount: "1",
            sysDiskType: systemDisk.then(systemDisk => systemDisk.types[0].value),
            sysDiskCapacity: Promise.all([systemDisk, systemDisk]).then(([systemDisk, systemDisk1]) => systemDisk.types[0].min > 160 ? systemDisk1.types[0].min : 160),
        },
        {
            hostGroupName: "coreGroup",
            hostGroupType: "CORE",
            nodeCount: "3",
            instanceType: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.types[0].id),
            diskType: dataDisk.then(dataDisk => dataDisk.types[0].value),
            diskCapacity: Promise.all([dataDisk, dataDisk]).then(([dataDisk, dataDisk1]) => dataDisk.types[0].min > 160 ? dataDisk1.types[0].min : 160),
            diskCount: "4",
            sysDiskType: systemDisk.then(systemDisk => systemDisk.types[0].value),
            sysDiskCapacity: Promise.all([systemDisk, systemDisk]).then(([systemDisk, systemDisk1]) => systemDisk.types[0].min > 160 ? systemDisk1.types[0].min : 160),
        },
        {
            hostGroupName: "taskGroup",
            hostGroupType: "TASK",
            nodeCount: "2",
            instanceType: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.types[0].id),
            diskType: dataDisk.then(dataDisk => dataDisk.types[0].value),
            diskCapacity: Promise.all([dataDisk, dataDisk]).then(([dataDisk, dataDisk1]) => dataDisk.types[0].min > 160 ? dataDisk1.types[0].min : 160),
            diskCount: "4",
            sysDiskType: systemDisk.then(systemDisk => systemDisk.types[0].value),
            sysDiskCapacity: Promise.all([systemDisk, systemDisk]).then(([systemDisk, systemDisk1]) => systemDisk.types[0].min > 160 ? systemDisk1.types[0].min : 160),
        },
    ],
    highAvailabilityEnable: true,
    zoneId: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.types[0].zoneId),
    securityGroupId: _var.security_group_id == "" ? defaultSecurityGroup.id : _var.security_group_id,
    isOpenPublicIp: true,
    chargeType: "PostPaid",
    vswitchId: _var.vswitch_id == "" ? vswitch.id : _var.vswitch_id,
    userDefinedEmrEcsRole: defaultRole.name,
    sshEnable: true,
    masterPwd: "ABCtest1234!",
});
2. Scale Up
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultMainVersions = alicloud.emr.getMainVersions({});
const defaultInstanceTypes = defaultMainVersions.then(defaultMainVersions => alicloud.emr.getInstanceTypes({
    destinationResource: "InstanceType",
    clusterType: defaultMainVersions.mainVersions[0].clusterTypes[0],
    supportLocalStorage: false,
    instanceChargeType: "PostPaid",
    supportNodeTypes: [
        "MASTER",
        "CORE",
        "TASK",
    ],
}));
const dataDisk = Promise.all([defaultMainVersions, defaultInstanceTypes, defaultInstanceTypes]).then(([defaultMainVersions, defaultInstanceTypes, defaultInstanceTypes1]) => alicloud.emr.getDiskTypes({
    destinationResource: "DataDisk",
    clusterType: defaultMainVersions.mainVersions[0].clusterTypes[0],
    instanceChargeType: "PostPaid",
    instanceType: defaultInstanceTypes.types[0].id,
    zoneId: defaultInstanceTypes1.types[0].zoneId,
}));
const systemDisk = Promise.all([defaultMainVersions, defaultInstanceTypes, defaultInstanceTypes]).then(([defaultMainVersions, defaultInstanceTypes, defaultInstanceTypes1]) => alicloud.emr.getDiskTypes({
    destinationResource: "SystemDisk",
    clusterType: defaultMainVersions.mainVersions[0].clusterTypes[0],
    instanceChargeType: "PostPaid",
    instanceType: defaultInstanceTypes.types[0].id,
    zoneId: defaultInstanceTypes1.types[0].zoneId,
}));
const vpc: alicloud.vpc.Network[];
for (const range = {value: 0}; range.value < (_var.vpc_id == "" ? 1 : 0 == true); range.value++) {
    vpc.push(new alicloud.vpc.Network(`vpc-${range.value}`, {cidrBlock: _var.vpc_cidr}));
}
const defaultSecurityGroup: alicloud.ecs.SecurityGroup[];
for (const range = {value: 0}; range.value < (_var.security_group_id == "" ? 1 : 0 == true); range.value++) {
    defaultSecurityGroup.push(new alicloud.ecs.SecurityGroup(`defaultSecurityGroup-${range.value}`, {vpcId: _var.vpc_id == "" ? vpc.id : _var.vpc_id}));
}
// VSwitch Resource for Module
const vswitch: alicloud.vpc.Switch[];
for (const range = {value: 0}; range.value < (_var.vswitch_id == "" ? 1 : 0 == true); range.value++) {
    vswitch.push(new alicloud.vpc.Switch(`vswitch-${range.value}`, {
        availabilityZone: _var.availability_zone == "" ? defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.types[0].zoneId) : _var.availability_zone,
        cidrBlock: _var.vswitch_cidr,
        vpcId: _var.vpc_id == "" ? vpc.id : _var.vpc_id,
    }));
}
// Ram role Resource for Module
const defaultRole = new alicloud.ram.Role("defaultRole", {
    document: `    {
        "Statement": [
        {
            "Action": "sts:AssumeRole",
            "Effect": "Allow",
            "Principal": {
            "Service": [
                "emr.aliyuncs.com",
                "ecs.aliyuncs.com"
            ]
            }
        }
        ],
        "Version": "1"
    }
`,
    description: "this is a role test.",
    force: true,
});
const defaultCluster = new alicloud.emr.Cluster("defaultCluster", {
    emrVer: defaultMainVersions.then(defaultMainVersions => defaultMainVersions.mainVersions[0].emrVersion),
    clusterType: defaultMainVersions.then(defaultMainVersions => defaultMainVersions.mainVersions[0].clusterTypes[0]),
    host_group: [
        {
            hostGroupName: "masterGroup",
            hostGroupType: "MASTER",
            nodeCount: "2",
            instanceType: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.types[0].id),
            diskType: dataDisk.then(dataDisk => dataDisk.types[0].value),
            diskCapacity: Promise.all([dataDisk, dataDisk]).then(([dataDisk, dataDisk1]) => dataDisk.types[0].min > 160 ? dataDisk1.types[0].min : 160),
            diskCount: "1",
            sysDiskType: systemDisk.then(systemDisk => systemDisk.types[0].value),
            sysDiskCapacity: Promise.all([systemDisk, systemDisk]).then(([systemDisk, systemDisk1]) => systemDisk.types[0].min > 160 ? systemDisk1.types[0].min : 160),
        },
        {
            hostGroupName: "coreGroup",
            hostGroupType: "CORE",
            nodeCount: "2",
            instanceType: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.types[0].id),
            diskType: dataDisk.then(dataDisk => dataDisk.types[0].value),
            diskCapacity: Promise.all([dataDisk, dataDisk]).then(([dataDisk, dataDisk1]) => dataDisk.types[0].min > 160 ? dataDisk1.types[0].min : 160),
            diskCount: "4",
            sysDiskType: systemDisk.then(systemDisk => systemDisk.types[0].value),
            sysDiskCapacity: Promise.all([systemDisk, systemDisk]).then(([systemDisk, systemDisk1]) => systemDisk.types[0].min > 160 ? systemDisk1.types[0].min : 160),
        },
        {
            hostGroupName: "taskGroup",
            hostGroupType: "TASK",
            nodeCount: "4",
            instanceType: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.types[0].id),
            diskType: dataDisk.then(dataDisk => dataDisk.types[0].value),
            diskCapacity: Promise.all([dataDisk, dataDisk]).then(([dataDisk, dataDisk1]) => dataDisk.types[0].min > 160 ? dataDisk1.types[0].min : 160),
            diskCount: "4",
            sysDiskType: systemDisk.then(systemDisk => systemDisk.types[0].value),
            sysDiskCapacity: Promise.all([systemDisk, systemDisk]).then(([systemDisk, systemDisk1]) => systemDisk.types[0].min > 160 ? systemDisk1.types[0].min : 160),
        },
    ],
    highAvailabilityEnable: true,
    zoneId: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.types[0].zoneId),
    securityGroupId: _var.security_group_id == "" ? defaultSecurityGroup.id : _var.security_group_id,
    isOpenPublicIp: true,
    chargeType: "PostPaid",
    vswitchId: _var.vswitch_id == "" ? vswitch.id : _var.vswitch_id,
    userDefinedEmrEcsRole: defaultRole.name,
    sshEnable: true,
    masterPwd: "ABCtest1234!",
});
3. Scale Down
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultMainVersions = alicloud.emr.getMainVersions({});
const defaultInstanceTypes = defaultMainVersions.then(defaultMainVersions => alicloud.emr.getInstanceTypes({
    destinationResource: "InstanceType",
    clusterType: defaultMainVersions.mainVersions[0].clusterTypes[0],
    supportLocalStorage: false,
    instanceChargeType: "PostPaid",
    supportNodeTypes: [
        "MASTER",
        "CORE",
        "TASK",
    ],
}));
const dataDisk = Promise.all([defaultMainVersions, defaultInstanceTypes, defaultInstanceTypes]).then(([defaultMainVersions, defaultInstanceTypes, defaultInstanceTypes1]) => alicloud.emr.getDiskTypes({
    destinationResource: "DataDisk",
    clusterType: defaultMainVersions.mainVersions[0].clusterTypes[0],
    instanceChargeType: "PostPaid",
    instanceType: defaultInstanceTypes.types[0].id,
    zoneId: defaultInstanceTypes1.types[0].zoneId,
}));
const systemDisk = Promise.all([defaultMainVersions, defaultInstanceTypes, defaultInstanceTypes]).then(([defaultMainVersions, defaultInstanceTypes, defaultInstanceTypes1]) => alicloud.emr.getDiskTypes({
    destinationResource: "SystemDisk",
    clusterType: defaultMainVersions.mainVersions[0].clusterTypes[0],
    instanceChargeType: "PostPaid",
    instanceType: defaultInstanceTypes.types[0].id,
    zoneId: defaultInstanceTypes1.types[0].zoneId,
}));
const vpc: alicloud.vpc.Network[];
for (const range = {value: 0}; range.value < (_var.vpc_id == "" ? 1 : 0 == true); range.value++) {
    vpc.push(new alicloud.vpc.Network(`vpc-${range.value}`, {cidrBlock: _var.vpc_cidr}));
}
const defaultSecurityGroup: alicloud.ecs.SecurityGroup[];
for (const range = {value: 0}; range.value < (_var.security_group_id == "" ? 1 : 0 == true); range.value++) {
    defaultSecurityGroup.push(new alicloud.ecs.SecurityGroup(`defaultSecurityGroup-${range.value}`, {vpcId: _var.vpc_id == "" ? vpc.id : _var.vpc_id}));
}
// VSwitch Resource for Module
const vswitch: alicloud.vpc.Switch[];
for (const range = {value: 0}; range.value < (_var.vswitch_id == "" ? 1 : 0 == true); range.value++) {
    vswitch.push(new alicloud.vpc.Switch(`vswitch-${range.value}`, {
        availabilityZone: _var.availability_zone == "" ? defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.types[0].zoneId) : _var.availability_zone,
        cidrBlock: _var.vswitch_cidr,
        vpcId: _var.vpc_id == "" ? vpc.id : _var.vpc_id,
    }));
}
// Ram role Resource for Module
const defaultRole = new alicloud.ram.Role("defaultRole", {
    document: `    {
        "Statement": [
        {
            "Action": "sts:AssumeRole",
            "Effect": "Allow",
            "Principal": {
            "Service": [
                "emr.aliyuncs.com",
                "ecs.aliyuncs.com"
            ]
            }
        }
        ],
        "Version": "1"
    }
`,
    description: "this is a role test.",
    force: true,
});
const defaultCluster = new alicloud.emr.Cluster("defaultCluster", {
    emrVer: defaultMainVersions.then(defaultMainVersions => defaultMainVersions.mainVersions[0].emrVersion),
    clusterType: defaultMainVersions.then(defaultMainVersions => defaultMainVersions.mainVersions[0].clusterTypes[0]),
    host_group: [
        {
            hostGroupName: "masterGroup",
            hostGroupType: "MASTER",
            nodeCount: "2",
            instanceType: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.types[0].id),
            diskType: dataDisk.then(dataDisk => dataDisk.types[0].value),
            diskCapacity: Promise.all([dataDisk, dataDisk]).then(([dataDisk, dataDisk1]) => dataDisk.types[0].min > 160 ? dataDisk1.types[0].min : 160),
            diskCount: "1",
            sysDiskType: systemDisk.then(systemDisk => systemDisk.types[0].value),
            sysDiskCapacity: Promise.all([systemDisk, systemDisk]).then(([systemDisk, systemDisk1]) => systemDisk.types[0].min > 160 ? systemDisk1.types[0].min : 160),
        },
        {
            hostGroupName: "coreGroup",
            hostGroupType: "CORE",
            nodeCount: "2",
            instanceType: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.types[0].id),
            diskType: dataDisk.then(dataDisk => dataDisk.types[0].value),
            diskCapacity: Promise.all([dataDisk, dataDisk]).then(([dataDisk, dataDisk1]) => dataDisk.types[0].min > 160 ? dataDisk1.types[0].min : 160),
            diskCount: "4",
            sysDiskType: systemDisk.then(systemDisk => systemDisk.types[0].value),
            sysDiskCapacity: Promise.all([systemDisk, systemDisk]).then(([systemDisk, systemDisk1]) => systemDisk.types[0].min > 160 ? systemDisk1.types[0].min : 160),
        },
        {
            hostGroupName: "taskGroup",
            hostGroupType: "TASK",
            nodeCount: "2",
            instanceType: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.types[0].id),
            diskType: dataDisk.then(dataDisk => dataDisk.types[0].value),
            diskCapacity: Promise.all([dataDisk, dataDisk]).then(([dataDisk, dataDisk1]) => dataDisk.types[0].min > 160 ? dataDisk1.types[0].min : 160),
            diskCount: "4",
            sysDiskType: systemDisk.then(systemDisk => systemDisk.types[0].value),
            sysDiskCapacity: Promise.all([systemDisk, systemDisk]).then(([systemDisk, systemDisk1]) => systemDisk.types[0].min > 160 ? systemDisk1.types[0].min : 160),
        },
    ],
    highAvailabilityEnable: true,
    zoneId: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.types[0].zoneId),
    securityGroupId: _var.security_group_id == "" ? defaultSecurityGroup.id : _var.security_group_id,
    isOpenPublicIp: true,
    chargeType: "PostPaid",
    vswitchId: _var.vswitch_id == "" ? vswitch.id : _var.vswitch_id,
    userDefinedEmrEcsRole: defaultRole.name,
    sshEnable: true,
    masterPwd: "ABCtest1234!",
});

constructor

new Cluster(name: string, args: ClusterArgs, opts?: pulumi.CustomResourceOptions)

Create a Cluster resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ClusterState, opts?: pulumi.CustomResourceOptions): Cluster

Get an existing Cluster resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Cluster

Returns true if the given object is an instance of Cluster. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property bootstrapActions

public bootstrapActions: pulumi.Output<ClusterBootstrapAction[] | undefined>;

property chargeType

public chargeType: pulumi.Output<string | undefined>;

Charge Type for this group of hosts: PostPaid or PrePaid. If this is not specified, charge type will follow global chargeType value.

property clusterType

public clusterType: pulumi.Output<string>;

EMR Cluster Type, e.g. HADOOP, KAFKA, DRUID, GATEWAY etc. You can find all valid EMR cluster type in emr web console. Supported ‘GATEWAY’ available in 1.61.0+.

property depositType

public depositType: pulumi.Output<string | undefined>;

Cluster deposit type, HALF_MANAGED or FULL_MANAGED.

property easEnable

public easEnable: pulumi.Output<boolean | undefined>;

High security cluster (true) or not. Default value is false.

property emrVer

public emrVer: pulumi.Output<string>;

EMR Version, e.g. EMR-3.22.0. You can find the all valid EMR Version in emr web console.

property highAvailabilityEnable

public highAvailabilityEnable: pulumi.Output<boolean | undefined>;

High Available for HDFS and YARN. If this is set true, MASTER group must have two nodes.

property hostGroups

public hostGroups: pulumi.Output<ClusterHostGroup[] | undefined>;

Groups of Host, You can specify MASTER as a group, CORE as a group (just like the above example).

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property isOpenPublicIp

public isOpenPublicIp: pulumi.Output<boolean | undefined>;

property keyPairName

public keyPairName: pulumi.Output<string | undefined>;

Ssh key pair.

property masterPwd

public masterPwd: pulumi.Output<string | undefined>;

Master ssh password.

property name

public name: pulumi.Output<string>;

bootstrap action name.

property optionSoftwareLists

public optionSoftwareLists: pulumi.Output<string[] | undefined>;

Optional software list.

property relatedClusterId

public relatedClusterId: pulumi.Output<string | undefined>;

This specify the related cluster id, if this cluster is a Gateway.

property securityGroupId

public securityGroupId: pulumi.Output<string | undefined>;

Security Group ID for Cluster, you can also specify this key for each host group.

property sshEnable

public sshEnable: pulumi.Output<boolean | undefined>;

If this is set true, we can ssh into cluster. Default value is false.

property tags

public tags: pulumi.Output<{[key: string]: any} | undefined>;

A mapping of tags to assign to the resource.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property useLocalMetadb

public useLocalMetadb: pulumi.Output<boolean | undefined>;

Use local metadb. Default is false.

property userDefinedEmrEcsRole

public userDefinedEmrEcsRole: pulumi.Output<string | undefined>;

Alicloud EMR uses roles to perform actions on your behalf when provisioning cluster resources, running applications, dynamically scaling resources. EMR uses the following roles when interacting with other Alicloud services. Default value is AliyunEmrEcsDefaultRole.

property vswitchId

public vswitchId: pulumi.Output<string | undefined>;

Global vswitch id, you can also specify it in host group.

property zoneId

public zoneId: pulumi.Output<string>;

Zone ID, e.g. cn-huhehaote-a

Functions

Function getDiskTypes

getDiskTypes(args: GetDiskTypesArgs, opts?: pulumi.InvokeOptions): Promise<GetDiskTypesResult>

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 defaultDiskTypes = pulumi.output(alicloud.emr.getDiskTypes({
    clusterType: "HADOOP",
    destinationResource: "DataDisk",
    instanceChargeType: "PostPaid",
    instanceType: "ecs.g5.xlarge",
    zoneId: "cn-huhehaote-a",
}, { async: true }));

export const dataDiskType = defaultDiskTypes.types[0].value;

Function getInstanceTypes

getInstanceTypes(args: GetInstanceTypesArgs, opts?: pulumi.InvokeOptions): Promise<GetInstanceTypesResult>

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 defaultInstanceTypes = pulumi.output(alicloud.emr.getInstanceTypes({
    clusterType: "HADOOP",
    destinationResource: "InstanceType",
    instanceChargeType: "PostPaid",
    instanceType: "ecs.g5.2xlarge",
    supportLocalStorage: false,
    supportNodeTypes: [
        "MASTER",
        "CORE",
    ],
}, { async: true }));

export const firstInstanceType = defaultInstanceTypes.types[0].id;

Function getMainVersions

getMainVersions(args?: GetMainVersionsArgs, opts?: pulumi.InvokeOptions): Promise<GetMainVersionsResult>

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

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",
}, { async: true }));

export const firstMainVersion = defaultMainVersions.mainVersions[0].emrVersion;
export const thisClusterTypes = defaultMainVersions.mainVersions[0].clusterTypes;

Others

interface ClusterArgs

interface ClusterArgs

The set of arguments for constructing a Cluster resource.

property bootstrapActions

bootstrapActions?: pulumi.Input<pulumi.Input<ClusterBootstrapAction>[]>;

property chargeType

chargeType?: pulumi.Input<string>;

Charge Type for this group of hosts: PostPaid or PrePaid. If this is not specified, charge type will follow global chargeType value.

property clusterType

clusterType: pulumi.Input<string>;

EMR Cluster Type, e.g. HADOOP, KAFKA, DRUID, GATEWAY etc. You can find all valid EMR cluster type in emr web console. Supported ‘GATEWAY’ available in 1.61.0+.

property depositType

depositType?: pulumi.Input<string>;

Cluster deposit type, HALF_MANAGED or FULL_MANAGED.

property easEnable

easEnable?: pulumi.Input<boolean>;

High security cluster (true) or not. Default value is false.

property emrVer

emrVer: pulumi.Input<string>;

EMR Version, e.g. EMR-3.22.0. You can find the all valid EMR Version in emr web console.

property highAvailabilityEnable

highAvailabilityEnable?: pulumi.Input<boolean>;

High Available for HDFS and YARN. If this is set true, MASTER group must have two nodes.

property hostGroups

hostGroups?: pulumi.Input<pulumi.Input<ClusterHostGroup>[]>;

Groups of Host, You can specify MASTER as a group, CORE as a group (just like the above example).

property isOpenPublicIp

isOpenPublicIp?: pulumi.Input<boolean>;

property keyPairName

keyPairName?: pulumi.Input<string>;

Ssh key pair.

property masterPwd

masterPwd?: pulumi.Input<string>;

Master ssh password.

property name

name?: pulumi.Input<string>;

bootstrap action name.

property optionSoftwareLists

optionSoftwareLists?: pulumi.Input<pulumi.Input<string>[]>;

Optional software list.

property relatedClusterId

relatedClusterId?: pulumi.Input<string>;

This specify the related cluster id, if this cluster is a Gateway.

property securityGroupId

securityGroupId?: pulumi.Input<string>;

Security Group ID for Cluster, you can also specify this key for each host group.

property sshEnable

sshEnable?: pulumi.Input<boolean>;

If this is set true, we can ssh into cluster. Default value is false.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

property useLocalMetadb

useLocalMetadb?: pulumi.Input<boolean>;

Use local metadb. Default is false.

property userDefinedEmrEcsRole

userDefinedEmrEcsRole?: pulumi.Input<string>;

Alicloud EMR uses roles to perform actions on your behalf when provisioning cluster resources, running applications, dynamically scaling resources. EMR uses the following roles when interacting with other Alicloud services. Default value is AliyunEmrEcsDefaultRole.

property vswitchId

vswitchId?: pulumi.Input<string>;

Global vswitch id, you can also specify it in host group.

property zoneId

zoneId: pulumi.Input<string>;

Zone ID, e.g. cn-huhehaote-a

interface ClusterState

interface ClusterState

Input properties used for looking up and filtering Cluster resources.

property bootstrapActions

bootstrapActions?: pulumi.Input<pulumi.Input<ClusterBootstrapAction>[]>;

property chargeType

chargeType?: pulumi.Input<string>;

Charge Type for this group of hosts: PostPaid or PrePaid. If this is not specified, charge type will follow global chargeType value.

property clusterType

clusterType?: pulumi.Input<string>;

EMR Cluster Type, e.g. HADOOP, KAFKA, DRUID, GATEWAY etc. You can find all valid EMR cluster type in emr web console. Supported ‘GATEWAY’ available in 1.61.0+.

property depositType

depositType?: pulumi.Input<string>;

Cluster deposit type, HALF_MANAGED or FULL_MANAGED.

property easEnable

easEnable?: pulumi.Input<boolean>;

High security cluster (true) or not. Default value is false.

property emrVer

emrVer?: pulumi.Input<string>;

EMR Version, e.g. EMR-3.22.0. You can find the all valid EMR Version in emr web console.

property highAvailabilityEnable

highAvailabilityEnable?: pulumi.Input<boolean>;

High Available for HDFS and YARN. If this is set true, MASTER group must have two nodes.

property hostGroups

hostGroups?: pulumi.Input<pulumi.Input<ClusterHostGroup>[]>;

Groups of Host, You can specify MASTER as a group, CORE as a group (just like the above example).

property isOpenPublicIp

isOpenPublicIp?: pulumi.Input<boolean>;

property keyPairName

keyPairName?: pulumi.Input<string>;

Ssh key pair.

property masterPwd

masterPwd?: pulumi.Input<string>;

Master ssh password.

property name

name?: pulumi.Input<string>;

bootstrap action name.

property optionSoftwareLists

optionSoftwareLists?: pulumi.Input<pulumi.Input<string>[]>;

Optional software list.

property relatedClusterId

relatedClusterId?: pulumi.Input<string>;

This specify the related cluster id, if this cluster is a Gateway.

property securityGroupId

securityGroupId?: pulumi.Input<string>;

Security Group ID for Cluster, you can also specify this key for each host group.

property sshEnable

sshEnable?: pulumi.Input<boolean>;

If this is set true, we can ssh into cluster. Default value is false.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

property useLocalMetadb

useLocalMetadb?: pulumi.Input<boolean>;

Use local metadb. Default is false.

property userDefinedEmrEcsRole

userDefinedEmrEcsRole?: pulumi.Input<string>;

Alicloud EMR uses roles to perform actions on your behalf when provisioning cluster resources, running applications, dynamically scaling resources. EMR uses the following roles when interacting with other Alicloud services. Default value is AliyunEmrEcsDefaultRole.

property vswitchId

vswitchId?: pulumi.Input<string>;

Global vswitch id, you can also specify it in host group.

property zoneId

zoneId?: pulumi.Input<string>;

Zone ID, e.g. cn-huhehaote-a

interface GetDiskTypesArgs

interface GetDiskTypesArgs

A collection of arguments for invoking getDiskTypes.

property clusterType

clusterType: string;

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

property destinationResource

destinationResource: string;

The destination resource of emr cluster instance

property instanceChargeType

instanceChargeType: string;

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

property instanceType

instanceType: string;

The ecs instance type of create emr cluster instance.

property outputFile

outputFile?: undefined | string;

property zoneId

zoneId?: undefined | string;

The Zone to create emr cluster instance.

interface GetDiskTypesResult

interface GetDiskTypesResult

A collection of values returned by getDiskTypes.

property clusterType

clusterType: string;

property destinationResource

destinationResource: string;

property id

id: string;

The provider-assigned unique ID for this managed resource.

property ids

ids: string[];

A list of data disk and system disk type IDs.

property instanceChargeType

instanceChargeType: string;

property instanceType

instanceType: string;

property outputFile

outputFile?: undefined | string;

property types

types: GetDiskTypesType[];

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

property zoneId

zoneId?: undefined | string;

interface GetInstanceTypesArgs

interface GetInstanceTypesArgs

A collection of arguments for invoking getInstanceTypes.

property clusterType

clusterType: string;

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

property destinationResource

destinationResource: string;

The destination resource of emr cluster instance

property instanceChargeType

instanceChargeType: string;

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

property instanceType

instanceType?: undefined | string;

Filter the specific ecs instance type to create emr cluster.

property outputFile

outputFile?: undefined | string;

property supportLocalStorage

supportLocalStorage?: undefined | false | true;

Whether the current storage disk is local or not.

property supportNodeTypes

supportNodeTypes?: string[];

The specific supported node type list. Possible values may be any one or combination of these: [“MASTER”, “CORE”, “TASK”, “GATEWAY”]

property zoneId

zoneId?: undefined | string;

The supported resources of specific zoneId.

interface GetInstanceTypesResult

interface GetInstanceTypesResult

A collection of values returned by getInstanceTypes.

property clusterType

clusterType: string;

property destinationResource

destinationResource: string;

property id

id: string;

The provider-assigned unique ID for this managed resource.

property ids

ids: string[];

A list of emr instance types IDs.

property instanceChargeType

instanceChargeType: string;

property instanceType

instanceType?: undefined | string;

property outputFile

outputFile?: undefined | string;

property supportLocalStorage

supportLocalStorage?: undefined | false | true;

property supportNodeTypes

supportNodeTypes?: string[];

property types

types: GetInstanceTypesType[];

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

property zoneId

zoneId?: undefined | string;

The available zone id in Alibaba Cloud account

interface GetMainVersionsArgs

interface GetMainVersionsArgs

A collection of arguments for invoking getMainVersions.

property clusterTypes

clusterTypes?: string[];

The supported clusterType of this emr version. Possible values may be any one or combination of these: [“HADOOP”, “DRUID”, “KAFKA”, “ZOOKEEPER”, “FLINK”, “CLICKHOUSE”]

property emrVersion

emrVersion?: undefined | string;

The version of the emr cluster instance. Possible values: EMR-4.0.0, EMR-3.23.0, EMR-3.22.0.

property outputFile

outputFile?: undefined | string;

interface GetMainVersionsResult

interface GetMainVersionsResult

A collection of values returned by getMainVersions.

property clusterTypes

clusterTypes?: string[];

property emrVersion

emrVersion?: undefined | string;

The version of the emr cluster instance.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property ids

ids: string[];

A list of emr instance types IDs.

property mainVersions

mainVersions: GetMainVersionsMainVersion[];

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

property outputFile

outputFile?: undefined | string;