@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.42 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.Instance = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource Type definition for AWS::Lightsail::Instance
*/
class Instance extends pulumi.CustomResource {
/**
* Get an existing Instance 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 Instance(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Instance. 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'] === Instance.__pulumiType;
}
/**
* Create a Instance 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 || args.blueprintId === undefined) && !opts.urn) {
throw new Error("Missing required property 'blueprintId'");
}
if ((!args || args.bundleId === undefined) && !opts.urn) {
throw new Error("Missing required property 'bundleId'");
}
resourceInputs["addOns"] = args ? args.addOns : undefined;
resourceInputs["availabilityZone"] = args ? args.availabilityZone : undefined;
resourceInputs["blueprintId"] = args ? args.blueprintId : undefined;
resourceInputs["bundleId"] = args ? args.bundleId : undefined;
resourceInputs["hardware"] = args ? args.hardware : undefined;
resourceInputs["instanceName"] = args ? args.instanceName : undefined;
resourceInputs["keyPairName"] = args ? args.keyPairName : undefined;
resourceInputs["location"] = args ? args.location : undefined;
resourceInputs["networking"] = args ? args.networking : undefined;
resourceInputs["state"] = args ? args.state : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["userData"] = args ? args.userData : undefined;
resourceInputs["instanceArn"] = undefined /*out*/;
resourceInputs["ipv6Addresses"] = undefined /*out*/;
resourceInputs["isStaticIp"] = undefined /*out*/;
resourceInputs["privateIpAddress"] = undefined /*out*/;
resourceInputs["publicIpAddress"] = undefined /*out*/;
resourceInputs["resourceType"] = undefined /*out*/;
resourceInputs["sshKeyName"] = undefined /*out*/;
resourceInputs["supportCode"] = undefined /*out*/;
resourceInputs["userName"] = undefined /*out*/;
}
else {
resourceInputs["addOns"] = undefined /*out*/;
resourceInputs["availabilityZone"] = undefined /*out*/;
resourceInputs["blueprintId"] = undefined /*out*/;
resourceInputs["bundleId"] = undefined /*out*/;
resourceInputs["hardware"] = undefined /*out*/;
resourceInputs["instanceArn"] = undefined /*out*/;
resourceInputs["instanceName"] = undefined /*out*/;
resourceInputs["ipv6Addresses"] = undefined /*out*/;
resourceInputs["isStaticIp"] = undefined /*out*/;
resourceInputs["keyPairName"] = undefined /*out*/;
resourceInputs["location"] = undefined /*out*/;
resourceInputs["networking"] = undefined /*out*/;
resourceInputs["privateIpAddress"] = undefined /*out*/;
resourceInputs["publicIpAddress"] = undefined /*out*/;
resourceInputs["resourceType"] = undefined /*out*/;
resourceInputs["sshKeyName"] = undefined /*out*/;
resourceInputs["state"] = undefined /*out*/;
resourceInputs["supportCode"] = undefined /*out*/;
resourceInputs["tags"] = undefined /*out*/;
resourceInputs["userData"] = undefined /*out*/;
resourceInputs["userName"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const replaceOnChanges = { replaceOnChanges: ["availabilityZone", "blueprintId", "bundleId", "instanceName"] };
opts = pulumi.mergeOptions(opts, replaceOnChanges);
super(Instance.__pulumiType, name, resourceInputs, opts);
}
}
exports.Instance = Instance;
/** @internal */
Instance.__pulumiType = 'aws-native:lightsail:Instance';
//# sourceMappingURL=instance.js.map