Enables Internet access for a bastion host.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "InstanceId" : "bastionhost-cn-78v1gh****",
  "RequestId" : "D47B5043-FDD6-4FBE-976E-5FC67A23578F"

Error codes

For a list of error codes, visit the API Error Center.