This operation creates a scaling configuration according to input parameters.
- When creating a scaling configuration, the specified ECS instance type must be consistent with the instance types of the active scaling configurations in the scaling group.
- Scaling configurations cannot be changed. To use a new scaling configuration, you must create it and activate it in a scaling group (by changing the ActiveScalingConfigurationId attribute).
- When creating a scaling configuration, you must select an image to determine the system disk configuration of the new instance. The image contains OS and the application software configuration. After an instance is created based on an image, the system disk of the instance is a clone of the image.
- When creating an instance, you must add it to a security group. Therefore, you need to specify a security group in a scaling configuration. The security group must be created in advance. Mutual access is allowed between instances in the same security group in the Intranet. By default, firewalls are deployed between security groups, and mutual access between security groups is disabled. However, firewall permissions of a security group can be set through security group authorization (by using the interface for granting security group permissions). Instances in one security group cannot exceed 1,000. If the instances in a security group exceed this limit, and the security group is specified when creating an instance, a failure prompt is displayed.
- When you create an instance through a scaling configuration, if InternetChargeType is set to PayByBandwidth, the value of InternetMaxBandwidthOut is the selected fixed bandwidth value; if InternetChargeType is set to PayByTraffic, InternetMaxBandwidthOut specifies the upper limit of the bandwidth value, and billing is based on the actual network traffic. When setting InternetChargeType and InternetMaxBandwidthOut, calculate the possible bandwidth expenses carefully.
- The value of InternetMaxBandwidthIn is unrelated to billing in all circumstances. Incoming data traffic of the instance is free of charge.
- During instance creation, the system allocates a system disk with an appropriate size for the instance based on the image specified by the user. Moreover, the system will also specify the type of the system disk as a cloud disk or an ephemeral disk if you have the permission to activate an ephemeral disk. (By default, a new user does not have this permission.)
- The capacity of a cloud disk cannot exceed 2,000 GB and the capacity of an ephemeral disk cannot exceed 1 TB (1,024 GB).
- The Portable attribute of a cloud disk created with an instance is False, that is, the cloud disk cannot be detached or attached. The DeleteWithInstance attribute of all created disks is True.
- A maximum of four data disks can be added to an instance. The total capacity of ephemeral disks for an instance cannot exceed 2 TB (2,048 GB). (This value does not include the capacity of the system disk).
- When the system disk is a cloud disk, data disks cannot be ephemeral disks; when the system disk is an ephemeral disk, data disks can be ephemeral disks or cloud disks.
- During instance creation, the ECS system allocates a system disk with an appropriate size for the instance based on the image specified by the user.
- If the instance memory is 512 MB or below, Windows OS is not supported. If the instance memory is 4 GB or above, a 32-bit OS is not supported.
- When the VSwitchId value is not set in a scaling group, the security group with the VPCId value set cannot be used to create a scaling configuration.
- When the VSwitchId value is set in a scaling group, the security group of the classic network type or with a different VPCId value cannot be used to create a scaling configuration.
- A maximum of 10 scaling configurations can be created in a scaling group.
|Action||String||Yes||Operation interface, required. The parameter value is CreateScalingConfiguration.|
|ScalingGroupId||String||Yes||ID of the scaling group of a scaling configuration.|
|ImageId||String||Yes||ID of an image file, indicating the image resource selected when an instance is enabled.|
|InstanceType||String||Yes||Resource rule of an ECS instance.|
|SecurityGroupId||String||Yes||ID of the security group to which a newly created instance belongs. Mutual access is allowed between instances in one security group.|
|ScalingConfigurationName||String||No||Name shown for the scheduled task. The name must contain 2-40 English or Chinese characters, and start with a number, a letter in upper or lower case or a Chinese character. The name can contain numbers, “_”, “-“ or “.”. The account name in the same scaling group is unique in the same region. If this parameter value is not specified, the default value is ScalingConfigurationId.|
|InternetChargeType||String||No||Network billing type, Values: PayByBandwidth or PayByTraffic. If this parameter value is not specified, the default value is PayByBandwidth.|
|InternetMaxBandwidthIn||Integer||No||Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). The value range is [1,200]. If this parameter value is not specified, AliyunAPI automatically sets the value to 200 Mbps.|
|InternetMaxBandwidthOut||Integer||No||Maximum outgoing bandwidth from the public network, measured in Mbps (Mega bit per second). The value range for PayByBandwidth is [1,100]. If this parameter value is not specified, AliyunAPI automatically sets the value to 0 Mbps. The value range for PayByTraffic is [1,100]. If this parameter value is not specified, an error is reported.|
|SystemDisk.Category||String||No||Category of the system disk. The parameter value options are cloud and ephemeral. The default value is cloud.|
|DataDisk.N.Size||Integer||No||Size of data disk N (ranging from 1 to 4), in GB. The value ranges from 5 to 2,000 for a cloud disk and from 5 to 1,024 for an ephemeral disk. A maximum of four values can be entered.|
|DataDisk.N.Category||String||No||Category of data disk N (ranging from 1 to 4). The parameter value options are cloud and ephemeral. The default value is cloud. A maximum of four values can be entered.|
|DataDisk.N.SnapshotId||String||No||Snapshot used for creating the data disk N (ranging from 1 to 4). If this parameter is specified, the DataDisk.N.Size parameter is neglected, and the size of the created disk is the size of the snapshot. If this snapshot is created before July 15, 2013 (included), the snapshot cannot be called, and InvalidSnapshot.TooOld is returned in Response. A maximum of four values can be entered.|
|DataDisk.N.Device||String||No||Attaching point of the data disk N (ranging from 1 to 4). If this parameter is empty, the ECS automatically assigns the attaching point when an ECS is created. The parameter value ranges from /dev/xvdb to /dev/xvdz. The default value is empty. A maximum of four values can be entered.|
|ScalingConfigurationId||String||ID of a scaling configuration. It is generated by the system and is globally unique.|
|Error||Error code||Description||HTTP status code|
|The specified scaling group does not exist in this account.||InvalidScalingGroupId.NotFound||The specified scaling group does not exist.||404|
|The scaling configuration name already exists.||InvalidScalingConfigurationName.Duplicate||The specified value of parameter
|Scaling configuration quantity exceeds the upper limit for a user to use.||QuotaExceeded.ScalingConfiguration||Scaling configuration quota exceeded in the specified scaling group.||400|
|Specified image is not in this account.||InvalidImageId.NotFound||The specified image does not exist.||404|
|Specified security group is not in this account.||InvalidSecurityGroupId.NotFound||The specified security group does not exist.||404|
|Specified image does not support the specified instance type.||InvalidImageId.InstanceTypeMismatch||The specified image does not support the specified instance type.||400|
|Specified network type is inconsistent for the specified security group and the scaling group.||InvalidSecurityGroupId.IncorrectNetworkType||The network type of specified Security Group does not support this action.||400|
|The specified security group and the virtual switch are not in the same VPC.||InvalidSecurityGroupId.VPCMismatch||The specified security group and the specified virtual switch are not in the same VPC.||400|
|The number of ECS instances attached to the specified security group exceeds the upper limit.||QuotaExceeded.SecurityGroupInstance||Instance quota exceeded in the specified security group.||400|
|The specified scaling configuration and the existing scaling configuration have different instance types.||InstanceType.Mismatch||The specified scaling configuration and existing active scaling configuration have different instance type.||400|
|Ephemeral disk capacity exceeds 2 TB (2,048 GB).||QuotaExceeded.EphemeralDiskSize||Ephemeral disk size quota exceeded.||403|
|Type of the specified system disk conflicts with that of the data disk.||InvalidParameter.Conflict||The value of parameter
|You are unauthorized to create an ephemeral system disk.||InvalidSystemDiskCategory.ValueUnauthorized||The system disk category is not authorized.||403|
|Specified snapshot does not exist.||InvalidDataDiskSnapshotId.NotFound||Snapshot “XXX” does not exist.||404|
|Capacity of the specified snapshot exceeds the upper limit of the disk size.||InvalidDataDiskSnapshotId.SizeNotSupported||The capacity of snapshot “XXX” exceeds the size limit of the specified disk category.||400|
|The snapshot is created before July 15, 2013 (included), and thus cannot be called.||InvalidSnapshot.TooOld||This operation is denied because the specified snapshot is created before 2013-07-15.||403|
|Data disk attaching point has been occupied.||InvalidDevice.InUse||Device “XXX” has been occupied.||403|
|The public network bandwidth and the billing type cannot be specified for a scaling group for which VSwitch is specified.||InvalidParameter.Conflict||The value of parameter
&<Public Request Parameters>