UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

107 lines 4.82 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.InstanceGroup = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides an Elastic MapReduce Cluster Instance Group configuration. * See [Amazon Elastic MapReduce Documentation](https://aws.amazon.com/documentation/emr/) for more information. * * > **NOTE:** At this time, Instance Groups cannot be destroyed through the API nor * web interface. Instance Groups are destroyed when the EMR Cluster is destroyed. * this provider will resize any Instance Group to zero when destroying the resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const task = new aws.emr.InstanceGroup("task", { * clusterId: tf_test_cluster.id, * instanceCount: 1, * instanceType: "m5.xlarge", * name: "my little instance group", * }); * ``` * * ## Import * * Using `pulumi import`, import EMR task instance group using their EMR Cluster id and Instance Group id separated by a forward-slash `/`. For example: * * ```sh * $ pulumi import aws:emr/instanceGroup:InstanceGroup task_group j-123456ABCDEF/ig-15EK4O09RZLNR * ``` */ class InstanceGroup extends pulumi.CustomResource { /** * Get an existing InstanceGroup resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new InstanceGroup(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of InstanceGroup. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === InstanceGroup.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["autoscalingPolicy"] = state?.autoscalingPolicy; resourceInputs["bidPrice"] = state?.bidPrice; resourceInputs["clusterId"] = state?.clusterId; resourceInputs["configurationsJson"] = state?.configurationsJson; resourceInputs["ebsConfigs"] = state?.ebsConfigs; resourceInputs["ebsOptimized"] = state?.ebsOptimized; resourceInputs["instanceCount"] = state?.instanceCount; resourceInputs["instanceType"] = state?.instanceType; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; resourceInputs["runningInstanceCount"] = state?.runningInstanceCount; resourceInputs["status"] = state?.status; } else { const args = argsOrState; if (args?.clusterId === undefined && !opts.urn) { throw new Error("Missing required property 'clusterId'"); } if (args?.instanceType === undefined && !opts.urn) { throw new Error("Missing required property 'instanceType'"); } resourceInputs["autoscalingPolicy"] = args?.autoscalingPolicy; resourceInputs["bidPrice"] = args?.bidPrice; resourceInputs["clusterId"] = args?.clusterId; resourceInputs["configurationsJson"] = args?.configurationsJson; resourceInputs["ebsConfigs"] = args?.ebsConfigs; resourceInputs["ebsOptimized"] = args?.ebsOptimized; resourceInputs["instanceCount"] = args?.instanceCount; resourceInputs["instanceType"] = args?.instanceType; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["runningInstanceCount"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(InstanceGroup.__pulumiType, name, resourceInputs, opts); } } exports.InstanceGroup = InstanceGroup; /** @internal */ InstanceGroup.__pulumiType = 'aws:emr/instanceGroup:InstanceGroup'; //# sourceMappingURL=instanceGroup.js.map