All Products
Search
Document Center

Bastionhost:DescribeInstances

Last Updated:Nov 27, 2024

Queries bastion hosts.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-bastionhost:DescribeInstanceBastionhostget
*Instance
acs:yundun-bastionhost:{#regionId}:{#accountId}:instance/{#InstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
PageNumberintegerNo

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

1
PageSizeintegerNo

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

10
RegionIdstringNo

The region ID of the bastion host.

cn-hangzhou
InstanceStatusstringNo

The status 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.
RUNNING
ResourceGroupIdstringNo

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

rg-acfm26ougi****
InstanceIdarrayNo

An array that consists of the IDs of the bastion hosts.

stringNo

The ID of the bastion host.

2
Tagarray<object>No

An array consisting of the tags that are added to the bastion hosts.

objectNo

The tag that is added to the bastion host.

KeystringNo

The key of the tag.

test
ValuestringNo

The value of the tag.

testapi

Response parameters

ParameterTypeDescriptionExample
object
TotalCountlong

The total number of bastion hosts that are queried.

4
RequestIdstring

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

61D36C55-AAFC-4678-8FAD-34FEF9E7182E
Instancesarray<object>

An array that consists of the bastion hosts returned.

Instanceobject
VpcIdstring

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

vpc-bp1c85tzgqu1bf5b****
VswitchIdstring

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

vsw-bp1xfwzzfti0kjbf****
ImageVersionstring

The image version of the bastion host.

3.0.0
PlanCodestring

The edition of the bastion host. Valid values:

  • cloudbastion: Basic Edition.
  • cloudbastion_ha: Enterprise Edition.
cloudbastion_ha
Descriptionstring

The remarks of the bastion host.

Test API
ExpireTimelong

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

1578326400000
Legacyboolean

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

  • true: The bastion host runs V2 or V3.1.
  • false: The bastion host runs V3.2.
false
InstanceIdstring

The bastion host ID.

bastionhost-cn-78v1gh****
InternetEndpointstring

The public O&M address of the bastion host.

drawvxalwb-public.bastionhost.aliyuncs.com
RegionIdstring

The region ID of the bastion host.

cn-hangzhou
IntranetEndpointstring

The private O&M address of the bastion host.

drawvxalwb.bastionhost.aliyuncs.com
StartTimelong

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

1577681345000
ResourceGroupIdstring

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

g-acfm26ougi****
InstanceStatusstring

The status 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.
RUNNING
LicenseCodestring

The license code of the bastion host.

bhah_ent_50_asset
PublicNetworkAccessboolean

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

  • true
  • false
true

Examples

Sample success responses

JSONformat

{
  "TotalCount": 4,
  "RequestId": "61D36C55-AAFC-4678-8FAD-34FEF9E7182E",
  "Instances": [
    {
      "VpcId": "vpc-bp1c85tzgqu1bf5b****",
      "VswitchId": "vsw-bp1xfwzzfti0kjbf****",
      "ImageVersion": "3.0.0",
      "PlanCode": "cloudbastion_ha",
      "Description": "Test API\n",
      "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 Service error codes.