All Products
Search
Document Center

Virtual Private Cloud:ListIpv4Gateways

Last Updated:Nov 13, 2024

Queries IPv4 gateways.

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
vpc:ListIpv4Gatewayslist
  • Ipv4Gateway
    acs:vpc:{#regionId}:{#accountId}:ipv4gateway/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region where the IPv4 gateways to be queried are deployed.

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

ap-southeast-6
MaxResultsintegerNo

The number of entries to return on each page. Valid values: 1 to 100. Default value: 10.

10
NextTokenstringNo

The token that is used for the next query. Valid values:

  • If this is your first query and no next queries are to be sent, ignore this parameter.
  • If a next query is to be sent, set the value to the value of NextToken that is returned from the last call.
FFmyTO70tTpLG6I3FmYAXGKPd****
VpcIdstringNo

The ID of the virtual private cloud (VPC) with which the IPv4 gateway is associated.

vpc-5tsrxlw7dv074gci4****
Ipv4GatewayIdstringNo

The ID of the IPv4 gateway.

ipv4gw-5tsnc6s4ogsedtp3k****
Ipv4GatewayNamestringNo

The name of the IPv4 gateway.

The name must be 1 to 128 characters in length, and cannot start with http:// or https://.

name
ResourceGroupIdstringNo

The ID of the resource group to which the IPv4 gateway belongs.

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

The tags of the resource.

objectNo

The tags of the resource.

KeystringNo

The tag key. You can specify at most 20 tag keys. The tag key cannot be an empty string.

The key cannot exceed 64 characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). The key must start with a letter but cannot start with aliyun or acs:. The key cannot contain http:// or https://.

FinanceDept
ValuestringNo

The tag value. You can specify at most 20 tag values. It can be an empty string.

The tag value cannot exceed 128 characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter but cannot start with aliyun or acs:. It cannot contain http:// or https://.

FinanceJoshua

Response parameters

ParameterTypeDescriptionExample
object
NextTokenstring

The token that is used for the next query. Valid values:

  • If no value is returned for NextToken, no next queries are sent.
  • If a value of NextToken is returned, the value is the token that is used for the subsequent query.
FFmyTO70tTpLG6I3FmYAXGKPd****
RequestIdstring

The ID of the request.

2D265800-E306-529C-8418-84B0A1D201DB
TotalCountstring

The total number of entries returned.

1
Ipv4GatewayModelsarray<object>

The list of IPv4 gateways.

Ipv4GatewayModelsobject
VpcIdstring

The ID of the VPC with which the IPv4 gateways are associated.

vpc-5tsrxlw7dv074gci4****
Statusstring

The status of the IPv4 gateway. Valid values:

  • Creating
  • Created
  • Modifying
  • Deleting
  • Deleted
Created
Ipv4GatewayIdstring

The ID of the IPv4 gateway.

ipv4gw-5tsnc6s4ogsedtp3k****
Ipv4GatewayDescriptionstring

The description of the IPv4 gateway.

test
Enabledboolean

Indicates whether the IPv4 gateway is activated. Valid values:

  • true: yes
  • false: no
true
GmtCreatestring

The time when the IPv4 gateway was created.

2021-12-02T07:07:35Z
Ipv4GatewayRouteTableIdstring

The ID of the route table associated with the IPv4 gateway.

vtb-5ts0ohchwkp3dydt2****
Ipv4GatewayNamestring

The name of the IPv4 gateway.

name
ResourceGroupIdstring

The ID of the resource group to which the IPv4 gateway belongs.

rg-bp67acfmxazb4ph****
Tagsarray<object>

The list of tags that are added to the resource group.

Tagobject
Keystring

The tag key.

FinanceDept
Valuestring

The tag value.

FinanceJoshua

Examples

Sample success responses

JSONformat

{
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "RequestId": "2D265800-E306-529C-8418-84B0A1D201DB",
  "TotalCount": "1",
  "Ipv4GatewayModels": [
    {
      "VpcId": "vpc-5tsrxlw7dv074gci4****",
      "Status": "Created",
      "Ipv4GatewayId": "ipv4gw-5tsnc6s4ogsedtp3k****",
      "Ipv4GatewayDescription": "test",
      "Enabled": true,
      "GmtCreate": "2021-12-02T07:07:35Z",
      "Ipv4GatewayRouteTableId": "vtb-5ts0ohchwkp3dydt2****",
      "Ipv4GatewayName": "name",
      "ResourceGroupId": "rg-bp67acfmxazb4ph****",
      "Tags": [
        {
          "Key": "FinanceDept",
          "Value": "FinanceJoshua"
        }
      ]
    }
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-07-31The Error code has changedView Change Details
2023-08-07The internal configuration of the API is changed, but the call is not affectedView Change Details