本文介绍如何修改IPsec连接信息。
# 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() # 配置待修改IPsec连接的信息。 modify_vpn_connection_attributes_request = volcenginesdkvpn.ModifyVpnConnectionAttributesRequest( vpn_connection_id="vgc-2bzvqi8kerd342dx0eg2f****", # 待修改IPsec连接的ID。 ) # 发起请求并处理返回或异常。 try: resp = api_instance.modify_vpn_connection_attributes(modify_vpn_connection_attributes_request) pprint(resp) except ApiException as e: print("Exception when calling api: %s\n" % e)