Disables Internet access to a 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 DisableInstancePublicAccess

The operation that you want to perform.

Set the value to DisableInstancePublicAccess.

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 disabled.

RequestId String 76FAAF15-D3A3-4099-9941-FC408D9FDB4C

The ID of the request.

Examples

Sample requests

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

Sample success responses

XML format

<DisableInstancePublicAccessResponse>
      <RequestId>76FAAF15-D3A3-4099-9941-FC408D9FDB4</RequestId>
      <InstanceId>bastionhost-cn-78v1gh****</InstanceId>
</DisableInstancePublicAccessResponse>

JSON format

{
    "RequestId":"76FAAF15-D31A3-4099-9941-FC408D9FDB4",
    "InstanceId":"bastionhost-cn-78v1gh****"
    }

Error codes

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