調用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

公網是否可訪問該Bastion Host。

樣本

請求樣本

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>新購Bastion Host</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":"新購Bastion Host",
			"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"
}

錯誤碼

訪問錯誤中心查看更多錯誤碼。