All Products
Search
Document Center

Virtual Private Cloud:DescribeHaVips

Last Updated:Aug 29, 2024

Queries HAVIPs in a region.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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
vpc:DescribeHaVipsget
  • HaVip
    acs:vpc:{#regionId}:{#accountId}:havip/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the HAVIP.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
PageNumberintegerNo

The page number. Default value: 1.

1
PageSizeintegerNo

The number of entries per page. Maximum value: 50. Default value: 10.

10
Filterarray<object>No

The details of the filter condition.

objectNo
KeystringNo

The filter keys. You can specify at most five filter keys. Valid values of N: 1 to 5. The following filter keys are supported:

  • VpcId: virtual private cloud (VPC) ID
  • VSwitchId: vSwitch ID
  • Status: HAVIP status
  • HaVipId: HAVIP ID
  • HaVipAddress: HAVIP IP address

You can specify multiple values for each filter key. The logical operator among multiple values is OR. If one value is matched, the filter key is matched.

The logical operator among multiple filter keys is AND. HAVIPs can be queried only if all filter keys are matched.

HaVipId
ValuearrayNo

The value of the filter key. Valid values of N: 1 to 5.

stringNo

The filter values for filter keys. You can specify multiple filter values for one key. The logical operator between filter values is OR. If one filter value is matched, the filter key is matched.

Active
ResourceGroupIdstringNo

The ID of the resource group to which the HAVIP belongs.

rg-bp67acfmxazb4ph****
Tagsarray<object>No

The tag list.

objectNo
KeystringNo

The key of tag N to add to the resource. You can specify up to 20 tag keys. The tag key cannot be an empty string.

The tag key can be up to 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://.

FinanceDept
ValuestringNo

The value of tag N to add to the resource. You can specify at most 20 tag values. The tag value can be an empty string.

The tag value can be up to 128 characters in length and cannot contain http:// or https://. The tag value cannot start with aliyun or acs:.

FinanceJoshua

Response parameters

ParameterTypeDescriptionExample
object

The number of entries per page.

PageSizeinteger

The number of entries per page.

10
RequestIdstring

The request ID.

33E480C5-B46F-4CA5-B6FD-D77C746E86AB
PageNumberinteger

The page number.

1
TotalCountinteger

The number of entries returned.

1
HaVipsarray<object>

The details about the HAVIP.

object
VpcIdstring

The ID of the VPC to which the HAVIP belongs.

vpc-bp1kcm36tevkpms97****
Statusstring

The status of the HAVIP. Valid values:

  • Creating: The server group is being created.
  • Available: The FULLNAT entry is available.
  • Deleting
Available
HaVipIdstring

The ID of the HAVIP.

havip-bp149uyvut73dpld****
AssociatedInstanceTypestring

The type of the instance with which the HAVIP is associated. Valid values:

  • EcsInstance: Elastic Compute Service (ECS) instance
  • NetworkInterface: elastic network interface (ENI)
EcsInstance
CreateTimestring

The time when the HAVIP was created.

2021-07-03T14:25:26Z
ChargeTypestring

The parameter is invalid. No value is returned.

none
RegionIdstring

The ID of the region to which the HAVIP belongs.

cn-hangzhou
VSwitchIdstring

The ID of the vSwitch to which the HAVIP belongs.

vsw-bp1pkt1fba8e824ez****
IpAddressstring

The private IP address of the HAVIP.

192.168.24.5
Descriptionstring

The description of the HAVIP.

My HaVip
MasterInstanceIdstring

The ID of the active instance that is associated with the HAVIP.

i-bp145q7glnuzdvz****
Namestring

The name of the HAVIP.

test
AssociatedEipAddressesarray

The list of EIPs associated with the HAVIP.

string

The EIP that is associated with the HAVIP.

121.12.XX.XX
AssociatedInstancesarray

The information about the instance associated with the HAVIP.

string

The ID of the instance with which the HAVIP is associated.

i-bp145q7glnuzdvzu21****
ResourceGroupIdstring

The ID of the resource group to which the HAVIP belongs.

rg-bp67acfmxazb4ph****
Tagsarray<object>

The tag list.

object
Keystring

The key of tag N added to the resource.

FinanceDept
Valuestring

The value of tag N added to the resource.

FinanceJoshua

Examples

Sample success responses

JSONformat

{
  "PageSize": 10,
  "RequestId": "33E480C5-B46F-4CA5-B6FD-D77C746E86AB",
  "PageNumber": 1,
  "TotalCount": 1,
  "HaVips": {
    "HaVip": [
      {
        "VpcId": "vpc-bp1kcm36tevkpms97****",
        "Status": "Available",
        "HaVipId": "havip-bp149uyvut73dpld****",
        "AssociatedInstanceType": "EcsInstance",
        "CreateTime": "2021-07-03T14:25:26Z",
        "ChargeType": "none",
        "RegionId": "cn-hangzhou",
        "VSwitchId": "vsw-bp1pkt1fba8e824ez****",
        "IpAddress": "192.168.24.5",
        "Description": "My HaVip",
        "MasterInstanceId": "i-bp145q7glnuzdvz****",
        "Name": "test",
        "AssociatedEipAddresses": {
          "associatedEipAddresse": [
            "121.12.XX.XX"
          ]
        },
        "AssociatedInstances": {
          "associatedInstance": [
            "i-bp145q7glnuzdvzu21****"
          ]
        },
        "ResourceGroupId": "rg-bp67acfmxazb4ph****",
        "Tags": {
          "Tag": [
            {
              "Key": "FinanceDept",
              "Value": "FinanceJoshua"
            }
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400Forbidden.HaVipNo permissions to perform operations on HAVIPs. Please apply for privilege--vpc_privilege_allow_buy_havip_instance.The error message returned because you do not have the permissions to manage the HAVIP. Go to the Quota Center page to acquire the permissions.
404InvalidRegionId.NotFoundThe RegionId provided does not exist in our records.The RegionId parameter is set to an invalid value. Specify a valid value and try again.
404InvalidFilterKey.ValueNotSupportedSpecified filter key is not supported: Filter.X.keyFilter.X.key is not supported.

For a list of error codes, visit the Service error codes.