本文介绍如何创建专线网关。
# Example Code generated by Beijing Volcanoengine Technology. from __future__ import print_function import volcenginesdkcore import volcenginesdkdirectconnect 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 = volcenginesdkdirectconnect.DIRECTCONNECTApi() # 配置待创建专线网关的参数。 create_direct_connect_gateway_request = volcenginesdkdirectconnect.CreateDirectConnectGatewayRequest( description="test", # 设置专线网关的描述。 direct_connect_gateway_name="test", # 设置专线网关的名称。 ) # 发起请求并处理返回或异常。 try: resp = api_instance.create_direct_connect_gateway(create_direct_connect_gateway_request) pprint(resp) except ApiException as e: print("Exception when calling api: %s\n" % e)