Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine
volcengine.ecs.LaunchTemplates
Explore with Pulumi AI
Use this data source to query detailed information of ecs launch templates
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooLaunchTemplate = new volcengine.ecs.LaunchTemplate("fooLaunchTemplate", {
    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",
});
const fooLaunchTemplates = volcengine.ecs.LaunchTemplatesOutput({
    ids: [fooLaunchTemplate.id],
});
import pulumi
import pulumi_volcengine as volcengine
foo_launch_template = volcengine.ecs.LaunchTemplate("fooLaunchTemplate",
    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")
foo_launch_templates = volcengine.ecs.launch_templates_output(ids=[foo_launch_template.id])
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 {
		fooLaunchTemplate, err := ecs.NewLaunchTemplate(ctx, "fooLaunchTemplate", &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
		}
		_ = ecs.LaunchTemplatesOutput(ctx, ecs.LaunchTemplatesOutputArgs{
			Ids: pulumi.StringArray{
				fooLaunchTemplate.ID(),
			},
		}, nil)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() => 
{
    var fooLaunchTemplate = new Volcengine.Ecs.LaunchTemplate("fooLaunchTemplate", 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",
    });
    var fooLaunchTemplates = Volcengine.Ecs.LaunchTemplates.Invoke(new()
    {
        Ids = new[]
        {
            fooLaunchTemplate.Id,
        },
    });
});
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 com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.LaunchTemplatesArgs;
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 fooLaunchTemplate = new LaunchTemplate("fooLaunchTemplate", 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());
        final var fooLaunchTemplates = EcsFunctions.LaunchTemplates(LaunchTemplatesArgs.builder()
            .ids(fooLaunchTemplate.id())
            .build());
    }
}
resources:
  fooLaunchTemplate:
    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
variables:
  fooLaunchTemplates:
    fn::invoke:
      Function: volcengine:ecs:LaunchTemplates
      Arguments:
        ids:
          - ${fooLaunchTemplate.id}
Using LaunchTemplates
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function launchTemplates(args: LaunchTemplatesArgs, opts?: InvokeOptions): Promise<LaunchTemplatesResult>
function launchTemplatesOutput(args: LaunchTemplatesOutputArgs, opts?: InvokeOptions): Output<LaunchTemplatesResult>def launch_templates(ids: Optional[Sequence[str]] = None,
                     launch_template_names: Optional[Sequence[str]] = None,
                     name_regex: Optional[str] = None,
                     output_file: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> LaunchTemplatesResult
def launch_templates_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     launch_template_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     name_regex: Optional[pulumi.Input[str]] = None,
                     output_file: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[LaunchTemplatesResult]func LaunchTemplates(ctx *Context, args *LaunchTemplatesArgs, opts ...InvokeOption) (*LaunchTemplatesResult, error)
func LaunchTemplatesOutput(ctx *Context, args *LaunchTemplatesOutputArgs, opts ...InvokeOption) LaunchTemplatesResultOutputpublic static class LaunchTemplates 
{
    public static Task<LaunchTemplatesResult> InvokeAsync(LaunchTemplatesArgs args, InvokeOptions? opts = null)
    public static Output<LaunchTemplatesResult> Invoke(LaunchTemplatesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<LaunchTemplatesResult> launchTemplates(LaunchTemplatesArgs args, InvokeOptions options)
public static Output<LaunchTemplatesResult> launchTemplates(LaunchTemplatesArgs args, InvokeOptions options)
fn::invoke:
  function: volcengine:ecs:LaunchTemplates
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Ids List<string>
- A list of launch template ids.
- LaunchTemplate List<string>Names 
- A list of launch template names.
- NameRegex string
- A Name Regex of scaling policy.
- OutputFile string
- File name where to save data source results.
- Ids []string
- A list of launch template ids.
- LaunchTemplate []stringNames 
- A list of launch template names.
- NameRegex string
- A Name Regex of scaling policy.
- OutputFile string
- File name where to save data source results.
- ids List<String>
- A list of launch template ids.
- launchTemplate List<String>Names 
- A list of launch template names.
- nameRegex String
- A Name Regex of scaling policy.
- outputFile String
- File name where to save data source results.
- ids string[]
- A list of launch template ids.
- launchTemplate string[]Names 
- A list of launch template names.
- nameRegex string
- A Name Regex of scaling policy.
- outputFile string
- File name where to save data source results.
- ids Sequence[str]
- A list of launch template ids.
- launch_template_ Sequence[str]names 
- A list of launch template names.
- name_regex str
- A Name Regex of scaling policy.
- output_file str
- File name where to save data source results.
- ids List<String>
- A list of launch template ids.
- launchTemplate List<String>Names 
- A list of launch template names.
- nameRegex String
- A Name Regex of scaling policy.
- outputFile String
- File name where to save data source results.
LaunchTemplates Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- LaunchTemplates List<LaunchTemplates Launch Template> 
- The collection of launch templates.
- TotalCount int
- The total count of scaling policy query.
- Ids List<string>
- LaunchTemplate List<string>Names 
- NameRegex string
- OutputFile string
- Id string
- The provider-assigned unique ID for this managed resource.
- LaunchTemplates []LaunchTemplates Launch Template 
- The collection of launch templates.
- TotalCount int
- The total count of scaling policy query.
- Ids []string
- LaunchTemplate []stringNames 
- NameRegex string
- OutputFile string
- id String
- The provider-assigned unique ID for this managed resource.
- launchTemplates List<LaunchTemplates Launch Template> 
- The collection of launch templates.
- totalCount Integer
- The total count of scaling policy query.
- ids List<String>
- launchTemplate List<String>Names 
- nameRegex String
- outputFile String
- id string
- The provider-assigned unique ID for this managed resource.
- launchTemplates LaunchTemplates Launch Template[] 
- The collection of launch templates.
- totalCount number
- The total count of scaling policy query.
- ids string[]
- launchTemplate string[]Names 
- nameRegex string
- outputFile string
- id str
- The provider-assigned unique ID for this managed resource.
- launch_templates Sequence[LaunchTemplates Launch Template] 
- The collection of launch templates.
- total_count int
- The total count of scaling policy query.
- ids Sequence[str]
- launch_template_ Sequence[str]names 
- name_regex str
- output_file str
- id String
- The provider-assigned unique ID for this managed resource.
- launchTemplates List<Property Map>
- The collection of launch templates.
- totalCount Number
- The total count of scaling policy query.
- ids List<String>
- launchTemplate List<String>Names 
- nameRegex String
- outputFile String
Supporting Types
LaunchTemplatesLaunchTemplate   
- CreatedAt string
- The created time of the launch template.
- DefaultVersion intNumber 
- The default version of the launch template.
- Description string
- The description of the instance.
- EipBandwidth int
- The EIP bandwidth which the scaling configuration set.
- EipBilling stringType 
- 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.
- HpcCluster stringId 
- The hpc cluster id.
- Id string
- The id of the launch template.
- ImageId string
- The image id.
- InstanceCharge stringType 
- The charge type of the instance and volume.
- InstanceName string
- The name of the instance.
- KeyPair stringName 
- When you log in to the instance using the SSH key pair, enter the name of the key pair.
- LatestVersion intNumber 
- The latest version of the launch template.
- LaunchTemplate stringId 
- The id of the launch template.
- LaunchTemplate stringName 
- The name of the launch template.
- NetworkInterfaces List<LaunchTemplates Launch Template Network Interface> 
- The list of network interfaces.
- SecurityEnhancement stringStrategy 
- 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.
- UpdatedAt string
- The updated time of the launch template.
- VersionDescription string
- The latest version description of the launch template.
- Volumes
List<LaunchTemplates Launch Template Volume> 
- The list of volume of the scaling configuration.
- VpcId string
- The vpc id.
- ZoneId string
- The zone ID of the instance.
- CreatedAt string
- The created time of the launch template.
- DefaultVersion intNumber 
- The default version of the launch template.
- Description string
- The description of the instance.
- EipBandwidth int
- The EIP bandwidth which the scaling configuration set.
- EipBilling stringType 
- 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.
- HpcCluster stringId 
- The hpc cluster id.
- Id string
- The id of the launch template.
- ImageId string
- The image id.
- InstanceCharge stringType 
- The charge type of the instance and volume.
- InstanceName string
- The name of the instance.
- KeyPair stringName 
- When you log in to the instance using the SSH key pair, enter the name of the key pair.
- LatestVersion intNumber 
- The latest version of the launch template.
- LaunchTemplate stringId 
- The id of the launch template.
- LaunchTemplate stringName 
- The name of the launch template.
- NetworkInterfaces []LaunchTemplates Launch Template Network Interface 
- The list of network interfaces.
- SecurityEnhancement stringStrategy 
- 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.
- UpdatedAt string
- The updated time of the launch template.
- VersionDescription string
- The latest version description of the launch template.
- Volumes
[]LaunchTemplates Launch Template Volume 
- The list of volume of the scaling configuration.
- VpcId string
- The vpc id.
- ZoneId string
- The zone ID of the instance.
- createdAt String
- The created time of the launch template.
- defaultVersion IntegerNumber 
- The default version of the launch template.
- description String
- The description of the instance.
- eipBandwidth Integer
- The EIP bandwidth which the scaling configuration set.
- eipBilling StringType 
- 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.
- hpcCluster StringId 
- The hpc cluster id.
- id String
- The id of the launch template.
- imageId String
- The image id.
- instanceCharge StringType 
- The charge type of the instance and volume.
- instanceName String
- The name of the instance.
- keyPair StringName 
- When you log in to the instance using the SSH key pair, enter the name of the key pair.
- latestVersion IntegerNumber 
- The latest version of the launch template.
- launchTemplate StringId 
- The id of the launch template.
- launchTemplate StringName 
- The name of the launch template.
- networkInterfaces List<LaunchTemplates Launch Template Network Interface> 
- The list of network interfaces.
- securityEnhancement StringStrategy 
- 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.
- updatedAt String
- The updated time of the launch template.
- versionDescription String
- The latest version description of the launch template.
- volumes
List<LaunchTemplates Launch Template Volume> 
- The list of volume of the scaling configuration.
- vpcId String
- The vpc id.
- zoneId String
- The zone ID of the instance.
- createdAt string
- The created time of the launch template.
- defaultVersion numberNumber 
- The default version of the launch template.
- description string
- The description of the instance.
- eipBandwidth number
- The EIP bandwidth which the scaling configuration set.
- eipBilling stringType 
- 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.
- hpcCluster stringId 
- The hpc cluster id.
- id string
- The id of the launch template.
- imageId string
- The image id.
- instanceCharge stringType 
- The charge type of the instance and volume.
- instanceName string
- The name of the instance.
- keyPair stringName 
- When you log in to the instance using the SSH key pair, enter the name of the key pair.
- latestVersion numberNumber 
- The latest version of the launch template.
- launchTemplate stringId 
- The id of the launch template.
- launchTemplate stringName 
- The name of the launch template.
- networkInterfaces LaunchTemplates Launch Template Network Interface[] 
- The list of network interfaces.
- securityEnhancement stringStrategy 
- 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.
- updatedAt string
- The updated time of the launch template.
- versionDescription string
- The latest version description of the launch template.
- volumes
LaunchTemplates Launch Template Volume[] 
- The list of volume of the scaling configuration.
- vpcId string
- The vpc id.
- zoneId string
- The zone ID of the instance.
- created_at str
- The created time of the launch template.
- default_version_ intnumber 
- The default version of the launch template.
- description str
- The description of the instance.
- eip_bandwidth int
- The EIP bandwidth which the scaling configuration set.
- eip_billing_ strtype 
- 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_ strid 
- The hpc cluster id.
- id str
- The id of the launch template.
- image_id str
- The image id.
- instance_charge_ strtype 
- The charge type of the instance and volume.
- instance_name str
- The name of the instance.
- key_pair_ strname 
- When you log in to the instance using the SSH key pair, enter the name of the key pair.
- latest_version_ intnumber 
- The latest version of the launch template.
- launch_template_ strid 
- The id of the launch template.
- launch_template_ strname 
- The name of the launch template.
- network_interfaces Sequence[LaunchTemplates Launch Template Network Interface] 
- The list of network interfaces.
- security_enhancement_ strstrategy 
- 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.
- updated_at str
- The updated time of the launch template.
- version_description str
- The latest version description of the launch template.
- volumes
Sequence[LaunchTemplates Launch Template Volume] 
- The list of volume of the scaling configuration.
- vpc_id str
- The vpc id.
- zone_id str
- The zone ID of the instance.
- createdAt String
- The created time of the launch template.
- defaultVersion NumberNumber 
- The default version of the launch template.
- description String
- The description of the instance.
- eipBandwidth Number
- The EIP bandwidth which the scaling configuration set.
- eipBilling StringType 
- 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.
- hpcCluster StringId 
- The hpc cluster id.
- id String
- The id of the launch template.
- imageId String
- The image id.
- instanceCharge StringType 
- The charge type of the instance and volume.
- instanceName String
- The name of the instance.
- keyPair StringName 
- When you log in to the instance using the SSH key pair, enter the name of the key pair.
- latestVersion NumberNumber 
- The latest version of the launch template.
- launchTemplate StringId 
- The id of the launch template.
- launchTemplate StringName 
- The name of the launch template.
- networkInterfaces List<Property Map>
- The list of network interfaces.
- securityEnhancement StringStrategy 
- 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.
- updatedAt String
- The updated time of the launch template.
- 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 of the instance.
LaunchTemplatesLaunchTemplateNetworkInterface     
- SecurityGroup List<string>Ids 
- 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.
- SecurityGroup []stringIds 
- 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.
- securityGroup List<String>Ids 
- 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.
- securityGroup string[]Ids 
- 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_ Sequence[str]ids 
- 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.
- securityGroup List<String>Ids 
- 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.
LaunchTemplatesLaunchTemplateVolume    
- DeleteWith boolInstance 
- 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.
- DeleteWith boolInstance 
- 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.
- deleteWith BooleanInstance 
- 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.
- deleteWith booleanInstance 
- 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_ boolinstance 
- 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.
- deleteWith BooleanInstance 
- 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.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the volcengineTerraform Provider.