You need to enable JavaScript to run this app.
导航
删除VPN网关路由条目
最近更新时间:2023.07.05 15:21:26首次发布时间:2023.07.05 15:21:26

本文介绍如何删除VPN网关目的路由条目。

示例代码

# Example Code generated by Beijing Volcanoengine Technology.
from __future__ import print_function
import volcenginesdkcore
import volcenginesdkvpn
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 = volcenginesdkvpn.VPNApi()
    # 配置待删除VPN网关路由条目的参数。
    delete_vpn_gateway_route_request = volcenginesdkvpn.DeleteVpnGatewayRouteRequest(
        vpn_gateway_route_id="vgr-7qthudw0ll6jmc****", # 待删除VPN网关路由条目的ID。
    )

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

相关文档

SDK源码:example_delete_vpn_gateway_route_2020-04-01.py
API接口:DeleteVpnGatewayRoute