Regions currently supported by MPS and the regionID check list
Region | RegionID |
---|---|
Asia-Pacific Southeast 1 (Singapore) | ap-southeast-1 |
Central Europe 1 (Frankfurt) | eu-central-1 |
China North 2 | cn-beijing |
China East 2 | cn-shanghai |
China South 1 | cn-shenzhen |
Asia-Pacific Northeast 1 | ap-northeast-1 |
Hong Kong | cn-hongkong |
US West 1 (Silicon Valley) | us-west-1 |
China East 1 | cn-hangzhou |
How JAVA SDK calls the MPS interface which is not in the Hangzhou region?
For example, add Beijing in the supported region (Add other regions in the similar way, and change cn-beijing to the regionID of the corresponding regions), see JAVA SDK > Quick start. Note that the core dependency is updated to the latest version.
import com.aliyuncs.profile.DefaultProfile;
import com.aliyuncs.DefaultAcsClient;
DefaultProfile.addEndpoint("cn-beijing","cn-beijing","Mts","mts.cn-beijing.aliyuncs.com");
DefaultProfile profile = DefaultProfile.getProfile("cn-beijing", accessKeyId, accessKeySecret);
DefaultAcsClient client = new DefaultAcsClient(profile);
How PHP SDK calls the MPS interface which is not in the Hangzhou region?
For example, add Beijing in the supported region (Add other regions in the similar way, and change cn-beijing to the regionID of the corresponding regions), see PHP SDK > Quick start. Note that the core dependency is updated to the latest version.
Edit aliyun-php-sdk-core/Regions/endpoints.xml file, and add the Beijing region before ( ) in the last row (Add other regions in the similar way):
<Endpoint name="mts-cn-beijing">
<RegionIds>
<RegionId>mts-cn-beijing</RegionId>
</RegionIds>
<Products>
<Product>
<ProductName>Mts</ProductName>
<DomainName>mts.cn-beijing.aliyuncs.com</DomainName>
</Product>
</Products>
</Endpoint>
include_once 'aliyun-php-sdk-core/Config.php';
$profile = DefaultProfile::getProfile('mts-cn-beijing',
$access_key_id,
$access_key_secret);
$client = new DefaultAcsClient($profile);
How Python SDK calls the MPS interface which is not in the Hangzhou region?
For example, add Beijing in the supported region (Add other regions in the similar way, and change cn-beijing to the regionID of the corresponding regions), see Python SDK > Quick start. Note that the core dependency is updated to the latest version.
Edit aliyunsdkcore/endpoints.xml file under the site-packages directory of python, and add the Beijing region before ( ) in the last row (Add other regions in the similar way):
<Endpoint name="mts-cn-beijing">
<RegionIds>
<RegionId>mts-cn-beijing</RegionId>
</RegionIds>
<Products>
<Product>
<ProductName>Mts</ProductName>
<DomainName>mts.cn-beijing.aliyuncs.com</DomainName>
</Product>
</Products>
</Endpoint>
from aliyunsdkcore import client
clt = client.AcsClient(access_key_id,
access_key_secret,
'mts-cn-beijing')
search_media_workflow(clt)