UNPKG

@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)

152 lines • 9.06 kB
"use strict"; // *** 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::EC2::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, { ...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) { resourceInputs["additionalInfo"] = args?.additionalInfo; resourceInputs["affinity"] = args?.affinity; resourceInputs["availabilityZone"] = args?.availabilityZone; resourceInputs["blockDeviceMappings"] = args?.blockDeviceMappings; resourceInputs["cpuOptions"] = args?.cpuOptions; resourceInputs["creditSpecification"] = args?.creditSpecification; resourceInputs["disableApiTermination"] = args?.disableApiTermination; resourceInputs["ebsOptimized"] = args?.ebsOptimized; resourceInputs["elasticGpuSpecifications"] = args?.elasticGpuSpecifications; resourceInputs["elasticInferenceAccelerators"] = args?.elasticInferenceAccelerators; resourceInputs["enclaveOptions"] = args?.enclaveOptions; resourceInputs["hibernationOptions"] = args?.hibernationOptions; resourceInputs["hostId"] = args?.hostId; resourceInputs["hostResourceGroupArn"] = args?.hostResourceGroupArn; resourceInputs["iamInstanceProfile"] = args?.iamInstanceProfile; resourceInputs["imageId"] = args?.imageId; resourceInputs["instanceInitiatedShutdownBehavior"] = args?.instanceInitiatedShutdownBehavior; resourceInputs["instanceType"] = args?.instanceType; resourceInputs["ipv6AddressCount"] = args?.ipv6AddressCount; resourceInputs["ipv6Addresses"] = args?.ipv6Addresses; resourceInputs["kernelId"] = args?.kernelId; resourceInputs["keyName"] = args?.keyName; resourceInputs["launchTemplate"] = args?.launchTemplate; resourceInputs["licenseSpecifications"] = args?.licenseSpecifications; resourceInputs["metadataOptions"] = args?.metadataOptions; resourceInputs["monitoring"] = args?.monitoring; resourceInputs["networkInterfaces"] = args?.networkInterfaces; resourceInputs["placementGroupName"] = args?.placementGroupName; resourceInputs["privateDnsNameOptions"] = args?.privateDnsNameOptions; resourceInputs["privateIpAddress"] = args?.privateIpAddress; resourceInputs["propagateTagsToVolumeOnCreation"] = args?.propagateTagsToVolumeOnCreation; resourceInputs["ramdiskId"] = args?.ramdiskId; resourceInputs["securityGroupIds"] = args?.securityGroupIds; resourceInputs["securityGroups"] = args?.securityGroups; resourceInputs["sourceDestCheck"] = args?.sourceDestCheck; resourceInputs["ssmAssociations"] = args?.ssmAssociations; resourceInputs["subnetId"] = args?.subnetId; resourceInputs["tags"] = args?.tags; resourceInputs["tenancy"] = args?.tenancy; resourceInputs["userData"] = args?.userData; resourceInputs["volumes"] = args?.volumes; resourceInputs["instanceId"] = undefined /*out*/; resourceInputs["privateDnsName"] = undefined /*out*/; resourceInputs["privateIp"] = undefined /*out*/; resourceInputs["publicDnsName"] = undefined /*out*/; resourceInputs["publicIp"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["vpcId"] = undefined /*out*/; } else { resourceInputs["additionalInfo"] = undefined /*out*/; resourceInputs["affinity"] = undefined /*out*/; resourceInputs["availabilityZone"] = undefined /*out*/; resourceInputs["blockDeviceMappings"] = undefined /*out*/; resourceInputs["cpuOptions"] = undefined /*out*/; resourceInputs["creditSpecification"] = undefined /*out*/; resourceInputs["disableApiTermination"] = undefined /*out*/; resourceInputs["ebsOptimized"] = undefined /*out*/; resourceInputs["elasticGpuSpecifications"] = undefined /*out*/; resourceInputs["elasticInferenceAccelerators"] = undefined /*out*/; resourceInputs["enclaveOptions"] = undefined /*out*/; resourceInputs["hibernationOptions"] = undefined /*out*/; resourceInputs["hostId"] = undefined /*out*/; resourceInputs["hostResourceGroupArn"] = undefined /*out*/; resourceInputs["iamInstanceProfile"] = undefined /*out*/; resourceInputs["imageId"] = undefined /*out*/; resourceInputs["instanceId"] = undefined /*out*/; resourceInputs["instanceInitiatedShutdownBehavior"] = undefined /*out*/; resourceInputs["instanceType"] = undefined /*out*/; resourceInputs["ipv6AddressCount"] = undefined /*out*/; resourceInputs["ipv6Addresses"] = undefined /*out*/; resourceInputs["kernelId"] = undefined /*out*/; resourceInputs["keyName"] = undefined /*out*/; resourceInputs["launchTemplate"] = undefined /*out*/; resourceInputs["licenseSpecifications"] = undefined /*out*/; resourceInputs["metadataOptions"] = undefined /*out*/; resourceInputs["monitoring"] = undefined /*out*/; resourceInputs["networkInterfaces"] = undefined /*out*/; resourceInputs["placementGroupName"] = undefined /*out*/; resourceInputs["privateDnsName"] = undefined /*out*/; resourceInputs["privateDnsNameOptions"] = undefined /*out*/; resourceInputs["privateIp"] = undefined /*out*/; resourceInputs["privateIpAddress"] = undefined /*out*/; resourceInputs["propagateTagsToVolumeOnCreation"] = undefined /*out*/; resourceInputs["publicDnsName"] = undefined /*out*/; resourceInputs["publicIp"] = undefined /*out*/; resourceInputs["ramdiskId"] = undefined /*out*/; resourceInputs["securityGroupIds"] = undefined /*out*/; resourceInputs["securityGroups"] = undefined /*out*/; resourceInputs["sourceDestCheck"] = undefined /*out*/; resourceInputs["ssmAssociations"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["subnetId"] = undefined /*out*/; resourceInputs["tags"] = undefined /*out*/; resourceInputs["tenancy"] = undefined /*out*/; resourceInputs["userData"] = undefined /*out*/; resourceInputs["volumes"] = undefined /*out*/; resourceInputs["vpcId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const replaceOnChanges = { replaceOnChanges: ["availabilityZone", "cpuOptions", "elasticGpuSpecifications[*]", "elasticInferenceAccelerators[*]", "enclaveOptions", "hibernationOptions", "hostResourceGroupArn", "imageId", "ipv6AddressCount", "ipv6Addresses[*]", "keyName", "launchTemplate", "licenseSpecifications[*]", "networkInterfaces[*]", "placementGroupName", "privateIpAddress", "securityGroups[*]", "subnetId"] }; opts = pulumi.mergeOptions(opts, replaceOnChanges); super(Instance.__pulumiType, name, resourceInputs, opts); } } exports.Instance = Instance; /** @internal */ Instance.__pulumiType = 'aws-native:ec2:Instance'; //# sourceMappingURL=instance.js.map