Querying the Template List
Function
This API is used to query the templates for creating target servers.
URI
GET /v1/sms/vm/templates
Response
Response parameters
For details about the response parameters, see Table 3.
Parameter |
Type |
Description |
---|---|---|
count |
String |
Template quantity |
templates |
String |
Template information. For details, see Table 2. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Template name |
id |
String |
Template ID |
region |
String |
Region ID |
availability_zone |
String |
AZ |
volumetype |
String |
Disk type |
vpc |
Object |
VPC information. For details, see Table 4. |
nics |
Array |
Subnet information. For details, see Table 6. |
security_groups |
Array |
Security group. For details, see Table 5. |
publicip |
Object |
EIP information. For details, see Table 7. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Security group ID |
name |
String |
Security group name |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Subnet ID |
name |
String |
Subnet name |
cidr |
String |
Subnet gateway/mask |
Parameter |
Type |
Description |
---|---|---|
type |
String |
EIP type. The default value is 5_bgp. |
bandwidth_size |
Integer |
Bandwidth size (Mbit/s). The value range is 1 to 2000. The minimum increment for bandwidth adjustment varies depending on the bandwidth range. The minimum increment is 1 Mbit/s if the allowed bandwidth ranges from 0 to 300 Mbit/s (with 300 Mbit/s included). The minimum increment is 50 Mbit/s if the allowed bandwidth ranges 300 Mbit/s to 1000 Mbit/s (with 1000 Mbit/s included). The minimum increment is 500 Mbit/s if the allowed bandwidth is greater than 1000 Mbit/s.
NOTE:
This parameter is mandatory when sharetype is set to PER and is optional when sharetype is set to WHOLE with an ID specified. |
Example
- Example request
GET v1/sms/vm/templates?name=temp1
- Example response
{ "count":1, "templates":[ { "name":"temp1", "id":"abcdefghijk-aa-bbb", "region":"my-kualalumpur-1", "availability_zone":"my-kualalumpur-1a", "volumetype":"SATA", "vpc":{ "id":"0dae26c9-9a70-4392-93f3-87d53115d171", "name":"vpc1" }, "nics":[ { "id":"157ee789-03ea-45b1-a698-76c92660dd83", "name": "subnet-1637", "cidr": "192.168.0.0/24" } ], "security_groups":[ { "id":"507ca48f-814c-4293-8706-300564d54620", "name":"default" } ], "publicip": { "type": "5_bgp", "bandwidth_size":10, } } ] }
Status Codes
See Status Codes.
Feedback
Was this page helpful?
Provide feedbackThank 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