@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
108 lines • 5.44 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.Environment = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an [AWS Mainframe Modernization Environment](https://docs.aws.amazon.com/m2/latest/userguide/environments-m2.html).
*
* ## Example Usage
*
* ## Import
*
* Using `pulumi import`, import Mainframe Modernization Environment using the `01234567890abcdef012345678`. For example:
*
* ```sh
* $ pulumi import aws:m2/environment:Environment example 01234567890abcdef012345678
* ```
*/
class Environment extends pulumi.CustomResource {
/**
* Get an existing Environment 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 Environment(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Environment. 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'] === Environment.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["applyChangesDuringMaintenanceWindow"] = state?.applyChangesDuringMaintenanceWindow;
resourceInputs["arn"] = state?.arn;
resourceInputs["description"] = state?.description;
resourceInputs["engineType"] = state?.engineType;
resourceInputs["engineVersion"] = state?.engineVersion;
resourceInputs["environmentId"] = state?.environmentId;
resourceInputs["forceUpdate"] = state?.forceUpdate;
resourceInputs["highAvailabilityConfig"] = state?.highAvailabilityConfig;
resourceInputs["instanceType"] = state?.instanceType;
resourceInputs["kmsKeyId"] = state?.kmsKeyId;
resourceInputs["loadBalancerArn"] = state?.loadBalancerArn;
resourceInputs["name"] = state?.name;
resourceInputs["preferredMaintenanceWindow"] = state?.preferredMaintenanceWindow;
resourceInputs["publiclyAccessible"] = state?.publiclyAccessible;
resourceInputs["region"] = state?.region;
resourceInputs["securityGroupIds"] = state?.securityGroupIds;
resourceInputs["storageConfiguration"] = state?.storageConfiguration;
resourceInputs["subnetIds"] = state?.subnetIds;
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'");
}
if (args?.instanceType === undefined && !opts.urn) {
throw new Error("Missing required property 'instanceType'");
}
resourceInputs["applyChangesDuringMaintenanceWindow"] = args?.applyChangesDuringMaintenanceWindow;
resourceInputs["description"] = args?.description;
resourceInputs["engineType"] = args?.engineType;
resourceInputs["engineVersion"] = args?.engineVersion;
resourceInputs["forceUpdate"] = args?.forceUpdate;
resourceInputs["highAvailabilityConfig"] = args?.highAvailabilityConfig;
resourceInputs["instanceType"] = args?.instanceType;
resourceInputs["kmsKeyId"] = args?.kmsKeyId;
resourceInputs["name"] = args?.name;
resourceInputs["preferredMaintenanceWindow"] = args?.preferredMaintenanceWindow;
resourceInputs["publiclyAccessible"] = args?.publiclyAccessible;
resourceInputs["region"] = args?.region;
resourceInputs["securityGroupIds"] = args?.securityGroupIds;
resourceInputs["storageConfiguration"] = args?.storageConfiguration;
resourceInputs["subnetIds"] = args?.subnetIds;
resourceInputs["tags"] = args?.tags;
resourceInputs["timeouts"] = args?.timeouts;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["environmentId"] = undefined /*out*/;
resourceInputs["loadBalancerArn"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Environment.__pulumiType, name, resourceInputs, opts);
}
}
exports.Environment = Environment;
/** @internal */
Environment.__pulumiType = 'aws:m2/environment:Environment';
//# sourceMappingURL=environment.js.map
;