调用EnableInstancePublicAccess接口打开堡垒机实例公网访问开关。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | EnableInstancePublicAccess |
要执行的操作。取值:EnableInstancePublicAccess。 |
InstanceId | String | 是 | bastionhost-cn-78v1gh**** |
堡垒机的实例ID。 说明 可通过调用DescribeInstances接口获取堡垒机实例ID。
|
RegionId | String | 否 | cn-hangzhou |
堡垒机实例的地域ID。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
InstanceId | String | bastionhost-cn-78v1gh**** |
已开启公网访问开关的堡垒机的实例ID。 |
RequestId | String | D47B5043-FDD6-4FBE-976E-5FC67A23578F |
本次调用请求的ID,是由阿里云为该请求生成的唯一标识符,可用于排查和定位问题。 |
示例
请求示例
http(s)://[Endpoint]/?Action=EnableInstancePublicAccess
&InstanceId=bastionhost-cn-78v1gh****
&RegionId=cn-hangzhou
&公共请求参数
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<EnableInstancePublicAccessResponse>
<InstanceId>bastionhost-cn-78v1gh****</InstanceId>
<RequestId>D47B5043-FDD6-4FBE-976E-5FC67A23578F</RequestId>
</EnableInstancePublicAccessResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"InstanceId" : "bastionhost-cn-78v1gh****",
"RequestId" : "D47B5043-FDD6-4FBE-976E-5FC67A23578F"
}
错误码
访问错误中心查看更多错误码。