EciScalingConfigurationArgs

data class EciScalingConfigurationArgs(val acrRegistryInfos: Output<List<EciScalingConfigurationAcrRegistryInfoArgs>>? = null, val active: Output<Boolean>? = null, val activeDeadlineSeconds: Output<Int>? = null, val autoCreateEip: Output<Boolean>? = null, val autoMatchImageCache: Output<Boolean>? = null, val containerGroupName: Output<String>? = null, val containers: Output<List<EciScalingConfigurationContainerArgs>>? = null, val costOptimization: Output<Boolean>? = null, val cpu: Output<Double>? = null, val cpuOptionsCore: Output<Int>? = null, val cpuOptionsThreadsPerCore: Output<Int>? = null, val description: Output<String>? = null, val dnsConfigOptions: Output<List<EciScalingConfigurationDnsConfigOptionArgs>>? = null, val dnsPolicy: Output<String>? = null, val egressBandwidth: Output<Int>? = null, val eipBandwidth: Output<Int>? = null, val enableSls: Output<Boolean>? = null, val ephemeralStorage: Output<Int>? = null, val forceDelete: Output<Boolean>? = null, val hostAliases: Output<List<EciScalingConfigurationHostAliasArgs>>? = null, val hostName: Output<String>? = null, val imageRegistryCredentials: Output<List<EciScalingConfigurationImageRegistryCredentialArgs>>? = null, val imageSnapshotId: Output<String>? = null, val ingressBandwidth: Output<Int>? = null, val initContainers: Output<List<EciScalingConfigurationInitContainerArgs>>? = null, val instanceFamilyLevel: Output<String>? = null, val instanceTypes: Output<List<String>>? = null, val ipv6AddressCount: Output<Int>? = null, val loadBalancerWeight: Output<Int>? = null, val memory: Output<Double>? = null, val ramRoleName: Output<String>? = null, val resourceGroupId: Output<String>? = null, val restartPolicy: Output<String>? = null, val scalingConfigurationName: Output<String>? = null, val scalingGroupId: Output<String>? = null, val securityContextSysctls: Output<List<EciScalingConfigurationSecurityContextSysctlArgs>>? = null, val securityGroupId: Output<String>? = null, val spotPriceLimit: Output<Double>? = null, val spotStrategy: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val terminationGracePeriodSeconds: Output<Int>? = null, val volumes: Output<List<EciScalingConfigurationVolumeArgs>>? = null) : ConvertibleToJava<EciScalingConfigurationArgs>

Provides a ESS eci scaling configuration resource. For information about ess eci scaling configuration, see CreateEciScalingConfiguration.

NOTE: Available since v1.164.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const defaultInteger = new random.index.Integer("default", {
min: 10000,
max: 99999,
});
const myName = `${name}-${defaultInteger.result}`;
const _default = alicloud.getZones({
availableDiskCategory: "cloud_efficiency",
availableResourceCreation: "VSwitch",
});
const defaultNetwork = new alicloud.vpc.Network("default", {
vpcName: myName,
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: myName,
});
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
name: myName,
vpcId: defaultNetwork.id,
});
const defaultScalingGroup = new alicloud.ess.ScalingGroup("default", {
minSize: 0,
maxSize: 1,
scalingGroupName: myName,
removalPolicies: [
"OldestInstance",
"NewestInstance",
],
vswitchIds: [defaultSwitch&#46;id],
groupType: "ECI",
});
const defaultEciScalingConfiguration = new alicloud.ess.EciScalingConfiguration("default", {
scalingGroupId: defaultScalingGroup.id,
cpu: 2,
memory: 4,
securityGroupId: defaultSecurityGroup.id,
forceDelete: true,
active: true,
containerGroupName: "container-group-1649839595174",
containers: [{
name: "container-1",
image: "registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/alpine:3.5",
}],
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default_integer = random.index.Integer("default",
min=10000,
max=99999)
my_name = f"{name}-{default_integer['result']}"
default = alicloud.get_zones(available_disk_category="cloud_efficiency",
available_resource_creation="VSwitch")
default_network = alicloud.vpc.Network("default",
vpc_name=my_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=my_name)
default_security_group = alicloud.ecs.SecurityGroup("default",
name=my_name,
vpc_id=default_network.id)
default_scaling_group = alicloud.ess.ScalingGroup("default",
min_size=0,
max_size=1,
scaling_group_name=my_name,
removal_policies=[
"OldestInstance",
"NewestInstance",
],
vswitch_ids=[default_switch&#46;id],
group_type="ECI")
default_eci_scaling_configuration = alicloud.ess.EciScalingConfiguration("default",
scaling_group_id=default_scaling_group.id,
cpu=2,
memory=4,
security_group_id=default_security_group.id,
force_delete=True,
active=True,
container_group_name="container-group-1649839595174",
containers=[{
"name": "container-1",
"image": "registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/alpine:3.5",
}])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var defaultInteger = new Random.Index.Integer("default", new()
{
Min = 10000,
Max = 99999,
});
var myName = $"{name}-{defaultInteger.Result}";
var @default = AliCloud.GetZones.Invoke(new()
{
AvailableDiskCategory = "cloud_efficiency",
AvailableResourceCreation = "VSwitch",
});
var defaultNetwork = new AliCloud.Vpc.Network("default", new()
{
VpcName = myName,
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 = myName,
});
var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
{
Name = myName,
VpcId = defaultNetwork.Id,
});
var defaultScalingGroup = new AliCloud.Ess.ScalingGroup("default", new()
{
MinSize = 0,
MaxSize = 1,
ScalingGroupName = myName,
RemovalPolicies = new[]
{
"OldestInstance",
"NewestInstance",
},
VswitchIds = new[]
{
defaultSwitch.Id,
},
GroupType = "ECI",
});
var defaultEciScalingConfiguration = new AliCloud.Ess.EciScalingConfiguration("default", new()
{
ScalingGroupId = defaultScalingGroup.Id,
Cpu = 2,
Memory = 4,
SecurityGroupId = defaultSecurityGroup.Id,
ForceDelete = true,
Active = true,
ContainerGroupName = "container-group-1649839595174",
Containers = new[]
{
new AliCloud.Ess.Inputs.EciScalingConfigurationContainerArgs
{
Name = "container-1",
Image = "registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/alpine:3.5",
},
},
});
});
package main
import (
"fmt"
"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/ess"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"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 := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
Min: 10000,
Max: 99999,
})
if err != nil {
return err
}
myName := fmt.Sprintf("%v-%v", name, defaultInteger.Result)
_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(myName),
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(myName),
})
if err != nil {
return err
}
defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
Name: pulumi.String(myName),
VpcId: defaultNetwork.ID(),
})
if err != nil {
return err
}
defaultScalingGroup, err := ess.NewScalingGroup(ctx, "default", &ess.ScalingGroupArgs{
MinSize: pulumi.Int(0),
MaxSize: pulumi.Int(1),
ScalingGroupName: pulumi.String(myName),
RemovalPolicies: pulumi.StringArray{
pulumi.String("OldestInstance"),
pulumi.String("NewestInstance"),
},
VswitchIds: pulumi.StringArray{
defaultSwitch.ID(),
},
GroupType: pulumi.String("ECI"),
})
if err != nil {
return err
}
_, err = ess.NewEciScalingConfiguration(ctx, "default", &ess.EciScalingConfigurationArgs{
ScalingGroupId: defaultScalingGroup.ID(),
Cpu: pulumi.Float64(2),
Memory: pulumi.Float64(4),
SecurityGroupId: defaultSecurityGroup.ID(),
ForceDelete: pulumi.Bool(true),
Active: pulumi.Bool(true),
ContainerGroupName: pulumi.String("container-group-1649839595174"),
Containers: ess.EciScalingConfigurationContainerArray{
&ess.EciScalingConfigurationContainerArgs{
Name: pulumi.String("container-1"),
Image: pulumi.String("registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/alpine:3.5"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.integer;
import com.pulumi.random.integerArgs;
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.ess.ScalingGroup;
import com.pulumi.alicloud.ess.ScalingGroupArgs;
import com.pulumi.alicloud.ess.EciScalingConfiguration;
import com.pulumi.alicloud.ess.EciScalingConfigurationArgs;
import com.pulumi.alicloud.ess.inputs.EciScalingConfigurationContainerArgs;
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("terraform-example");
var defaultInteger = new Integer("defaultInteger", IntegerArgs.builder()
.min(10000)
.max(99999)
.build());
final var myName = String.format("%s-%s", name,defaultInteger.result());
final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableDiskCategory("cloud_efficiency")
.availableResourceCreation("VSwitch")
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(myName)
.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(myName)
.build());
var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
.name(myName)
.vpcId(defaultNetwork.id())
.build());
var defaultScalingGroup = new ScalingGroup("defaultScalingGroup", ScalingGroupArgs.builder()
.minSize(0)
.maxSize(1)
.scalingGroupName(myName)
.removalPolicies(
"OldestInstance",
"NewestInstance")
.vswitchIds(defaultSwitch.id())
.groupType("ECI")
.build());
var defaultEciScalingConfiguration = new EciScalingConfiguration("defaultEciScalingConfiguration", EciScalingConfigurationArgs.builder()
.scalingGroupId(defaultScalingGroup.id())
.cpu(2.0)
.memory(4.0)
.securityGroupId(defaultSecurityGroup.id())
.forceDelete(true)
.active(true)
.containerGroupName("container-group-1649839595174")
.containers(EciScalingConfigurationContainerArgs.builder()
.name("container-1")
.image("registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/alpine:3.5")
.build())
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
defaultInteger:
type: random:integer
name: default
properties:
min: 10000
max: 99999
defaultNetwork:
type: alicloud:vpc:Network
name: default
properties:
vpcName: ${myName}
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: ${myName}
defaultSecurityGroup:
type: alicloud:ecs:SecurityGroup
name: default
properties:
name: ${myName}
vpcId: ${defaultNetwork.id}
defaultScalingGroup:
type: alicloud:ess:ScalingGroup
name: default
properties:
minSize: 0
maxSize: 1
scalingGroupName: ${myName}
removalPolicies:
- OldestInstance
- NewestInstance
vswitchIds:
- ${defaultSwitch.id}
groupType: ECI
defaultEciScalingConfiguration:
type: alicloud:ess:EciScalingConfiguration
name: default
properties:
scalingGroupId: ${defaultScalingGroup.id}
cpu: 2
memory: 4
securityGroupId: ${defaultSecurityGroup.id}
forceDelete: true
active: true
containerGroupName: container-group-1649839595174
containers:
- name: container-1
image: registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/alpine:3.5
variables:
myName: ${name}-${defaultInteger.result}
default:
fn::invoke:
function: alicloud:getZones
arguments:
availableDiskCategory: cloud_efficiency
availableResourceCreation: VSwitch

Import

ESS eci scaling configuration can be imported using the id, e.g.

$ pulumi import alicloud:ess/eciScalingConfiguration:EciScalingConfiguration example asc-abc123456

Constructors

Link copied to clipboard
constructor(acrRegistryInfos: Output<List<EciScalingConfigurationAcrRegistryInfoArgs>>? = null, active: Output<Boolean>? = null, activeDeadlineSeconds: Output<Int>? = null, autoCreateEip: Output<Boolean>? = null, autoMatchImageCache: Output<Boolean>? = null, containerGroupName: Output<String>? = null, containers: Output<List<EciScalingConfigurationContainerArgs>>? = null, costOptimization: Output<Boolean>? = null, cpu: Output<Double>? = null, cpuOptionsCore: Output<Int>? = null, cpuOptionsThreadsPerCore: Output<Int>? = null, description: Output<String>? = null, dnsConfigOptions: Output<List<EciScalingConfigurationDnsConfigOptionArgs>>? = null, dnsPolicy: Output<String>? = null, egressBandwidth: Output<Int>? = null, eipBandwidth: Output<Int>? = null, enableSls: Output<Boolean>? = null, ephemeralStorage: Output<Int>? = null, forceDelete: Output<Boolean>? = null, hostAliases: Output<List<EciScalingConfigurationHostAliasArgs>>? = null, hostName: Output<String>? = null, imageRegistryCredentials: Output<List<EciScalingConfigurationImageRegistryCredentialArgs>>? = null, imageSnapshotId: Output<String>? = null, ingressBandwidth: Output<Int>? = null, initContainers: Output<List<EciScalingConfigurationInitContainerArgs>>? = null, instanceFamilyLevel: Output<String>? = null, instanceTypes: Output<List<String>>? = null, ipv6AddressCount: Output<Int>? = null, loadBalancerWeight: Output<Int>? = null, memory: Output<Double>? = null, ramRoleName: Output<String>? = null, resourceGroupId: Output<String>? = null, restartPolicy: Output<String>? = null, scalingConfigurationName: Output<String>? = null, scalingGroupId: Output<String>? = null, securityContextSysctls: Output<List<EciScalingConfigurationSecurityContextSysctlArgs>>? = null, securityGroupId: Output<String>? = null, spotPriceLimit: Output<Double>? = null, spotStrategy: Output<String>? = null, tags: Output<Map<String, String>>? = null, terminationGracePeriodSeconds: Output<Int>? = null, volumes: Output<List<EciScalingConfigurationVolumeArgs>>? = null)

Properties

Link copied to clipboard

Information about the Container Registry Enterprise Edition instance. See acr_registry_infos below for details.

Link copied to clipboard
val active: Output<Boolean>? = null

Whether active current eci scaling configuration in the specified scaling group. Note that only one configuration can be active. Default to false.

Link copied to clipboard
val activeDeadlineSeconds: Output<Int>? = null

The duration in seconds relative to the startTime that the job may be active before the system tries to terminate it.

Link copied to clipboard
val autoCreateEip: Output<Boolean>? = null

Whether create eip automatically.

Link copied to clipboard
val autoMatchImageCache: Output<Boolean>? = null

Whether to automatically match the image cache.

Link copied to clipboard
val containerGroupName: Output<String>? = null

The name series of the elastic container instances created from the scaling configuration. If you want to use an ordered instance name, specify the value for this parameter in the following format: name_prefix(AUTO_INCREMENT)begin_number,bitsname_suffix. name_prefix: the prefix of the hostname. (AUTO_INCREMENT): the sort method. This is a static field. begin_number: the start value of the sequential values. Valid values: 0 to 999999. bits: the number of digits in sequential values. Valid values: 1 to 6. If the number of digits in the specified begin_number value is greater than the value of the bits field, the bits field is automatically set to 6. name_suffix: the suffix of the hostname. This field is optional.

Link copied to clipboard

The list of containers. See containers below for details.

Link copied to clipboard
val costOptimization: Output<Boolean>? = null

Indicates whether the Cost Optimization feature is enabled. Valid values: true,false.

Link copied to clipboard
val cpu: Output<Double>? = null

The amount of CPU resources allocated to the container group.

Link copied to clipboard
val cpuOptionsCore: Output<Int>? = null

The number of physical CPU cores. You can specify this parameter for only specific instance types.

Link copied to clipboard
val cpuOptionsThreadsPerCore: Output<Int>? = null

The number of threads per core. You can specify this parameter for only specific instance types. If you set this parameter to 1, Hyper-Threading is disabled.

Link copied to clipboard
val description: Output<String>? = null

The description of data disk N. Valid values of N: 1 to 16. The description must be 2 to 256 characters in length and cannot start with http:// or https://.

Link copied to clipboard

The options. Each option is a name-value pair. The value in the name-value pair is optional. See dns_config_options below for details.

Link copied to clipboard
val dnsPolicy: Output<String>? = null

dns policy of contain group.

Link copied to clipboard
val egressBandwidth: Output<Int>? = null

egress bandwidth.

Link copied to clipboard
val eipBandwidth: Output<Int>? = null

Eip bandwidth.

Link copied to clipboard
val enableSls: Output<Boolean>? = null

Enable sls log service.

Link copied to clipboard
val ephemeralStorage: Output<Int>? = null

The size of ephemeral storage.

Link copied to clipboard
val forceDelete: Output<Boolean>? = null

The eci scaling configuration will be deleted forcibly with deleting its scaling group. Default to false.

Link copied to clipboard

HostAliases. See host_aliases below.

Link copied to clipboard
val hostName: Output<String>? = null

Hostname of an ECI instance.

Link copied to clipboard

The image registry credential. See image_registry_credentials below for details.

Link copied to clipboard
val imageSnapshotId: Output<String>? = null

The ID of image cache.

Link copied to clipboard
val ingressBandwidth: Output<Int>? = null

Ingress bandwidth.

Link copied to clipboard

The list of initContainers. See init_containers below for details.

Link copied to clipboard
val instanceFamilyLevel: Output<String>? = null

The level of the instance family, which is used to filter instance types that meet the specified criteria. This parameter takes effect only if you set CostOptimization to true. Valid values: EntryLevel, EnterpriseLevel, CreditEntryLevel.

Link copied to clipboard
val instanceTypes: Output<List<String>>? = null

The specified ECS instance types. You can specify up to five ECS instance types.

Link copied to clipboard
val ipv6AddressCount: Output<Int>? = null

Number of IPv6 addresses.

Link copied to clipboard
val loadBalancerWeight: Output<Int>? = null

The weight of an ECI instance attached to the Server Group.

Link copied to clipboard
val memory: Output<Double>? = null

The amount of memory resources allocated to the container group.

Link copied to clipboard
val ramRoleName: Output<String>? = null

The RAM role that the container group assumes. ECI and ECS share the same RAM role.

Link copied to clipboard
val resourceGroupId: Output<String>? = null

ID of resource group.

Link copied to clipboard
val restartPolicy: Output<String>? = null

The restart policy of the container group. Default to Always.

Link copied to clipboard
val scalingConfigurationName: Output<String>? = null

Name shown for the scheduled task. which must contain 2-64 characters ( English or Chinese), starting with numbers, English letters or Chinese characters, and can contain number, underscores _, hypens -, and decimal point .. If this parameter value is not specified, the default value is EciScalingConfigurationId.

Link copied to clipboard
val scalingGroupId: Output<String>? = null

ID of the scaling group of a eci scaling configuration.

Link copied to clipboard

The system information about the security context in which the elastic container instance is run. See security_context_sysctls below for details.

Link copied to clipboard
val securityGroupId: Output<String>? = null

ID of the security group used to create new instance. It is conflict with security_group_ids.

Link copied to clipboard
val spotPriceLimit: Output<Double>? = null

The maximum price hourly for spot instance.

Link copied to clipboard
val spotStrategy: Output<String>? = null

The spot strategy for a Pay-As-You-Go instance. Valid values: NoSpot, SpotAsPriceGo , SpotWithPriceLimit.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags to assign to the resource. It will be applied for ECI instances finally.

Link copied to clipboard
val terminationGracePeriodSeconds: Output<Int>? = null

The program's buffering time before closing.

Link copied to clipboard

The list of volumes. See volumes below for details.

Functions

Link copied to clipboard
open override fun toJava(): EciScalingConfigurationArgs