UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

127 lines 6.95 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.LaunchTemplate = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const foo = new volcengine.ecs.LaunchTemplate("foo", { * description: "acc-test-desc", * eipBandwidth: 1, * eipBillingType: "PostPaidByBandwidth", * eipIsp: "ChinaMobile", * hostName: "tf-host-name", * hpcClusterId: "hpcCluster-l8u24ovdmoab6opf", * imageId: "image-ycjwwciuzy5pkh54xx8f", * instanceChargeType: "PostPaid", * instanceName: "tf-acc-name", * instanceTypeId: "ecs.g1.large", * keyPairName: "tf-key-pair", * launchTemplateName: "tf-acc-template", * }); * ``` * * ## Import * * LaunchTemplate can be imported using the LaunchTemplateId, e.g. * When the instance launch template is modified, a new version will be created. * When the number of versions reaches the upper limit (30), the oldest version that is not the default version will be deleted. * * ```sh * $ pulumi import volcengine:ecs/launchTemplate:LaunchTemplate default lt-ysxc16auaugh9zfy**** * ``` */ class LaunchTemplate extends pulumi.CustomResource { /** * Get an existing LaunchTemplate 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 LaunchTemplate(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of LaunchTemplate. 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'] === LaunchTemplate.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["eipBandwidth"] = state ? state.eipBandwidth : undefined; resourceInputs["eipBillingType"] = state ? state.eipBillingType : undefined; resourceInputs["eipIsp"] = state ? state.eipIsp : undefined; resourceInputs["hostName"] = state ? state.hostName : undefined; resourceInputs["hpcClusterId"] = state ? state.hpcClusterId : undefined; resourceInputs["imageId"] = state ? state.imageId : undefined; resourceInputs["instanceChargeType"] = state ? state.instanceChargeType : undefined; resourceInputs["instanceName"] = state ? state.instanceName : undefined; resourceInputs["instanceTypeId"] = state ? state.instanceTypeId : undefined; resourceInputs["keyPairName"] = state ? state.keyPairName : undefined; resourceInputs["launchTemplateId"] = state ? state.launchTemplateId : undefined; resourceInputs["launchTemplateName"] = state ? state.launchTemplateName : undefined; resourceInputs["networkInterfaces"] = state ? state.networkInterfaces : undefined; resourceInputs["securityEnhancementStrategy"] = state ? state.securityEnhancementStrategy : undefined; resourceInputs["suffixIndex"] = state ? state.suffixIndex : undefined; resourceInputs["uniqueSuffix"] = state ? state.uniqueSuffix : undefined; resourceInputs["userData"] = state ? state.userData : undefined; resourceInputs["versionDescription"] = state ? state.versionDescription : undefined; resourceInputs["volumes"] = state ? state.volumes : undefined; resourceInputs["vpcId"] = state ? state.vpcId : undefined; resourceInputs["zoneId"] = state ? state.zoneId : undefined; } else { const args = argsOrState; if ((!args || args.launchTemplateName === undefined) && !opts.urn) { throw new Error("Missing required property 'launchTemplateName'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["eipBandwidth"] = args ? args.eipBandwidth : undefined; resourceInputs["eipBillingType"] = args ? args.eipBillingType : undefined; resourceInputs["eipIsp"] = args ? args.eipIsp : undefined; resourceInputs["hostName"] = args ? args.hostName : undefined; resourceInputs["hpcClusterId"] = args ? args.hpcClusterId : undefined; resourceInputs["imageId"] = args ? args.imageId : undefined; resourceInputs["instanceChargeType"] = args ? args.instanceChargeType : undefined; resourceInputs["instanceName"] = args ? args.instanceName : undefined; resourceInputs["instanceTypeId"] = args ? args.instanceTypeId : undefined; resourceInputs["keyPairName"] = args ? args.keyPairName : undefined; resourceInputs["launchTemplateName"] = args ? args.launchTemplateName : undefined; resourceInputs["networkInterfaces"] = args ? args.networkInterfaces : undefined; resourceInputs["securityEnhancementStrategy"] = args ? args.securityEnhancementStrategy : undefined; resourceInputs["suffixIndex"] = args ? args.suffixIndex : undefined; resourceInputs["uniqueSuffix"] = args ? args.uniqueSuffix : undefined; resourceInputs["userData"] = args ? args.userData : undefined; resourceInputs["versionDescription"] = args ? args.versionDescription : undefined; resourceInputs["volumes"] = args ? args.volumes : undefined; resourceInputs["vpcId"] = args ? args.vpcId : undefined; resourceInputs["zoneId"] = args ? args.zoneId : undefined; resourceInputs["launchTemplateId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(LaunchTemplate.__pulumiType, name, resourceInputs, opts); } } exports.LaunchTemplate = LaunchTemplate; /** @internal */ LaunchTemplate.__pulumiType = 'volcengine:ecs/launchTemplate:LaunchTemplate'; //# sourceMappingURL=launchTemplate.js.map