Enables Internet access for a bastion host.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | EnableInstancePublicAccess |
The operation that you want to perform. Set the value to EnableInstancePublicAccess. |
InstanceId | String | Yes | bastionhost-cn-78v1gh**** |
The ID of the bastion host. Note You can call the DescribeInstances operation to query the ID of the bastion host.
|
RegionId | String | No | cn-hangzhou |
The region ID of the bastion host. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
InstanceId | String | bastionhost-cn-78v1gh**** |
The ID of the bastion host whose Internet access is enabled. |
RequestId | String | D47B5043-FDD6-4FBE-976E-5FC67A23578F |
The ID of the request, which is used to locate and troubleshoot issues. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=EnableInstancePublicAccess
&InstanceId=bastionhost-cn-78v1gh****
&RegionId=cn-hangzhou
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<EnableInstancePublicAccessResponse>
<InstanceId>bastionhost-cn-78v1gh****</InstanceId>
<RequestId>D47B5043-FDD6-4FBE-976E-5FC67A23578F</RequestId>
</EnableInstancePublicAccessResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"InstanceId" : "bastionhost-cn-78v1gh****",
"RequestId" : "D47B5043-FDD6-4FBE-976E-5FC67A23578F"
}
Error codes
For a list of error codes, visit the API Error Center.