You need to enable JavaScript to run this app.
导航

ListListeners

最近更新时间2022.09.01 11:30:06

首次发布时间2022.09.01 11:30:06

API说明

API 名称:ListListeners。
API 域名:open.volcengineapi.com 。
API 描述:列举监听列表。

URI 参数

在使用该部分 API 提交请求时必须包含以下 URI 参数。

除了 URI 参数,该 API 请求还需要包含签名参数。关于更多签名参数的信息,参见公共请求参数

名称类型是否必选格式说明
Action
string
[a-zA-Z]+
API 名称。
VersionstringYYYY-MM-DDAPI 版本信息。该参数的取值是 2022-03-01 。

请求正文

参数类型是否必选参数说明示例
AcceleratorId
string
加速器 ID 。
ga-ghdasgh***
PageNumint页码,默认1。1
PageSizeint页面大小,默认10。10

响应正文

参数类型参数说明示例
TotalCount
int
监听总个数。
10
PageNumint页码,默认为1。1
PageSizeint页面大小,默认为10。10
Listenersarray of Listener监听列表。Listener

Listener

参数类型参数说明示例
ListenerId
string
监听 ID 。
lst-ghdasgh***
AcceleratorIdstring加速器 ID 。ga-ghdasgh***
CreateTimelong创建监听的时间,时间戳。1643155486
Namestring监听的名称。test_pf
Protocolstring监听协议,具体支持:TCP、UDP 。TCP

State

string

监听的状态,支持取值:

  • active:正常。
  • deploying:配置中。
  • Inactive:待配置。

active

EnableAffinity

bool

是否开启客户端亲和性,默认不开启,支持取值:

  • true:开启。
  • false:不开启。

false

PortRangesarray of PortRange监听端口。PortRange
AccountIDstring账户ID2100055193

PortRange

参数类型参数说明示例值
FromPort
int
起始端口。
80
ToPortint终止端口。81

示例

请求示例

POST https://open.volcengineapi.com/?Version=2022-03-01&Action=ListListeners&<其他公共请求参数>
{
    "AcceleratorId": "accinstance-zGHoYhWixBusRXtM2pC2UH",
    "PageNum": 1,
    "PageSize": 10,
    "State": ""
}

响应示例

{
    "ResponseMetadata": {
        "RequestId": "202208061634080102252431390137AA27",
        "Action": "ListListeners",
        "Version": "2022-03-01",
        "Service": "ga",
        "Region": "cn-north-1"
    },
    "Result": {
        "Listeners": [
            {
                "AcceleratorId": "accinstance-zGHoYhWixBusRXtM2pC2UH",
                "ListenerId": "listener-BBL7ACekxpY94mvkExYwMb",
                "CreateTime": 1654683362,
                "Name": "",
                "Protocol": "UDP",
                "State": "active",
                "PortRanges": [
                    {
                        "FromPort": 34,
                        "ToPort": 34
                    }
                ],
                "EnableAffinity": false,
                "AccountID": "2100055193"
            },
            {
                "AcceleratorId": "accinstance-zGHoYhWixBusRXtM2pC2UH",
                "ListenerId": "listener-mCKv3LhPBfKABE782H8nrH",
                "CreateTime": 1655124958,
                "Name": "",
                "Protocol": "UDP",
                "State": "active",
                "PortRanges": [
                    {
                        "FromPort": 36,
                        "ToPort": 36
                    }
                ],
                "EnableAffinity": false,
                "AccountID": "2100055193"
            },
            {
                "AcceleratorId": "accinstance-zGHoYhWixBusRXtM2pC2UH",
                "ListenerId": "listener-yrGx4hbk8kUjENhWtRqKnP",
                "CreateTime": 1655178094,
                "Name": "测试",
                "Protocol": "TCP",
                "State": "active",
                "PortRanges": [
                    {
                        "FromPort": 70,
                        "ToPort": 70
                    }
                ],
                "EnableAffinity": false,
                "AccountID": "2100055193"
            }
        ],
        "TotalCount": 3,
        "PageSize": 10,
        "PageNum": 1
    }
}