@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
149 lines • 6.32 kB
JavaScript
;
// *** 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.Application = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages an EMR Serverless Application.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.emrserverless.Application("example", {
* name: "example",
* releaseLabel: "emr-6.6.0",
* type: "hive",
* });
* ```
*
* ### Initial Capacity Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.emrserverless.Application("example", {
* name: "example",
* releaseLabel: "emr-6.6.0",
* type: "hive",
* initialCapacities: [{
* initialCapacityType: "HiveDriver",
* initialCapacityConfig: {
* workerCount: 1,
* workerConfiguration: {
* cpu: "2 vCPU",
* memory: "10 GB",
* },
* },
* }],
* });
* ```
*
* ### Maximum Capacity Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.emrserverless.Application("example", {
* name: "example",
* releaseLabel: "emr-6.6.0",
* type: "hive",
* maximumCapacity: {
* cpu: "2 vCPU",
* memory: "10 GB",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import EMR Severless applications using the `id`. For example:
*
* ```sh
* $ pulumi import aws:emrserverless/application:Application example id
* ```
*/
class Application extends pulumi.CustomResource {
/**
* Get an existing Application 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 Application(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Application. 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'] === Application.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["architecture"] = state ? state.architecture : undefined;
resourceInputs["arn"] = state ? state.arn : undefined;
resourceInputs["autoStartConfiguration"] = state ? state.autoStartConfiguration : undefined;
resourceInputs["autoStopConfiguration"] = state ? state.autoStopConfiguration : undefined;
resourceInputs["imageConfiguration"] = state ? state.imageConfiguration : undefined;
resourceInputs["initialCapacities"] = state ? state.initialCapacities : undefined;
resourceInputs["interactiveConfiguration"] = state ? state.interactiveConfiguration : undefined;
resourceInputs["maximumCapacity"] = state ? state.maximumCapacity : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["networkConfiguration"] = state ? state.networkConfiguration : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["releaseLabel"] = state ? state.releaseLabel : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
resourceInputs["type"] = state ? state.type : undefined;
}
else {
const args = argsOrState;
if ((!args || args.releaseLabel === undefined) && !opts.urn) {
throw new Error("Missing required property 'releaseLabel'");
}
if ((!args || args.type === undefined) && !opts.urn) {
throw new Error("Missing required property 'type'");
}
resourceInputs["architecture"] = args ? args.architecture : undefined;
resourceInputs["autoStartConfiguration"] = args ? args.autoStartConfiguration : undefined;
resourceInputs["autoStopConfiguration"] = args ? args.autoStopConfiguration : undefined;
resourceInputs["imageConfiguration"] = args ? args.imageConfiguration : undefined;
resourceInputs["initialCapacities"] = args ? args.initialCapacities : undefined;
resourceInputs["interactiveConfiguration"] = args ? args.interactiveConfiguration : undefined;
resourceInputs["maximumCapacity"] = args ? args.maximumCapacity : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["networkConfiguration"] = args ? args.networkConfiguration : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["releaseLabel"] = args ? args.releaseLabel : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Application.__pulumiType, name, resourceInputs, opts);
}
}
exports.Application = Application;
/** @internal */
Application.__pulumiType = 'aws:emrserverless/application:Application';
//# sourceMappingURL=application.js.map