Enables Internet access to a specified Bastionhost instance.

Debugging

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 Bastionhost instance.

Note You can call the DescribeInstances operation to obtain the ID of the Bastionhost instance.
RegionId String No cn-hangzhou

The region ID of the Bastionhost instance.

Response parameters

Parameter Type Example Description
InstanceId String bastionhost-cn-78v1gh****

The ID of the Bastionhost instance to which Internet access was enabled.

RequestId String D47B5043-FDD6-4FBE-976E-5FC67A23578F

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=EnableInstancePublicAccess
&InstanceId=bastionhost-cn-78v1gh****
&<Common request parameters>

Sample success responses

XML format

<EnableInstancePublicAccessResponse>
      <RequestId>D47B5043-FDD6-4FBE-976E-5FC67A23578F</RequestId>
      <InstanceId>bastionhost-cn-78v1gh****</InstanceId>
</EnableInstancePublicAccessResponse>

JSON format

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

Error codes

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