1. Packages
  2. Volcengine
  3. API Docs
  4. ecs
  5. LaunchTemplate
Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine

volcengine.ecs.LaunchTemplate

Explore with Pulumi AI

Example Usage

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",
});
Copy
import pulumi
import pulumi_volcengine as volcengine

foo = volcengine.ecs.LaunchTemplate("foo",
    description="acc-test-desc",
    eip_bandwidth=1,
    eip_billing_type="PostPaidByBandwidth",
    eip_isp="ChinaMobile",
    host_name="tf-host-name",
    hpc_cluster_id="hpcCluster-l8u24ovdmoab6opf",
    image_id="image-ycjwwciuzy5pkh54xx8f",
    instance_charge_type="PostPaid",
    instance_name="tf-acc-name",
    instance_type_id="ecs.g1.large",
    key_pair_name="tf-key-pair",
    launch_template_name="tf-acc-template")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecs.NewLaunchTemplate(ctx, "foo", &ecs.LaunchTemplateArgs{
			Description:        pulumi.String("acc-test-desc"),
			EipBandwidth:       pulumi.Int(1),
			EipBillingType:     pulumi.String("PostPaidByBandwidth"),
			EipIsp:             pulumi.String("ChinaMobile"),
			HostName:           pulumi.String("tf-host-name"),
			HpcClusterId:       pulumi.String("hpcCluster-l8u24ovdmoab6opf"),
			ImageId:            pulumi.String("image-ycjwwciuzy5pkh54xx8f"),
			InstanceChargeType: pulumi.String("PostPaid"),
			InstanceName:       pulumi.String("tf-acc-name"),
			InstanceTypeId:     pulumi.String("ecs.g1.large"),
			KeyPairName:        pulumi.String("tf-key-pair"),
			LaunchTemplateName: pulumi.String("tf-acc-template"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;

return await Deployment.RunAsync(() => 
{
    var foo = new Volcengine.Ecs.LaunchTemplate("foo", new()
    {
        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",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.LaunchTemplate;
import com.pulumi.volcengine.ecs.LaunchTemplateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var foo = new LaunchTemplate("foo", LaunchTemplateArgs.builder()        
            .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")
            .build());

    }
}
Copy
resources:
  foo:
    type: volcengine:ecs:LaunchTemplate
    properties:
      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
Copy

Create LaunchTemplate Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new LaunchTemplate(name: string, args: LaunchTemplateArgs, opts?: CustomResourceOptions);
@overload
def LaunchTemplate(resource_name: str,
                   args: LaunchTemplateArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def LaunchTemplate(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   launch_template_name: Optional[str] = None,
                   key_pair_name: Optional[str] = None,
                   volumes: Optional[Sequence[LaunchTemplateVolumeArgs]] = None,
                   eip_isp: Optional[str] = None,
                   host_name: Optional[str] = None,
                   hpc_cluster_id: Optional[str] = None,
                   image_id: Optional[str] = None,
                   instance_charge_type: Optional[str] = None,
                   eip_bandwidth: Optional[int] = None,
                   zone_id: Optional[str] = None,
                   eip_billing_type: Optional[str] = None,
                   instance_name: Optional[str] = None,
                   network_interfaces: Optional[Sequence[LaunchTemplateNetworkInterfaceArgs]] = None,
                   security_enhancement_strategy: Optional[str] = None,
                   suffix_index: Optional[int] = None,
                   unique_suffix: Optional[bool] = None,
                   user_data: Optional[str] = None,
                   version_description: Optional[str] = None,
                   description: Optional[str] = None,
                   vpc_id: Optional[str] = None,
                   instance_type_id: Optional[str] = None)
func NewLaunchTemplate(ctx *Context, name string, args LaunchTemplateArgs, opts ...ResourceOption) (*LaunchTemplate, error)
public LaunchTemplate(string name, LaunchTemplateArgs args, CustomResourceOptions? opts = null)
public LaunchTemplate(String name, LaunchTemplateArgs args)
public LaunchTemplate(String name, LaunchTemplateArgs args, CustomResourceOptions options)
type: volcengine:ecs:LaunchTemplate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. LaunchTemplateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. LaunchTemplateArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. LaunchTemplateArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. LaunchTemplateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. LaunchTemplateArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var launchTemplateResource = new Volcengine.Ecs.LaunchTemplate("launchTemplateResource", new()
{
    LaunchTemplateName = "string",
    KeyPairName = "string",
    Volumes = new[]
    {
        new Volcengine.Ecs.Inputs.LaunchTemplateVolumeArgs
        {
            DeleteWithInstance = false,
            Size = 0,
            VolumeType = "string",
        },
    },
    EipIsp = "string",
    HostName = "string",
    HpcClusterId = "string",
    ImageId = "string",
    InstanceChargeType = "string",
    EipBandwidth = 0,
    ZoneId = "string",
    EipBillingType = "string",
    InstanceName = "string",
    NetworkInterfaces = new[]
    {
        new Volcengine.Ecs.Inputs.LaunchTemplateNetworkInterfaceArgs
        {
            SecurityGroupIds = new[]
            {
                "string",
            },
            SubnetId = "string",
        },
    },
    SecurityEnhancementStrategy = "string",
    SuffixIndex = 0,
    UniqueSuffix = false,
    UserData = "string",
    VersionDescription = "string",
    Description = "string",
    VpcId = "string",
    InstanceTypeId = "string",
});
Copy
example, err := ecs.NewLaunchTemplate(ctx, "launchTemplateResource", &ecs.LaunchTemplateArgs{
	LaunchTemplateName: pulumi.String("string"),
	KeyPairName:        pulumi.String("string"),
	Volumes: ecs.LaunchTemplateVolumeArray{
		&ecs.LaunchTemplateVolumeArgs{
			DeleteWithInstance: pulumi.Bool(false),
			Size:               pulumi.Int(0),
			VolumeType:         pulumi.String("string"),
		},
	},
	EipIsp:             pulumi.String("string"),
	HostName:           pulumi.String("string"),
	HpcClusterId:       pulumi.String("string"),
	ImageId:            pulumi.String("string"),
	InstanceChargeType: pulumi.String("string"),
	EipBandwidth:       pulumi.Int(0),
	ZoneId:             pulumi.String("string"),
	EipBillingType:     pulumi.String("string"),
	InstanceName:       pulumi.String("string"),
	NetworkInterfaces: ecs.LaunchTemplateNetworkInterfaceArray{
		&ecs.LaunchTemplateNetworkInterfaceArgs{
			SecurityGroupIds: pulumi.StringArray{
				pulumi.String("string"),
			},
			SubnetId: pulumi.String("string"),
		},
	},
	SecurityEnhancementStrategy: pulumi.String("string"),
	SuffixIndex:                 pulumi.Int(0),
	UniqueSuffix:                pulumi.Bool(false),
	UserData:                    pulumi.String("string"),
	VersionDescription:          pulumi.String("string"),
	Description:                 pulumi.String("string"),
	VpcId:                       pulumi.String("string"),
	InstanceTypeId:              pulumi.String("string"),
})
Copy
var launchTemplateResource = new LaunchTemplate("launchTemplateResource", LaunchTemplateArgs.builder()
    .launchTemplateName("string")
    .keyPairName("string")
    .volumes(LaunchTemplateVolumeArgs.builder()
        .deleteWithInstance(false)
        .size(0)
        .volumeType("string")
        .build())
    .eipIsp("string")
    .hostName("string")
    .hpcClusterId("string")
    .imageId("string")
    .instanceChargeType("string")
    .eipBandwidth(0)
    .zoneId("string")
    .eipBillingType("string")
    .instanceName("string")
    .networkInterfaces(LaunchTemplateNetworkInterfaceArgs.builder()
        .securityGroupIds("string")
        .subnetId("string")
        .build())
    .securityEnhancementStrategy("string")
    .suffixIndex(0)
    .uniqueSuffix(false)
    .userData("string")
    .versionDescription("string")
    .description("string")
    .vpcId("string")
    .instanceTypeId("string")
    .build());
Copy
launch_template_resource = volcengine.ecs.LaunchTemplate("launchTemplateResource",
    launch_template_name="string",
    key_pair_name="string",
    volumes=[{
        "delete_with_instance": False,
        "size": 0,
        "volume_type": "string",
    }],
    eip_isp="string",
    host_name="string",
    hpc_cluster_id="string",
    image_id="string",
    instance_charge_type="string",
    eip_bandwidth=0,
    zone_id="string",
    eip_billing_type="string",
    instance_name="string",
    network_interfaces=[{
        "security_group_ids": ["string"],
        "subnet_id": "string",
    }],
    security_enhancement_strategy="string",
    suffix_index=0,
    unique_suffix=False,
    user_data="string",
    version_description="string",
    description="string",
    vpc_id="string",
    instance_type_id="string")
Copy
const launchTemplateResource = new volcengine.ecs.LaunchTemplate("launchTemplateResource", {
    launchTemplateName: "string",
    keyPairName: "string",
    volumes: [{
        deleteWithInstance: false,
        size: 0,
        volumeType: "string",
    }],
    eipIsp: "string",
    hostName: "string",
    hpcClusterId: "string",
    imageId: "string",
    instanceChargeType: "string",
    eipBandwidth: 0,
    zoneId: "string",
    eipBillingType: "string",
    instanceName: "string",
    networkInterfaces: [{
        securityGroupIds: ["string"],
        subnetId: "string",
    }],
    securityEnhancementStrategy: "string",
    suffixIndex: 0,
    uniqueSuffix: false,
    userData: "string",
    versionDescription: "string",
    description: "string",
    vpcId: "string",
    instanceTypeId: "string",
});
Copy
type: volcengine:ecs:LaunchTemplate
properties:
    description: string
    eipBandwidth: 0
    eipBillingType: string
    eipIsp: string
    hostName: string
    hpcClusterId: string
    imageId: string
    instanceChargeType: string
    instanceName: string
    instanceTypeId: string
    keyPairName: string
    launchTemplateName: string
    networkInterfaces:
        - securityGroupIds:
            - string
          subnetId: string
    securityEnhancementStrategy: string
    suffixIndex: 0
    uniqueSuffix: false
    userData: string
    versionDescription: string
    volumes:
        - deleteWithInstance: false
          size: 0
          volumeType: string
    vpcId: string
    zoneId: string
Copy

LaunchTemplate Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The LaunchTemplate resource accepts the following input properties:

LaunchTemplateName
This property is required.
Changes to this property will trigger replacement.
string
The name of the launch template.
Description string
The description of the instance.
EipBandwidth int
The EIP bandwidth which the scaling configuration set.
EipBillingType string
The EIP billing type which the scaling configuration set. Valid values: PostPaidByBandwidth, PostPaidByTraffic.
EipIsp string
The EIP ISP which the scaling configuration set. Valid values: BGP, ChinaMobile, ChinaUnicom, ChinaTelecom.
HostName string
The host name of the instance.
HpcClusterId string
The hpc cluster id.
ImageId string
The image ID.
InstanceChargeType string
The charge type of the instance and volume.
InstanceName string
The name of the instance.
InstanceTypeId string
The compute type of the instance.
KeyPairName string
When you log in to the instance using the SSH key pair, enter the name of the key pair.
NetworkInterfaces List<LaunchTemplateNetworkInterface>
The list of network interfaces. When creating an instance, it is supported to bind auxiliary network cards at the same time. The first one is the primary network card, and the others are secondary network cards.
SecurityEnhancementStrategy string
Whether to open the security reinforcement.
SuffixIndex int
The index of the ordered suffix.
UniqueSuffix bool
Indicates whether the ordered suffix is automatically added to Hostname and InstanceName when multiple instances are created.
UserData string
Instance custom data. The set custom data must be Base64 encoded, and the size of the custom data before Base64 encoding cannot exceed 16KB.
VersionDescription string
The latest version description of the launch template.
Volumes List<LaunchTemplateVolume>
The list of volume of the scaling configuration.
VpcId string
The vpc id.
ZoneId string
The zone id.
LaunchTemplateName
This property is required.
Changes to this property will trigger replacement.
string
The name of the launch template.
Description string
The description of the instance.
EipBandwidth int
The EIP bandwidth which the scaling configuration set.
EipBillingType string
The EIP billing type which the scaling configuration set. Valid values: PostPaidByBandwidth, PostPaidByTraffic.
EipIsp string
The EIP ISP which the scaling configuration set. Valid values: BGP, ChinaMobile, ChinaUnicom, ChinaTelecom.
HostName string
The host name of the instance.
HpcClusterId string
The hpc cluster id.
ImageId string
The image ID.
InstanceChargeType string
The charge type of the instance and volume.
InstanceName string
The name of the instance.
InstanceTypeId string
The compute type of the instance.
KeyPairName string
When you log in to the instance using the SSH key pair, enter the name of the key pair.
NetworkInterfaces []LaunchTemplateNetworkInterfaceArgs
The list of network interfaces. When creating an instance, it is supported to bind auxiliary network cards at the same time. The first one is the primary network card, and the others are secondary network cards.
SecurityEnhancementStrategy string
Whether to open the security reinforcement.
SuffixIndex int
The index of the ordered suffix.
UniqueSuffix bool
Indicates whether the ordered suffix is automatically added to Hostname and InstanceName when multiple instances are created.
UserData string
Instance custom data. The set custom data must be Base64 encoded, and the size of the custom data before Base64 encoding cannot exceed 16KB.
VersionDescription string
The latest version description of the launch template.
Volumes []LaunchTemplateVolumeArgs
The list of volume of the scaling configuration.
VpcId string
The vpc id.
ZoneId string
The zone id.
launchTemplateName
This property is required.
Changes to this property will trigger replacement.
String
The name of the launch template.
description String
The description of the instance.
eipBandwidth Integer
The EIP bandwidth which the scaling configuration set.
eipBillingType String
The EIP billing type which the scaling configuration set. Valid values: PostPaidByBandwidth, PostPaidByTraffic.
eipIsp String
The EIP ISP which the scaling configuration set. Valid values: BGP, ChinaMobile, ChinaUnicom, ChinaTelecom.
hostName String
The host name of the instance.
hpcClusterId String
The hpc cluster id.
imageId String
The image ID.
instanceChargeType String
The charge type of the instance and volume.
instanceName String
The name of the instance.
instanceTypeId String
The compute type of the instance.
keyPairName String
When you log in to the instance using the SSH key pair, enter the name of the key pair.
networkInterfaces List<LaunchTemplateNetworkInterface>
The list of network interfaces. When creating an instance, it is supported to bind auxiliary network cards at the same time. The first one is the primary network card, and the others are secondary network cards.
securityEnhancementStrategy String
Whether to open the security reinforcement.
suffixIndex Integer
The index of the ordered suffix.
uniqueSuffix Boolean
Indicates whether the ordered suffix is automatically added to Hostname and InstanceName when multiple instances are created.
userData String
Instance custom data. The set custom data must be Base64 encoded, and the size of the custom data before Base64 encoding cannot exceed 16KB.
versionDescription String
The latest version description of the launch template.
volumes List<LaunchTemplateVolume>
The list of volume of the scaling configuration.
vpcId String
The vpc id.
zoneId String
The zone id.
launchTemplateName
This property is required.
Changes to this property will trigger replacement.
string
The name of the launch template.
description string
The description of the instance.
eipBandwidth number
The EIP bandwidth which the scaling configuration set.
eipBillingType string
The EIP billing type which the scaling configuration set. Valid values: PostPaidByBandwidth, PostPaidByTraffic.
eipIsp string
The EIP ISP which the scaling configuration set. Valid values: BGP, ChinaMobile, ChinaUnicom, ChinaTelecom.
hostName string
The host name of the instance.
hpcClusterId string
The hpc cluster id.
imageId string
The image ID.
instanceChargeType string
The charge type of the instance and volume.
instanceName string
The name of the instance.
instanceTypeId string
The compute type of the instance.
keyPairName string
When you log in to the instance using the SSH key pair, enter the name of the key pair.
networkInterfaces LaunchTemplateNetworkInterface[]
The list of network interfaces. When creating an instance, it is supported to bind auxiliary network cards at the same time. The first one is the primary network card, and the others are secondary network cards.
securityEnhancementStrategy string
Whether to open the security reinforcement.
suffixIndex number
The index of the ordered suffix.
uniqueSuffix boolean
Indicates whether the ordered suffix is automatically added to Hostname and InstanceName when multiple instances are created.
userData string
Instance custom data. The set custom data must be Base64 encoded, and the size of the custom data before Base64 encoding cannot exceed 16KB.
versionDescription string
The latest version description of the launch template.
volumes LaunchTemplateVolume[]
The list of volume of the scaling configuration.
vpcId string
The vpc id.
zoneId string
The zone id.
launch_template_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the launch template.
description str
The description of the instance.
eip_bandwidth int
The EIP bandwidth which the scaling configuration set.
eip_billing_type str
The EIP billing type which the scaling configuration set. Valid values: PostPaidByBandwidth, PostPaidByTraffic.
eip_isp str
The EIP ISP which the scaling configuration set. Valid values: BGP, ChinaMobile, ChinaUnicom, ChinaTelecom.
host_name str
The host name of the instance.
hpc_cluster_id str
The hpc cluster id.
image_id str
The image ID.
instance_charge_type str
The charge type of the instance and volume.
instance_name str
The name of the instance.
instance_type_id str
The compute type of the instance.
key_pair_name str
When you log in to the instance using the SSH key pair, enter the name of the key pair.
network_interfaces Sequence[LaunchTemplateNetworkInterfaceArgs]
The list of network interfaces. When creating an instance, it is supported to bind auxiliary network cards at the same time. The first one is the primary network card, and the others are secondary network cards.
security_enhancement_strategy str
Whether to open the security reinforcement.
suffix_index int
The index of the ordered suffix.
unique_suffix bool
Indicates whether the ordered suffix is automatically added to Hostname and InstanceName when multiple instances are created.
user_data str
Instance custom data. The set custom data must be Base64 encoded, and the size of the custom data before Base64 encoding cannot exceed 16KB.
version_description str
The latest version description of the launch template.
volumes Sequence[LaunchTemplateVolumeArgs]
The list of volume of the scaling configuration.
vpc_id str
The vpc id.
zone_id str
The zone id.
launchTemplateName
This property is required.
Changes to this property will trigger replacement.
String
The name of the launch template.
description String
The description of the instance.
eipBandwidth Number
The EIP bandwidth which the scaling configuration set.
eipBillingType String
The EIP billing type which the scaling configuration set. Valid values: PostPaidByBandwidth, PostPaidByTraffic.
eipIsp String
The EIP ISP which the scaling configuration set. Valid values: BGP, ChinaMobile, ChinaUnicom, ChinaTelecom.
hostName String
The host name of the instance.
hpcClusterId String
The hpc cluster id.
imageId String
The image ID.
instanceChargeType String
The charge type of the instance and volume.
instanceName String
The name of the instance.
instanceTypeId String
The compute type of the instance.
keyPairName String
When you log in to the instance using the SSH key pair, enter the name of the key pair.
networkInterfaces List<Property Map>
The list of network interfaces. When creating an instance, it is supported to bind auxiliary network cards at the same time. The first one is the primary network card, and the others are secondary network cards.
securityEnhancementStrategy String
Whether to open the security reinforcement.
suffixIndex Number
The index of the ordered suffix.
uniqueSuffix Boolean
Indicates whether the ordered suffix is automatically added to Hostname and InstanceName when multiple instances are created.
userData String
Instance custom data. The set custom data must be Base64 encoded, and the size of the custom data before Base64 encoding cannot exceed 16KB.
versionDescription String
The latest version description of the launch template.
volumes List<Property Map>
The list of volume of the scaling configuration.
vpcId String
The vpc id.
zoneId String
The zone id.

Outputs

All input properties are implicitly available as output properties. Additionally, the LaunchTemplate resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
LaunchTemplateId string
The launch template id.
Id string
The provider-assigned unique ID for this managed resource.
LaunchTemplateId string
The launch template id.
id String
The provider-assigned unique ID for this managed resource.
launchTemplateId String
The launch template id.
id string
The provider-assigned unique ID for this managed resource.
launchTemplateId string
The launch template id.
id str
The provider-assigned unique ID for this managed resource.
launch_template_id str
The launch template id.
id String
The provider-assigned unique ID for this managed resource.
launchTemplateId String
The launch template id.

Look up Existing LaunchTemplate Resource

Get an existing LaunchTemplate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: LaunchTemplateState, opts?: CustomResourceOptions): LaunchTemplate
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        eip_bandwidth: Optional[int] = None,
        eip_billing_type: Optional[str] = None,
        eip_isp: Optional[str] = None,
        host_name: Optional[str] = None,
        hpc_cluster_id: Optional[str] = None,
        image_id: Optional[str] = None,
        instance_charge_type: Optional[str] = None,
        instance_name: Optional[str] = None,
        instance_type_id: Optional[str] = None,
        key_pair_name: Optional[str] = None,
        launch_template_id: Optional[str] = None,
        launch_template_name: Optional[str] = None,
        network_interfaces: Optional[Sequence[LaunchTemplateNetworkInterfaceArgs]] = None,
        security_enhancement_strategy: Optional[str] = None,
        suffix_index: Optional[int] = None,
        unique_suffix: Optional[bool] = None,
        user_data: Optional[str] = None,
        version_description: Optional[str] = None,
        volumes: Optional[Sequence[LaunchTemplateVolumeArgs]] = None,
        vpc_id: Optional[str] = None,
        zone_id: Optional[str] = None) -> LaunchTemplate
func GetLaunchTemplate(ctx *Context, name string, id IDInput, state *LaunchTemplateState, opts ...ResourceOption) (*LaunchTemplate, error)
public static LaunchTemplate Get(string name, Input<string> id, LaunchTemplateState? state, CustomResourceOptions? opts = null)
public static LaunchTemplate get(String name, Output<String> id, LaunchTemplateState state, CustomResourceOptions options)
resources:  _:    type: volcengine:ecs:LaunchTemplate    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Description string
The description of the instance.
EipBandwidth int
The EIP bandwidth which the scaling configuration set.
EipBillingType string
The EIP billing type which the scaling configuration set. Valid values: PostPaidByBandwidth, PostPaidByTraffic.
EipIsp string
The EIP ISP which the scaling configuration set. Valid values: BGP, ChinaMobile, ChinaUnicom, ChinaTelecom.
HostName string
The host name of the instance.
HpcClusterId string
The hpc cluster id.
ImageId string
The image ID.
InstanceChargeType string
The charge type of the instance and volume.
InstanceName string
The name of the instance.
InstanceTypeId string
The compute type of the instance.
KeyPairName string
When you log in to the instance using the SSH key pair, enter the name of the key pair.
LaunchTemplateId string
The launch template id.
LaunchTemplateName Changes to this property will trigger replacement. string
The name of the launch template.
NetworkInterfaces List<LaunchTemplateNetworkInterface>
The list of network interfaces. When creating an instance, it is supported to bind auxiliary network cards at the same time. The first one is the primary network card, and the others are secondary network cards.
SecurityEnhancementStrategy string
Whether to open the security reinforcement.
SuffixIndex int
The index of the ordered suffix.
UniqueSuffix bool
Indicates whether the ordered suffix is automatically added to Hostname and InstanceName when multiple instances are created.
UserData string
Instance custom data. The set custom data must be Base64 encoded, and the size of the custom data before Base64 encoding cannot exceed 16KB.
VersionDescription string
The latest version description of the launch template.
Volumes List<LaunchTemplateVolume>
The list of volume of the scaling configuration.
VpcId string
The vpc id.
ZoneId string
The zone id.
Description string
The description of the instance.
EipBandwidth int
The EIP bandwidth which the scaling configuration set.
EipBillingType string
The EIP billing type which the scaling configuration set. Valid values: PostPaidByBandwidth, PostPaidByTraffic.
EipIsp string
The EIP ISP which the scaling configuration set. Valid values: BGP, ChinaMobile, ChinaUnicom, ChinaTelecom.
HostName string
The host name of the instance.
HpcClusterId string
The hpc cluster id.
ImageId string
The image ID.
InstanceChargeType string
The charge type of the instance and volume.
InstanceName string
The name of the instance.
InstanceTypeId string
The compute type of the instance.
KeyPairName string
When you log in to the instance using the SSH key pair, enter the name of the key pair.
LaunchTemplateId string
The launch template id.
LaunchTemplateName Changes to this property will trigger replacement. string
The name of the launch template.
NetworkInterfaces []LaunchTemplateNetworkInterfaceArgs
The list of network interfaces. When creating an instance, it is supported to bind auxiliary network cards at the same time. The first one is the primary network card, and the others are secondary network cards.
SecurityEnhancementStrategy string
Whether to open the security reinforcement.
SuffixIndex int
The index of the ordered suffix.
UniqueSuffix bool
Indicates whether the ordered suffix is automatically added to Hostname and InstanceName when multiple instances are created.
UserData string
Instance custom data. The set custom data must be Base64 encoded, and the size of the custom data before Base64 encoding cannot exceed 16KB.
VersionDescription string
The latest version description of the launch template.
Volumes []LaunchTemplateVolumeArgs
The list of volume of the scaling configuration.
VpcId string
The vpc id.
ZoneId string
The zone id.
description String
The description of the instance.
eipBandwidth Integer
The EIP bandwidth which the scaling configuration set.
eipBillingType String
The EIP billing type which the scaling configuration set. Valid values: PostPaidByBandwidth, PostPaidByTraffic.
eipIsp String
The EIP ISP which the scaling configuration set. Valid values: BGP, ChinaMobile, ChinaUnicom, ChinaTelecom.
hostName String
The host name of the instance.
hpcClusterId String
The hpc cluster id.
imageId String
The image ID.
instanceChargeType String
The charge type of the instance and volume.
instanceName String
The name of the instance.
instanceTypeId String
The compute type of the instance.
keyPairName String
When you log in to the instance using the SSH key pair, enter the name of the key pair.
launchTemplateId String
The launch template id.
launchTemplateName Changes to this property will trigger replacement. String
The name of the launch template.
networkInterfaces List<LaunchTemplateNetworkInterface>
The list of network interfaces. When creating an instance, it is supported to bind auxiliary network cards at the same time. The first one is the primary network card, and the others are secondary network cards.
securityEnhancementStrategy String
Whether to open the security reinforcement.
suffixIndex Integer
The index of the ordered suffix.
uniqueSuffix Boolean
Indicates whether the ordered suffix is automatically added to Hostname and InstanceName when multiple instances are created.
userData String
Instance custom data. The set custom data must be Base64 encoded, and the size of the custom data before Base64 encoding cannot exceed 16KB.
versionDescription String
The latest version description of the launch template.
volumes List<LaunchTemplateVolume>
The list of volume of the scaling configuration.
vpcId String
The vpc id.
zoneId String
The zone id.
description string
The description of the instance.
eipBandwidth number
The EIP bandwidth which the scaling configuration set.
eipBillingType string
The EIP billing type which the scaling configuration set. Valid values: PostPaidByBandwidth, PostPaidByTraffic.
eipIsp string
The EIP ISP which the scaling configuration set. Valid values: BGP, ChinaMobile, ChinaUnicom, ChinaTelecom.
hostName string
The host name of the instance.
hpcClusterId string
The hpc cluster id.
imageId string
The image ID.
instanceChargeType string
The charge type of the instance and volume.
instanceName string
The name of the instance.
instanceTypeId string
The compute type of the instance.
keyPairName string
When you log in to the instance using the SSH key pair, enter the name of the key pair.
launchTemplateId string
The launch template id.
launchTemplateName Changes to this property will trigger replacement. string
The name of the launch template.
networkInterfaces LaunchTemplateNetworkInterface[]
The list of network interfaces. When creating an instance, it is supported to bind auxiliary network cards at the same time. The first one is the primary network card, and the others are secondary network cards.
securityEnhancementStrategy string
Whether to open the security reinforcement.
suffixIndex number
The index of the ordered suffix.
uniqueSuffix boolean
Indicates whether the ordered suffix is automatically added to Hostname and InstanceName when multiple instances are created.
userData string
Instance custom data. The set custom data must be Base64 encoded, and the size of the custom data before Base64 encoding cannot exceed 16KB.
versionDescription string
The latest version description of the launch template.
volumes LaunchTemplateVolume[]
The list of volume of the scaling configuration.
vpcId string
The vpc id.
zoneId string
The zone id.
description str
The description of the instance.
eip_bandwidth int
The EIP bandwidth which the scaling configuration set.
eip_billing_type str
The EIP billing type which the scaling configuration set. Valid values: PostPaidByBandwidth, PostPaidByTraffic.
eip_isp str
The EIP ISP which the scaling configuration set. Valid values: BGP, ChinaMobile, ChinaUnicom, ChinaTelecom.
host_name str
The host name of the instance.
hpc_cluster_id str
The hpc cluster id.
image_id str
The image ID.
instance_charge_type str
The charge type of the instance and volume.
instance_name str
The name of the instance.
instance_type_id str
The compute type of the instance.
key_pair_name str
When you log in to the instance using the SSH key pair, enter the name of the key pair.
launch_template_id str
The launch template id.
launch_template_name Changes to this property will trigger replacement. str
The name of the launch template.
network_interfaces Sequence[LaunchTemplateNetworkInterfaceArgs]
The list of network interfaces. When creating an instance, it is supported to bind auxiliary network cards at the same time. The first one is the primary network card, and the others are secondary network cards.
security_enhancement_strategy str
Whether to open the security reinforcement.
suffix_index int
The index of the ordered suffix.
unique_suffix bool
Indicates whether the ordered suffix is automatically added to Hostname and InstanceName when multiple instances are created.
user_data str
Instance custom data. The set custom data must be Base64 encoded, and the size of the custom data before Base64 encoding cannot exceed 16KB.
version_description str
The latest version description of the launch template.
volumes Sequence[LaunchTemplateVolumeArgs]
The list of volume of the scaling configuration.
vpc_id str
The vpc id.
zone_id str
The zone id.
description String
The description of the instance.
eipBandwidth Number
The EIP bandwidth which the scaling configuration set.
eipBillingType String
The EIP billing type which the scaling configuration set. Valid values: PostPaidByBandwidth, PostPaidByTraffic.
eipIsp String
The EIP ISP which the scaling configuration set. Valid values: BGP, ChinaMobile, ChinaUnicom, ChinaTelecom.
hostName String
The host name of the instance.
hpcClusterId String
The hpc cluster id.
imageId String
The image ID.
instanceChargeType String
The charge type of the instance and volume.
instanceName String
The name of the instance.
instanceTypeId String
The compute type of the instance.
keyPairName String
When you log in to the instance using the SSH key pair, enter the name of the key pair.
launchTemplateId String
The launch template id.
launchTemplateName Changes to this property will trigger replacement. String
The name of the launch template.
networkInterfaces List<Property Map>
The list of network interfaces. When creating an instance, it is supported to bind auxiliary network cards at the same time. The first one is the primary network card, and the others are secondary network cards.
securityEnhancementStrategy String
Whether to open the security reinforcement.
suffixIndex Number
The index of the ordered suffix.
uniqueSuffix Boolean
Indicates whether the ordered suffix is automatically added to Hostname and InstanceName when multiple instances are created.
userData String
Instance custom data. The set custom data must be Base64 encoded, and the size of the custom data before Base64 encoding cannot exceed 16KB.
versionDescription String
The latest version description of the launch template.
volumes List<Property Map>
The list of volume of the scaling configuration.
vpcId String
The vpc id.
zoneId String
The zone id.

Supporting Types

LaunchTemplateNetworkInterface
, LaunchTemplateNetworkInterfaceArgs

SecurityGroupIds List<string>
The security group ID associated with the NIC.
SubnetId string
The private network subnet ID of the instance, when creating the instance, supports binding the secondary NIC at the same time.
SecurityGroupIds []string
The security group ID associated with the NIC.
SubnetId string
The private network subnet ID of the instance, when creating the instance, supports binding the secondary NIC at the same time.
securityGroupIds List<String>
The security group ID associated with the NIC.
subnetId String
The private network subnet ID of the instance, when creating the instance, supports binding the secondary NIC at the same time.
securityGroupIds string[]
The security group ID associated with the NIC.
subnetId string
The private network subnet ID of the instance, when creating the instance, supports binding the secondary NIC at the same time.
security_group_ids Sequence[str]
The security group ID associated with the NIC.
subnet_id str
The private network subnet ID of the instance, when creating the instance, supports binding the secondary NIC at the same time.
securityGroupIds List<String>
The security group ID associated with the NIC.
subnetId String
The private network subnet ID of the instance, when creating the instance, supports binding the secondary NIC at the same time.

LaunchTemplateVolume
, LaunchTemplateVolumeArgs

DeleteWithInstance bool
The delete with instance flag of volume. Valid values: true, false. Default value: true.
Size int
The size of volume.
VolumeType string
The type of volume.
DeleteWithInstance bool
The delete with instance flag of volume. Valid values: true, false. Default value: true.
Size int
The size of volume.
VolumeType string
The type of volume.
deleteWithInstance Boolean
The delete with instance flag of volume. Valid values: true, false. Default value: true.
size Integer
The size of volume.
volumeType String
The type of volume.
deleteWithInstance boolean
The delete with instance flag of volume. Valid values: true, false. Default value: true.
size number
The size of volume.
volumeType string
The type of volume.
delete_with_instance bool
The delete with instance flag of volume. Valid values: true, false. Default value: true.
size int
The size of volume.
volume_type str
The type of volume.
deleteWithInstance Boolean
The delete with instance flag of volume. Valid values: true, false. Default value: true.
size Number
The size of volume.
volumeType String
The type of volume.

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.

$ pulumi import volcengine:ecs/launchTemplate:LaunchTemplate default lt-ysxc16auaugh9zfy****
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
volcengine volcengine/pulumi-volcengine
License
Apache-2.0
Notes
This Pulumi package is based on the volcengine Terraform Provider.