Disables Internet access of a bastion host.

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

Name 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 bastion host whose Internet access you want to disable.

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

The region ID of the bastion host.

Response parameters

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

The ID of the bastion host whose Internet access is disabled.

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

The ID of the request, which is used to locate and troubleshoot issues.

Examples

Sample requests

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

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

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

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

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

Error codes

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