UNPKG

@pulumi/aws

Version:

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

108 lines 4.4 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.Environment = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides an AppConfig Environment resource for an `aws.appconfig.Application` resource. One or more environments can be defined for an application. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const exampleApplication = new aws.appconfig.Application("example", { * name: "example-application-tf", * description: "Example AppConfig Application", * tags: { * Type: "AppConfig Application", * }, * }); * const example = new aws.appconfig.Environment("example", { * name: "example-environment-tf", * description: "Example AppConfig Environment", * applicationId: exampleApplication.id, * monitors: [{ * alarmArn: exampleAwsCloudwatchMetricAlarm.arn, * alarmRoleArn: exampleAwsIamRole.arn, * }], * tags: { * Type: "AppConfig Environment", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import AppConfig Environments using the environment ID and application ID separated by a colon (`:`). For example: * * ```sh * $ pulumi import aws:appconfig/environment:Environment example 71abcde:11xxxxx * ``` */ 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["applicationId"] = state?.applicationId; resourceInputs["arn"] = state?.arn; resourceInputs["description"] = state?.description; resourceInputs["environmentId"] = state?.environmentId; resourceInputs["monitors"] = state?.monitors; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; resourceInputs["state"] = state?.state; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } else { const args = argsOrState; if (args?.applicationId === undefined && !opts.urn) { throw new Error("Missing required property 'applicationId'"); } resourceInputs["applicationId"] = args?.applicationId; resourceInputs["description"] = args?.description; resourceInputs["monitors"] = args?.monitors; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["environmentId"] = undefined /*out*/; resourceInputs["state"] = 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:appconfig/environment:Environment'; //# sourceMappingURL=environment.js.map