Unlike user-defined common parameters, public parameters provided by OOS are managed by Alibaba Cloud. You can use these public parameters to quickly access information about Alibaba Cloud regions (all regions or those supported by a specific product), zones, cloud products, and their endpoints.
Preparations
Ensure the Alibaba Cloud CLI is installed and configured. For installation or configuration instructions, see:
For temporary testing purposes, installing Alibaba Cloud CLI is not necessary. You can utilize Cloud Shell provided by Alibaba Cloud for API calls to retrieve information about cloud product hosts.Cloud Shell
-
Install Alibaba Cloud CLI.
-
Configure Alibaba Cloud CLI.
Set up necessary parameters such as credentials and regions to use Alibaba Cloud resources. For detailed configurations, see Identity credential types.
Procedure
Obtain Alibaba Cloud region information
All supported regions
-
Request command
Use the following command in Alibaba Cloud CLI to invoke the
GetParametersByPath
interface and retrieve information about all regions supported by Alibaba Cloud using the public parameter path.aliyun oos GetParametersByPath --Path aliyun/services/global-infrastructure/regions
The
Path
parameter specifies the path for the information you want to access. For this scenario, usealiyun/services/global-infrastructure/regions
to request information about all regions supported by Alibaba Cloud. -
Return example
The return value includes region IDs and names, creation time, update time, and other details. Displayed here are only a few regions, such as
cn-hangzhou
andcn-shanghai
.
Regions supported by a specific product
-
Request command
Use the following command in Alibaba Cloud CLI to invoke the
GetParametersByPath
interface and retrieve information about regions supported by a specific Alibaba Cloud product using the public parameter path.aliyun oos GetParametersByPath --Path aliyun/services/global-infrastructure/products/oos/regions
The
Path
parameter specifies the path for the information you want to access. For this scenario, usealiyun/services/global-infrastructure/products/{product_code}/regions
, where{product_code}
is the code for a specific product, such asoos
. -
Return example
The return value includes region IDs and names, creation time, update time, and other details. Displayed here are only a few regions supported by the OOS product, such as
cn-hangzhou
andcn-shanghai
.
Obtain all Alibaba Cloud zones
-
Request command
Use the following command in Alibaba Cloud CLI to invoke the
GetParametersByPath
interface and retrieve information about all zones supported by Alibaba Cloud using the public parameter path.aliyun oos GetParametersByPath --Path aliyun/services/global-infrastructure/availability-zones
The
Path
parameter specifies the path for the information you want to access. For this scenario, usealiyun/services/global-infrastructure/availability-zones
to request information about all supported zones. -
Return example
The return value includes zone IDs and names, creation time, update time, and other details. Displayed here are only a few zones, such as
cn-shanghai-g-alipay
andcn-shanghai-x6
.
Obtain Alibaba Cloud published cloud products
-
Request command
Use the following command in Alibaba Cloud CLI to invoke the
GetParametersByPath
interface and retrieve information about published cloud products of Alibaba Cloud using the public parameter path.aliyun oos GetParametersByPath --Path aliyun/services/global-infrastructure/products
The
Path
parameter specifies the path for the information you want to access. For this scenario, usealiyun/services/global-infrastructure/products
to request information about all published cloud products. -
Return example
The example return value features cloud product IDs, names, creation and update times, among other details. It displays information for select cloud products, such as the published
OOS
andECS
products.
Obtain the endpoint of a specific Alibaba Cloud product
-
Request command
Use the following command in Alibaba Cloud CLI to invoke the
GetParametersByPath
interface and retrieve the endpoint of a specific Alibaba Cloud product using the public parameter path.aliyun oos GetParametersByPath --Path aliyun/services/global-infrastructure/products/oos/endpoints
Path
defines the parameter path to retrieve. In this scenario, the path isaliyun/services/global-infrastructure/products/{product_code}/endpoints
, where{product_code}
refers to the code of a specific product (such asoos
), indicating a request for the endpoint information of the OOS product within a particular region. -
Return example
The return value includes the endpoint ID and name, creation time, update time, and other details. Displayed here are only the endpoints of OOS in some regions, such as
cn-hangzhou
andcn-shanghai
.