ListZones
Queries the list of available zone IDs for a specified product type and operating system type in a specified region.
Operation description
Usage notes
This operation returns a list of available zone IDs that can be selected by the current Alibaba Cloud account based on the region, product type, and operating system type. A typical use case is to confirm which zones are available before creating a resource that requires a specified vSwitch, and then select a vSwitch located in one of these zones.
This operation only queries information. It does not create resources or incur fees.
Before you begin
When you call this operation as a RAM user or by using STS credentials, you must have the appstreaming:ListAppInstanceType permission. If you do not have the required permissions, the error code Forbidden.NoPermission is returned.
ProductType, BizRegionId, and OsType are all required. If any of these parameters is missing, empty, or has an unrecognized value, the error code InvalidParameter.ValueInvalid is returned.
BizRegionId must be a region ID supported by App Streaming. You can call ListRegions to obtain the supported region IDs.
Call sequence
Call ListRegions to obtain the supported region IDs.
Call this operation by using the region ID, target product type, and operating system type, and then read the returned ListZonesModel.Zones.
When you create a resource and need to specify a vSwitch, select a vSwitch located in one of the returned zones. For example, pass the corresponding vSwitch ID when you call CreateAppInstanceGroup or CreateWuyingServer.
The returned list of available zones 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 the list for a long time.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
appstreaming:ListAppInstanceType |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProductType |
string |
Yes |
The product type. Required. Specifies the product for which you want to query available zones. The list of available zones is returned based on the available resources of the product in the specified region. The value is case-insensitive. Use one of the following values: Valid values:
Valid values:
|
CloudApp |
| BizRegionId |
string |
Yes |
The region ID. Required. Specifies the region for which you want to query available zones. All returned zones are located in this region. The value must be a region ID supported by App Streaming. You can call ListRegions to query the supported region IDs. If you specify an unsupported region, the error code InvalidParameter.ValueInvalid is returned. |
cn-hangzhou |
| OsType |
string |
Yes |
The operating system type. Required. Specifies the operating system used by the resource. This parameter and ProductType together determine the available zones. The value is case-insensitive. Use one of the following values: Valid values:
Valid values:
|
Windows |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The query result, 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 you create a resource and specify a vSwitch, select a vSwitch located in one of these zones. |
|
|
string |
The zone ID, which consists of a region ID and a zone letter suffix, such as cn-hangzhou-h. |
cn-hangzhou-h |
|
| RequestId |
string |
The unique identifier of the request, which can be used to troubleshoot request 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.