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

删除云企业网实例

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

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

本文介绍如何删除指定的CEN实例。

示例代码

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()
    #删除指定的CEN实例
    delete_cen_request = volcenginesdkcen.DeleteCenRequest(
        cen_id="cen-7qthudw0ll6jmc****",  # CEN实例的ID
    )

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

相关文档