Modifies a scaling configuration of the Elastic Container Instance type. When you call the ModifyEciScalingConfiguration operation, you can specify the ID, name, and instance properties of the scaling configuration whose information you want to modify. You can modify the instance restart policy, instance bidding policy, and elastic IP address (EIP) bandwidth.
Operation description
- If you want to change the name of a scaling configuration in a scaling group, make sure that the new name is unique within the scaling group.
- You can call the ModifyEciScalingConfiguration operation to check the modification result.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ess:ModifyEciScalingConfiguration | update |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ScalingConfigurationId | string | Yes | The ID of the scaling configuration that you want to modify. | asc-bp16har3jpj6fjbx**** |
ScalingConfigurationName | string | Yes | 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 (.). The name must start with a letter or a digit. The name of a scaling configuration must be unique in the specified region. If you do not specify this parameter, the value of ScalingConfigurationId is used. | test-modify |
Description | string | Yes | Note
This parameter is unavailable.
| desc |
SecurityGroupId | string | Yes | The ID of the security group to which elastic container instances belong. Elastic container instances that belong to 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 then adds the container protocols and port numbers that you specified to the inbound rules of the security group. | sg-uf66jeqopgqa9hdn**** |
ContainerGroupName | string | Yes | The name series of elastic container instances. Naming conventions:
| nginx-test |
RestartPolicy | string | No | The instance restart policy. Valid values:
Default value: Always. | Always |
Cpu | float | No | The number of vCPUs per elastic container instance. | 1.0 |
Memory | float | No | The memory size per elastic container instance. Unit: GiB. | 2.0 |
ResourceGroupId | string | No | The ID of the resource group. | rg-uf66jeqopgqa9hdn**** |
DnsPolicy | string | No | The Domain Name System (DNS) policy. Valid values:
| Default |
EnableSls | boolean | No | Note
This parameter is not available for use.
| false |
ImageSnapshotId | string | No | The ID of the image cache. | imc-2zebxkiifuyzzlhl**** |
RamRoleName | string | No | The name of the instance Resource Access Management (RAM) role. You can use the same RAM role to access elastic container instances and Elastic Compute Service (ECS) instances. For more information, see Use an instance RAM role by calling API operations. | RamTestRole |
TerminationGracePeriodSeconds | long | No | The buffer period during which the program handles operations before the program is stopped. Unit: seconds. | 60 |
AutoMatchImageCache | boolean | No | Specifies whether to automatically match image caches. Default value: false. | false |
Ipv6AddressCount | integer | No | The number of IPv6 addresses. | 1 |
ActiveDeadlineSeconds | long | No | The validity period of the scaling configuration. Unit: seconds. | 1000 |
SpotStrategy | string | No | The instance bidding policy. Valid values:
Default value: NoSpot. | SpotPriceLimit |
SpotPriceLimit | float | No | The maximum hourly price of preemptible elastic container instances. The value can be accurate to three decimal places. If you set SpotStrategy to SpotWithPriceLimit, you must specify SpotPriceLimit. | 0.025 |
AutoCreateEip | boolean | No | Specifies whether to automatically create elastic IP addresses (EIPs) and bind the EIPs to elastic container instances. | true |
EipBandwidth | integer | No | The EIP bandwidth. Default value: 5. Unit: Mbit/s. | 5 |
HostName | string | No | The hostname series of elastic container instances. | test |
IngressBandwidth | long | No | The maximum inbound bandwidth. Unit: bit/s. | 1024000 |
EgressBandwidth | long | No | The maximum outbound bandwidth. Unit: bit/s. | 1024000 |
CpuOptionsCore | integer | No | The number of physical CPU cores. You can specify this parameter for only specific ECS instance types. For more information, see Specify CPU options. | 2 |
CpuOptionsThreadsPerCore | integer | No | The number of threads per core. You can specify this parameter for only specific instance types. A value of 1 specifies that Hyper-Threading is disabled. For more information, see Specify CPU options. | 2 |
EphemeralStorage | integer | No | The size of the temporary storage space. By default, an Enterprise SSD (ESSD) of the PL1 type is used. Unit: GiB. | 20 |
LoadBalancerWeight | integer | No | The load balancing weight of each backend server. Valid values: 1 to 100. | 50 |
Tags | array<object> | No | The tags. | |
object | No | The tag. | ||
Key | string | No | The tag key. | version |
Value | string | No | The tag value. | 3 |
ImageRegistryCredentials | array<object> | No | The image repositories. | |
object | No | The image repository. | ||
Password | string | No | The password of the image repository. | yourpaasword |
Server | string | No | The address of the image repository. | registry-vpc.cn-shanghai.aliyuncs.com |
UserName | string | No | The username of the image repository. | yourusername |
Containers | array<object> | No | The containers. | |
object | No | The container. | ||
ReadinessProbe.TimeoutSeconds | integer | No | The timeout limit for a readiness probe to be complete. Unit: seconds. Default value: 1. Minimum value: 1. | 1 |
ReadinessProbe.SuccessThreshold | integer | No | The minimum number of consecutive successes that must occur for a failed readiness probe to be considered successful. Default value: 1. Set the value to 1. | 1 |
SecurityContext.Capability.Adds | array | No | The permissions that you want to grant to the processes in the container. Valid values: NET_ADMIN and NET_RAW. Note
To use NET_RAW, submit a ticket.
| |
string | No | The permissions that you want to grant to the process in the container. Valid values: NET_ADMIN and NET_RAW. Note
To use NET_RAW, submit a ticket.
| NET_RAW | |
ReadinessProbe.TcpSocket.Port | integer | No | The port detected by the TCP socket when you perform a readiness probe. | 8000 |
ReadinessProbe.HttpGet.Scheme | string | No | The protocol type of the HTTP GET request that you use to perform a readiness probe. Valid values:
| HTTP |
LivenessProbe.PeriodSeconds | integer | No | The interval between consecutive liveness probes. Unit: seconds. Default value: 10. Minimum value: 1. | 5 |
Ports | array<object> | No | The ports. | |
object | No | The port. | ||
Protocol | string | No | The protocol type. Valid values:
| TCP |
Port | integer | No | The port number. Valid values: 1 to 65535. | 80 |
SecurityContext.ReadOnlyRootFilesystem | boolean | No | Specifies whether the root file system is read-only. Set the value to true. | true |
EnvironmentVars | array<object> | No | The environment variables. | |
object | No | The environment variable. | ||
Key | string | No | The name of the environment variable. The name can be 1 to 128 characters in length, and can contain letters, underscores (_), and digits. The name cannot start with a digit. Specify the value in the | PATH |
Value | string | No | The value of the environment variable. The value can be up to 256 characters in length. | /usr/local/bin |
FieldRef.FieldPath | string | No | Note
This parameter is unavailable.
| path |
LivenessProbe.TcpSocket.Port | integer | No | The port detected by the TCP socket when you perform a liveness probe. | 1 |
Tty | boolean | No | Specifies whether to enable Interaction. Default value: false. If the command is a /bin/bash command, set this parameter to true. | false |
WorkingDir | string | No | The working directory of the container. | /usr/local/ |
LivenessProbe.HttpGet.Scheme | string | No | The protocol type of the HTTP GET request that you use to perform a liveness probe. Valid values:
| HTTP |
ReadinessProbe.HttpGet.Port | integer | No | The port over which you want to send the HTTP GET request to perform a readiness probe. | 8080 |
Args | array | No | The container startup arguments. You can specify up to 10 arguments. | |
string | No | The container startup argument. You can specify up to 10 arguments. | 100 | |
Gpu | integer | No | The number of GPUs per container. | 1 |
ReadinessProbe.InitialDelaySeconds | integer | No | The interval between the launch of the container and the onset of a readiness probe. Unit: seconds. | 3 |
Stdin | boolean | No | Specifies whether the container 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 when standard input streams in the container are read. Default value: false. | false |
Memory | float | No | The memory size per container. Unit: GiB. | 0.5 |
Name | string | No | The name of the container image. | nginx |
Image | string | No | The container image. | registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:latest |
LivenessProbe.InitialDelaySeconds | integer | No | The interval between the launch of the container and the onset of a liveness probe. Unit: seconds. | 5 |
VolumeMounts | array<object> | No | The volume mounts of the container. | |
object | No | The volume mount of the container. | ||
MountPropagation | string | No | The mount propagation settings of the volume. 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 |
MountPath | string | No | The directory within the container onto which you want to mount the volume. Note
The information stored within this directory is overwritten by the data on the mounted volume. Exercise caution when you specify this parameter.
| /pod/data |
ReadOnly | boolean | No | Specifies whether the volume is read-only. Default value: false. | false |
Name | string | No | The volume name. The value of this parameter is the same as the name of the volume that is mounted to containers. | default-volume1 |
SubPath | string | No | The volume subdirectory. | data2/ |
LivenessProbe.FailureThreshold | integer | No | The minimum number of consecutive failures that must occur for a liveness probe to be considered failed. Default value: 3. | 3 |
ReadinessProbe.Exec.Commands | array | No | The commands executed in the container when using the command line to perform the health check. | |
string | No | The command. | cat /tmp/healthy | |
ReadinessProbe.FailureThreshold | integer | No | The minimum number of consecutive failures that must occur for a readiness probe to be considered failed. Default value: 3. | 3 |
ImagePullPolicy | string | No | The image pulling policy. Valid values:
| Always |
StdinOnce | boolean | No | Specifies whether standard input streams remain connected during multiple sessions when StdinOnce is set to true. If you set 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. | false |
Cpu | float | No | The number of vCPUs per container. | 0.25 |
LivenessProbe.HttpGet.Port | integer | No | The port over which you want to send the HTTP GET request to perform a liveness probe. | 8888 |
LivenessProbe.HttpGet.Path | string | No | The path to which you want to send the HTTP GET request to perform a liveness probe. | /healthyz |
LivenessProbe.SuccessThreshold | integer | No | The minimum number of consecutive successes that must occur to consider a failed liveness probe successful. Default value: 1. Set the value to 1. | 1 |
ReadinessProbe.PeriodSeconds | integer | No | The interval between consecutive readiness probes. Unit: seconds. Default value: 10. Minimum value: 1. | 3 |
LivenessProbe.TimeoutSeconds | integer | No | The timeout limit for a liveness probe to be complete. Unit: seconds. Default value: 1. Minimum value: 1. | 1 |
Commands | array | No | The commands that you can run in the container when you use the CLI to perform a liveness probe. | |
string | No | The command that you can run in the container when you use the CLI to perform a liveness probe. | sleep | |
SecurityContext.RunAsUser | long | No | The ID of the user that runs the container. | 1000 |
ReadinessProbe.HttpGet.Path | string | No | The path to which you want to send the HTTP GET request to perform a readiness probe. | /healthz |
LivenessProbe.Exec.Commands | array | No | The command executed in the container when using the command line to perform the health check. | |
string | No | The command. | cat /tmp/healthy | |
LifecyclePostStartHandlerHttpGetHost | string | No | The IP address of the host to which you want to send the HTTP GET request to configure the postStart callback function. | 10.0.XX.XX |
LifecyclePostStartHandlerHttpGetPort | integer | No | The port over which you want to send the HTTP GET request to configure the postStart callback function. | 5050 |
LifecyclePostStartHandlerHttpGetPath | string | No | The path to which you want to send the HTTP GET request to configure the postStart callback function. | /healthyz |
LifecyclePostStartHandlerHttpGetScheme | string | No | The protocol type of the HTTP GET request that you want to send to configure the postStart callback function. Valid values:
| HTTPS |
LifecyclePostStartHandlerExecs | array | No | The commands that you can run within the container to configure the postStart callback function. | |
string | No | The command that you can run within the container to configure the postStart callback function. | ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"] | |
LifecyclePostStartHandlerTcpSocketHost | string | No | The IP address of the host detected by the TCP socket that you want to use to configure the postStart callback function. | 10.0.XX.XX |
LifecyclePostStartHandlerTcpSocketPort | integer | No | The port detected by the TCP socket that you want to use to configure the postStart callback function. | 80 |
LifecyclePreStopHandlerHttpGetHost | string | No | The IP address of the host to which you want to send the HTTP GET request to configure the preStop callback function. | 10.0.XX.XX |
LifecyclePreStopHandlerHttpGetPort | integer | No | The port over which you want to send the HTTP GET request to configure the preStop callback function. | 80 |
LifecyclePreStopHandlerHttpGetPath | string | No | The path to which you want to send the HTTP GET request to configure the preStop callback function. | /healthyz |
LifecyclePreStopHandlerHttpGetScheme | string | No | The protocol type of the HTTP GET request that you want to send to configure the preStop callback function. Valid values:
| HTTP |
LifecyclePreStopHandlerExecs | array | No | The commands that you can run within the container to configure the preStop callback function. | |
string | No | The command that you can run within the container to configure the preStop callback function. | ["/bin/sh", "-c","echo Hello from the preStop handler > /usr/share/message"] | |
LifecyclePreStopHandlerTcpSocketHost | string | No | The IP address of the host detected by the TCP socket that you want to use to configure the preStop callback function. | 10.0.XX.XX |
LifecyclePreStopHandlerTcpSocketPort | integer | No | The port detected by the TCP socket that you want to use to configure the preStop callback function. | 80 |
Volumes | array<object> | No | The volumes. | |
object | No | The volume. | ||
Type | string | No | The type of the Host directory. Examples: File, Directory, and Socket. | EmptyDirVolume |
DiskVolume.DiskSize | integer | No | The volume size. Unit: GiB. | 15 |
NFSVolume.Path | string | No | The path to the Network File System (NFS) volume. | /share |
FlexVolume.FsType | string | No | The type of the mounted file system. The default value is determined by the script of FlexVolume. | ext4 |
DiskVolume.FsType | string | No | We recommend that you specify | xfs |
HostPathVolume.Type | string | No | The type of host directory. For example: File, Directory, Socket, etc. | Directory |
NFSVolume.ReadOnly | boolean | No | Specifies whether the permissions on the NFS volume are read-only. Default value: false. | false |
HostPathVolume.Path | string | No | The absolute path on the host. | /xx/xx/name |
FlexVolume.Options | string | No | The FlexVolume options. Each option is a key-value pair in a JSON string. For example, if you use FlexVolume to mount a disk, the format of Options is | {"volumeId":"d-2zehdahrwoa7srg****","performanceLevel": "PL2"} |
FlexVolume.Driver | string | No | The name of the FlexVolume driver. | flexvolume |
ConfigFileVolumeDefaultMode | integer | No | The default permissions on the ConfigFile volume. | 0644 |
NFSVolume.Server | string | No | The endpoint of the NFS server. | 3f9cd4a596-naw76.cn-shanghai.nas.aliyuncs.com |
DiskVolume.DiskId | string | No | The ID of the disk volume. | d-xx |
Name | string | No | The volume name. | default-volume1 |
EmptyDirVolume.Medium | string | No | The storage medium of the emptyDir volume. If you do not specify a storage medium for the emptyDir volume, the emptyDir volume stores data in the file system of a node. A value of memory specifies that the emptyDir volume stores data in the memory. | memory |
ConfigFileVolumeConfigFileToPath | array<object> | No | The paths to the configuration files. | |
object | No | The path to the configuration file. | ||
Path | string | No | The relative path to the configuration file. | /usr/bin/ |
Mode | integer | No | The permissions on the ConfigFile volume. | 0644 |
Content | string | No | The content of the configuration file (32 KB). | bGl1bWk= |
EmptyDirVolume.SizeLimit | string | No | The size of the emptyDir volume. The value contains a unit. We recommend that you use Gi or Mi as the unit. | 256Mi |
InitContainers | array<object> | No | The init containers. | |
object | No | The init container. | ||
InitContainerEnvironmentVars | array<object> | No | The environment variables of the init container. | |
object | No | The environment variable of the init container. | ||
Key | string | No | The name of the environment variable. The name can be 1 to 128 characters in length, and can contain letters, underscores (_), and digits. The name cannot start with a digit. Specify the value in the | Path |
Value | string | No | The value of the environment variable. The value can be up to 256 characters in length. | /usr/bin/ |
FieldRef.FieldPath | string | No | Note
This parameter is unavailable.
| path |
SecurityContext.Capability.Adds | array | No | The permissions that you want to grant to the processes in the init container. Valid values: NET_ADMIN and NET_RAW. Note
To use NET_RAW, submit a ticket.
| |
string | No | The permissions that you want to grant to the process in the init container. Valid values: NET_ADMIN and NET_RAW. Note
To use NET_RAW, submit a ticket.
| NET_RAW | |
Image | string | No | The image of the init container. | nginx |
InitContainerPorts | array<object> | No | The ports of the init container. | |
object | No | The port of the init container. | ||
Protocol | string | No | The protocol type. Valid values:
| TCP |
Port | integer | No | The port number. Valid values: 1 to 65535. | 1 |
InitContainerVolumeMounts | array<object> | No | The volume mounts of the init container. | |
object | No | The volume mount of the init container. | ||
MountPropagation | string | No | The mount propagation settings of the volume. 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:
Default value: None. | None |
MountPath | string | No | The directory within the init container onto which you want to mount the volume. Note
The information stored within this directory is overwritten by the data on the mounted volume. Exercise caution when you specify this parameter.
| /usr/share/ |
ReadOnly | boolean | No | Specifies whether the mount path is read-only. Default value: false. | false |
Name | string | No | The name of the volume. | test-empty |
SubPath | string | No | The volume subdirectory. The pod can mount different directories of the same volume to different subdirectories of init containers. | Always |
SecurityContext.ReadOnlyRootFilesystem | boolean | No | Note
This parameter is unavailable.
| false |
ImagePullPolicy | string | No | The image pulling policy. Valid values:
| Always |
Cpu | float | No | The number of vCPUs per init container. | 0.5 |
WorkingDir | string | No | The working directory. | /usr/local |
Commands | array | No | The commands that you can run to start the init container. | |
string | No | The command that you can run to start the init container. | sleep | |
Args | array | No | The container startup arguments. | |
string | No | The container startup argument. | 10 | |
SecurityContext.RunAsUser | long | No | The ID of the user who runs the init container. | 587 |
Gpu | integer | No | The number of GPUs per init container. | 1 |
Memory | float | No | The memory size per init container. Unit: GiB. | 1.0 |
Name | string | No | The name of the init container. | test-init |
DnsConfigNameServers | array | No | The IP addresses of DNS servers. | |
string | No | The IP address of the DNS server. | 172.10.*.** | |
DnsConfigSearchs | array | No | The search domains of DNS servers. | |
string | No | The search domain of the DNS server. | svc.local.kubenetes | |
DnsConfigOptions | array<object> | No | The options. Each option is a name-value pair. The value in the name-value pair is optional. | |
object | No | The option. Each option is a name-value pair. The value in the name-value pair is optional. | ||
Value | string | No | The variable value of the option. | value |
Name | string | No | The variable name of the option. | name |
HostAliases | array<object> | No | The hosts. | |
object | No | The host. | ||
Ip | string | No | The IP address that you want to add. | 192.0.XX.XX |
Hostnames | array | No | The names of the hosts that you want to add. | |
string | No | The name of the host that you want to add. | ['hehe.com', 'haha.com'] | |
SecurityContextSysCtls | array<object> | No | The security contexts in which the elastic container instance runs. | |
object | No | The security context in which the elastic container instance runs. | ||
Value | string | No | The variable value of the security context in which the elastic container instance runs. | 65536 |
Name | string | No | The variable name of the security context in which the elastic container instance runs. | kernel.msgmax |
NtpServers | array | No | The endpoints of Network Time Protocol (NTP) servers. | |
string | No | The endpoint of the NTP server. | ntp.cloud.aliyuncs.com | |
AcrRegistryInfos | array<object> | No | The Container Registry Enterprise Edition instances. | |
object | No | The Container Registry Enterprise Edition instance. | ||
Domains | array | No | The domain names of the Container Registry Enterprise Edition instance. By default, all domain names of the instance are displayed. Separate multiple domain names with commas (,). | |
string | No | The domain name of the Container Registry Enterprise Edition instance. By default, all domain names of the instance are displayed. Separate multiple domain names with commas (,). | *****-****-registry.cn-beijing.cr.aliyuncs.com | |
InstanceName | string | No | The name of the Container Registry Enterprise Edition instance. | acr-test |
InstanceId | string | No | The ID of the Container Registry Enterprise Edition instance. | cri-nwj395hgf6f3**** |
RegionId | string | No | The region ID of the Container Registry Enterprise Edition instance. | cn-hangzhou |
CostOptimization | boolean | No | Specifies whether to enable the Cost Optimization feature. Valid values:
Default value: false. | false |
InstanceFamilyLevel | string | No | 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
| EnterpriseLevel |
ContainersUpdateType | string | No | The update mode of containers. Valid values:
Default value: RenewUpdate. | RenewUpdate |
InstanceTypes | array | No | The ECS instance types. You can specify up to five instance types. | |
string | No | The ECS instance type. You can specify up to five ECS instance types. For more information, see Specify ECS instance types to create an elastic container instance. | ecs.g6.large | |
DataCacheBucket | string | No | The bucket in which data caches are stored. | default |
DataCachePL | string | No | The performance level (PL) of the cloud disk in which data caches are stored. We recommend that you use Enterprise SSDs (ESSDs). Valid values:
Default value: PL1. Note
For more information about ESSDs, see ESSDs .
| PL1 |
DataCacheProvisionedIops | integer | No | The provisioned read/write IOPS of the ESSD AutoPL disk in which data caches are stored. Valid values: 0 to min{50,000, 1,000 × *Capacity - Baseline IOPS}. Baseline IOPS = min{1,800+50 x *Capacity, 50,000}. Note
For more information about ESSD AutoPL disks, see ESSD AutoPL disks.
| 40000 |
DataCacheBurstingEnabled | boolean | No | Specifies whether to enable the Performance Burst feature for the ESSD AutoPL disk in which data caches are stored. Valid values:
Default value: false. Note
For more information about ESSD AutoPL disks, see ESSD AutoPL disks.
| false |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "89945DD3-9072-47D0-A318-353284CF****"
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
403 | Forbidden.RiskControl | Forbidden.RiskControl |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-01-23 | The Error code has changed | View Change Details |
2023-11-14 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-10-11 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-07-12 | The Error code has changed | View Change Details |