All Products
Search
Document Center

Auto Scaling:CreateEciScalingConfiguration

Last Updated:Apr 30, 2024

Creates a scaling configuration of the Elastic Container Instance type. Auto Scaling uses the scaling configuration as a template to create elastic container instances during scale-outs based on your business requirements.

Usage notes

A scaling configuration is a template that is used to create elastic container instances during scale-outs.

You can specify CPU and Memory to determine the range of instance types. Then, Auto Scaling determines the available instance types based on factors such as I/O optimization requirements and zones. Auto Scaling preferentially creates elastic container instances by using the lowest-priced instance type. This method is applicable only if you set Scaling Policy to Cost Optimization Policy and no instance type is specified in the scaling configuration.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action

String

Yes

CreateEciScalingConfiguration

The operation that you want to perform. Set the value to CreateEciScalingConfiguration.

ScalingGroupId

String

Yes

asg-bp14wlu85wrpchm0****

The ID of the scaling group for which you want to create the scaling configuration.

ScalingConfigurationName

String

Yes

scalingconfig****

The name of the scaling configuration. The name must be 2 to 64 characters in length and can contain letters, digits, underscores (_), hyphens (-), and periods (.). It must start with a letter or a digit.

A scaling configuration must bear a distinctive name within a given region. If you do not specify this parameter, the scaling configuration ID is used.

SecurityGroupId

String

Yes

sg-uf66jeqopgqa9hdn****

The ID of the security group with which you want to associate the elastic container instances created from the scaling configuration. Elastic container instances that are associated with the same security group can communicate with each other.

If you do not specify a security group, the system uses the default security group in the region that you selected. Make sure that the inbound rules of the security group contain the protocols and port numbers of the containers that you want to expose. If you do not have a default security group in the region, the system creates a default security group and adds the declared container protocols and port numbers to the inbound rules of the security group.

ContainerGroupName

String

Yes

nginx-test

The naming series of the elastic container instances.

RestartPolicy

String

No

Always

The restart policy of the elastic container instances. Valid values:

  • Always: always restarts the elastic container instances.

  • Never: never restarts the elastic container instances.

  • OnFailure: restarts the elastic container instances upon failures.

Default value: Always.

Cpu

Float

No

1.0

The number of vCPUs that you want to allocate to an instance.

Memory

Float

No

2.0

The memory size that you want to allocate to an instance. Unit: GiB.

ResourceGroupId

String

No

rg-uf66jeqopgqa9hdn****

The ID of the resource group.

DnsPolicy

String

No

Default

The Domain Name System (DNS) policy. Valid values:

  • None: uses the DNS that is specified by DnsConfig.

  • Default: uses the DNS that is specified for the runtime environment.

ImageSnapshotId

String

No

imc-2zebxkiifuyzzlhl****

The ID of the image snapshot.

RamRoleName

String

No

RamTestRole

The name of the Resource Access Management (RAM) role that you want to assign to the elastic container instances. Elastic container instances and Elastic Compute Service (ECS) instances can share the same RAM role. For more information, see Use an instance RAM role by calling API operations.

TerminationGracePeriodSeconds

Long

No

60

The buffer period during which a program handles operations before the program is stopped. Unit: seconds.

AutoMatchImageCache

Boolean

No

false

Specifies whether to automatically match the image cache. Valid values:

  • true

  • false

Default value: false.

Ipv6AddressCount

Integer

No

1

The number of IPv6 addresses.

ActiveDeadlineSeconds

Long

No

1000

The validity period of the scaling configuration. Unit: seconds.

SpotStrategy

String

No

SpotWithPriceLimit

The bidding policy of the elastic container instances. Valid values:

  • NoSpot: The instances are pay-as-you-go instances.

  • SpotWithPriceLimit: The instances are preemptible instances for which you can specify the maximum hourly price.

  • SpotAsPriceGo: The instances are created as preemptible instances for which the market price at the time of purchase is used as the bid price.

Default value: NoSpot.

SpotPriceLimit

Float

No

0.025

The maximum hourly price of the preemptible elastic container instances. The value can be accurate to three decimal places.

If you set SpotStrategy to SpotWithPriceLimit, you must specify SpotPriceLimit.

AutoCreateEip

Boolean

No

true

Specifies whether to automatically create an elastic IP address (EIP) and then bind the EIP to an elastic container instance.

EipBandwidth

Integer

No

5

The bandwidth of the EIP. Default value: 5. Unit: Mbit/s.

HostName

String

No

test

The hostname series of the elastic container instances.

IngressBandwidth

Long

No

1024000

The maximum inbound bandwidth. Unit: bit/s.

EgressBandwidth

Long

No

1024000

The maximum outbound bandwidth. Unit: bit/s.

CpuOptionsCore

Integer

No

2

The number of physical CPU cores. You can specify this parameter for only specific instance types. For more information, see Specify custom CPU options.

CpuOptionsThreadsPerCore

Integer

No

2

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. For more information, see Specify custom CPU options.

EphemeralStorage

Integer

No

20

The size of the ephemeral storage space. By default, a performance level 1 (PL1) enhanced SSD (ESSD) is used. Unit: GiB.

LoadBalancerWeight

Integer

No

50

The weight of an elastic container instance as a backend server. Valid values: 1 to 100.

Default value: 50.

Tag.N.Key

String

No

version

The tag key. You can specify 1 to 20 tags for each instance.

You cannot specify an empty string as a tag key. The tag key can be up to 128 characters in length. It cannot contain http:// or https://, and cannot start with acs: or aliyun.

Tag.N.Value

String

No

3

The tag value. You can specify 1 to 20 tags for each instance.

You can specify an empty string as a tag value. The tag value can be up to 128 characters in length. It cannot contain http:// or https://, and cannot start with acs:.

ImageRegistryCredential.N.Password

String

No

yourpassword

The password of image repository N.

ImageRegistryCredential.N.Server

String

No

registry-vpc.cn-shanghai.aliyuncs.com

The registered address of image repository N.

ImageRegistryCredential.N.UserName

String

No

yourusername

The username of image repository N.

Container.N.ReadinessProbe.TimeoutSeconds

Integer

No

5

The time limit within which a readiness probe must be completed. Default value: 1. Minimum value: 1.

Container.N.ReadinessProbe.SuccessThreshold

Integer

No

1

The minimum count of consecutive successes needed to consider a failed readiness probe as having recovered successfully. Default value: 1. Set the value to 1.

Container.N.SecurityContext.Capability.Add.N

String

No

NET_ADMIN

The permissions that you want to grant to the processes in container N. Valid values: NET_ADMIN and NET_RAW.

Note

If you want to use NET_RAW, submit a ticket.

Container.N.ReadinessProbe.TcpSocket.Port

Integer

No

8000

The port detected by the TCP sockets that you want to use for readiness probing.

Container.N.ReadinessProbe.HttpGet.Scheme

String

No

HTTP

The protocol type of the HTTP GET requests that you want to use for readiness probing. Valid values:

  • HTTP

  • HTTPS

Container.N.LivenessProbe.PeriodSeconds

Integer

No

5

The time interval between consecutive liveness probes. Unit: seconds. Default value: 10. Minimum value: 1.

Container.N.Port.N.Protocol

String

No

TCP

The protocol type. Valid values:

  • TCP

  • UDP

Container.N.Port.N.Port

Integer

No

80

The port number. Valid values: 1 to 65535.

Container.N.EnvironmentVar.N.Key

String

No

PATH

The key of environment variable N. The key must be 1 to 128 characters in length and can contain letters, digits, and underscores (_). It cannot start with a digit. Specify the value in the [0-9a-zA-Z] format.

Container.N.EnvironmentVar.N.Value

String

No

/usr/local/bin

The value of environment variable N. The value can be up to 256 characters in length.

Container.N.LivenessProbe.TcpSocket.Port

Integer

No

8000

The port detected by the TCP sockets that you want to use for liveness probing.

Container.N.Tty

Boolean

No

false

Specifies whether to enable the Interaction feature. Valid values:

  • true

  • false

Default value: false.

If you set Command to /bin/bash, set this parameter to true.

Container.N.WorkingDir

String

No

/usr/local/

The working directory of container N.

Container.N.LivenessProbe.HttpGet.Scheme

String

No

HTTP

The protocol type of the HTTP GET requests that you want to use for liveness probing. Valid values:

  • HTTP

  • HTTPS

Container.N.ReadinessProbe.HttpGet.Port

Integer

No

8080

The port over which you want to send the HTTP GET requests for readiness probing.

Container.N.Arg.N

String

No

100

The arguments that correspond to the startup commands of container N. You can specify up to 10 arguments.

Container.N.Gpu

Integer

No

1

The number of GPUs that you want to allocate to container N.

Container.N.ReadinessProbe.InitialDelaySeconds

Integer

No

3

The interval between the launch of container N and the onset of a readiness probe. Unit: seconds. Unit: seconds.

Container.N.Stdin

Boolean

No

false

Specifies whether container N allocates buffer resources to standard input streams during its active runtime. If you do not specify this parameter, an end-of-file (EOF) error occurs.

Default value: false.

Container.N.Memory

Float

No

0.5

The memory size that you want to allocate to container N. Unit: GiB.

Container.N.Name

String

No

nginx

The image name of container N.

Container.N.Image

String

No

registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:latest

The image of container N.

Container.N.LivenessProbe.InitialDelaySeconds

Integer

No

5

The interval between the launch of the container and the onset of a liveness probe. Unit: seconds.

Container.N.VolumeMount.N.MountPropagation

String

No

None

The mount propagation settings of volume N. Mount propagation enables volumes mounted on one container to be shared among other containers within the same pod or across distinct pods residing on the same node. Valid values:

  • None: Subsequent mounts executed either on the volume itself or its subdirectories do not propagate to the already established volume mount.

  • HostToCotainer: Subsequent mounts executed either on the volume itself or its subdirectories propagate to the already established volume mount.

  • Bidirectional: This value is similar to HostToCotainer. Subsequent mounts executed either on the volume itself or its subdirectories propagate to the already established volume mount. In addition, any volume mounts executed on the container not only propagate back to the underlying instance but also to all containers across every pod that uses the same volume.

Default value: None.

Container.N.VolumeMount.N.MountPath

String

No

/pod/data

The directory within container N onto which you want to mount volume N.

Note

The information stored within this directory will be overridden by the data present on the mounted volume. Specify this parameter with caution.

Container.N.VolumeMount.N.ReadOnly

Boolean

No

false

Specifies whether volume N is read-only. Valid values:

  • true

  • false

Default value: false.

Container.N.VolumeMount.N.Name

String

No

default-volume1

The name of volume N. The value of this parameter is the same as the value of Volume.N.Name.

Container.N.VolumeMount.N.SubPath

String

No

data2/

The subdirectory of volume N.

Container.N.LivenessProbe.FailureThreshold

Integer

No

3

The minimum count of consecutive failures that must occur for a liveness probe to be classified as failed.

Default value: 3.

Container.N.ReadinessProbe.Exec.Command.N

String

No

cat /tmp/healthy

The commands that you want to run by using the Command-Line Interface (CLI) for readiness probing within container N.

Container.N.ReadinessProbe.FailureThreshold

Integer

No

3

The minimum count of consecutive failures that must occur for a readiness probe to be classified as failed. Default value: 3.

Container.N.ImagePullPolicy

String

No

Always

The image pulling policy. Valid values:

  • Always: Each time instances are created, image pulling is performed.

  • IfNotPresent: Image pulling is performed as needed. On-premises images are preferentially used. If no on-premises images are available, image pulling is performed.

  • Never: Image pulling is not performed. On-premises images are always used.

Container.N.StdinOnce

Boolean

No

false

Specifies whether standard input streams remain connected during multiple sessions when Container.N.StdinOnce is set to true.

If you set Container.N.StdinOnce to true, standard input streams are connected after the container is started and remain idle until a client is connected to receive data. After the client is disconnected, streams are also disconnected and remain disconnected until the container is restarted.

Container.N.Cpu

Float

No

0.25

The number of CPU cores that you want to allocate to container N.

Container.N.LivenessProbe.HttpGet.Port

Integer

No

8888

The port over which you want to send the HTTP GET requests for liveness probing.

Container.N.LivenessProbe.HttpGet.Path

String

No

/healthyz

The path to which you want to send the HTTP GET requests for liveness probing.

Container.N.LivenessProbe.SuccessThreshold

Integer

No

1

The minimum count of consecutive successes needed to consider a failed liveness probe as having recovered successfully. Default value: 1. Set the value to 1.

Container.N.ReadinessProbe.PeriodSeconds

Integer

No

3

The time interval between consecutive readiness probes. Unit: seconds. Default value: 10. Minimum value: 1.

Container.N.LivenessProbe.TimeoutSeconds

Integer

No

1

The time limit within which a liveness probe must be completed. Default value: 1. Minimum value: 1.

Container.N.Command.N

String

No

sleep

Command N that you want to run to start container N. You can specify up to 20 commands. Each command can contain up to 256 characters.

Container.N.SecurityContext.RunAsUser

Long

No

1000

The ID of the user that runs container N.

Container.N.ReadinessProbe.HttpGet.Path

String

No

/healthz

The path to which you want to send the HTTP GET requests for readiness probing.

Container.N.LivenessProbe.Exec.Command.N

String

No

cat/tmp/healthy

The commands that you want to run by using the CLI for liveness probing within container N.

Container.N.LifecyclePostStartHandlerHttpGetHost

String

No

10.0.XX.XX

The IP address of the host to which you want to send the HTTP GET requests for configuring the PostStart callback function.

Container.N.LifecyclePostStartHandlerHttpGetPort

Integer

No

5050

The port over which you want to send the HTTP GET requests for configuring the PostStart callback function.

Container.N.LifecyclePostStartHandlerHttpGetPath

String

No

/healthyz

The path to which you want to send the HTTP GET requests for configuring the PostStart callback function.

Container.N.LifecyclePostStartHandlerHttpGetScheme

String

No

HTTPS

The protocol type of the HTTP GET requests that you want to send for configuring the PostStart callback function. Valid values:

  • HTTP

  • HTTPS

Container.N.LifecyclePostStartHandlerExec.N

String

No

[ "/bin/sh", "-c", "echo Hello from the postStart handler /usr/share/message" ]

Command N that you want to run by using the CLI for configuring the PostStart callback function within container N.

Container.N.LifecyclePostStartHandlerTcpSocketHost

String

No

10.0.XX.XX

The IP address of the host detected by the TCP sockets that you want to use for configuring the PostStart callback function.

Container.N.LifecyclePostStartHandlerTcpSocketPort

Integer

No

80

The port number detected by the TCP sockets that you want to use for configuring the PostStart callback function.

Container.N.LifecyclePreStopHandlerHttpGetHost

String

No

10.0.XX.XX

The IP address of the host to which you want to send the HTTP GET requests for configuring the PreStop callback function.

Container.N.LifecyclePreStopHandlerHttpGetPort

Integer

No

88

The port over which you want to send the HTTP GET requests for configuring the PreStop callback function.

Container.N.LifecyclePreStopHandlerHttpGetPath

String

No

/healthyz

The path to which you want to send the HTTP GET requests for configuring the PreStop callback function.

Container.N.LifecyclePreStopHandlerHttpGetScheme

String

No

HTTP

The protocol type of the HTTP GET requests for configuring the PreStop callback function. Valid values:

  • HTTP

  • HTTPS

Container.N.LifecyclePreStopHandlerExec.N

String

No

[ "/bin/sh", "-c", "echo Hello from the preStop handler /usr/share/message" ]

Command N that you want to run by using the CLI for configuring the PreStop callback function within container N.

Container.N.LifecyclePreStopHandlerTcpSocketHost

String

No

10.0.XX.XX

The IP address of the host detected by the TCP sockets that you want to use for configuring the PreStop callback function.

Container.N.LifecyclePreStopHandlerTcpSocketPort

Integer

No

90

The port number detected by the TCP sockets that you want to use for configuring the PreStop callback function.

Volume.N.Type

String

No

ConfigFileVolume

The type of volume N. Valid values:

  • EmptyDirVolume: an empty volume.

  • NFSVolume: a network file system (NFS) volume.

  • ConfigFileVolume: a configuration file.

  • FlexVolume: a volume that uses the FlexVolume plug-in to extend storage and supports disks.

  • HostPathVolume: a file or path of the host node.

  • DiskVolume: a disk volume. This value is not recommended. We recommend that you set Volume.N.Type to FlexVolume.

Volume.N.DiskVolume.DiskSize

Integer

No

15

The storage size of the DiskVolume. Unit: GiB.

Volume.N.NFSVolume.Path

String

No

/share

The path to the NFSVolume.

Volume.N.FlexVolume.FsType

String

No

ext4

The type of the file system that you want to mount. The default value is determined by the script of FlexVolume.

Volume.N.DiskVolume.FsType

String

No

xfs

We recommend that you specify FlexVolume.FsType.

Volume.N.HostPathVolume.Type

String

No

Directory

The type of the host path. Examples: File, Directory, and Socket.

Volume.N.NFSVolume.ReadOnly

Boolean

No

false

Specifies whether the NFSVolume is read-only. Valid values:

  • true

  • false

Default value: false.

Volume.N.HostPathVolume.Path

String

No

/xx/xx/path

The absolute path on the host.

Volume.N.FlexVolume.Options

String

No

{"volumeId":"d-2zehdahrwoa7srg****","performanceLevel": "PL2"}

The options of the FlexVolume. Each option is a key-value pair in a JSON string.

If you want to mount a FlexVolume, specify the options in the {"volumeId":"d-2zehdahrwoa7srg****","performanceLevel": "PL2"} format.

Volume.N.FlexVolume.Driver

String

No

flexvolume

The driver name of the FlexVolume.

Volume.N.ConfigFileVolumeDefaultMode

Integer

No

0644

The default permissions on the ConfigFileVolume.

Volume.N.NFSVolume.Server

String

No

3f9cd4a596-naw76.cn-shanghai.nas.aliyuncs.com

The endpoint of the NFS server.

Volume.N.DiskVolume.DiskId

String

No

d-xx

The ID of the DiskVolume.

Volume.N.Name

String

No

default-volume1

The name of volume N.

Volume.N.EmptyDirVolume.Medium

String

No

memory

The storage medium of the EmptyDirVolume. If you leave this parameter empty, the file system of the node is used as the storage medium. If you set this parameter to memory, the memory is used as the storage medium.

Volume.N.ConfigFileVolumeConfigFileToPath.N.Path

String

No

PATH

The relative path to the configuration file.

Volume.N.ConfigFileVolumeConfigFileToPath.N.Mode

Integer

No

0644

The permissions on the ConfigFileVolume directory.

Volume.N.ConfigFileVolumeConfigFileToPath.N.Content

String

No

bGl1bWk=

The content of the configuration file (32 KB).

Volume.N.EmptyDirVolume.SizeLimit

String

No

256 Mi

The storage size of the EmptyDirVolume. Unit: GiB or MiB.

InitContainer.N.InitContainerEnvironmentVar.N.Key

String

No

Path

The key of environment variable N. The key must be 1 to 128 characters in length and can contain letters, digits, and underscores (_). It cannot start with a digit. Specify the value in the [0-9a-zA-Z] format.

InitContainer.N.InitContainerEnvironmentVar.N.Value

String

No

/usr/bin/

The value of environment variable N. The value can be up to 256 characters in length.

InitContainer.N.SecurityContext.Capability.Add.N

String

No

NET_ADMIN

The permissions that you want to grant to the processes in init container N. Valid values: NET_ADMIN and NET_RAW.

Note

If you want to use NET_RAW, submit a ticket.

InitContainer.N.Image

String

No

nginx

The image of init container N.

InitContainer.N.InitContainerVolumeMount.N.MountPropagation

String

No

None

The mount propagation settings of volume N. Mount propagation enables volumes mounted on one container to be shared among other containers within the same pod or across distinct pods residing on the same node. Valid values:

  • None: Subsequent mounts executed either on the volume itself or its subdirectories do not propagate to the already established volume mount.

  • HostToCotainer: Subsequent mounts executed either on the volume itself or its subdirectories propagate to the already established volume mount.

  • Bidirectional: This value is similar to HostToCotainer. Subsequent mounts executed either on the volume itself or its subdirectories propagate to the already established volume mount. In addition, any volume mounts executed on the container not only propagate back to the underlying instance but also to all containers across every pod that uses the same volume.

InitContainer.N.InitContainerVolumeMount.N.MountPath

String

No

/usr/share/

The directory on which init container N mounts volume N. The information stored within this directory will be overridden by the data present on the mounted volume. Specify this parameter with caution.

InitContainer.N.InitContainerVolumeMount.N.ReadOnly

Boolean

No

false

Specifies whether volume N is read-only.

Default value: false.

InitContainer.N.InitContainerVolumeMount.N.Name

String

No

test-empty

The name of volume N that you want to mount.

InitContainer.N.InitContainerVolumeMount.N.SubPath

String

No

/usr/sub/

The subdirectory of volume N. An init container within a pod can have various directories from the same volume mounted to different directories within it.

InitContainer.N.ImagePullPolicy

String

No

Always

The image pulling policy.

InitContainer.N.Cpu

Float

No

0.5

The number of vCPUs that you want to allocate to init container N.

InitContainer.N.WorkingDir

String

No

/usr/local

The working directory.

InitContainer.N.Command.N

String

No

sleep

Command N that you want to run to start init container N.

InitContainer.N.Arg.N

String

No

10

Argument N that you want to use to start init container N.

InitContainer.N.SecurityContext.RunAsUser

Long

No

587

The ID of the user that runs init container N.

InitContainer.N.Gpu

Integer

No

1

The number of GPUs that you want to allocate to init container N.

InitContainer.N.Memory

Float

No

1.0

The memory size that you want to allocate to init container N. Unit: GiB.

InitContainer.N.Name

String

No

test-init

The name of init container N.

DnsConfigNameServer.N

String

No

172.10.*.**

The IP addresses of the DNS servers.

DnsConfigSearch.N

String

No

svc.local.kubenetes

The search domains of the DNS servers.

DnsConfigOption.N.Value

String

No

value

The option value.

DnsConfigOption.N.Name

String

No

name

The option key.

HostAliase.N.Ip

String

No

1.1.1.1

The IP address that you want to add.

HostAliase.N.Hostname.N

String

No

hehe.com

The hostname that you want to add.

SecurityContextSysctl.N.Value

String

No

65536

The value of security context N in which the elastic container instance runs.

SecurityContextSysctl.N.Name

String

No

kernel.msgmax

The key of security context N in which the elastic container instance runs.

NtpServer.N

String

No

ntp.cloud.aliyuncs.com

The endpoint of Network Time Protocol (NTP) server N.

AcrRegistryInfo.N.Domain.N

String

No

*****-****-registry.cn-beijing.cr.aliyuncs.com

The domain name of Container Registry Enterprise Edition instance N. By default, all domain names of Container Registry Enterprise Edition instance N are displayed. Separate multiple domain names with commas (,).

AcrRegistryInfo.N.InstanceName

String

No

acr-test

The name of Container Registry Enterprise Edition instance N.

AcrRegistryInfo.N.InstanceId

String

No

cri-nwj395hgf6f3****

The ID of Container Registry Enterprise Edition instance N.

AcrRegistryInfo.N.RegionId

String

No

cn-beijing

The region ID of Container Registry Enterprise Edition instance N.

CostOptimization

Boolean

No

false

Specifies whether to enable the Cost Optimization feature. Valid values:

  • true

  • false

Default value: false.

InstanceFamilyLevel

String

No

EnterpriseLevel

The level of the instance family. You can specify this parameter to filter instance types that meet the specified criteria. This parameter takes effect only if you set CostOptimization to true. Valid values:

  • EntryLevel: entry level (shared instance types). Instance types of this level are the most cost-effective, but may not provide stable computing performance in a consistent manner. Instance types of this level are suitable for business scenarios in which the CPU utilization is low. For more information, see Shared instance families.

  • EnterpriseLevel: enterprise level. Instance types of this level provide stable performance and dedicated resources and are suitable for business scenarios that require high stability. For more information, see Overview of instance families.

  • CreditEntryLevel: credit entry level (burstable instance types). CPU credits are used to ensure computing performance. Instance types of this level are suitable for business scenarios in which CPU utilization is low but may fluctuate in specific scenarios. For more information, see Overview of burstable instances.

InstanceType.N

String

No

ecs.g6.large

ECS instance type N. You can specify up to five ECS instance types. For more information, see Specify ECS instance types to create an elastic container instance.

DataCacheBucket

String

No

default

The bucket that you want to use to cache data.

DataCachePL

String

No

PL1

The PL of the disk that you want to use to cache data. We recommend that you use ESSDs. Valid values if you use ESSDs:

  • PL0: An ESSD can provide up to 10,000 random read/write IOPS.

  • PL1: An ESSD can provide up to 50,000 random read/write IOPS.

  • PL2: An ESSD can provide up to 100,000 random read/write IOPS.

  • PL3: An ESSD can provide up to 1,000,000 random read/write IOPS.

Default value: PL1.

Note

For more information about ESSDs, see ESSDs.

DataCacheProvisionedIops

Integer

No

40000

The provisioned IOPS for the ESSD AutoPL disk that you want to use to cache data. Valid values: 0 to min{50000, 1000 × Capacity - Baseline IOPS}, where Baseline IOPS = min{1800 + 50 × Capacity - 50000}.

Note

For more information about ESSD AutoPL disks, see ESSD AutoPL disks.

DataCacheBurstingEnabled

Boolean

No

false

Specifies whether to enable the Performance Burst feature for the ESSD AutoPL disk that you want to use to cache data. Valid values:

  • true

  • false

Default value: false.

Note

For more information about ESSD AutoPL disks, see ESSD AutoPL disks.

Response parameters

Parameter

Type

Example

Description

ScalingConfigurationId

String

eci-uf6fonnghi50u374****

The ID of the elastic container instance.

RequestId

String

89945DD3-9072-47D0-A318-353284CF****

The request ID.

Examples

Sample requests

http(s)://ess.aliyuncs.com/?Action=CreateEciScalingConfiguration
&ScalingGroupId=asg-bp14wlu85wrpchm0****
&ScalingConfigurationName=scalingconfig****
&SecurityGroupId=sg-uf66jeqopgqa9hdn****
&ContainerGroupName=nginx-test
&RestartPolicy=Always
&Cpu=1.0
&Memory=2.0
&ResourceGroupId=rg-uf66jeqopgqa9hdn****
&DnsPolicy=Default
&ImageSnapshotId=imc-2zebxkiifuyzzlhl****
&RamRoleName=RamTestRole
&TerminationGracePeriodSeconds=60
&AutoMatchImageCache=false
&Ipv6AddressCount=1
&ActiveDeadlineSeconds=1000
&SpotStrategy=SpotWithPriceLimit
&SpotPriceLimit=0.025
&AutoCreateEip=true
&EipBandwidth=5
&HostName=test
&IngressBandwidth=1024000
&EgressBandwidth=1024000
&CpuOptionsCore=2
&CpuOptionsThreadsPerCore=2
&EphemeralStorage=20
&LoadBalancerWeight=50
&Tag=[{"Key":"version","Value":"3"}]
&ImageRegistryCredential=[{"Password":"yourpassword","Server":"registry-vpc.cn-shanghai.aliyuncs.com","UserName":"yourusername"}]
&Container=[{"ReadinessProbe.TimeoutSeconds":5,"ReadinessProbe.SuccessThreshold":1,"SecurityContext.Capability.Add":["NET_ADMIN"],"ReadinessProbe.TcpSocket.Port":8000,"ReadinessProbe.HttpGet.Scheme":"HTTP","LivenessProbe.PeriodSeconds":5,"Port":[{"Protocol":"TCP","Port":80}],"EnvironmentVar":[{"Key":"PATH","Value":"/usr/local/bin"}],"LivenessProbe.TcpSocket.Port":8000,"Tty":false,"WorkingDir":"/usr/local/","LivenessProbe.HttpGet.Scheme":"HTTP","ReadinessProbe.HttpGet.Port":8080,"Arg":["100"],"Gpu":1,"ReadinessProbe.InitialDelaySeconds":3,"Stdin":false,"Memory":0.5,"Name":"nginx","Image":"registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:latest","LivenessProbe.InitialDelaySeconds":5,"VolumeMount":[{"MountPropagation":"None","MountPath":"/pod/data","ReadOnly":false,"Name":"default-volume1","SubPath":"data2/"}],"LivenessProbe.FailureThreshold":3,"ReadinessProbe.Exec.Command":["cat /tmp/healthy"],"ReadinessProbe.FailureThreshold":3,"ImagePullPolicy":"Always","StdinOnce":false,"Cpu":0.25,"LivenessProbe.HttpGet.Port":8888,"LivenessProbe.HttpGet.Path":"/healthyz","LivenessProbe.SuccessThreshold":1,"ReadinessProbe.PeriodSeconds":3,"LivenessProbe.TimeoutSeconds":1,"Command":["sleep"],"SecurityContext.RunAsUser":1000,"ReadinessProbe.HttpGet.Path":"/healthz","LivenessProbe.Exec.Command":["cat/tmp/healthy"],"LifecyclePostStartHandlerHttpGetHost":"10.0.XX.XX","LifecyclePostStartHandlerHttpGetPort":5050,"LifecyclePostStartHandlerHttpGetPath":"/healthyz","LifecyclePostStartHandlerHttpGetScheme":"HTTPS","LifecyclePostStartHandlerExec":["[ \t\"/bin/sh\", \t\"-c\", \t\"echo Hello from the postStart handler  /usr/share/message\" ]"],"LifecyclePostStartHandlerTcpSocketHost":"10.0.XX.XX","LifecyclePostStartHandlerTcpSocketPort":80,"LifecyclePreStopHandlerHttpGetHost":"10.0.XX.XX","LifecyclePreStopHandlerHttpGetPort":88,"LifecyclePreStopHandlerHttpGetPath":"/healthyz","LifecyclePreStopHandlerHttpGetScheme":"HTTP","LifecyclePreStopHandlerExec":["[       \"/bin/sh\",       \"-c\",       \"echo Hello from the preStop handler  /usr/share/message\" ]"],"LifecyclePreStopHandlerTcpSocketHost":"10.0.XX.XX","LifecyclePreStopHandlerTcpSocketPort":90}]
&Volume=[{"Type":"ConfigFileVolume","DiskVolume.DiskSize":15,"NFSVolume.Path":"/share","FlexVolume.FsType":"ext4","DiskVolume.FsType":"xfs","HostPathVolume.Type":"Directory","NFSVolume.ReadOnly":false,"HostPathVolume.Path":"/xx/xx/path","FlexVolume.Options":"{\"volumeId\":\"d-2zehdahrwoa7srg****\",\"performanceLevel\": \"PL2\"}","FlexVolume.Driver":"flexvolume","ConfigFileVolumeDefaultMode":644,"NFSVolume.Server":"3f9cd4a596-naw76.cn-shanghai.nas.aliyuncs.com","DiskVolume.DiskId":"d-xx","Name":"default-volume1","EmptyDirVolume.Medium":"memory","ConfigFileVolumeConfigFileToPath":[{"Path":"PATH","Mode":644,"Content":"bGl1bWk="}],"EmptyDirVolume.SizeLimit":"256 Mi"}]
&InitContainer=[{"InitContainerEnvironmentVar":[{"Key":"Path","Value":"/usr/bin/"}],"SecurityContext.Capability.Add":["NET_ADMIN"],"Image":"nginx","InitContainerVolumeMount":[{"MountPropagation":"None","MountPath":"/usr/share/","ReadOnly":false,"Name":"test-empty","SubPath":"/usr/sub/"}],"ImagePullPolicy":"Always","Cpu":0.5,"WorkingDir":"/usr/local","Command":["sleep"],"Arg":["10"],"SecurityContext.RunAsUser":587,"Gpu":1,"Memory":1.0,"Name":"test-init"}]
&DnsConfigNameServer=["172.10.*.**"]
&DnsConfigSearch=["svc.local.kubenetes"]
&DnsConfigOption=[{"Value":"value","Name":"name"}]
&HostAliase=[{"Ip":"1.1.1.1","Hostname":["hehe.com"]}]
&SecurityContextSysctl=[{"Value":"65536","Name":"kernel.msgmax"}]
&NtpServer=["ntp.cloud.aliyuncs.com"]
&AcrRegistryInfo=[{"Domain":["*****-****-registry.cn-beijing.cr.aliyuncs.com"],"InstanceName":"acr-test","InstanceId":"cri-nwj395hgf6f3****","RegionId":"cn-beijing"}]
&CostOptimization=false
&InstanceFamilyLevel=EnterpriseLevel
&InstanceType=["ecs.g6.large"]
&DataCacheBucket=default
&DataCachePL=PL1
&DataCacheProvisionedIops=40000
&DataCacheBurstingEnabled=false
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateEciScalingConfigurationResponse>
    <ScalingConfigurationId>eci-uf6fonnghi50u374****</ScalingConfigurationId>
    <RequestId>89945DD3-9072-47D0-A318-353284CF****</RequestId>
</CreateEciScalingConfigurationResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "ScalingConfigurationId" : "eci-uf6fonnghi50u374****",
  "RequestId" : "89945DD3-9072-47D0-A318-353284CF****"
}

Error codes

For a list of error codes, see Service error codes.

HTTP status code

Error code

Error message

Description

400

InstanceType.Mismatch

The specified scaling configuration and existing active scaling configuration have different instance type.

The instance type in the specified scaling configuration is different from the instance type in the current scaling configuration.

404

InvalidDataDiskSnapshotId.NotFound

Snapshot "XXX" does not exist.

The snapshot does not exist.

400

InvalidDataDiskSnapshotId.SizeNotSupported

The capacity of snapshot "XXX" exceeds the size limit of the specified disk category.

The size of the snapshot exceeds the maximum size that is allowed for the disk.

403

InvalidDevice.InUse

Device "XXX" has been occupied.

The mount target of the data disk is occupied.

400

InvalidImageId.InstanceTypeMismatch

The specified image does not support the specified instance type.

The specified image does not support the specified instance type.

404

InvalidImageId.NotFound

The specified image does not exist.

The specified image does not exist in your Alibaba Cloud account.

400

InvalidKeyPairName.NotFound

The specified KeyPairName does not exist in our records.

The key pair does not exist.

400

InvalidNetworkType.ForRAMRole

RAMRole can't be used For classic instance.

The network type of an instance is classic network. The classic network does not support RamRoleName.

400

InvalidParameter

The specified value of parameter KeyPairName is not valid.

The OS of the instance is Windows. Windows instances do not support KeyPairName.

400

InvalidParameter.Conflict

The value of parameter SystemDisk.Category and parameter DataDisk.N.Category are conflict.

The specified system disk category conflicts with the data disk category.

400

InvalidRamRole.NotFound

The specified RamRoleName does not exist.

The value of RamRoleName is invalid.

400

InvalidScalingConfigurationName.Duplicate

The specified value of parameter ScalingConfigurationName is duplicated.

A scaling configuration with the same name is already in existence.

404

InvalidScalingGroupId.NotFound

The specified scaling group does not exist.

The specified scaling group does not exist in your Alibaba Cloud account.

400

InvalidSecurityGroupId.IncorrectNetworkType

The network type of specified security Group does not support this action.

The network type of the specified security group is different from the network type of the scaling group.

404

InvalidSecurityGroupId.NotFound

The specified security group does not exist.

The specified security group does not exist in your Alibaba Cloud account.

400

InvalidSecurityGroupId.VPCMismatch

The specified security group and the specified virtual switch are not in the same VPC.

The specified security group and vSwitch are not in the same VPC.

403

InvalidSnapshot.TooOld

This operation is denied because the specified snapshot is created before 2013-07-15.

The specified snapshot was created on or before July 15, 2013, and the request is rejected.

403

InvalidSystemDiskCategory.ValueUnauthorized

The system disk category is not authorized.

You do not have the permissions to create an ephemeral system disk.

400

InvalidUserData.Base64FormatInvalid

The specified parameter UserData must be base64 encoded.

The specified user data is not encoded in Base64.

400

InvalidUserData.SizeExceeded

The specified parameter UserData exceeds the size.

The user data size exceeds the upper limit.

403

QuotaExceeded.EphemeralDiskSize

Ephemeral disk size quota exceeded.

The total capacity of mounted ephemeral disks is greater than 2 TiB (2,048 GiB).

400

QuotaExceeded.ScalingConfiguration

Scaling configuration quota exceeded in the specified scaling group.

The maximum number of scaling configurations has been reached.

400

QuotaExceeded.SecurityGroupInstance

Instance quota exceeded in the specified security group.

The maximum number of elastic container instances that can be associated with the security group has been reached.