com.aliyuncs.v5.endpoint.UserVpcEndpointResolver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aliyun-java-sdk-core-v5 Show documentation
Show all versions of aliyun-java-sdk-core-v5 Show documentation
Aliyun Open API SDK for Java
Copyright (C) Alibaba Cloud Computing
All rights reserved.
版权所有 (C)阿里云计算有限公司
http://www.aliyun.com
The newest version!
package com.aliyuncs.v5.endpoint;
import com.aliyuncs.v5.exceptions.ClientException;
public class UserVpcEndpointResolver extends EndpointResolverBase {
@Override
public boolean isRegionIdValid(ResolveEndpointRequest request) {
return request.regionId != null;
}
@Override
public boolean isProductCodeValid(ResolveEndpointRequest request) {
return request.productCode != null;
}
@Override
public String makeEndpointKey(ResolveEndpointRequest request) {
return null;
}
@Override
public String resolve(ResolveEndpointRequest request) throws ClientException {
String productCode = request.productCode.toLowerCase();
String regionId = request.regionId.toLowerCase();
return String.format("%s-vpc.%s.aliyuncs.com", productCode, regionId);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy