ListZones
Queries the list of available zone IDs for a specified region, product type, and operating system type.
Operation description
Operation description
This operation returns the list of available zone IDs for the current Alibaba Cloud account based on the specified region, product type, and operating system type. A typical use case is to check which zones are available before creating a resource that requires a vSwitch, and then select a vSwitch in one of those zones.
This operation only queries information. It does not create resources or incur fees.
Before you begin
When calling this operation with a RAM user or STS credential, the
appstreaming:ListAppInstanceTypepermission is required. If the permission is insufficient, the error codeForbidden.NoPermissionis returned.ProductType,BizRegionId, andOsTypeare all required. If any of these parameters is missing, empty, or set to an unrecognized value, the error codeInvalidParameter.ValueInvalidis returned.BizRegionIdmust be a region ID supported by WUYING Cloud Application. Call ListRegions first to obtain the supported region IDs.
Call sequence
Call ListRegions to obtain the supported region IDs.
Call this operation with the region ID, target product type, and operating system type, and read the returned
ListZonesModel.Zones.When creating a resource that requires a vSwitch, select a vSwitch in one of the returned zones. For example, pass the corresponding vSwitch ID when calling CreateAppInstanceGroup or CreateWuyingServer.
The returned zone list is determined by the available resources in the current region and may change over time. Query the list in real time before creating resources instead of caching it for extended periods.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProductType |
string |
Yes |
The product type. Required. Specifies the product for which to query available zones. The zone list is returned based on the available resources of this product in the specified region. The value is case-insensitive. Use the following recommended values. Valid values:
Valid values:
|
CloudApp |
| BizRegionId |
string |
Yes |
The region ID. Required. Specifies the region for which to query available zones. All returned zones are within this region. The value must be a region ID supported by WUYING Cloud Application. Call ListRegions to obtain the supported region IDs. If an unsupported region is specified, the error code |
cn-hangzhou |
| OsType |
string |
Yes |
The operating system type. Required. Specifies the operating system used by the resource. This parameter, together with Valid values:
Valid values:
|
Windows |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The result of this query, including the request ID and the list of available zones. |
||
| ListZonesModel |
object |
The zone query result. |
|
| Zones |
array |
The list of available zone IDs for the specified product type and operating system type in the current region. When creating a resource that requires a vSwitch, select a vSwitch in one of these zones. |
|
|
string |
The zone ID, which consists of the region ID followed by a zone letter suffix, such as |
cn-hangzhou-h |
|
| RequestId |
string |
The request ID. You can use this ID to locate and troubleshoot issues. |
1CBAFFAB-B697-4049-A9B1-67E1FC5F**** |
Examples
Success response
JSON format
{
"ListZonesModel": {
"Zones": [
"cn-hangzhou-h"
]
},
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.