Queries bastion hosts.

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 DescribeInstances

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

PageNumber Integer No 1

The number of the page to return. Default value: 1.

PageSize Integer No 10

The number of entries to return on each page. Default value: 10.

RegionId String No cn-hangzhou

The region ID of the bastion host.

InstanceStatus String No RUNNING

The state of the bastion host. Valid values:

  • PENDING: The bastion host is not initialized.
  • CREATING: The bastion host is being created.
  • RUNNING: The bastion host is running.
  • EXPIRED: The bastion host expired.
  • CREATE_FAILED: The bastion host fails to be created.
  • UPGRADING: The configurations of the bastion host are being changed.
  • UPGRADE_FAILED: The configurations of the bastion host fail to be changed.
ResourceGroupId String No rg-acfm26ougi****

The ID of the resource group to which the bastion host belongs.

InstanceId.N String No 2

The ID of the bastion host.

Tag.N.Key String No test

The tag key of the bastion host.

Tag.N.Value String No testapi

The tag value of the bastion host.

Response parameters

Parameter Type Example Description
TotalCount Long 4

The total number of bastion hosts that are queried.

RequestId String 61D36C55-AAFC-4678-8FAD-34FEF9E7182E

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

Instances Array of Instance

An array that consists of the queried bastion hosts.

VpcId String vpc-bp1c85tzgqu1bf5b****

The ID of the virtual private cloud (VPC) to which the bastion host belongs.

VswitchId String vsw-bp1xfwzzfti0kjbf****

The ID of the vSwitch to which the bastion host belongs.

ImageVersion String 3.0.0

The image version of the bastion host.

PlanCode String cloudbastion_ha

The edition of the bastion host. Valid values:

  • cloudbastion: Basic
  • cloudbastion_ha: Enterprise
Description String Test an operation.

The description of the bastion host.

ExpireTime Long 1578326400000

The timestamp when the bastion host expires. Unit: milliseconds.

Legacy Boolean false

Indicates whether the bastion host runs an earlier version. Valid values:

  • true: indicates that the bastion host runs V2 or V3.1.
  • false:indicates that the bastion host runs V3.2.
InstanceId String bastionhost-cn-78v1gh****

The ID of the bastion host.

InternetEndpoint String drawvxalwb-public.bastionhost.aliyuncs.com

The public O&M address of the bastion host.

RegionId String cn-hangzhou

The region ID of the bastion host.

IntranetEndpoint String drawvxalwb.bastionhost.aliyuncs.com

The private O&M address of the bastion host.

StartTime Long 1577681345000

The timestamp when the bastion host is purchased or renewed. Unit: milliseconds.

ResourceGroupId String g-acfm26ougi****

The ID of the resource group to which the bastion host belongs.

InstanceStatus String RUNNING

The state of the bastion host. Valid values:

  • PENDING: The bastion host is not initialized.
  • CREATING: The bastion host is being created.
  • RUNNING: The bastion host is running.
  • EXPIRED: The bastion host expired.
  • CREATE_FAILED: The bastion host fails to be created.
  • UPGRADING: The configurations of the bastion host are being changed.
  • UPGRADE_FAILED: The configurations of the bastion host fail to be changed.
LicenseCode String bhah_ent_50_asset

The license code of the bastion host.

PublicNetworkAccess Boolean true

Indicates whether the bastion host can be accessed from the Internet. Valid values:

  • true: The bastion host can be accessed from the Internet.
  • false: The bastion host cannot be accessed from the Internet.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeInstances
&PageNumber=1
&PageSize=10
&RegionId=cn-hangzhou
&InstanceStatus=RUNNING
&ResourceGroupId=rg-acfm26ougi****
&InstanceId=["2"]
&Tag=[{"Key":"test","Value":"testapi"}]
&<Common request parameters>

Sample success responses

XML format

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

<DescribeInstancesResponse>
    <TotalCount>4</TotalCount>
    <RequestId>61D36C55-AAFC-4678-8FAD-34FEF9E7182E</RequestId>
    <Instances>
        <VpcId>vpc-bp1c85tzgqu1bf5b****</VpcId>
        <VswitchId>vsw-bp1xfwzzfti0kjbf****</VswitchId>
        <ImageVersion>3.0.0</ImageVersion>
        <PlanCode>cloudbastion_ha</PlanCode>
        <Description>Test an operation.</Description>
        <ExpireTime>1578326400000</ExpireTime>
        <Legacy>false</Legacy>
        <InstanceId>bastionhost-cn-78v1gh****</InstanceId>
        <InternetEndpoint>drawvxalwb-public.bastionhost.aliyuncs.com</InternetEndpoint>
        <RegionId>cn-hangzhou</RegionId>
        <IntranetEndpoint>drawvxalwb.bastionhost.aliyuncs.com</IntranetEndpoint>
        <StartTime>1577681345000</StartTime>
        <ResourceGroupId>g-acfm26ougi****</ResourceGroupId>
        <InstanceStatus>RUNNING</InstanceStatus>
        <LicenseCode>bhah_ent_50_asset</LicenseCode>
        <PublicNetworkAccess>true</PublicNetworkAccess>
    </Instances>
</DescribeInstancesResponse>

JSON format

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

{
  "TotalCount" : 4,
  "RequestId" : "61D36C55-AAFC-4678-8FAD-34FEF9E7182E",
  "Instances" : [ {
    "VpcId" : "vpc-bp1c85tzgqu1bf5b****",
    "VswitchId" : "vsw-bp1xfwzzfti0kjbf****",
    "ImageVersion" : "3.0.0",
    "PlanCode" : "cloudbastion_ha",
    "Description" : "Test an operation.",
    "ExpireTime" : 1578326400000,
    "Legacy" : false,
    "InstanceId" : "bastionhost-cn-78v1gh****",
    "InternetEndpoint" : "drawvxalwb-public.bastionhost.aliyuncs.com",
    "RegionId" : "cn-hangzhou",
    "IntranetEndpoint" : "drawvxalwb.bastionhost.aliyuncs.com",
    "StartTime" : 1577681345000,
    "ResourceGroupId" : "g-acfm26ougi****",
    "InstanceStatus" : "RUNNING",
    "LicenseCode" : "bhah_ent_50_asset",
    "PublicNetworkAccess" : true
  } ]
}

Error codes

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