@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)
100 lines • 6.09 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.LaunchConfiguration = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* The AWS::AutoScaling::LaunchConfiguration resource specifies the launch configuration that can be used by an Auto Scaling group to configure Amazon EC2 instances.
*/
class LaunchConfiguration extends pulumi.CustomResource {
/**
* Get an existing LaunchConfiguration 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 LaunchConfiguration(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of LaunchConfiguration. 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'] === LaunchConfiguration.__pulumiType;
}
/**
* Create a LaunchConfiguration 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.imageId === undefined) && !opts.urn) {
throw new Error("Missing required property 'imageId'");
}
if ((!args || args.instanceType === undefined) && !opts.urn) {
throw new Error("Missing required property 'instanceType'");
}
resourceInputs["associatePublicIpAddress"] = args ? args.associatePublicIpAddress : undefined;
resourceInputs["blockDeviceMappings"] = args ? args.blockDeviceMappings : undefined;
resourceInputs["classicLinkVpcId"] = args ? args.classicLinkVpcId : undefined;
resourceInputs["classicLinkVpcSecurityGroups"] = args ? args.classicLinkVpcSecurityGroups : undefined;
resourceInputs["ebsOptimized"] = args ? args.ebsOptimized : undefined;
resourceInputs["iamInstanceProfile"] = args ? args.iamInstanceProfile : undefined;
resourceInputs["imageId"] = args ? args.imageId : undefined;
resourceInputs["instanceId"] = args ? args.instanceId : undefined;
resourceInputs["instanceMonitoring"] = args ? args.instanceMonitoring : undefined;
resourceInputs["instanceType"] = args ? args.instanceType : undefined;
resourceInputs["kernelId"] = args ? args.kernelId : undefined;
resourceInputs["keyName"] = args ? args.keyName : undefined;
resourceInputs["launchConfigurationName"] = args ? args.launchConfigurationName : undefined;
resourceInputs["metadataOptions"] = args ? args.metadataOptions : undefined;
resourceInputs["placementTenancy"] = args ? args.placementTenancy : undefined;
resourceInputs["ramDiskId"] = args ? args.ramDiskId : undefined;
resourceInputs["securityGroups"] = args ? args.securityGroups : undefined;
resourceInputs["spotPrice"] = args ? args.spotPrice : undefined;
resourceInputs["userData"] = args ? args.userData : undefined;
}
else {
resourceInputs["associatePublicIpAddress"] = undefined /*out*/;
resourceInputs["blockDeviceMappings"] = undefined /*out*/;
resourceInputs["classicLinkVpcId"] = undefined /*out*/;
resourceInputs["classicLinkVpcSecurityGroups"] = undefined /*out*/;
resourceInputs["ebsOptimized"] = undefined /*out*/;
resourceInputs["iamInstanceProfile"] = undefined /*out*/;
resourceInputs["imageId"] = undefined /*out*/;
resourceInputs["instanceId"] = undefined /*out*/;
resourceInputs["instanceMonitoring"] = undefined /*out*/;
resourceInputs["instanceType"] = undefined /*out*/;
resourceInputs["kernelId"] = undefined /*out*/;
resourceInputs["keyName"] = undefined /*out*/;
resourceInputs["launchConfigurationName"] = undefined /*out*/;
resourceInputs["metadataOptions"] = undefined /*out*/;
resourceInputs["placementTenancy"] = undefined /*out*/;
resourceInputs["ramDiskId"] = undefined /*out*/;
resourceInputs["securityGroups"] = undefined /*out*/;
resourceInputs["spotPrice"] = undefined /*out*/;
resourceInputs["userData"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const replaceOnChanges = { replaceOnChanges: ["associatePublicIpAddress", "blockDeviceMappings[*]", "classicLinkVpcId", "classicLinkVpcSecurityGroups[*]", "ebsOptimized", "iamInstanceProfile", "imageId", "instanceId", "instanceMonitoring", "instanceType", "kernelId", "keyName", "launchConfigurationName", "metadataOptions", "placementTenancy", "ramDiskId", "securityGroups[*]", "spotPrice", "userData"] };
opts = pulumi.mergeOptions(opts, replaceOnChanges);
super(LaunchConfiguration.__pulumiType, name, resourceInputs, opts);
}
}
exports.LaunchConfiguration = LaunchConfiguration;
/** @internal */
LaunchConfiguration.__pulumiType = 'aws-native:autoscaling:LaunchConfiguration';
//# sourceMappingURL=launchConfiguration.js.map