To ensure network stability, security, and quality of service (QoS), you can set inbound and outbound bandwidth limits when you create an elastic container instance by calling the CreateContainerGroup API operation.
Bandwidth limits can only be set through the CreateContainerGroup API operation. The Elastic Container Instance console does not support bandwidth configuration.
Prerequisites
Before you begin, make sure that you have:
An Alibaba Cloud account
Permissions to call the
CreateContainerGroupAPI operation
Set bandwidth limits
Call the CreateContainerGroup API operation with the following bandwidth parameters:
Parameter | Type | Example | Description |
| Long | 102400 | The maximum inbound bandwidth. Unit: Bps (bytes per second). |
| Long | 102400 | The maximum outbound bandwidth. Unit: Bps (bytes per second). |
The bandwidth unit is Bps (bytes per second), not bps (bits per second). For example, a value of 102400 Bps equals 100 KBps.
Example request
The following request sets both inbound and outbound bandwidth to 102,400 Bps:
https://eci.[RegionId].aliyuncs.com/?Action=CreateContainerGroup
&IngressBandwidth=102400
&EgressBandwidth=102400
&<other required parameters>Replace [RegionId] with your target region ID, such as ap-southeast-1. Replace <other required parameters> with the remaining parameters required by CreateContainerGroup. For the full parameter list, see CreateContainerGroup.