All Products
Search
Document Center

Platform For AI:ListGateway

Last Updated:Dec 16, 2024

Queries a list of private 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
eas:ListGatewaylist
*All Resources
*
    none
none

Request syntax

GET /api/v2/gateways HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
GatewayIdstringNo

The private gateway ID. To obtain the private gateway ID, see the private_gateway_id parameter in the response parameters of the ListResources operation.

gw-1uhcqmsc7x22******
PageNumberintegerNo

The page number. Default value: 1.

1
PageSizeintegerNo

The number of entries per page. Default value: 100.

100
GatewayNamestringNo

The private gateway alias.

mygateway1
ResourceNamestringNo

The ID of the resource group. To obtain a resource group ID, see the ResourceId field in the response of the ListResources operation.

eas-r-4gt8twzwllfo******

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

40325405-579C-4D82****
Gatewaysarray<object>

The private gateways.

gatewayListobject

The private gateway.

GatewayIdstring

The private gateway ID.

gw-1uhcqmsc7x22******
GatewayNamestring

The private gateway alias.

mygateway1
InstanceTypestring

The type of instances used for the private gateway.

2c4g
IntranetDomainstring

The internal endpoint.

gw-1uhcqmsc7x22******-1801786532******-vpc.cn-wulanchabu.pai-eas.aliyuncs.com
InternetEnabledboolean

Indicates whether Internet access is enabled.

true
InternetDomainstring

The public endpoint.

gw-1uhcqmsc7x22******-1801786532******.cn-wulanchabu.pai-eas.aliyuncs.com
CreateTimestring

The time when the private gateway was created. The time is displayed in UTC.

2020-05-19T14:19:42Z
UpdateTimestring

The time when the private gateway was updated. The time is displayed in UTC.

2021-02-24T11:52:17Z
Statusstring

The state of the private gateway.

Valid values:

  • Creating
  • Stopped
  • Failed
  • Running
  • Deleted
  • Deleting
  • Waiting
Running
Replicasinteger

The number of nodes in the private gateway.

2
IsDefaultboolean

Indicates whether it is the default private gateway.

true
ChargeTypestring

The billing method. Valid values:

  • PrePaid: subscription.
  • PostPaid: pay-as-you-go.
PostPaid
SSLRedirectionEnabledboolean

Specifies whether to enable HTTP to HTTPS redirection.

true
PageNumberinteger

The page number.

1
PageSizeinteger

The number of entries per page.

100
TotalCountlong

The total number of private gateways returned.

5

Examples

Sample success responses

JSONformat

{
  "RequestId": "40325405-579C-4D82****",
  "Gateways": [
    {
      "GatewayId": "gw-1uhcqmsc7x22******",
      "GatewayName": "mygateway1",
      "InstanceType": "2c4g",
      "IntranetDomain": "gw-1uhcqmsc7x22******-1801786532******-vpc.cn-wulanchabu.pai-eas.aliyuncs.com",
      "InternetEnabled": true,
      "InternetDomain": "gw-1uhcqmsc7x22******-1801786532******.cn-wulanchabu.pai-eas.aliyuncs.com",
      "CreateTime": "2020-05-19T14:19:42Z",
      "UpdateTime": "2021-02-24T11:52:17Z",
      "Status": "Running",
      "Replicas": 2,
      "IsDefault": true,
      "ChargeType": "PostPaid",
      "SSLRedirectionEnabled": true
    }
  ],
  "PageNumber": 1,
  "PageSize": 100,
  "TotalCount": 5
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-11-28The response structure of the API has changedView Change Details
2024-10-11The request parameters of the API has changed. The response structure of the API has changedView Change Details