1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ecs
  5. AutoProvisioningGroup
Alibaba Cloud v3.68.0 published on Monday, Dec 2, 2024 by Pulumi

alicloud.ecs.AutoProvisioningGroup

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.68.0 published on Monday, Dec 2, 2024 by Pulumi

    Provides a ECS auto provisioning group resource which is a solution that uses preemptive instances and pay_as_you_go instances to rapidly deploy clusters.

    NOTE: Available in 1.79.0+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "auto_provisioning_group";
    const default = alicloud.getZones({
        availableDiskCategory: "cloud_efficiency",
        availableResourceCreation: "VSwitch",
    });
    const defaultNetwork = new alicloud.vpc.Network("default", {
        vpcName: name,
        cidrBlock: "172.16.0.0/16",
    });
    const defaultSwitch = new alicloud.vpc.Switch("default", {
        vpcId: defaultNetwork.id,
        cidrBlock: "172.16.0.0/24",
        zoneId: _default.then(_default => _default.zones?.[0]?.id),
        vswitchName: name,
    });
    const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
        name: name,
        vpcId: defaultNetwork.id,
    });
    const defaultGetImages = alicloud.ecs.getImages({
        nameRegex: "^ubuntu_18.*64",
        mostRecent: true,
        owners: "system",
    });
    const template = new alicloud.ecs.EcsLaunchTemplate("template", {
        launchTemplateName: name,
        imageId: defaultGetImages.then(defaultGetImages => defaultGetImages.images?.[0]?.id),
        instanceType: "ecs.n1.tiny",
        securityGroupId: defaultSecurityGroup.id,
    });
    const defaultAutoProvisioningGroup = new alicloud.ecs.AutoProvisioningGroup("default", {
        launchTemplateId: template.id,
        totalTargetCapacity: "4",
        payAsYouGoTargetCapacity: "1",
        spotTargetCapacity: "2",
        launchTemplateConfigs: [{
            instanceType: "ecs.n1.small",
            vswitchId: defaultSwitch.id,
            weightedCapacity: "2",
            maxPrice: "2",
        }],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "auto_provisioning_group"
    default = alicloud.get_zones(available_disk_category="cloud_efficiency",
        available_resource_creation="VSwitch")
    default_network = alicloud.vpc.Network("default",
        vpc_name=name,
        cidr_block="172.16.0.0/16")
    default_switch = alicloud.vpc.Switch("default",
        vpc_id=default_network.id,
        cidr_block="172.16.0.0/24",
        zone_id=default.zones[0].id,
        vswitch_name=name)
    default_security_group = alicloud.ecs.SecurityGroup("default",
        name=name,
        vpc_id=default_network.id)
    default_get_images = alicloud.ecs.get_images(name_regex="^ubuntu_18.*64",
        most_recent=True,
        owners="system")
    template = alicloud.ecs.EcsLaunchTemplate("template",
        launch_template_name=name,
        image_id=default_get_images.images[0].id,
        instance_type="ecs.n1.tiny",
        security_group_id=default_security_group.id)
    default_auto_provisioning_group = alicloud.ecs.AutoProvisioningGroup("default",
        launch_template_id=template.id,
        total_target_capacity="4",
        pay_as_you_go_target_capacity="1",
        spot_target_capacity="2",
        launch_template_configs=[{
            "instance_type": "ecs.n1.small",
            "vswitch_id": default_switch.id,
            "weighted_capacity": "2",
            "max_price": "2",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "auto_provisioning_group"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableDiskCategory:     pulumi.StringRef("cloud_efficiency"),
    			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
    			VpcId:       defaultNetwork.ID(),
    			CidrBlock:   pulumi.String("172.16.0.0/24"),
    			ZoneId:      pulumi.String(_default.Zones[0].Id),
    			VswitchName: pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
    			Name:  pulumi.String(name),
    			VpcId: defaultNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		defaultGetImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
    			NameRegex:  pulumi.StringRef("^ubuntu_18.*64"),
    			MostRecent: pulumi.BoolRef(true),
    			Owners:     pulumi.StringRef("system"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		template, err := ecs.NewEcsLaunchTemplate(ctx, "template", &ecs.EcsLaunchTemplateArgs{
    			LaunchTemplateName: pulumi.String(name),
    			ImageId:            pulumi.String(defaultGetImages.Images[0].Id),
    			InstanceType:       pulumi.String("ecs.n1.tiny"),
    			SecurityGroupId:    defaultSecurityGroup.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ecs.NewAutoProvisioningGroup(ctx, "default", &ecs.AutoProvisioningGroupArgs{
    			LaunchTemplateId:         template.ID(),
    			TotalTargetCapacity:      pulumi.String("4"),
    			PayAsYouGoTargetCapacity: pulumi.String("1"),
    			SpotTargetCapacity:       pulumi.String("2"),
    			LaunchTemplateConfigs: ecs.AutoProvisioningGroupLaunchTemplateConfigArray{
    				&ecs.AutoProvisioningGroupLaunchTemplateConfigArgs{
    					InstanceType:     pulumi.String("ecs.n1.small"),
    					VswitchId:        defaultSwitch.ID(),
    					WeightedCapacity: pulumi.String("2"),
    					MaxPrice:         pulumi.String("2"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "auto_provisioning_group";
        var @default = AliCloud.GetZones.Invoke(new()
        {
            AvailableDiskCategory = "cloud_efficiency",
            AvailableResourceCreation = "VSwitch",
        });
    
        var defaultNetwork = new AliCloud.Vpc.Network("default", new()
        {
            VpcName = name,
            CidrBlock = "172.16.0.0/16",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
        {
            VpcId = defaultNetwork.Id,
            CidrBlock = "172.16.0.0/24",
            ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
            VswitchName = name,
        });
    
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
        {
            Name = name,
            VpcId = defaultNetwork.Id,
        });
    
        var defaultGetImages = AliCloud.Ecs.GetImages.Invoke(new()
        {
            NameRegex = "^ubuntu_18.*64",
            MostRecent = true,
            Owners = "system",
        });
    
        var template = new AliCloud.Ecs.EcsLaunchTemplate("template", new()
        {
            LaunchTemplateName = name,
            ImageId = defaultGetImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
            InstanceType = "ecs.n1.tiny",
            SecurityGroupId = defaultSecurityGroup.Id,
        });
    
        var defaultAutoProvisioningGroup = new AliCloud.Ecs.AutoProvisioningGroup("default", new()
        {
            LaunchTemplateId = template.Id,
            TotalTargetCapacity = "4",
            PayAsYouGoTargetCapacity = "1",
            SpotTargetCapacity = "2",
            LaunchTemplateConfigs = new[]
            {
                new AliCloud.Ecs.Inputs.AutoProvisioningGroupLaunchTemplateConfigArgs
                {
                    InstanceType = "ecs.n1.small",
                    VswitchId = defaultSwitch.Id,
                    WeightedCapacity = "2",
                    MaxPrice = "2",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.inputs.GetZonesArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.ecs.SecurityGroup;
    import com.pulumi.alicloud.ecs.SecurityGroupArgs;
    import com.pulumi.alicloud.ecs.EcsFunctions;
    import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
    import com.pulumi.alicloud.ecs.EcsLaunchTemplate;
    import com.pulumi.alicloud.ecs.EcsLaunchTemplateArgs;
    import com.pulumi.alicloud.ecs.AutoProvisioningGroup;
    import com.pulumi.alicloud.ecs.AutoProvisioningGroupArgs;
    import com.pulumi.alicloud.ecs.inputs.AutoProvisioningGroupLaunchTemplateConfigArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("auto_provisioning_group");
            final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableDiskCategory("cloud_efficiency")
                .availableResourceCreation("VSwitch")
                .build());
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
                .vpcName(name)
                .cidrBlock("172.16.0.0/16")
                .build());
    
            var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
                .vpcId(defaultNetwork.id())
                .cidrBlock("172.16.0.0/24")
                .zoneId(default_.zones()[0].id())
                .vswitchName(name)
                .build());
    
            var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
                .name(name)
                .vpcId(defaultNetwork.id())
                .build());
    
            final var defaultGetImages = EcsFunctions.getImages(GetImagesArgs.builder()
                .nameRegex("^ubuntu_18.*64")
                .mostRecent(true)
                .owners("system")
                .build());
    
            var template = new EcsLaunchTemplate("template", EcsLaunchTemplateArgs.builder()
                .launchTemplateName(name)
                .imageId(defaultGetImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
                .instanceType("ecs.n1.tiny")
                .securityGroupId(defaultSecurityGroup.id())
                .build());
    
            var defaultAutoProvisioningGroup = new AutoProvisioningGroup("defaultAutoProvisioningGroup", AutoProvisioningGroupArgs.builder()
                .launchTemplateId(template.id())
                .totalTargetCapacity("4")
                .payAsYouGoTargetCapacity("1")
                .spotTargetCapacity("2")
                .launchTemplateConfigs(AutoProvisioningGroupLaunchTemplateConfigArgs.builder()
                    .instanceType("ecs.n1.small")
                    .vswitchId(defaultSwitch.id())
                    .weightedCapacity("2")
                    .maxPrice("2")
                    .build())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: auto_provisioning_group
    resources:
      defaultNetwork:
        type: alicloud:vpc:Network
        name: default
        properties:
          vpcName: ${name}
          cidrBlock: 172.16.0.0/16
      defaultSwitch:
        type: alicloud:vpc:Switch
        name: default
        properties:
          vpcId: ${defaultNetwork.id}
          cidrBlock: 172.16.0.0/24
          zoneId: ${default.zones[0].id}
          vswitchName: ${name}
      defaultAutoProvisioningGroup:
        type: alicloud:ecs:AutoProvisioningGroup
        name: default
        properties:
          launchTemplateId: ${template.id}
          totalTargetCapacity: '4'
          payAsYouGoTargetCapacity: '1'
          spotTargetCapacity: '2'
          launchTemplateConfigs:
            - instanceType: ecs.n1.small
              vswitchId: ${defaultSwitch.id}
              weightedCapacity: '2'
              maxPrice: '2'
      template:
        type: alicloud:ecs:EcsLaunchTemplate
        properties:
          launchTemplateName: ${name}
          imageId: ${defaultGetImages.images[0].id}
          instanceType: ecs.n1.tiny
          securityGroupId: ${defaultSecurityGroup.id}
      defaultSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        name: default
        properties:
          name: ${name}
          vpcId: ${defaultNetwork.id}
    variables:
      default:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableDiskCategory: cloud_efficiency
            availableResourceCreation: VSwitch
      defaultGetImages:
        fn::invoke:
          Function: alicloud:ecs:getImages
          Arguments:
            nameRegex: ^ubuntu_18.*64
            mostRecent: true
            owners: system
    

    Create AutoProvisioningGroup Resource

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

    Constructor syntax

    new AutoProvisioningGroup(name: string, args: AutoProvisioningGroupArgs, opts?: CustomResourceOptions);
    @overload
    def AutoProvisioningGroup(resource_name: str,
                              args: AutoProvisioningGroupArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def AutoProvisioningGroup(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              launch_template_configs: Optional[Sequence[AutoProvisioningGroupLaunchTemplateConfigArgs]] = None,
                              total_target_capacity: Optional[str] = None,
                              launch_template_id: Optional[str] = None,
                              pay_as_you_go_target_capacity: Optional[str] = None,
                              spot_instance_interruption_behavior: Optional[str] = None,
                              description: Optional[str] = None,
                              default_target_capacity_type: Optional[str] = None,
                              launch_template_version: Optional[str] = None,
                              max_spot_price: Optional[float] = None,
                              pay_as_you_go_allocation_strategy: Optional[str] = None,
                              auto_provisioning_group_name: Optional[str] = None,
                              spot_allocation_strategy: Optional[str] = None,
                              excess_capacity_termination_policy: Optional[str] = None,
                              spot_instance_pools_to_use_count: Optional[int] = None,
                              spot_target_capacity: Optional[str] = None,
                              terminate_instances: Optional[bool] = None,
                              terminate_instances_with_expiration: Optional[bool] = None,
                              auto_provisioning_group_type: Optional[str] = None,
                              valid_from: Optional[str] = None,
                              valid_until: Optional[str] = None)
    func NewAutoProvisioningGroup(ctx *Context, name string, args AutoProvisioningGroupArgs, opts ...ResourceOption) (*AutoProvisioningGroup, error)
    public AutoProvisioningGroup(string name, AutoProvisioningGroupArgs args, CustomResourceOptions? opts = null)
    public AutoProvisioningGroup(String name, AutoProvisioningGroupArgs args)
    public AutoProvisioningGroup(String name, AutoProvisioningGroupArgs args, CustomResourceOptions options)
    
    type: alicloud:ecs:AutoProvisioningGroup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AutoProvisioningGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AutoProvisioningGroupArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AutoProvisioningGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AutoProvisioningGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AutoProvisioningGroupArgs
    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 autoProvisioningGroupResource = new AliCloud.Ecs.AutoProvisioningGroup("autoProvisioningGroupResource", new()
    {
        LaunchTemplateConfigs = new[]
        {
            new AliCloud.Ecs.Inputs.AutoProvisioningGroupLaunchTemplateConfigArgs
            {
                MaxPrice = "string",
                VswitchId = "string",
                WeightedCapacity = "string",
                InstanceType = "string",
                Priority = "string",
            },
        },
        TotalTargetCapacity = "string",
        LaunchTemplateId = "string",
        PayAsYouGoTargetCapacity = "string",
        SpotInstanceInterruptionBehavior = "string",
        Description = "string",
        DefaultTargetCapacityType = "string",
        LaunchTemplateVersion = "string",
        MaxSpotPrice = 0,
        PayAsYouGoAllocationStrategy = "string",
        AutoProvisioningGroupName = "string",
        SpotAllocationStrategy = "string",
        ExcessCapacityTerminationPolicy = "string",
        SpotInstancePoolsToUseCount = 0,
        SpotTargetCapacity = "string",
        TerminateInstances = false,
        TerminateInstancesWithExpiration = false,
        AutoProvisioningGroupType = "string",
        ValidFrom = "string",
        ValidUntil = "string",
    });
    
    example, err := ecs.NewAutoProvisioningGroup(ctx, "autoProvisioningGroupResource", &ecs.AutoProvisioningGroupArgs{
    	LaunchTemplateConfigs: ecs.AutoProvisioningGroupLaunchTemplateConfigArray{
    		&ecs.AutoProvisioningGroupLaunchTemplateConfigArgs{
    			MaxPrice:         pulumi.String("string"),
    			VswitchId:        pulumi.String("string"),
    			WeightedCapacity: pulumi.String("string"),
    			InstanceType:     pulumi.String("string"),
    			Priority:         pulumi.String("string"),
    		},
    	},
    	TotalTargetCapacity:              pulumi.String("string"),
    	LaunchTemplateId:                 pulumi.String("string"),
    	PayAsYouGoTargetCapacity:         pulumi.String("string"),
    	SpotInstanceInterruptionBehavior: pulumi.String("string"),
    	Description:                      pulumi.String("string"),
    	DefaultTargetCapacityType:        pulumi.String("string"),
    	LaunchTemplateVersion:            pulumi.String("string"),
    	MaxSpotPrice:                     pulumi.Float64(0),
    	PayAsYouGoAllocationStrategy:     pulumi.String("string"),
    	AutoProvisioningGroupName:        pulumi.String("string"),
    	SpotAllocationStrategy:           pulumi.String("string"),
    	ExcessCapacityTerminationPolicy:  pulumi.String("string"),
    	SpotInstancePoolsToUseCount:      pulumi.Int(0),
    	SpotTargetCapacity:               pulumi.String("string"),
    	TerminateInstances:               pulumi.Bool(false),
    	TerminateInstancesWithExpiration: pulumi.Bool(false),
    	AutoProvisioningGroupType:        pulumi.String("string"),
    	ValidFrom:                        pulumi.String("string"),
    	ValidUntil:                       pulumi.String("string"),
    })
    
    var autoProvisioningGroupResource = new AutoProvisioningGroup("autoProvisioningGroupResource", AutoProvisioningGroupArgs.builder()
        .launchTemplateConfigs(AutoProvisioningGroupLaunchTemplateConfigArgs.builder()
            .maxPrice("string")
            .vswitchId("string")
            .weightedCapacity("string")
            .instanceType("string")
            .priority("string")
            .build())
        .totalTargetCapacity("string")
        .launchTemplateId("string")
        .payAsYouGoTargetCapacity("string")
        .spotInstanceInterruptionBehavior("string")
        .description("string")
        .defaultTargetCapacityType("string")
        .launchTemplateVersion("string")
        .maxSpotPrice(0)
        .payAsYouGoAllocationStrategy("string")
        .autoProvisioningGroupName("string")
        .spotAllocationStrategy("string")
        .excessCapacityTerminationPolicy("string")
        .spotInstancePoolsToUseCount(0)
        .spotTargetCapacity("string")
        .terminateInstances(false)
        .terminateInstancesWithExpiration(false)
        .autoProvisioningGroupType("string")
        .validFrom("string")
        .validUntil("string")
        .build());
    
    auto_provisioning_group_resource = alicloud.ecs.AutoProvisioningGroup("autoProvisioningGroupResource",
        launch_template_configs=[{
            "max_price": "string",
            "vswitch_id": "string",
            "weighted_capacity": "string",
            "instance_type": "string",
            "priority": "string",
        }],
        total_target_capacity="string",
        launch_template_id="string",
        pay_as_you_go_target_capacity="string",
        spot_instance_interruption_behavior="string",
        description="string",
        default_target_capacity_type="string",
        launch_template_version="string",
        max_spot_price=0,
        pay_as_you_go_allocation_strategy="string",
        auto_provisioning_group_name="string",
        spot_allocation_strategy="string",
        excess_capacity_termination_policy="string",
        spot_instance_pools_to_use_count=0,
        spot_target_capacity="string",
        terminate_instances=False,
        terminate_instances_with_expiration=False,
        auto_provisioning_group_type="string",
        valid_from="string",
        valid_until="string")
    
    const autoProvisioningGroupResource = new alicloud.ecs.AutoProvisioningGroup("autoProvisioningGroupResource", {
        launchTemplateConfigs: [{
            maxPrice: "string",
            vswitchId: "string",
            weightedCapacity: "string",
            instanceType: "string",
            priority: "string",
        }],
        totalTargetCapacity: "string",
        launchTemplateId: "string",
        payAsYouGoTargetCapacity: "string",
        spotInstanceInterruptionBehavior: "string",
        description: "string",
        defaultTargetCapacityType: "string",
        launchTemplateVersion: "string",
        maxSpotPrice: 0,
        payAsYouGoAllocationStrategy: "string",
        autoProvisioningGroupName: "string",
        spotAllocationStrategy: "string",
        excessCapacityTerminationPolicy: "string",
        spotInstancePoolsToUseCount: 0,
        spotTargetCapacity: "string",
        terminateInstances: false,
        terminateInstancesWithExpiration: false,
        autoProvisioningGroupType: "string",
        validFrom: "string",
        validUntil: "string",
    });
    
    type: alicloud:ecs:AutoProvisioningGroup
    properties:
        autoProvisioningGroupName: string
        autoProvisioningGroupType: string
        defaultTargetCapacityType: string
        description: string
        excessCapacityTerminationPolicy: string
        launchTemplateConfigs:
            - instanceType: string
              maxPrice: string
              priority: string
              vswitchId: string
              weightedCapacity: string
        launchTemplateId: string
        launchTemplateVersion: string
        maxSpotPrice: 0
        payAsYouGoAllocationStrategy: string
        payAsYouGoTargetCapacity: string
        spotAllocationStrategy: string
        spotInstanceInterruptionBehavior: string
        spotInstancePoolsToUseCount: 0
        spotTargetCapacity: string
        terminateInstances: false
        terminateInstancesWithExpiration: false
        totalTargetCapacity: string
        validFrom: string
        validUntil: string
    

    AutoProvisioningGroup 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 AutoProvisioningGroup resource accepts the following input properties:

    LaunchTemplateConfigs List<Pulumi.AliCloud.Ecs.Inputs.AutoProvisioningGroupLaunchTemplateConfig>
    DataDisk mappings to attach to ecs instance. See block-config below for details.
    LaunchTemplateId string
    The ID of the instance launch template associated with the auto provisioning group.
    TotalTargetCapacity string
    The total target capacity of the auto provisioning group. The target capacity consists of the following three parts:PayAsYouGoTargetCapacity,SpotTargetCapacity and the supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity.
    AutoProvisioningGroupName string
    The name of the auto provisioning group to be created. It must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-)
    AutoProvisioningGroupType string
    The type of the auto provisioning group. Valid values:request and maintain,Default value: maintain.
    DefaultTargetCapacityType string
    The type of supplemental instances. When the total value of PayAsYouGoTargetCapacity and SpotTargetCapacity is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet the capacity requirements. Valid values:PayAsYouGo: Pay-as-you-go instances; Spot: Preemptible instances, Default value: Spot.
    Description string
    The description of the auto provisioning group.
    ExcessCapacityTerminationPolicy string
    The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity. Valid values: no-termination and termination,Default value: no-termination.
    LaunchTemplateVersion string
    The version of the instance launch template associated with the auto provisioning group.
    MaxSpotPrice double
    The global maximum price for preemptible instances in the auto provisioning group. If both the MaxSpotPrice and LaunchTemplateConfig.N.MaxPrice parameters are specified, the maximum price is the lower value of the two.
    PayAsYouGoAllocationStrategy string
    The scale-out policy for pay-as-you-go instances. Valid values: lowest-price and prioritized,Default value: lowest-price.
    PayAsYouGoTargetCapacity string
    The target capacity of pay-as-you-go instances in the auto provisioning group.
    SpotAllocationStrategy string
    The scale-out policy for preemptible instances. Valid values:lowest-price and diversified,Default value: lowest-price.
    SpotInstanceInterruptionBehavior string
    The default behavior after preemptible instances are shut down. Valid values: stop and terminate,Default value: stop.
    SpotInstancePoolsToUseCount int
    This parameter takes effect when the SpotAllocationStrategy parameter is set to lowest-price. The auto provisioning group selects instance types of the lowest cost to create instances.
    SpotTargetCapacity string
    The target capacity of preemptible instances in the auto provisioning group.
    TerminateInstances bool
    Specifies whether to release instances of the auto provisioning group. Valid values:false and true, default value: false.
    TerminateInstancesWithExpiration bool
    The shutdown policy for preemptible instances when the auto provisioning group expires. Valid values: false and true, default value: false.
    ValidFrom string
    The time when the auto provisioning group is started. The period of time between this point in time and the point in time specified by the valid_until parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group is immediately started after creation.
    ValidUntil string
    The time when the auto provisioning group expires. The period of time between this point in time and the point in time specified by the valid_from parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group never expires.
    LaunchTemplateConfigs []AutoProvisioningGroupLaunchTemplateConfigArgs
    DataDisk mappings to attach to ecs instance. See block-config below for details.
    LaunchTemplateId string
    The ID of the instance launch template associated with the auto provisioning group.
    TotalTargetCapacity string
    The total target capacity of the auto provisioning group. The target capacity consists of the following three parts:PayAsYouGoTargetCapacity,SpotTargetCapacity and the supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity.
    AutoProvisioningGroupName string
    The name of the auto provisioning group to be created. It must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-)
    AutoProvisioningGroupType string
    The type of the auto provisioning group. Valid values:request and maintain,Default value: maintain.
    DefaultTargetCapacityType string
    The type of supplemental instances. When the total value of PayAsYouGoTargetCapacity and SpotTargetCapacity is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet the capacity requirements. Valid values:PayAsYouGo: Pay-as-you-go instances; Spot: Preemptible instances, Default value: Spot.
    Description string
    The description of the auto provisioning group.
    ExcessCapacityTerminationPolicy string
    The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity. Valid values: no-termination and termination,Default value: no-termination.
    LaunchTemplateVersion string
    The version of the instance launch template associated with the auto provisioning group.
    MaxSpotPrice float64
    The global maximum price for preemptible instances in the auto provisioning group. If both the MaxSpotPrice and LaunchTemplateConfig.N.MaxPrice parameters are specified, the maximum price is the lower value of the two.
    PayAsYouGoAllocationStrategy string
    The scale-out policy for pay-as-you-go instances. Valid values: lowest-price and prioritized,Default value: lowest-price.
    PayAsYouGoTargetCapacity string
    The target capacity of pay-as-you-go instances in the auto provisioning group.
    SpotAllocationStrategy string
    The scale-out policy for preemptible instances. Valid values:lowest-price and diversified,Default value: lowest-price.
    SpotInstanceInterruptionBehavior string
    The default behavior after preemptible instances are shut down. Valid values: stop and terminate,Default value: stop.
    SpotInstancePoolsToUseCount int
    This parameter takes effect when the SpotAllocationStrategy parameter is set to lowest-price. The auto provisioning group selects instance types of the lowest cost to create instances.
    SpotTargetCapacity string
    The target capacity of preemptible instances in the auto provisioning group.
    TerminateInstances bool
    Specifies whether to release instances of the auto provisioning group. Valid values:false and true, default value: false.
    TerminateInstancesWithExpiration bool
    The shutdown policy for preemptible instances when the auto provisioning group expires. Valid values: false and true, default value: false.
    ValidFrom string
    The time when the auto provisioning group is started. The period of time between this point in time and the point in time specified by the valid_until parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group is immediately started after creation.
    ValidUntil string
    The time when the auto provisioning group expires. The period of time between this point in time and the point in time specified by the valid_from parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group never expires.
    launchTemplateConfigs List<AutoProvisioningGroupLaunchTemplateConfig>
    DataDisk mappings to attach to ecs instance. See block-config below for details.
    launchTemplateId String
    The ID of the instance launch template associated with the auto provisioning group.
    totalTargetCapacity String
    The total target capacity of the auto provisioning group. The target capacity consists of the following three parts:PayAsYouGoTargetCapacity,SpotTargetCapacity and the supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity.
    autoProvisioningGroupName String
    The name of the auto provisioning group to be created. It must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-)
    autoProvisioningGroupType String
    The type of the auto provisioning group. Valid values:request and maintain,Default value: maintain.
    defaultTargetCapacityType String
    The type of supplemental instances. When the total value of PayAsYouGoTargetCapacity and SpotTargetCapacity is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet the capacity requirements. Valid values:PayAsYouGo: Pay-as-you-go instances; Spot: Preemptible instances, Default value: Spot.
    description String
    The description of the auto provisioning group.
    excessCapacityTerminationPolicy String
    The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity. Valid values: no-termination and termination,Default value: no-termination.
    launchTemplateVersion String
    The version of the instance launch template associated with the auto provisioning group.
    maxSpotPrice Double
    The global maximum price for preemptible instances in the auto provisioning group. If both the MaxSpotPrice and LaunchTemplateConfig.N.MaxPrice parameters are specified, the maximum price is the lower value of the two.
    payAsYouGoAllocationStrategy String
    The scale-out policy for pay-as-you-go instances. Valid values: lowest-price and prioritized,Default value: lowest-price.
    payAsYouGoTargetCapacity String
    The target capacity of pay-as-you-go instances in the auto provisioning group.
    spotAllocationStrategy String
    The scale-out policy for preemptible instances. Valid values:lowest-price and diversified,Default value: lowest-price.
    spotInstanceInterruptionBehavior String
    The default behavior after preemptible instances are shut down. Valid values: stop and terminate,Default value: stop.
    spotInstancePoolsToUseCount Integer
    This parameter takes effect when the SpotAllocationStrategy parameter is set to lowest-price. The auto provisioning group selects instance types of the lowest cost to create instances.
    spotTargetCapacity String
    The target capacity of preemptible instances in the auto provisioning group.
    terminateInstances Boolean
    Specifies whether to release instances of the auto provisioning group. Valid values:false and true, default value: false.
    terminateInstancesWithExpiration Boolean
    The shutdown policy for preemptible instances when the auto provisioning group expires. Valid values: false and true, default value: false.
    validFrom String
    The time when the auto provisioning group is started. The period of time between this point in time and the point in time specified by the valid_until parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group is immediately started after creation.
    validUntil String
    The time when the auto provisioning group expires. The period of time between this point in time and the point in time specified by the valid_from parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group never expires.
    launchTemplateConfigs AutoProvisioningGroupLaunchTemplateConfig[]
    DataDisk mappings to attach to ecs instance. See block-config below for details.
    launchTemplateId string
    The ID of the instance launch template associated with the auto provisioning group.
    totalTargetCapacity string
    The total target capacity of the auto provisioning group. The target capacity consists of the following three parts:PayAsYouGoTargetCapacity,SpotTargetCapacity and the supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity.
    autoProvisioningGroupName string
    The name of the auto provisioning group to be created. It must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-)
    autoProvisioningGroupType string
    The type of the auto provisioning group. Valid values:request and maintain,Default value: maintain.
    defaultTargetCapacityType string
    The type of supplemental instances. When the total value of PayAsYouGoTargetCapacity and SpotTargetCapacity is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet the capacity requirements. Valid values:PayAsYouGo: Pay-as-you-go instances; Spot: Preemptible instances, Default value: Spot.
    description string
    The description of the auto provisioning group.
    excessCapacityTerminationPolicy string
    The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity. Valid values: no-termination and termination,Default value: no-termination.
    launchTemplateVersion string
    The version of the instance launch template associated with the auto provisioning group.
    maxSpotPrice number
    The global maximum price for preemptible instances in the auto provisioning group. If both the MaxSpotPrice and LaunchTemplateConfig.N.MaxPrice parameters are specified, the maximum price is the lower value of the two.
    payAsYouGoAllocationStrategy string
    The scale-out policy for pay-as-you-go instances. Valid values: lowest-price and prioritized,Default value: lowest-price.
    payAsYouGoTargetCapacity string
    The target capacity of pay-as-you-go instances in the auto provisioning group.
    spotAllocationStrategy string
    The scale-out policy for preemptible instances. Valid values:lowest-price and diversified,Default value: lowest-price.
    spotInstanceInterruptionBehavior string
    The default behavior after preemptible instances are shut down. Valid values: stop and terminate,Default value: stop.
    spotInstancePoolsToUseCount number
    This parameter takes effect when the SpotAllocationStrategy parameter is set to lowest-price. The auto provisioning group selects instance types of the lowest cost to create instances.
    spotTargetCapacity string
    The target capacity of preemptible instances in the auto provisioning group.
    terminateInstances boolean
    Specifies whether to release instances of the auto provisioning group. Valid values:false and true, default value: false.
    terminateInstancesWithExpiration boolean
    The shutdown policy for preemptible instances when the auto provisioning group expires. Valid values: false and true, default value: false.
    validFrom string
    The time when the auto provisioning group is started. The period of time between this point in time and the point in time specified by the valid_until parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group is immediately started after creation.
    validUntil string
    The time when the auto provisioning group expires. The period of time between this point in time and the point in time specified by the valid_from parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group never expires.
    launch_template_configs Sequence[AutoProvisioningGroupLaunchTemplateConfigArgs]
    DataDisk mappings to attach to ecs instance. See block-config below for details.
    launch_template_id str
    The ID of the instance launch template associated with the auto provisioning group.
    total_target_capacity str
    The total target capacity of the auto provisioning group. The target capacity consists of the following three parts:PayAsYouGoTargetCapacity,SpotTargetCapacity and the supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity.
    auto_provisioning_group_name str
    The name of the auto provisioning group to be created. It must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-)
    auto_provisioning_group_type str
    The type of the auto provisioning group. Valid values:request and maintain,Default value: maintain.
    default_target_capacity_type str
    The type of supplemental instances. When the total value of PayAsYouGoTargetCapacity and SpotTargetCapacity is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet the capacity requirements. Valid values:PayAsYouGo: Pay-as-you-go instances; Spot: Preemptible instances, Default value: Spot.
    description str
    The description of the auto provisioning group.
    excess_capacity_termination_policy str
    The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity. Valid values: no-termination and termination,Default value: no-termination.
    launch_template_version str
    The version of the instance launch template associated with the auto provisioning group.
    max_spot_price float
    The global maximum price for preemptible instances in the auto provisioning group. If both the MaxSpotPrice and LaunchTemplateConfig.N.MaxPrice parameters are specified, the maximum price is the lower value of the two.
    pay_as_you_go_allocation_strategy str
    The scale-out policy for pay-as-you-go instances. Valid values: lowest-price and prioritized,Default value: lowest-price.
    pay_as_you_go_target_capacity str
    The target capacity of pay-as-you-go instances in the auto provisioning group.
    spot_allocation_strategy str
    The scale-out policy for preemptible instances. Valid values:lowest-price and diversified,Default value: lowest-price.
    spot_instance_interruption_behavior str
    The default behavior after preemptible instances are shut down. Valid values: stop and terminate,Default value: stop.
    spot_instance_pools_to_use_count int
    This parameter takes effect when the SpotAllocationStrategy parameter is set to lowest-price. The auto provisioning group selects instance types of the lowest cost to create instances.
    spot_target_capacity str
    The target capacity of preemptible instances in the auto provisioning group.
    terminate_instances bool
    Specifies whether to release instances of the auto provisioning group. Valid values:false and true, default value: false.
    terminate_instances_with_expiration bool
    The shutdown policy for preemptible instances when the auto provisioning group expires. Valid values: false and true, default value: false.
    valid_from str
    The time when the auto provisioning group is started. The period of time between this point in time and the point in time specified by the valid_until parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group is immediately started after creation.
    valid_until str
    The time when the auto provisioning group expires. The period of time between this point in time and the point in time specified by the valid_from parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group never expires.
    launchTemplateConfigs List<Property Map>
    DataDisk mappings to attach to ecs instance. See block-config below for details.
    launchTemplateId String
    The ID of the instance launch template associated with the auto provisioning group.
    totalTargetCapacity String
    The total target capacity of the auto provisioning group. The target capacity consists of the following three parts:PayAsYouGoTargetCapacity,SpotTargetCapacity and the supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity.
    autoProvisioningGroupName String
    The name of the auto provisioning group to be created. It must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-)
    autoProvisioningGroupType String
    The type of the auto provisioning group. Valid values:request and maintain,Default value: maintain.
    defaultTargetCapacityType String
    The type of supplemental instances. When the total value of PayAsYouGoTargetCapacity and SpotTargetCapacity is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet the capacity requirements. Valid values:PayAsYouGo: Pay-as-you-go instances; Spot: Preemptible instances, Default value: Spot.
    description String
    The description of the auto provisioning group.
    excessCapacityTerminationPolicy String
    The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity. Valid values: no-termination and termination,Default value: no-termination.
    launchTemplateVersion String
    The version of the instance launch template associated with the auto provisioning group.
    maxSpotPrice Number
    The global maximum price for preemptible instances in the auto provisioning group. If both the MaxSpotPrice and LaunchTemplateConfig.N.MaxPrice parameters are specified, the maximum price is the lower value of the two.
    payAsYouGoAllocationStrategy String
    The scale-out policy for pay-as-you-go instances. Valid values: lowest-price and prioritized,Default value: lowest-price.
    payAsYouGoTargetCapacity String
    The target capacity of pay-as-you-go instances in the auto provisioning group.
    spotAllocationStrategy String
    The scale-out policy for preemptible instances. Valid values:lowest-price and diversified,Default value: lowest-price.
    spotInstanceInterruptionBehavior String
    The default behavior after preemptible instances are shut down. Valid values: stop and terminate,Default value: stop.
    spotInstancePoolsToUseCount Number
    This parameter takes effect when the SpotAllocationStrategy parameter is set to lowest-price. The auto provisioning group selects instance types of the lowest cost to create instances.
    spotTargetCapacity String
    The target capacity of preemptible instances in the auto provisioning group.
    terminateInstances Boolean
    Specifies whether to release instances of the auto provisioning group. Valid values:false and true, default value: false.
    terminateInstancesWithExpiration Boolean
    The shutdown policy for preemptible instances when the auto provisioning group expires. Valid values: false and true, default value: false.
    validFrom String
    The time when the auto provisioning group is started. The period of time between this point in time and the point in time specified by the valid_until parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group is immediately started after creation.
    validUntil String
    The time when the auto provisioning group expires. The period of time between this point in time and the point in time specified by the valid_from parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group never expires.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AutoProvisioningGroup Resource

    Get an existing AutoProvisioningGroup 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?: AutoProvisioningGroupState, opts?: CustomResourceOptions): AutoProvisioningGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_provisioning_group_name: Optional[str] = None,
            auto_provisioning_group_type: Optional[str] = None,
            default_target_capacity_type: Optional[str] = None,
            description: Optional[str] = None,
            excess_capacity_termination_policy: Optional[str] = None,
            launch_template_configs: Optional[Sequence[AutoProvisioningGroupLaunchTemplateConfigArgs]] = None,
            launch_template_id: Optional[str] = None,
            launch_template_version: Optional[str] = None,
            max_spot_price: Optional[float] = None,
            pay_as_you_go_allocation_strategy: Optional[str] = None,
            pay_as_you_go_target_capacity: Optional[str] = None,
            spot_allocation_strategy: Optional[str] = None,
            spot_instance_interruption_behavior: Optional[str] = None,
            spot_instance_pools_to_use_count: Optional[int] = None,
            spot_target_capacity: Optional[str] = None,
            terminate_instances: Optional[bool] = None,
            terminate_instances_with_expiration: Optional[bool] = None,
            total_target_capacity: Optional[str] = None,
            valid_from: Optional[str] = None,
            valid_until: Optional[str] = None) -> AutoProvisioningGroup
    func GetAutoProvisioningGroup(ctx *Context, name string, id IDInput, state *AutoProvisioningGroupState, opts ...ResourceOption) (*AutoProvisioningGroup, error)
    public static AutoProvisioningGroup Get(string name, Input<string> id, AutoProvisioningGroupState? state, CustomResourceOptions? opts = null)
    public static AutoProvisioningGroup get(String name, Output<String> id, AutoProvisioningGroupState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    AutoProvisioningGroupName string
    The name of the auto provisioning group to be created. It must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-)
    AutoProvisioningGroupType string
    The type of the auto provisioning group. Valid values:request and maintain,Default value: maintain.
    DefaultTargetCapacityType string
    The type of supplemental instances. When the total value of PayAsYouGoTargetCapacity and SpotTargetCapacity is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet the capacity requirements. Valid values:PayAsYouGo: Pay-as-you-go instances; Spot: Preemptible instances, Default value: Spot.
    Description string
    The description of the auto provisioning group.
    ExcessCapacityTerminationPolicy string
    The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity. Valid values: no-termination and termination,Default value: no-termination.
    LaunchTemplateConfigs List<Pulumi.AliCloud.Ecs.Inputs.AutoProvisioningGroupLaunchTemplateConfig>
    DataDisk mappings to attach to ecs instance. See block-config below for details.
    LaunchTemplateId string
    The ID of the instance launch template associated with the auto provisioning group.
    LaunchTemplateVersion string
    The version of the instance launch template associated with the auto provisioning group.
    MaxSpotPrice double
    The global maximum price for preemptible instances in the auto provisioning group. If both the MaxSpotPrice and LaunchTemplateConfig.N.MaxPrice parameters are specified, the maximum price is the lower value of the two.
    PayAsYouGoAllocationStrategy string
    The scale-out policy for pay-as-you-go instances. Valid values: lowest-price and prioritized,Default value: lowest-price.
    PayAsYouGoTargetCapacity string
    The target capacity of pay-as-you-go instances in the auto provisioning group.
    SpotAllocationStrategy string
    The scale-out policy for preemptible instances. Valid values:lowest-price and diversified,Default value: lowest-price.
    SpotInstanceInterruptionBehavior string
    The default behavior after preemptible instances are shut down. Valid values: stop and terminate,Default value: stop.
    SpotInstancePoolsToUseCount int
    This parameter takes effect when the SpotAllocationStrategy parameter is set to lowest-price. The auto provisioning group selects instance types of the lowest cost to create instances.
    SpotTargetCapacity string
    The target capacity of preemptible instances in the auto provisioning group.
    TerminateInstances bool
    Specifies whether to release instances of the auto provisioning group. Valid values:false and true, default value: false.
    TerminateInstancesWithExpiration bool
    The shutdown policy for preemptible instances when the auto provisioning group expires. Valid values: false and true, default value: false.
    TotalTargetCapacity string
    The total target capacity of the auto provisioning group. The target capacity consists of the following three parts:PayAsYouGoTargetCapacity,SpotTargetCapacity and the supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity.
    ValidFrom string
    The time when the auto provisioning group is started. The period of time between this point in time and the point in time specified by the valid_until parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group is immediately started after creation.
    ValidUntil string
    The time when the auto provisioning group expires. The period of time between this point in time and the point in time specified by the valid_from parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group never expires.
    AutoProvisioningGroupName string
    The name of the auto provisioning group to be created. It must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-)
    AutoProvisioningGroupType string
    The type of the auto provisioning group. Valid values:request and maintain,Default value: maintain.
    DefaultTargetCapacityType string
    The type of supplemental instances. When the total value of PayAsYouGoTargetCapacity and SpotTargetCapacity is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet the capacity requirements. Valid values:PayAsYouGo: Pay-as-you-go instances; Spot: Preemptible instances, Default value: Spot.
    Description string
    The description of the auto provisioning group.
    ExcessCapacityTerminationPolicy string
    The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity. Valid values: no-termination and termination,Default value: no-termination.
    LaunchTemplateConfigs []AutoProvisioningGroupLaunchTemplateConfigArgs
    DataDisk mappings to attach to ecs instance. See block-config below for details.
    LaunchTemplateId string
    The ID of the instance launch template associated with the auto provisioning group.
    LaunchTemplateVersion string
    The version of the instance launch template associated with the auto provisioning group.
    MaxSpotPrice float64
    The global maximum price for preemptible instances in the auto provisioning group. If both the MaxSpotPrice and LaunchTemplateConfig.N.MaxPrice parameters are specified, the maximum price is the lower value of the two.
    PayAsYouGoAllocationStrategy string
    The scale-out policy for pay-as-you-go instances. Valid values: lowest-price and prioritized,Default value: lowest-price.
    PayAsYouGoTargetCapacity string
    The target capacity of pay-as-you-go instances in the auto provisioning group.
    SpotAllocationStrategy string
    The scale-out policy for preemptible instances. Valid values:lowest-price and diversified,Default value: lowest-price.
    SpotInstanceInterruptionBehavior string
    The default behavior after preemptible instances are shut down. Valid values: stop and terminate,Default value: stop.
    SpotInstancePoolsToUseCount int
    This parameter takes effect when the SpotAllocationStrategy parameter is set to lowest-price. The auto provisioning group selects instance types of the lowest cost to create instances.
    SpotTargetCapacity string
    The target capacity of preemptible instances in the auto provisioning group.
    TerminateInstances bool
    Specifies whether to release instances of the auto provisioning group. Valid values:false and true, default value: false.
    TerminateInstancesWithExpiration bool
    The shutdown policy for preemptible instances when the auto provisioning group expires. Valid values: false and true, default value: false.
    TotalTargetCapacity string
    The total target capacity of the auto provisioning group. The target capacity consists of the following three parts:PayAsYouGoTargetCapacity,SpotTargetCapacity and the supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity.
    ValidFrom string
    The time when the auto provisioning group is started. The period of time between this point in time and the point in time specified by the valid_until parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group is immediately started after creation.
    ValidUntil string
    The time when the auto provisioning group expires. The period of time between this point in time and the point in time specified by the valid_from parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group never expires.
    autoProvisioningGroupName String
    The name of the auto provisioning group to be created. It must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-)
    autoProvisioningGroupType String
    The type of the auto provisioning group. Valid values:request and maintain,Default value: maintain.
    defaultTargetCapacityType String
    The type of supplemental instances. When the total value of PayAsYouGoTargetCapacity and SpotTargetCapacity is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet the capacity requirements. Valid values:PayAsYouGo: Pay-as-you-go instances; Spot: Preemptible instances, Default value: Spot.
    description String
    The description of the auto provisioning group.
    excessCapacityTerminationPolicy String
    The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity. Valid values: no-termination and termination,Default value: no-termination.
    launchTemplateConfigs List<AutoProvisioningGroupLaunchTemplateConfig>
    DataDisk mappings to attach to ecs instance. See block-config below for details.
    launchTemplateId String
    The ID of the instance launch template associated with the auto provisioning group.
    launchTemplateVersion String
    The version of the instance launch template associated with the auto provisioning group.
    maxSpotPrice Double
    The global maximum price for preemptible instances in the auto provisioning group. If both the MaxSpotPrice and LaunchTemplateConfig.N.MaxPrice parameters are specified, the maximum price is the lower value of the two.
    payAsYouGoAllocationStrategy String
    The scale-out policy for pay-as-you-go instances. Valid values: lowest-price and prioritized,Default value: lowest-price.
    payAsYouGoTargetCapacity String
    The target capacity of pay-as-you-go instances in the auto provisioning group.
    spotAllocationStrategy String
    The scale-out policy for preemptible instances. Valid values:lowest-price and diversified,Default value: lowest-price.
    spotInstanceInterruptionBehavior String
    The default behavior after preemptible instances are shut down. Valid values: stop and terminate,Default value: stop.
    spotInstancePoolsToUseCount Integer
    This parameter takes effect when the SpotAllocationStrategy parameter is set to lowest-price. The auto provisioning group selects instance types of the lowest cost to create instances.
    spotTargetCapacity String
    The target capacity of preemptible instances in the auto provisioning group.
    terminateInstances Boolean
    Specifies whether to release instances of the auto provisioning group. Valid values:false and true, default value: false.
    terminateInstancesWithExpiration Boolean
    The shutdown policy for preemptible instances when the auto provisioning group expires. Valid values: false and true, default value: false.
    totalTargetCapacity String
    The total target capacity of the auto provisioning group. The target capacity consists of the following three parts:PayAsYouGoTargetCapacity,SpotTargetCapacity and the supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity.
    validFrom String
    The time when the auto provisioning group is started. The period of time between this point in time and the point in time specified by the valid_until parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group is immediately started after creation.
    validUntil String
    The time when the auto provisioning group expires. The period of time between this point in time and the point in time specified by the valid_from parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group never expires.
    autoProvisioningGroupName string
    The name of the auto provisioning group to be created. It must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-)
    autoProvisioningGroupType string
    The type of the auto provisioning group. Valid values:request and maintain,Default value: maintain.
    defaultTargetCapacityType string
    The type of supplemental instances. When the total value of PayAsYouGoTargetCapacity and SpotTargetCapacity is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet the capacity requirements. Valid values:PayAsYouGo: Pay-as-you-go instances; Spot: Preemptible instances, Default value: Spot.
    description string
    The description of the auto provisioning group.
    excessCapacityTerminationPolicy string
    The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity. Valid values: no-termination and termination,Default value: no-termination.
    launchTemplateConfigs AutoProvisioningGroupLaunchTemplateConfig[]
    DataDisk mappings to attach to ecs instance. See block-config below for details.
    launchTemplateId string
    The ID of the instance launch template associated with the auto provisioning group.
    launchTemplateVersion string
    The version of the instance launch template associated with the auto provisioning group.
    maxSpotPrice number
    The global maximum price for preemptible instances in the auto provisioning group. If both the MaxSpotPrice and LaunchTemplateConfig.N.MaxPrice parameters are specified, the maximum price is the lower value of the two.
    payAsYouGoAllocationStrategy string
    The scale-out policy for pay-as-you-go instances. Valid values: lowest-price and prioritized,Default value: lowest-price.
    payAsYouGoTargetCapacity string
    The target capacity of pay-as-you-go instances in the auto provisioning group.
    spotAllocationStrategy string
    The scale-out policy for preemptible instances. Valid values:lowest-price and diversified,Default value: lowest-price.
    spotInstanceInterruptionBehavior string
    The default behavior after preemptible instances are shut down. Valid values: stop and terminate,Default value: stop.
    spotInstancePoolsToUseCount number
    This parameter takes effect when the SpotAllocationStrategy parameter is set to lowest-price. The auto provisioning group selects instance types of the lowest cost to create instances.
    spotTargetCapacity string
    The target capacity of preemptible instances in the auto provisioning group.
    terminateInstances boolean
    Specifies whether to release instances of the auto provisioning group. Valid values:false and true, default value: false.
    terminateInstancesWithExpiration boolean
    The shutdown policy for preemptible instances when the auto provisioning group expires. Valid values: false and true, default value: false.
    totalTargetCapacity string
    The total target capacity of the auto provisioning group. The target capacity consists of the following three parts:PayAsYouGoTargetCapacity,SpotTargetCapacity and the supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity.
    validFrom string
    The time when the auto provisioning group is started. The period of time between this point in time and the point in time specified by the valid_until parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group is immediately started after creation.
    validUntil string
    The time when the auto provisioning group expires. The period of time between this point in time and the point in time specified by the valid_from parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group never expires.
    auto_provisioning_group_name str
    The name of the auto provisioning group to be created. It must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-)
    auto_provisioning_group_type str
    The type of the auto provisioning group. Valid values:request and maintain,Default value: maintain.
    default_target_capacity_type str
    The type of supplemental instances. When the total value of PayAsYouGoTargetCapacity and SpotTargetCapacity is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet the capacity requirements. Valid values:PayAsYouGo: Pay-as-you-go instances; Spot: Preemptible instances, Default value: Spot.
    description str
    The description of the auto provisioning group.
    excess_capacity_termination_policy str
    The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity. Valid values: no-termination and termination,Default value: no-termination.
    launch_template_configs Sequence[AutoProvisioningGroupLaunchTemplateConfigArgs]
    DataDisk mappings to attach to ecs instance. See block-config below for details.
    launch_template_id str
    The ID of the instance launch template associated with the auto provisioning group.
    launch_template_version str
    The version of the instance launch template associated with the auto provisioning group.
    max_spot_price float
    The global maximum price for preemptible instances in the auto provisioning group. If both the MaxSpotPrice and LaunchTemplateConfig.N.MaxPrice parameters are specified, the maximum price is the lower value of the two.
    pay_as_you_go_allocation_strategy str
    The scale-out policy for pay-as-you-go instances. Valid values: lowest-price and prioritized,Default value: lowest-price.
    pay_as_you_go_target_capacity str
    The target capacity of pay-as-you-go instances in the auto provisioning group.
    spot_allocation_strategy str
    The scale-out policy for preemptible instances. Valid values:lowest-price and diversified,Default value: lowest-price.
    spot_instance_interruption_behavior str
    The default behavior after preemptible instances are shut down. Valid values: stop and terminate,Default value: stop.
    spot_instance_pools_to_use_count int
    This parameter takes effect when the SpotAllocationStrategy parameter is set to lowest-price. The auto provisioning group selects instance types of the lowest cost to create instances.
    spot_target_capacity str
    The target capacity of preemptible instances in the auto provisioning group.
    terminate_instances bool
    Specifies whether to release instances of the auto provisioning group. Valid values:false and true, default value: false.
    terminate_instances_with_expiration bool
    The shutdown policy for preemptible instances when the auto provisioning group expires. Valid values: false and true, default value: false.
    total_target_capacity str
    The total target capacity of the auto provisioning group. The target capacity consists of the following three parts:PayAsYouGoTargetCapacity,SpotTargetCapacity and the supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity.
    valid_from str
    The time when the auto provisioning group is started. The period of time between this point in time and the point in time specified by the valid_until parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group is immediately started after creation.
    valid_until str
    The time when the auto provisioning group expires. The period of time between this point in time and the point in time specified by the valid_from parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group never expires.
    autoProvisioningGroupName String
    The name of the auto provisioning group to be created. It must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-)
    autoProvisioningGroupType String
    The type of the auto provisioning group. Valid values:request and maintain,Default value: maintain.
    defaultTargetCapacityType String
    The type of supplemental instances. When the total value of PayAsYouGoTargetCapacity and SpotTargetCapacity is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet the capacity requirements. Valid values:PayAsYouGo: Pay-as-you-go instances; Spot: Preemptible instances, Default value: Spot.
    description String
    The description of the auto provisioning group.
    excessCapacityTerminationPolicy String
    The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity. Valid values: no-termination and termination,Default value: no-termination.
    launchTemplateConfigs List<Property Map>
    DataDisk mappings to attach to ecs instance. See block-config below for details.
    launchTemplateId String
    The ID of the instance launch template associated with the auto provisioning group.
    launchTemplateVersion String
    The version of the instance launch template associated with the auto provisioning group.
    maxSpotPrice Number
    The global maximum price for preemptible instances in the auto provisioning group. If both the MaxSpotPrice and LaunchTemplateConfig.N.MaxPrice parameters are specified, the maximum price is the lower value of the two.
    payAsYouGoAllocationStrategy String
    The scale-out policy for pay-as-you-go instances. Valid values: lowest-price and prioritized,Default value: lowest-price.
    payAsYouGoTargetCapacity String
    The target capacity of pay-as-you-go instances in the auto provisioning group.
    spotAllocationStrategy String
    The scale-out policy for preemptible instances. Valid values:lowest-price and diversified,Default value: lowest-price.
    spotInstanceInterruptionBehavior String
    The default behavior after preemptible instances are shut down. Valid values: stop and terminate,Default value: stop.
    spotInstancePoolsToUseCount Number
    This parameter takes effect when the SpotAllocationStrategy parameter is set to lowest-price. The auto provisioning group selects instance types of the lowest cost to create instances.
    spotTargetCapacity String
    The target capacity of preemptible instances in the auto provisioning group.
    terminateInstances Boolean
    Specifies whether to release instances of the auto provisioning group. Valid values:false and true, default value: false.
    terminateInstancesWithExpiration Boolean
    The shutdown policy for preemptible instances when the auto provisioning group expires. Valid values: false and true, default value: false.
    totalTargetCapacity String
    The total target capacity of the auto provisioning group. The target capacity consists of the following three parts:PayAsYouGoTargetCapacity,SpotTargetCapacity and the supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity.
    validFrom String
    The time when the auto provisioning group is started. The period of time between this point in time and the point in time specified by the valid_until parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group is immediately started after creation.
    validUntil String
    The time when the auto provisioning group expires. The period of time between this point in time and the point in time specified by the valid_from parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group never expires.

    Supporting Types

    AutoProvisioningGroupLaunchTemplateConfig, AutoProvisioningGroupLaunchTemplateConfigArgs

    MaxPrice string
    The maximum price of the instance type specified in the Nth extended configurations of the launch template.
    VswitchId string
    The ID of the VSwitch in the Nth extended configurations of the launch template.
    WeightedCapacity string
    The weight of the instance type specified in the Nth extended configurations of the launch template.
    InstanceType string
    The instance type of the Nth extended configurations of the launch template.
    Priority string
    The priority of the instance type specified in the Nth extended configurations of the launch template. A value of 0 indicates the highest priority.
    MaxPrice string
    The maximum price of the instance type specified in the Nth extended configurations of the launch template.
    VswitchId string
    The ID of the VSwitch in the Nth extended configurations of the launch template.
    WeightedCapacity string
    The weight of the instance type specified in the Nth extended configurations of the launch template.
    InstanceType string
    The instance type of the Nth extended configurations of the launch template.
    Priority string
    The priority of the instance type specified in the Nth extended configurations of the launch template. A value of 0 indicates the highest priority.
    maxPrice String
    The maximum price of the instance type specified in the Nth extended configurations of the launch template.
    vswitchId String
    The ID of the VSwitch in the Nth extended configurations of the launch template.
    weightedCapacity String
    The weight of the instance type specified in the Nth extended configurations of the launch template.
    instanceType String
    The instance type of the Nth extended configurations of the launch template.
    priority String
    The priority of the instance type specified in the Nth extended configurations of the launch template. A value of 0 indicates the highest priority.
    maxPrice string
    The maximum price of the instance type specified in the Nth extended configurations of the launch template.
    vswitchId string
    The ID of the VSwitch in the Nth extended configurations of the launch template.
    weightedCapacity string
    The weight of the instance type specified in the Nth extended configurations of the launch template.
    instanceType string
    The instance type of the Nth extended configurations of the launch template.
    priority string
    The priority of the instance type specified in the Nth extended configurations of the launch template. A value of 0 indicates the highest priority.
    max_price str
    The maximum price of the instance type specified in the Nth extended configurations of the launch template.
    vswitch_id str
    The ID of the VSwitch in the Nth extended configurations of the launch template.
    weighted_capacity str
    The weight of the instance type specified in the Nth extended configurations of the launch template.
    instance_type str
    The instance type of the Nth extended configurations of the launch template.
    priority str
    The priority of the instance type specified in the Nth extended configurations of the launch template. A value of 0 indicates the highest priority.
    maxPrice String
    The maximum price of the instance type specified in the Nth extended configurations of the launch template.
    vswitchId String
    The ID of the VSwitch in the Nth extended configurations of the launch template.
    weightedCapacity String
    The weight of the instance type specified in the Nth extended configurations of the launch template.
    instanceType String
    The instance type of the Nth extended configurations of the launch template.
    priority String
    The priority of the instance type specified in the Nth extended configurations of the launch template. A value of 0 indicates the highest priority.

    Import

    ECS auto provisioning group can be imported using the id, e.g.

    $ pulumi import alicloud:ecs/autoProvisioningGroup:AutoProvisioningGroup example asg-abc123456
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.68.0 published on Monday, Dec 2, 2024 by Pulumi