調用EnableInstancePublicAccess開啟指定Bastion Host執行個體公網訪問開關。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
請求參數
名稱 | 類型 | 是否必選 | 樣本值 | 描述 |
---|---|---|---|---|
Action | String | 是 | EnableInstancePublicAccess |
要執行的操作。 取值:EnableInstancePublicAccess。 |
InstanceId | String | 是 | bastionhost-cn-78v1gh**** |
Bastion Host的執行個體ID。 说明 可通過調用DescribeInstances介面擷取Bastion Host執行個體ID。
|
RegionId | String | 否 | cn-hangzhou |
Bastion Host執行個體的地區ID。 |
返回資料
名稱 | 類型 | 樣本值 | 描述 |
---|---|---|---|
InstanceId | String | bastionhost-cn-78v1gh**** |
已開啟公網訪問開關的Bastion Host的執行個體ID。 |
RequestId | String | D47B5043-FDD6-4FBE-976E-5FC67A23578F |
阿里雲為該請求產生的唯一識別碼。 |
樣本
請求樣本
http(s)://[Endpoint]/?Action=EnableInstancePublicAccess
&InstanceId=bastionhost-cn-78v1gh****
&<公用請求參數>
正常返回樣本
XML
格式
<EnableInstancePublicAccessResponse>
<RequestId>D47B5043-FDD6-4FBE-976E-5FC67A23578F</RequestId>
<InstanceId>bastionhost-cn-78v1gh****</InstanceId>
</EnableInstancePublicAccessResponse>
JSON
格式
{
"RequestId":"D47B5043-FDD6-4FBE-976E-5FC67A23578F",
"InstanceId":"bastionhost-cn-78v1gh****"
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。