UNPKG

@pulumi/aws

Version:

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

128 lines 5.72 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.InstanceFleet = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides an Elastic MapReduce Cluster Instance Fleet configuration. * See [Amazon Elastic MapReduce Documentation](https://aws.amazon.com/documentation/emr/) for more information. * * > **NOTE:** At this time, Instance Fleets cannot be destroyed through the API nor * web interface. Instance Fleets are destroyed when the EMR Cluster is destroyed. * the provider will resize any Instance Fleet 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.InstanceFleet("task", { * clusterId: cluster.id, * instanceTypeConfigs: [ * { * bidPriceAsPercentageOfOnDemandPrice: 100, * ebsConfigs: [{ * size: 100, * type: "gp2", * volumesPerInstance: 1, * }], * instanceType: "m4.xlarge", * weightedCapacity: 1, * }, * { * bidPriceAsPercentageOfOnDemandPrice: 100, * ebsConfigs: [{ * size: 100, * type: "gp2", * volumesPerInstance: 1, * }], * instanceType: "m4.2xlarge", * weightedCapacity: 2, * }, * ], * launchSpecifications: { * spotSpecifications: [{ * allocationStrategy: "capacity-optimized", * blockDurationMinutes: 0, * timeoutAction: "TERMINATE_CLUSTER", * timeoutDurationMinutes: 10, * }], * }, * name: "task fleet", * targetOnDemandCapacity: 1, * targetSpotCapacity: 1, * }); * ``` * * ## Import * * Using `pulumi import`, import EMR Instance Fleet using the EMR Cluster identifier and Instance Fleet identifier separated by a forward slash (`/`). For example: * * ```sh * $ pulumi import aws:emr/instanceFleet:InstanceFleet example j-123456ABCDEF/if-15EK4O09RZLNR * ``` */ class InstanceFleet extends pulumi.CustomResource { /** * Get an existing InstanceFleet 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 InstanceFleet(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of InstanceFleet. 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'] === InstanceFleet.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["clusterId"] = state ? state.clusterId : undefined; resourceInputs["instanceTypeConfigs"] = state ? state.instanceTypeConfigs : undefined; resourceInputs["launchSpecifications"] = state ? state.launchSpecifications : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["provisionedOnDemandCapacity"] = state ? state.provisionedOnDemandCapacity : undefined; resourceInputs["provisionedSpotCapacity"] = state ? state.provisionedSpotCapacity : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["targetOnDemandCapacity"] = state ? state.targetOnDemandCapacity : undefined; resourceInputs["targetSpotCapacity"] = state ? state.targetSpotCapacity : undefined; } else { const args = argsOrState; if ((!args || args.clusterId === undefined) && !opts.urn) { throw new Error("Missing required property 'clusterId'"); } resourceInputs["clusterId"] = args ? args.clusterId : undefined; resourceInputs["instanceTypeConfigs"] = args ? args.instanceTypeConfigs : undefined; resourceInputs["launchSpecifications"] = args ? args.launchSpecifications : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["targetOnDemandCapacity"] = args ? args.targetOnDemandCapacity : undefined; resourceInputs["targetSpotCapacity"] = args ? args.targetSpotCapacity : undefined; resourceInputs["provisionedOnDemandCapacity"] = undefined /*out*/; resourceInputs["provisionedSpotCapacity"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(InstanceFleet.__pulumiType, name, resourceInputs, opts); } } exports.InstanceFleet = InstanceFleet; /** @internal */ InstanceFleet.__pulumiType = 'aws:emr/instanceFleet:InstanceFleet'; //# sourceMappingURL=instanceFleet.js.map