All Products
Search
Document Center

Virtual Private Cloud:ListVpcGatewayEndpoints

Last Updated:Nov 13, 2024

Queries gateway endpoints.

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:ListVpcGatewayEndpointslist
  • GatewayEndpoint
    acs:vpc:{#regionId}:{#accountId}:gatewayendpoint/*
  • GatewayEndpoint
    acs:vpc:{#regionId}:{#accountId}:gatewayendpoint/{#GatewayEndpointId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
EndpointIdstringNo

The ID of the gateway endpoint.

vpce-bp1i1212ss2whuwyw****
EndpointNamestringNo

The name of the gateway endpoint.

The name must be 1 to 128 characters in length.

test
ServiceNamestringNo

The name of the endpoint service.

com.aliyun.cn-hangzhou.oss
NextTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results. Valid values:

  • You do not need to specify this parameter for the first request.
  • If a value is returned for NextToken, specify the value in the next request to retrieve a new page of results.
FFmyTO70tTpLG6I3FmYAXGKPd****
MaxResultslongNo

The number of entries per page. Valid values: 1 to 100. Default value: 20.

20
RegionIdstringYes

The region ID of the gateway endpoint.

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

cn-hangzhou
ResourceGroupIdstringNo

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

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

The tag list.

objectNo
KeystringNo

The key of tag N added to the resource. You can specify at most 20 tag keys. It 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 value of tag N added to the resource. You can specify at most 20 tag values. The tag value can be an empty string.

The tag value cannot exceed 128 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://.

FinanceJoshua

Response parameters

ParameterTypeDescriptionExample
object

The request ID.

RequestIdstring

The request ID.

0AB1129F-32C1-5E4D-9E22-E4A859CA46EB
NextTokenstring

A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:

  • If no value is returned for NextToken, no next queries are sent.
  • If a value is returned for NextToken, the value can be used in the next request to retrieve a new page of results.
FFmyTO70tTpLG6I3FmYAXGKPd****
TotalCountlong

The number of entries returned.

10
Endpointsarray<object>

The list of gateway endpoints.

Endpointobject
EndpointIdstring

The ID of the gateway endpoint.

vpce-bp1i1212ss2whuwyw****
EndpointNamestring

The name of the gateway endpoint.

test
EndpointDescriptionstring

The description of the gateway endpoint.

test_description
ServiceNamestring

The name of the endpoint service.

com.aliyun.cn-hangzhou.oss
VpcIdstring

The ID of the virtual private cloud (VPC) to which the gateway endpoint belongs.

vpc-bp1gsk7h12ew7oegk****
PolicyDocumentstring

The access policy for the cloud service.

For more information about the syntax and structure of the access policy, see Policy syntax and structure.

{\n \"Version\": \"1\",\n \"Statement\": [\n {\n \"Effect\": \"Allow\",\n \"Action\": \"*\",\n \"Principal\": \"*\",\n \"Resource\": \"*\"\n }\n ]\n}
CreationTimestring

The time when the endpoint was created. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.

2021-09-08T08:43:04Z
EndpointStatusstring

The status of the gateway endpoint. Valid values:

  • Creating
  • Created
  • Modifying
  • Associating
  • Dissociating
  • Deleting
Created
AssociatedRouteTablesarray

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

RouteTablestring

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

vtb-bp1sme72jnuodvyx7****
ResourceGroupIdstring

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

rg-acfmxvfvazb4p****
Tagsarray<object>

The tag list.

Tagobject
Keystring

The key of tag N added to the resource.

FinanceDept
Valuestring

The value of tag N added to the resource.

FinanceJoshua
MaxResultslong

The number of entries per page.

20

Examples

Sample success responses

JSONformat

{
  "RequestId": "0AB1129F-32C1-5E4D-9E22-E4A859CA46EB",
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "TotalCount": 10,
  "Endpoints": [
    {
      "EndpointId": "vpce-bp1i1212ss2whuwyw****",
      "EndpointName": "test",
      "EndpointDescription": "test_description",
      "ServiceName": "com.aliyun.cn-hangzhou.oss",
      "VpcId": "vpc-bp1gsk7h12ew7oegk****",
      "PolicyDocument": "{\\n  \\\"Version\\\": \\\"1\\\",\\n  \\\"Statement\\\": [\\n    {\\n      \\\"Effect\\\": \\\"Allow\\\",\\n      \\\"Action\\\": \\\"*\\\",\\n      \\\"Principal\\\": \\\"*\\\",\\n      \\\"Resource\\\": \\\"*\\\"\\n    }\\n  ]\\n}",
      "CreationTime": "2021-09-08T08:43:04Z",
      "EndpointStatus": "Created",
      "AssociatedRouteTables": [
        "vtb-bp1sme72jnuodvyx7****"
      ],
      "ResourceGroupId": "rg-acfmxvfvazb4p****",
      "Tags": [
        {
          "Key": "FinanceDept",
          "Value": "FinanceJoshua"
        }
      ]
    }
  ],
  "MaxResults": 20
}

Error codes

HTTP status codeError codeError messageDescription
400IllegalParam.NextTokenThe specified NextToken is invalid.The specified NextToken is invalid.
400IllegalParam.MaxResultsThe param of MaxResults is illegal.-
400InvalidVpcId.NotFoundSpecified value of VpcId is not found in our record.The VPC does not exist. Check whether the specified VPC is valid.

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

Change history

Change timeSummary of changesOperation
2023-09-06The Error code has changedView Change Details
2023-06-13The Error code has changedView Change Details
2023-03-23The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details