All Products
Search
Document Center

Bastionhost:EnableInstancePublicAccess

Last Updated:Jun 25, 2026

Enables the public access switch for a specified Bastionhost instance.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The ID of the Bastionhost instance.

Note

You can call the DescribeInstances operation to query the Bastionhost instance ID.

bastionhost-cn-78v1gh****

RegionId

string

No

The region ID of the Bastionhost instance.

cn-hangzhou

Response elements

Element

Type

Description

Example

object

InstanceId

string

The ID of the Bastionhost instance for which the public access switch has been enabled.

bastionhost-cn-78v1gh****

RequestId

string

The request ID, which is a unique identifier generated by Alibaba Cloud for the request. You can use the ID for troubleshooting.

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

Examples

Success response

JSON format

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

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.