@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
129 lines • 4.81 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");
/**
* Resource for managing an [AWS Mainframe Modernization Application](https://docs.aws.amazon.com/m2/latest/userguide/applications-m2.html).
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.m2.Application("example", {
* name: "Example",
* engineType: "bluage",
* definition: {
* content: `{
* \"definition\": {
* \"listeners\": [
* {
* \"port\": 8196,
* \"type\": \"http\"
* }
* ],
* \"ba-application\": {
* \"app-location\": \"${s3_source}/PlanetsDemo-v1.zip\"
* }
* },
* \"source-locations\": [
* {
* \"source-id\": \"s3-source\",
* \"source-type\": \"s3\",
* \"properties\": {
* \"s3-bucket\": \"example-bucket\",
* \"s3-key-prefix\": \"v1\"
* }
* }
* ],
* \"template-version\": \"2.0\"
* }
*
* `,
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Mainframe Modernization Application using the `01234567890abcdef012345678`. For example:
*
* ```sh
* $ pulumi import aws:m2/application:Application example 01234567890abcdef012345678
* ```
*/
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, { ...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["applicationId"] = state?.applicationId;
resourceInputs["arn"] = state?.arn;
resourceInputs["currentVersion"] = state?.currentVersion;
resourceInputs["definition"] = state?.definition;
resourceInputs["description"] = state?.description;
resourceInputs["engineType"] = state?.engineType;
resourceInputs["kmsKeyId"] = state?.kmsKeyId;
resourceInputs["name"] = state?.name;
resourceInputs["region"] = state?.region;
resourceInputs["roleArn"] = state?.roleArn;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["timeouts"] = state?.timeouts;
}
else {
const args = argsOrState;
if (args?.engineType === undefined && !opts.urn) {
throw new Error("Missing required property 'engineType'");
}
resourceInputs["definition"] = args?.definition;
resourceInputs["description"] = args?.description;
resourceInputs["engineType"] = args?.engineType;
resourceInputs["kmsKeyId"] = args?.kmsKeyId;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
resourceInputs["roleArn"] = args?.roleArn;
resourceInputs["tags"] = args?.tags;
resourceInputs["timeouts"] = args?.timeouts;
resourceInputs["applicationId"] = undefined /*out*/;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["currentVersion"] = 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:m2/application:Application';
//# sourceMappingURL=application.js.map