@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
121 lines • 6.18 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.Deployment = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides an AppConfig Deployment resource for an `aws.appconfig.Application` resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.appconfig.Deployment("example", {
* applicationId: exampleAwsAppconfigApplication.id,
* configurationProfileId: exampleAwsAppconfigConfigurationProfile.configurationProfileId,
* configurationVersion: exampleAwsAppconfigHostedConfigurationVersion.versionNumber,
* deploymentStrategyId: exampleAwsAppconfigDeploymentStrategy.id,
* description: "My example deployment",
* environmentId: exampleAwsAppconfigEnvironment.environmentId,
* kmsKeyIdentifier: exampleAwsKmsKey.arn,
* tags: {
* Type: "AppConfig Deployment",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import AppConfig Deployments using the application ID, environment ID, and deployment number separated by a slash (`/`). For example:
*
* ```sh
* $ pulumi import aws:appconfig/deployment:Deployment example 71abcde/11xxxxx/1
* ```
*/
class Deployment extends pulumi.CustomResource {
/**
* Get an existing Deployment 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 Deployment(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Deployment. 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'] === Deployment.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["applicationId"] = state ? state.applicationId : undefined;
resourceInputs["arn"] = state ? state.arn : undefined;
resourceInputs["configurationProfileId"] = state ? state.configurationProfileId : undefined;
resourceInputs["configurationVersion"] = state ? state.configurationVersion : undefined;
resourceInputs["deploymentNumber"] = state ? state.deploymentNumber : undefined;
resourceInputs["deploymentStrategyId"] = state ? state.deploymentStrategyId : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["environmentId"] = state ? state.environmentId : undefined;
resourceInputs["kmsKeyArn"] = state ? state.kmsKeyArn : undefined;
resourceInputs["kmsKeyIdentifier"] = state ? state.kmsKeyIdentifier : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["state"] = state ? state.state : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
}
else {
const args = argsOrState;
if ((!args || args.applicationId === undefined) && !opts.urn) {
throw new Error("Missing required property 'applicationId'");
}
if ((!args || args.configurationProfileId === undefined) && !opts.urn) {
throw new Error("Missing required property 'configurationProfileId'");
}
if ((!args || args.configurationVersion === undefined) && !opts.urn) {
throw new Error("Missing required property 'configurationVersion'");
}
if ((!args || args.deploymentStrategyId === undefined) && !opts.urn) {
throw new Error("Missing required property 'deploymentStrategyId'");
}
if ((!args || args.environmentId === undefined) && !opts.urn) {
throw new Error("Missing required property 'environmentId'");
}
resourceInputs["applicationId"] = args ? args.applicationId : undefined;
resourceInputs["configurationProfileId"] = args ? args.configurationProfileId : undefined;
resourceInputs["configurationVersion"] = args ? args.configurationVersion : undefined;
resourceInputs["deploymentStrategyId"] = args ? args.deploymentStrategyId : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["environmentId"] = args ? args.environmentId : undefined;
resourceInputs["kmsKeyIdentifier"] = args ? args.kmsKeyIdentifier : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["deploymentNumber"] = undefined /*out*/;
resourceInputs["kmsKeyArn"] = undefined /*out*/;
resourceInputs["state"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Deployment.__pulumiType, name, resourceInputs, opts);
}
}
exports.Deployment = Deployment;
/** @internal */
Deployment.__pulumiType = 'aws:appconfig/deployment:Deployment';
//# sourceMappingURL=deployment.js.map