Querying AS Configurations
Function
This API is used to query AS configurations based on search criteria. The results are displayed by page.
- Search criteria can be the AS configuration name, image ID, start line number, and number of records.
- If no search criteria are specified, a maximum of 20 AS configurations can be queried for a tenant by default.
Authorization
Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned.
- If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
- If you are using identity policy-based authorization, the permission listed below is required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
as:scalingConfig:list
list
scalingConfig*
-
as:configs:list
-
URI
GET /autoscaling-api/v1/{project_id}/scaling_configuration
You can type the question mark (?) and ampersand (&) at the end of the URI to define multiple search criteria. AS configurations can be searched by all optional parameters in the following table. For details, see the example request.
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Specifies the project ID. For details, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
| scaling_configuration_name | No | String | Definition Specifies the AS configuration name. Constraints N/A Range The value can contain 1 to 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. Default Value N/A |
| image_id | No | String | Definition Specifies the image ID. Its value is the same as that of imageRef for specifying the image selected during ECS creation. You can obtain an image ID by calling the IMS API for querying images. For details, see Querying Images. Constraints N/A Range N/A Default Value N/A |
| start_number | No | Integer | Definition Specifies the start line number. Constraints N/A Range Minimum value: 0 Default Value 0 |
| limit | No | Integer | Definition Specifies the number of records to be returned. Constraints N/A Range 0–100 Default Value 20 |
Request
None
Example Request
This example queries the AS configurations with image ID 37ca2b35-6fc7-47ab-93c7-900324809c5c.
GET https://{Endpoint}/autoscaling-api/v1/{project_id}/scaling_configuration?image_id=37ca2b35-6fc7-47ab-93c7-900324809c5c Response
| Parameter | Type | Description |
|---|---|---|
| total_number | Integer | Definition Specifies the total number of records. Range N/A |
| start_number | Integer | Definition Specifies the start line number. Range Minimum value: 0 |
| limit | Integer | Definition Specifies the number of query records. Range 0–100 |
| scaling_configurations | Array of scaling_configurations objects | Definition Specifies the AS configuration list. |
| Parameter | Type | Description |
|---|---|---|
| scaling_configuration_id | String | Definition Specifies the AS configuration ID. This parameter is globally unique. Range N/A |
| tenant | String | Definition Specifies the tenant ID. Range N/A |
| scaling_configuration_name | String | Definition Specifies the AS configuration name. Fuzzy match is supported. Range The value can contain 1 to 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. |
| instance_config | instance_config object | Definition Specifies the information about instance configurations. |
| create_time | String | Definition Specifies the time when AS configurations were created. The time format complies with UTC. The format is yyyy-MM-ddTHH:mm:ssZ, for example, 2025-05-10T10:00:00Z. Range N/A |
| scaling_group_id | String | Definition Specifies the ID of the AS group to which the AS configuration is bound. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| flavorRef | String | Definition Specifies the ECS flavor ID. Range N/A |
| imageRef | String | Definition Specifies the image ID. It is the same as image_id. Range N/A |
| disk | Array of disk objects | Definition Specifies the disk group information. |
| key_name | String | Definition Specifies the name of the SSH key pair used to log in to the ECS. Range N/A |
| key_fingerprint | String | Definition Specifies the fingerprint of the SSH key pair used to log in to the ECS. Range N/A |
| instance_name | String | Definition Specifies the instance name. This parameter is reserved. NOTE: When you call APIs to query details about an AS configuration created from an ECS or to list such AS configurations, instance_name is empty in the response. Range N/A |
| instance_id | String | Definition Specifies the instance ID. This parameter is reserved. Range N/A |
| adminPass | String | Definition Specifies the password used to log in to the ECS. The displayed password is not plaintext. This parameter is reserved. Range N/A |
| personality | Array of personality objects | Definition Specifies information about the injected file. |
| public_ip | public_ip object | Definition Specifies the EIP of the ECS. |
| user_data | String | Definition Specifies the Cloud-Init user data, which is encoded using Base64. Range The password must:
|
| metadata | metadata object | Definition Specifies the ECS metadata. For details, see Table 11. |
| security_groups | Array of security_groups objects | Definition Specifies the security group information. |
| server_group_id | String | Definition Specifies the ECS group ID. Range N/A |
| tenancy | String | Definition Specifies that ECSs are created on DeHs. Range
|
| dedicated_host_id | String | Definition Specifies the ID of a DeH. Range N/A |
| market_type | String | Definition Specifies the ECS billing mode. Range
|
| multi_flavor_priority_policy | String | Definition Specifies the priority policy for selecting a flavor when using an AS configuration to create ECSs. Range
|
| cpu_options | CpuOptions object | Definition Specifies whether hyper-threading is disabled for instances. For details, see Table 13. |
| Parameter | Type | Description |
|---|---|---|
| size | Integer | Definition Specifies the disk size. The unit is GB. Range
|
| volume_type | String | Definition Specifies the disk type. Range
|
| disk_type | String | Definition Specifies the disk type (system disk or data disk). Range
|
| dedicated_storage_id | String | Definition Specifies the ID of the DSS device for the disk. Range N/A |
| data_disk_image_id | String | Definition Specifies the ID of the data disk image for creating a data disk. Range N/A |
| snapshot_id | String | Definition Specifies the disk backup snapshot ID. Range N/A |
| metadata | metadata object | Definition Specifies the metadata for creating disks. For details, see Table 6. |
| iops | Integer | Definition Specifies the IOPS of an EVS disk. This parameter is available when volume_type is set to GPSSD2 or ESSD2. NOTE:
Range
|
| throughput | Integer | Definition Specifies the throughput of an EVS disk. The unit is MiB/s. This parameter is available when volume_type is set to GPSSD2. NOTE:
Range 125–1,000 |
| Parameter | Type | Description |
|---|---|---|
| __system__encrypted | String | Definition Specifies whether disks are encrypted. If this parameter is absent, disks are not encrypted by default. Range 0: not encrypted 1: encrypted |
| __system__cmkid | String | Definition Specifies the CMK ID which is used for encryption. This parameter is used with __system__encrypted. NOTE: For details about how to use an HTTPS request to obtain the CMK ID, see Querying the Key List. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| path | String | Definition Specifies the path of the injected file. Range
|
| content | String | Definition Specifies the content of the file to be injected. The file content is encoded using Base64. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| eip | eip object | Definition Specifies the automatically assigned EIP. |
| Parameter | Type | Description |
|---|---|---|
| ip_type | String | Definition Specifies the IP address type. For details, see the publicip field in "Assigning an EIP" in Virtual Private Cloud API Reference. Range
|
| bandwidth | bandwidth object | Definition Specifies the bandwidth of an IP address. |
| Parameter | Type | Description |
|---|---|---|
| size | Integer | Definition Specifies the bandwidth (Mbit/s). Range [1,2000] for bandwidth billing, [1,300] for traffic billing |
| share_type | String | Definition Specifies the bandwidth sharing type. Range
|
| charging_mode | String | Definition Specifies the bandwidth billing mode. Range
|
| id | String | Definition Specifies the bandwidth ID. You can specify a shared bandwidth when applying for an EIP with the bandwidth whose type is set to WHOLE. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| admin_pass | String | Definition Specifies the password of the Administrator account for a Windows ECS. Range The password must:
|
Example Response
{
"limit": 20,
"total_number": 2,
"start_number": 0,
"scaling_configurations": [
{
"tenant": "ce061903a53545dcaddb300093b477d2",
"scaling_configuration_id": "6afe46f9-7d3d-4046-8748-3b2a1085ad86",
"scaling_configuration_name": "config_name_1",
"instance_config": {
"disk": [
{
"size": 40,
"volume_type": "SATA",
"disk_type": "SYS"
},
{
"size": 100,
"volume_type": "SATA",
"disk_type": "DATA"
}
],
"personality": null,
"instance_name": null,
"instance_id": null,
"flavorRef": "103",
"imageRef": "37ca2b35-6fc7-47ab-93c7-900324809c5c",
"key_name": "keypair01",
"key_fingerprint" : "SHA256:qlvdUkYgSjKUxcr2uJgJJRMCKMLkJO5BPLooBcgsF8k",
"public_ip": null,
"user_data": null,
"metadata": {},
"security_groups": [{
"id": "6c22a6c0-b5d2-4a84-ac56-51090dcc33be"
}],
"cpu_options" : null
},
"create_time": "2015-07-23T01:04:07Z"
},
{
"tenant": "ce061903a53545dcaddb300093b477d2",
"scaling_configuration_id": "24a8c5f3-c713-4aba-ac29-c17101009e5d",
"scaling_configuration_name": "config_name_2",
"instance_config": {
"disk": [
{
"size": 40,
"volume_type": "SATA",
"disk_type": "SYS"
}
],
"personality": null,
"instance_name": null,
"instance_id": null,
"flavorRef": "103",
"imageRef": "37ca2b35-6fc7-47ab-93c7-900324809c5c",
"key_name": "keypair01",
"key_fingerprint" : "SHA256:qlvdUkYgSjKUxcr2uJgJJRMCKMLkJO5BPLooBcgsF8k",
"public_ip": null,
"user_data": null,
"metadata": {},
"security_groups": [{
"id": "6c22a6c0-b5d2-4a84-ac56-51090dcc33be"
}],
"multi_flavor_priority_policy": "PICK_FIRST"
},
"create_time": "2015-07-22T01:08:41Z"
}
]
} Returned Values
- Normal
- Abnormal
Returned Value
Description
400 Bad Request
The server failed to process the request.
401 Unauthorized
You must enter the username and password to access the requested page.
403 Forbidden
You are forbidden to access the requested page.
404 Not Found
The server cannot find the requested page.
405 Method Not Allowed
You are not allowed to use the method specified in the request.
406 Not Acceptable
The client does not accept the response generated by the server.
407 Proxy Authentication Required
The client must be authorized by the proxy before the request can proceed.
408 Request Timeout
The request timed out.
409 Conflict
The request cannot be processed due to a conflict.
500 Internal Server Error
Failed to complete the request because of an internal service error.
501 Not Implemented
Failed to complete the request because the server does not support the requested function.
502 Bad Gateway
Failed to complete the request because the request is invalid.
503 Service Unavailable
Failed to complete the request because the system is unavailable.
504 Gateway Timeout
The gateway timed out.
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot