Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 1.06 KB

8-Endpoint-CN.md

File metadata and controls

27 lines (22 loc) · 1.06 KB

← 客户端与凭证 | Endpoint(English) | 环境要求 →


Endpoint

很多时候会遇到无法找到 Endpoint,需要手动设置 Endpoint 的情况。 添加的格式如下:

//...
IClientProfile profile = DefaultProfile.GetProfile("<regionId>", "<ACCESS_KEY_ID>", "<ACCESS_KEY_SECRET>");
// 全局生效
profile.AddEndpoint("<endpointName>", "<regionId>", "<product>", "<domain>");
IAcsClient client = new DefaultAcsClient(profile);
DescribeRegionsRequest regionsRequest = new DescribeRegionsRequest();
// 只对当前request生效
regionsRequest.SetEndpoint("<your endpoint>");

var request = new AddLiveAppRecordConfigRequest();
// 拼接规则设置网络,参数:share、 inner、 vpc、 public
regionsRequest.ProductNetwork = "public";

var response = client.GetAcsResponse(regionsRequest);

拼接规则方式需要产品端支持并符合规范方可使用。


← 客户端与凭证 | Endpoint(English) | 环境要求 →