Queries instances.

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.

PageSize Integer No 10

The number of entries to return on each page.

RegionId String No cn-hangzhou

The ID of the region.

InstanceStatus String No RUNNING

The status of the instance. Valid values:

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

The ID of the enterprise resource group to which the instance belongs.

InstanceId.N RepeatList No bastionhost-cn-78v1ghxxxxx

The ID of instance N.

Valid values of N: 1 to 20.

Tag.N.Key String No test

The key of tag N of the instance.

Valid values of N: 1 to 20.

Tag.N.Value String No testapi

The value of tag N of the instance.

Valid values of N: 1 to 20.

Response parameters

Parameter Type Example Description
RequestId String 61D36C55-AAFC-4678-8FAD-34FEF9E7182E

The ID of the request.

TotalCount Long 4

The total number of instances.

Instances Array

The information of instances.

RegionId String cn-hangzhou

The ID of the region.

InstanceId String bastionhost-cn-78v1ghxxxx

The ID of the instance.

InstanceStatus String RUNNING

The status of the instance.

Legacy Boolean false

Indicates whether the instance is of an earlier version. Valid values:

  • true: indicates an instance whose version is earlier than V3.2.
  • false: indicates an instance whose version is V3.2 or later.
VpcId String vpc-bp1c85tzgqu1bf5bxxxxx

The ID of the VPC to which the instance belongs.

VswitchId String vsw-bp1xfwzzfti0kjbfxxxxx

The ID of the VSwitch to which the instance belongs.

IntranetEndpoint String drawvxalwb.bastionhost.aliyuncs.com

The private endpoint.

InternetEndpoint String drawvxalwb-public.bastionhost.aliyuncs.com

The public endpoint.

StartTime Long 1577681345000

The time when the instance started.

ExpireTime Long 1578326400000

The time when the instance expires.

Description String Test API operation

The description of the instance.

LicenseCode String bhah_ent_50_asset

The license code.

PublicNetworkAccess Boolean true

Indicates whether the Bastionhost instance can be accessed over the Internet.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeInstances
&<Common request parameters>

Sample success responses

XML format

<DescribeInstancesResponse>
    <Instances>
        <LicenseCode>bhah_ent_50_asset</LicenseCode>
        <Description>Test API operation</Description>
        <VpcId>vpc-bp1c85tzgqu1bf5bxxxxx</VpcId>
        <InstanceId>bastionhost-cn-78v1ghxxxxx</InstanceId>
        <InstanceStatus>RUNNING</InstanceStatus>
        <Legacy>false</Legacy>
        <PublicNetworkAccess>true</PublicNetworkAccess>
        <InternetEndpoint>drawvxalwb-public.bastionhost.aliyuncs.com</InternetEndpoint>
        <StartTime>1577681345000</StartTime>
        <RegionId>cn-hangzhou</RegionId>
        <ExpireTime>1578326400000</ExpireTime>
        <VswitchId>vsw-bp1xfwzzfti0kjbfxxxxx</VswitchId>
        <IntranetEndpoint>drawvxalwb.bastionhost.aliyuncs.com</IntranetEndpoint>
    </Instances>
    <Instances>
        <LicenseCode>bhah_ent_50_asset</LicenseCode>
        <Description>Bastionhost purchase</Description>
        <InstanceId>bastionhost-cn-mp91g9xxxxx</InstanceId>
        <Legacy>false</Legacy>
        <StartTime>1577267277000</StartTime>
        <VswitchId>vsw-bp15stcuwjlrt5djxxxxx</VswitchId>
        <VpcId>vpc-bp1vejr1buxl12olxxxxx</VpcId>
        <InstanceStatus>RUNNING</InstanceStatus>
        <PublicNetworkAccess>true</PublicNetworkAccess>
        <InternetEndpoint>lwsnjuujmg-public.bastionhost.aliyuncs.com</InternetEndpoint>
        <RegionId>cn-hangzhou</RegionId>
        <ExpireTime>1580572800000</ExpireTime>
        <IntranetEndpoint>lwsnjuujmg.bastionhost.aliyuncs.com</IntranetEndpoint>
    </Instances>
    <Instances>
        <LicenseCode>bhah_ent_50_asset</LicenseCode>
        <VpcId>vpc-bp1c85tzgqu1bf5bxxxxx</VpcId>
        <InstanceId>bastionhost-cn-78v1g8xxxxx</InstanceId>
        <InstanceStatus>RUNNING</InstanceStatus>
        <Legacy>false</Legacy>
        <PublicNetworkAccess>true</PublicNetworkAccess>
        <InternetEndpoint>lfjlhrxyap-public.bastionhost.aliyuncs.com</InternetEndpoint>
        <StartTime>1577242757000</StartTime>
        <RegionId>cn-hangzhou</RegionId>
        <ExpireTime>1577894400000</ExpireTime>
        <VswitchId>vsw-bp1xfwzzfti0kjbfxxxxx</VswitchId>
        <IntranetEndpoint>lfjlhrxyap.bastionhost.aliyuncs.com</IntranetEndpoint>
    </Instances>
    <Instances>
        <EcsStatus>Running</EcsStatus>
        <LicenseCode>idle_license_20_asset</LicenseCode>
        <Description>Technical support</Description>
        <Renewable>true</Renewable>
        <InstanceId>bastionhost-cn-v6413dixxxxx</InstanceId>
        <Legacy>true</Legacy>
        <StartTime>1555643020000</StartTime>
        <PlanUpgradeStatus>0</PlanUpgradeStatus>
        <Upgradeable>false</Upgradeable>
        <IntranetIp>192.168.0.xx</IntranetIp>
        <VswitchId>vsw-bp1xfwzzfti0kjbfxxxxx</VswitchId>
        <UpgradeStatus>0</UpgradeStatus>
        <InternetIp>47.98.43.1xx</InternetIp>
        <VpcId>vpc-bp1c85tzgqu1bf5xxxxx</VpcId>
        <Operatable>false</Operatable>
        <InstanceStatus>RUNNING</InstanceStatus>
        <NetworkType>vpc</NetworkType>
        <PlanUpgradeable>true</PlanUpgradeable>
        <RegionId>cn-hangzhou</RegionId>
        <ExpireTime>1587312000000</ExpireTime>
        <ImageVersionName>V2.1.7</ImageVersionName>
    </Instances>
    <TotalCount>4</TotalCount>
    <RequestId>61D36C55-AAFC-4678-8FAD-34FEF9E7182E</RequestId>
</DescribeInstancesResponse>

JSON format

{
    "Instances":[
        {
            "LicenseCode":"bhah_ent_50_asset",
      "Description":"Test API operation",
            "VpcId":"vpc-bp1c85tzgqu1bf5bxxxxx",
            "InstanceId":"bastionhost-cn-78v1ghxxxxx",
            "InstanceStatus":"RUNNING",
            "Legacy":false,
            "PublicNetworkAccess":true,
            "InternetEndpoint":"drawvxalwb-public.bastionhost.aliyuncs.com",
            "StartTime":1577681345000,
            "RegionId":"cn-hangzhou",
            "ExpireTime":1578326400000,
            "VswitchId":"vsw-bp1xfwzzfti0kjbfxxxxx",
            "IntranetEndpoint":"drawvxalwb.bastionhost.aliyuncs.com"
        },
        {
            "LicenseCode":"bhah_ent_50_asset",
            "Description":"Bastionhost purchase",
            "InstanceId":"bastionhost-cn-mp91g9xxxxx",
            "Legacy":false,
            "StartTime":1577267277000,
            "VswitchId":"vsw-bp15stcuwjlrt5djxxxxx",
            "VpcId":"vpc-bp1vejr1buxl12olxxxxx",
            "InstanceStatus":"RUNNING",
            "PublicNetworkAccess":true,
            "InternetEndpoint":"lwsnjuujmg-public.bastionhost.aliyuncs.com",
            "RegionId":"cn-hangzhou",
            "ExpireTime":1580572800000,
            "IntranetEndpoint":"lwsnjuujmg.bastionhost.aliyuncs.com"
        },
        {
            "LicenseCode":"bhah_ent_50_asset",
            "VpcId":"vpc-bp1c85tzgqu1bf5bxxxxx",
            "InstanceId":"bastionhost-cn-78v1g8xxxxx",
            "InstanceStatus":"RUNNING",
            "Legacy":false,
            "PublicNetworkAccess":true,
            "InternetEndpoint":"lfjlhrxyap-public.bastionhost.aliyuncs.com",
            "StartTime":1577242757000,
            "RegionId":"cn-hangzhou",
            "ExpireTime":1577894400000,
            "VswitchId":"vsw-bp1xfwzzfti0kjbfxxxxx",
            "IntranetEndpoint":"lfjlhrxyap.bastionhost.aliyuncs.com"
        },
        {
            "EcsStatus":"Running",
            "LicenseCode":"idle_license_20_asset",
            "Description":"Technical support",
            "Renewable":true,
            "InstanceId":"bastionhost-cn-v6413dixxxxx",
            "Legacy":true,
            "StartTime":1555643020000,
            "PlanUpgradeStatus":0,
            "Upgradeable":false,
            "IntranetIp":"192.168.0.xx",
            "VswitchId":"vsw-bp1xfwzzfti0kjbfxxxxx",
            "UpgradeStatus":0,
            "InternetIp":"47.98.43.1xx",
            "VpcId":"vpc-bp1c85tzgqu1bf5xxxxx",
            "Operatable":false,
            "InstanceStatus":"RUNNING",
            "NetworkType":"vpc",
            "PlanUpgradeable":true,
            "RegionId":"cn-hangzhou",
            "ExpireTime":1587312000000,
            "ImageVersionName":"V2.1.7"
        }
    ],
    "TotalCount":4,
    "RequestId":"61D36C55-AAFC-4678-8FAD-34FEF9E7182E"
}

Error codes

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