Configures security groups 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 ConfigInstanceSecurityGroups

The operation that you want to perform. Set the value to ConfigInstanceSecurityGroups.

Lang String No zh

The language of the content within the request and response. Default value: zh. Valid values:

  • zh: Chinese
  • en: English
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.

AuthorizedSecurityGroups.N String Yes 2

The ID of authorized security group N. Valid values of N: 1 to 100.

Response parameters

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

The ID of the bastion host for which security groups were configured.

RequestId String 0ECCC399-4D35-48A7-8379-5C6180E66235

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" : "0ECCC399-4D35-48A7-8379-5C6180E66235"

Error codes

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