@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
121 lines • 5.67 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, { ...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?.applicationId;
resourceInputs["arn"] = state?.arn;
resourceInputs["configurationProfileId"] = state?.configurationProfileId;
resourceInputs["configurationVersion"] = state?.configurationVersion;
resourceInputs["deploymentNumber"] = state?.deploymentNumber;
resourceInputs["deploymentStrategyId"] = state?.deploymentStrategyId;
resourceInputs["description"] = state?.description;
resourceInputs["environmentId"] = state?.environmentId;
resourceInputs["kmsKeyArn"] = state?.kmsKeyArn;
resourceInputs["kmsKeyIdentifier"] = state?.kmsKeyIdentifier;
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'");
}
if (args?.configurationProfileId === undefined && !opts.urn) {
throw new Error("Missing required property 'configurationProfileId'");
}
if (args?.configurationVersion === undefined && !opts.urn) {
throw new Error("Missing required property 'configurationVersion'");
}
if (args?.deploymentStrategyId === undefined && !opts.urn) {
throw new Error("Missing required property 'deploymentStrategyId'");
}
if (args?.environmentId === undefined && !opts.urn) {
throw new Error("Missing required property 'environmentId'");
}
resourceInputs["applicationId"] = args?.applicationId;
resourceInputs["configurationProfileId"] = args?.configurationProfileId;
resourceInputs["configurationVersion"] = args?.configurationVersion;
resourceInputs["deploymentStrategyId"] = args?.deploymentStrategyId;
resourceInputs["description"] = args?.description;
resourceInputs["environmentId"] = args?.environmentId;
resourceInputs["kmsKeyIdentifier"] = args?.kmsKeyIdentifier;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
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