@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
108 lines • 6.2 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, Object.assign(Object.assign({}, 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 ? state.applyChangesDuringMaintenanceWindow : undefined;
resourceInputs["arn"] = state ? state.arn : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["engineType"] = state ? state.engineType : undefined;
resourceInputs["engineVersion"] = state ? state.engineVersion : undefined;
resourceInputs["environmentId"] = state ? state.environmentId : undefined;
resourceInputs["forceUpdate"] = state ? state.forceUpdate : undefined;
resourceInputs["highAvailabilityConfig"] = state ? state.highAvailabilityConfig : undefined;
resourceInputs["instanceType"] = state ? state.instanceType : undefined;
resourceInputs["kmsKeyId"] = state ? state.kmsKeyId : undefined;
resourceInputs["loadBalancerArn"] = state ? state.loadBalancerArn : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["preferredMaintenanceWindow"] = state ? state.preferredMaintenanceWindow : undefined;
resourceInputs["publiclyAccessible"] = state ? state.publiclyAccessible : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["securityGroupIds"] = state ? state.securityGroupIds : undefined;
resourceInputs["storageConfiguration"] = state ? state.storageConfiguration : undefined;
resourceInputs["subnetIds"] = state ? state.subnetIds : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
resourceInputs["timeouts"] = state ? state.timeouts : undefined;
}
else {
const args = argsOrState;
if ((!args || args.engineType === undefined) && !opts.urn) {
throw new Error("Missing required property 'engineType'");
}
if ((!args || args.instanceType === undefined) && !opts.urn) {
throw new Error("Missing required property 'instanceType'");
}
resourceInputs["applyChangesDuringMaintenanceWindow"] = args ? args.applyChangesDuringMaintenanceWindow : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["engineType"] = args ? args.engineType : undefined;
resourceInputs["engineVersion"] = args ? args.engineVersion : undefined;
resourceInputs["forceUpdate"] = args ? args.forceUpdate : undefined;
resourceInputs["highAvailabilityConfig"] = args ? args.highAvailabilityConfig : undefined;
resourceInputs["instanceType"] = args ? args.instanceType : undefined;
resourceInputs["kmsKeyId"] = args ? args.kmsKeyId : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["preferredMaintenanceWindow"] = args ? args.preferredMaintenanceWindow : undefined;
resourceInputs["publiclyAccessible"] = args ? args.publiclyAccessible : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["securityGroupIds"] = args ? args.securityGroupIds : undefined;
resourceInputs["storageConfiguration"] = args ? args.storageConfiguration : undefined;
resourceInputs["subnetIds"] = args ? args.subnetIds : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["timeouts"] = args ? args.timeouts : undefined;
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