@pulumi/aws-native
Version:
The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)
104 lines • 5.25 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.Plan = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Represents a plan that specifies Regions, IAM roles, and workflows of logic required to perform the desired change to your multi-Region application
*/
class Plan extends pulumi.CustomResource {
/**
* Get an existing Plan 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 opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, opts) {
return new Plan(name, undefined, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Plan. 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'] === Plan.__pulumiType;
}
/**
* Create a Plan resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name, args, opts) {
let resourceInputs = {};
opts = opts || {};
if (!opts.id) {
if (args?.executionRole === undefined && !opts.urn) {
throw new Error("Missing required property 'executionRole'");
}
if (args?.recoveryApproach === undefined && !opts.urn) {
throw new Error("Missing required property 'recoveryApproach'");
}
if (args?.regions === undefined && !opts.urn) {
throw new Error("Missing required property 'regions'");
}
if (args?.workflows === undefined && !opts.urn) {
throw new Error("Missing required property 'workflows'");
}
resourceInputs["associatedAlarms"] = args?.associatedAlarms;
resourceInputs["description"] = args?.description;
resourceInputs["executionRole"] = args?.executionRole;
resourceInputs["name"] = args?.name;
resourceInputs["primaryRegion"] = args?.primaryRegion;
resourceInputs["recoveryApproach"] = args?.recoveryApproach;
resourceInputs["recoveryTimeObjectiveMinutes"] = args?.recoveryTimeObjectiveMinutes;
resourceInputs["regions"] = args?.regions;
resourceInputs["reportConfiguration"] = args?.reportConfiguration;
resourceInputs["tags"] = args?.tags;
resourceInputs["triggers"] = args?.triggers;
resourceInputs["workflows"] = args?.workflows;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["healthChecksForPlan"] = undefined /*out*/;
resourceInputs["owner"] = undefined /*out*/;
resourceInputs["planHealthChecks"] = undefined /*out*/;
resourceInputs["route53HealthChecks"] = undefined /*out*/;
resourceInputs["version"] = undefined /*out*/;
}
else {
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["associatedAlarms"] = undefined /*out*/;
resourceInputs["description"] = undefined /*out*/;
resourceInputs["executionRole"] = undefined /*out*/;
resourceInputs["healthChecksForPlan"] = undefined /*out*/;
resourceInputs["name"] = undefined /*out*/;
resourceInputs["owner"] = undefined /*out*/;
resourceInputs["planHealthChecks"] = undefined /*out*/;
resourceInputs["primaryRegion"] = undefined /*out*/;
resourceInputs["recoveryApproach"] = undefined /*out*/;
resourceInputs["recoveryTimeObjectiveMinutes"] = undefined /*out*/;
resourceInputs["regions"] = undefined /*out*/;
resourceInputs["reportConfiguration"] = undefined /*out*/;
resourceInputs["route53HealthChecks"] = undefined /*out*/;
resourceInputs["tags"] = undefined /*out*/;
resourceInputs["triggers"] = undefined /*out*/;
resourceInputs["version"] = undefined /*out*/;
resourceInputs["workflows"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const replaceOnChanges = { replaceOnChanges: ["name", "primaryRegion", "recoveryApproach", "regions[*]"] };
opts = pulumi.mergeOptions(opts, replaceOnChanges);
super(Plan.__pulumiType, name, resourceInputs, opts);
}
}
exports.Plan = Plan;
/** @internal */
Plan.__pulumiType = 'aws-native:arcregionswitch:Plan';
//# sourceMappingURL=plan.js.map