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

查看路由信息

最近更新时间2023.07.07 14:27:51

首次发布时间2023.06.27 15:39:07

本文介绍如何查看云企业网的路由信息。

示例代码

from __future__ import print_function
import volcenginesdkcore
import volcenginesdkcen
from pprint import pprint
from volcenginesdkcore.rest import ApiException

if __name__ == '__main__':
    configuration = volcenginesdkcore.Configuration()
    #设置您的ak
    configuration.ak = "AK"
    #设置您的sk
    configuration.sk = "SK"
    #设置您要访问的地域
    configuration.region = "cn-beijing"
    #设置默认配置
    volcenginesdkcore.Configuration.set_default(configuration)

    #使用全局默认配置
    api_instance = volcenginesdkcen.CENApi()
    #创建一个DescribeCenRouteEntries接口
    describe_cen_route_entries_request = volcenginesdkcen.DescribeCenRouteEntriesRequest(
        page_number=1, # 列表的页码
        page_size=20,  # 分页查询时每页的行数
    )

        #发起请求并处理返回或异常
        try:
        resp = api_instance.describe_cen_route_entries(describe_cen_route_entries_request)
        pprint(resp)
    except ApiException as e:
        print("Exception when calling api: %s\n" % e)

相关文档