def DeleteAutoSnapshotPolicies(self, request): """本接口(DeleteAutoSnapshotPolicies)用于删除定期快照策略。 * 支持批量操作。如果多个定期快照策略存在无法删除的,则操作不执行,以特定错误码返回。 :param request: Request instance for DeleteAutoSnapshotPolicies. :type request: :class:`tencentcloud.cbs.v20170312.models.DeleteAutoSnapshotPoliciesRequest` :rtype: :class:`tencentcloud.cbs.v20170312.models.DeleteAutoSnapshotPoliciesResponse` """ try: params = request._serialize() body = self.call("DeleteAutoSnapshotPolicies", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.DeleteAutoSnapshotPoliciesResponse() model._deserialize(response["Response"]) return model else: code = response["Response"]["Error"]["Code"] message = response["Response"]["Error"]["Message"] reqid = response["Response"]["RequestId"] raise TencentCloudSDKException(code, message, reqid) except Exception as e: if isinstance(e, TencentCloudSDKException): raise else: raise TencentCloudSDKException(e.message, e.message)
def DeleteAutoSnapshotPolicies(self, request): """This API (DeleteAutoSnapshotPolicies) is used to delete scheduled snapshot policies. * Batch operations are supported. If one of the scheduled snapshot policies in a batch cannot be deleted, the operation is not performed and a specific error code is returned. :param request: Request instance for DeleteAutoSnapshotPolicies. :type request: :class:`tencentcloud.cbs.v20170312.models.DeleteAutoSnapshotPoliciesRequest` :rtype: :class:`tencentcloud.cbs.v20170312.models.DeleteAutoSnapshotPoliciesResponse` """ try: params = request._serialize() body = self.call("DeleteAutoSnapshotPolicies", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.DeleteAutoSnapshotPoliciesResponse() model._deserialize(response["Response"]) return model else: code = response["Response"]["Error"]["Code"] message = response["Response"]["Error"]["Message"] reqid = response["Response"]["RequestId"] raise TencentCloudSDKException(code, message, reqid) except Exception as e: if isinstance(e, TencentCloudSDKException): raise else: raise TencentCloudSDKException(e.message, e.message)