调用DescribeInstances查询实例的列表信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeInstances

要执行的操作。

取值:DescribeInstances。

PageNumber Integer 1

实例列表的当前页码。

PageSize Integer 10

输入时设置的每页行数。

RegionId String cn-hangzhou

地域ID。

InstanceStatus String RUNNING

实例状态。取值范围:

  • PENDING:未初始化
  • CREATING:创建中
  • RUNNING:运行中
  • EXPIRED:已过期
  • CREATE_FAILED:创建失败
  • UPGRADING:变配中
  • UPGRADE_FAILED:变配失败
ResourceGroupId String rg-acfm26ougixxxxx

实例所在的企业资源组ID。

InstanceId.N RepeatList bastionhost-cn-78v1ghxxxxx

实例ID。

N的取值范围:1~20。

Tag.N.Key String test

实例的标签键。

N的取值范围:1~20。

Tag.N.Value String testapi

实例的标签值。

N的取值范围:1~20。

返回数据

名称 类型 示例值 描述
RequestId String 61D36C55-AAFC-4678-8FAD-34FEF9E7182E

请求ID。

TotalCount Long 4

实例总数量。

Instances Array

实例列表信息。

RegionId String cn-hangzhou

地域ID。

InstanceId String bastionhost-cn-78v1ghxxxx

实例ID。

InstanceStatus String RUNNING

实例状态。

Legacy Boolean false

是否是老实例。取值范围:

  • true 表示旧实例,是指老版oem平台承载的实例
  • false 表示新实例,是指新版csm平台承载的实例
VpcId String vpc-bp1c85tzgqu1bf5bxxxxx

实例绑定的VPC ID。

VswitchId String vsw-bp1xfwzzfti0kjbfxxxxx

实例绑定的交换机ID。

IntranetEndpoint String drawvxalwb.bastionhost.aliyuncs.com

私网域名。

InternetEndpoint String drawvxalwb-public.bastionhost.aliyuncs.com

公网域名。

StartTime Long 1577681345000

实例的开始时间。

ExpireTime Long 1578326400000

过期时间。

Description String 测试API

备注信息。

LicenseCode String bhah_ent_50_asset

许可Code。

PublicNetworkAccess Boolean true

公网是否可访问该堡垒机。

示例

请求示例

http(s)://[Endpoint]/?Action=DescribeInstances
&<公共请求参数>

正常返回示例

XML 格式

<Instances>
    <LicenseCode>bhah_ent_50_asset</LicenseCode>
    <Description>测试API</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>新购堡垒机</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>何佳林_技术支持</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>

JSON 格式

{
	"Instances":[
		{
			"LicenseCode":"bhah_ent_50_asset",
      "Description":"测试API",
			"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":"新购堡垒机",
			"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":"何佳林_技术支持",
			"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"
}

错误码

访问错误中心查看更多错误码。