本文整理匯總了Python中sdk.UcloudApiClient.post方法的典型用法代碼示例。如果您正苦於以下問題:Python UcloudApiClient.post方法的具體用法?Python UcloudApiClient.post怎麽用?Python UcloudApiClient.post使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sdk.UcloudApiClient
的用法示例。
在下文中一共展示了UcloudApiClient.post方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1:
# 需要導入模塊: from sdk import UcloudApiClient [as 別名]
# 或者: from sdk.UcloudApiClient import post [as 別名]
offset = 0,
max_count = 100
)
if response['ret_code'] == 0:
print response
#獲取EIP列表
response = ApiClient.get('/uip/list')
if response['ret_code'] == 0:
print response
#綁定EIP到主機
response = ApiClient.post('/uip/associate',
vm_id = "$VM_INSTANCE_UUID",
eip_id = "$EIP_UUID"
)
if response['ret_code'] == 0:
print response
#從主機解綁EIP
response = ApiClient.post('/uip/disassociate',
vm_id = "$VM_INSTANCE_UUID",
eip_id = "$EIP_UUID"
)
if response['ret_code'] == 0:
print response