huaweicloud-sdk-python-v3/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/cbr_client.py

2161 lines
66 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# coding: utf-8
from __future__ import absolute_import
import datetime
import re
import importlib
import six
from huaweicloudsdkcore.client import Client, ClientBuilder
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdkcore.utils import http_utils
from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest
class CbrClient(Client):
"""
:param configuration: .Configuration object for this client
:param pool_threads: The number of threads to use for async requests
to the API. More threads means more concurrent API requests.
"""
PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types
NATIVE_TYPES_MAPPING = {
'int': int,
'long': int if six.PY3 else long,
'float': float,
'str': str,
'bool': bool,
'date': datetime.date,
'datetime': datetime.datetime,
'object': object,
}
def __init__(self):
super(CbrClient, self).__init__()
self.model_package = importlib.import_module("huaweicloudsdkcbr.v1.model")
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
@staticmethod
def new_builder(clazz):
return ClientBuilder(clazz)
def add_member(self, request):
"""添加备份成员
添加备份可共享的成员,只有云服务器备份可以添加备份共享成员,且仅支持在同一区域的不同用户间共享。
:param AddMemberRequest request
:return: AddMemberResponse
"""
return self.add_member_with_http_info(request)
def add_member_with_http_info(self, request):
"""添加备份成员
添加备份可共享的成员,只有云服务器备份可以添加备份共享成员,且仅支持在同一区域的不同用户间共享。
:param AddMemberRequest request
:return: AddMemberResponse
"""
all_params = ['backup_id', 'add_member_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'backup_id' in local_var_params:
path_params['backup_id'] = local_var_params['backup_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/backups/{backup_id}/members',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='AddMemberResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def add_vault_resource(self, request):
"""添加资源
存储库添加资源
:param AddVaultResourceRequest request
:return: AddVaultResourceResponse
"""
return self.add_vault_resource_with_http_info(request)
def add_vault_resource_with_http_info(self, request):
"""添加资源
存储库添加资源
:param AddVaultResourceRequest request
:return: AddVaultResourceResponse
"""
all_params = ['vault_id', 'add_vault_resource_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'vault_id' in local_var_params:
path_params['vault_id'] = local_var_params['vault_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/vaults/{vault_id}/addresources',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='AddVaultResourceResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def associate_vault_policy(self, request):
"""设置存储库策略
存储库设置策略
:param AssociateVaultPolicyRequest request
:return: AssociateVaultPolicyResponse
"""
return self.associate_vault_policy_with_http_info(request)
def associate_vault_policy_with_http_info(self, request):
"""设置存储库策略
存储库设置策略
:param AssociateVaultPolicyRequest request
:return: AssociateVaultPolicyResponse
"""
all_params = ['vault_id', 'associate_vault_policy_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'vault_id' in local_var_params:
path_params['vault_id'] = local_var_params['vault_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/vaults/{vault_id}/associatepolicy',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='AssociateVaultPolicyResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def copy_backup(self, request):
"""复制备份
跨区域复制备份。
:param CopyBackupRequest request
:return: CopyBackupResponse
"""
return self.copy_backup_with_http_info(request)
def copy_backup_with_http_info(self, request):
"""复制备份
跨区域复制备份。
:param CopyBackupRequest request
:return: CopyBackupResponse
"""
all_params = ['backup_id', 'copy_backup_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'backup_id' in local_var_params:
path_params['backup_id'] = local_var_params['backup_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/backups/{backup_id}/replicate',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='CopyBackupResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def copy_checkpoint(self, request):
"""复制备份还原点
执行复制
:param CopyCheckpointRequest request
:return: CopyCheckpointResponse
"""
return self.copy_checkpoint_with_http_info(request)
def copy_checkpoint_with_http_info(self, request):
"""复制备份还原点
执行复制
:param CopyCheckpointRequest request
:return: CopyCheckpointResponse
"""
all_params = ['copy_checkpoint_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/checkpoints/replicate',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='CopyCheckpointResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def create_checkpoint(self, request):
"""创建备份还原点
对存储库执行备份,生成备份还原点
:param CreateCheckpointRequest request
:return: CreateCheckpointResponse
"""
return self.create_checkpoint_with_http_info(request)
def create_checkpoint_with_http_info(self, request):
"""创建备份还原点
对存储库执行备份,生成备份还原点
:param CreateCheckpointRequest request
:return: CreateCheckpointResponse
"""
all_params = ['create_checkpoint_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/checkpoints',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='CreateCheckpointResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def create_policy(self, request):
"""创建策略
[创建策略,策略分为备份策略和复制策略。](tag:hws,hws_hk) [创建备份策略。](tag:dt,ocb,tlf,sbc,fcs_vm,ctc)
:param CreatePolicyRequest request
:return: CreatePolicyResponse
"""
return self.create_policy_with_http_info(request)
def create_policy_with_http_info(self, request):
"""创建策略
[创建策略,策略分为备份策略和复制策略。](tag:hws,hws_hk) [创建备份策略。](tag:dt,ocb,tlf,sbc,fcs_vm,ctc)
:param CreatePolicyRequest request
:return: CreatePolicyResponse
"""
all_params = ['create_policy_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/policies',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='CreatePolicyResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def create_vault(self, request):
"""创建存储库
创建存储库
:param CreateVaultRequest request
:return: CreateVaultResponse
"""
return self.create_vault_with_http_info(request)
def create_vault_with_http_info(self, request):
"""创建存储库
创建存储库
:param CreateVaultRequest request
:return: CreateVaultResponse
"""
all_params = ['create_vault_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/vaults',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='CreateVaultResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def delete_backup(self, request):
"""删除备份
删除单个备份。
:param DeleteBackupRequest request
:return: DeleteBackupResponse
"""
return self.delete_backup_with_http_info(request)
def delete_backup_with_http_info(self, request):
"""删除备份
删除单个备份。
:param DeleteBackupRequest request
:return: DeleteBackupResponse
"""
all_params = ['backup_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'backup_id' in local_var_params:
path_params['backup_id'] = local_var_params['backup_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/backups/{backup_id}',
method='DELETE',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='DeleteBackupResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def delete_member(self, request):
"""删除指定备份成员
删除指定的备份共享成员
:param DeleteMemberRequest request
:return: DeleteMemberResponse
"""
return self.delete_member_with_http_info(request)
def delete_member_with_http_info(self, request):
"""删除指定备份成员
删除指定的备份共享成员
:param DeleteMemberRequest request
:return: DeleteMemberResponse
"""
all_params = ['backup_id', 'member_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'backup_id' in local_var_params:
path_params['backup_id'] = local_var_params['backup_id']
if 'member_id' in local_var_params:
path_params['member_id'] = local_var_params['member_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/backups/{backup_id}/members/{member_id}',
method='DELETE',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='DeleteMemberResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def delete_policy(self, request):
"""删除策略
删除策略
:param DeletePolicyRequest request
:return: DeletePolicyResponse
"""
return self.delete_policy_with_http_info(request)
def delete_policy_with_http_info(self, request):
"""删除策略
删除策略
:param DeletePolicyRequest request
:return: DeletePolicyResponse
"""
all_params = ['policy_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'policy_id' in local_var_params:
path_params['policy_id'] = local_var_params['policy_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/policies/{policy_id}',
method='DELETE',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='DeletePolicyResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def delete_vault(self, request):
"""删除存储库
删除存储库。若删除储存库,将一并删除存储库中的所有备份。
:param DeleteVaultRequest request
:return: DeleteVaultResponse
"""
return self.delete_vault_with_http_info(request)
def delete_vault_with_http_info(self, request):
"""删除存储库
删除存储库。若删除储存库,将一并删除存储库中的所有备份。
:param DeleteVaultRequest request
:return: DeleteVaultResponse
"""
all_params = ['vault_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'vault_id' in local_var_params:
path_params['vault_id'] = local_var_params['vault_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/vaults/{vault_id}',
method='DELETE',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='DeleteVaultResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def disassociate_vault_policy(self, request):
"""解除存储库策略
存储库解除策略
:param DisassociateVaultPolicyRequest request
:return: DisassociateVaultPolicyResponse
"""
return self.disassociate_vault_policy_with_http_info(request)
def disassociate_vault_policy_with_http_info(self, request):
"""解除存储库策略
存储库解除策略
:param DisassociateVaultPolicyRequest request
:return: DisassociateVaultPolicyResponse
"""
all_params = ['vault_id', 'disassociate_vault_policy_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'vault_id' in local_var_params:
path_params['vault_id'] = local_var_params['vault_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/vaults/{vault_id}/dissociatepolicy',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='DisassociateVaultPolicyResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def import_backup(self, request):
"""同步备份
同步备份副本
:param ImportBackupRequest request
:return: ImportBackupResponse
"""
return self.import_backup_with_http_info(request)
def import_backup_with_http_info(self, request):
"""同步备份
同步备份副本
:param ImportBackupRequest request
:return: ImportBackupResponse
"""
all_params = ['import_backup_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/backups/sync',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ImportBackupResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_backups(self, request):
"""查询所有备份
查询所有副本
:param ListBackupsRequest request
:return: ListBackupsResponse
"""
return self.list_backups_with_http_info(request)
def list_backups_with_http_info(self, request):
"""查询所有备份
查询所有副本
:param ListBackupsRequest request
:return: ListBackupsResponse
"""
all_params = ['checkpoint_id', 'dec', 'end_time', 'image_type', 'limit', 'marker', 'name', 'offset', 'resource_az', 'resource_id', 'resource_name', 'resource_type', 'sort', 'start_time', 'status', 'vault_id', 'enterprise_project_id', 'own_type', 'member_status', 'parent_id', 'used_percent']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
if 'checkpoint_id' in local_var_params:
query_params.append(('checkpoint_id', local_var_params['checkpoint_id']))
if 'dec' in local_var_params:
query_params.append(('dec', local_var_params['dec']))
if 'end_time' in local_var_params:
query_params.append(('end_time', local_var_params['end_time']))
if 'image_type' in local_var_params:
query_params.append(('image_type', local_var_params['image_type']))
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit']))
if 'marker' in local_var_params:
query_params.append(('marker', local_var_params['marker']))
if 'name' in local_var_params:
query_params.append(('name', local_var_params['name']))
if 'offset' in local_var_params:
query_params.append(('offset', local_var_params['offset']))
if 'resource_az' in local_var_params:
query_params.append(('resource_az', local_var_params['resource_az']))
if 'resource_id' in local_var_params:
query_params.append(('resource_id', local_var_params['resource_id']))
if 'resource_name' in local_var_params:
query_params.append(('resource_name', local_var_params['resource_name']))
if 'resource_type' in local_var_params:
query_params.append(('resource_type', local_var_params['resource_type']))
if 'sort' in local_var_params:
query_params.append(('sort', local_var_params['sort']))
if 'start_time' in local_var_params:
query_params.append(('start_time', local_var_params['start_time']))
if 'status' in local_var_params:
query_params.append(('status', local_var_params['status']))
if 'vault_id' in local_var_params:
query_params.append(('vault_id', local_var_params['vault_id']))
if 'enterprise_project_id' in local_var_params:
query_params.append(('enterprise_project_id', local_var_params['enterprise_project_id']))
if 'own_type' in local_var_params:
query_params.append(('own_type', local_var_params['own_type']))
if 'member_status' in local_var_params:
query_params.append(('member_status', local_var_params['member_status']))
if 'parent_id' in local_var_params:
query_params.append(('parent_id', local_var_params['parent_id']))
if 'used_percent' in local_var_params:
query_params.append(('used_percent', local_var_params['used_percent']))
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/backups',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListBackupsResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_op_logs(self, request):
"""查询任务列表
查询任务列表
:param ListOpLogsRequest request
:return: ListOpLogsResponse
"""
return self.list_op_logs_with_http_info(request)
def list_op_logs_with_http_info(self, request):
"""查询任务列表
查询任务列表
:param ListOpLogsRequest request
:return: ListOpLogsResponse
"""
all_params = ['end_time', 'limit', 'offset', 'operation_type', 'provider_id', 'resource_id', 'resource_name', 'start_time', 'status', 'vault_id', 'vault_name', 'enterprise_project_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
if 'end_time' in local_var_params:
query_params.append(('end_time', local_var_params['end_time']))
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit']))
if 'offset' in local_var_params:
query_params.append(('offset', local_var_params['offset']))
if 'operation_type' in local_var_params:
query_params.append(('operation_type', local_var_params['operation_type']))
if 'provider_id' in local_var_params:
query_params.append(('provider_id', local_var_params['provider_id']))
if 'resource_id' in local_var_params:
query_params.append(('resource_id', local_var_params['resource_id']))
if 'resource_name' in local_var_params:
query_params.append(('resource_name', local_var_params['resource_name']))
if 'start_time' in local_var_params:
query_params.append(('start_time', local_var_params['start_time']))
if 'status' in local_var_params:
query_params.append(('status', local_var_params['status']))
if 'vault_id' in local_var_params:
query_params.append(('vault_id', local_var_params['vault_id']))
if 'vault_name' in local_var_params:
query_params.append(('vault_name', local_var_params['vault_name']))
if 'enterprise_project_id' in local_var_params:
query_params.append(('enterprise_project_id', local_var_params['enterprise_project_id']))
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/operation-logs',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListOpLogsResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_policies(self, request):
"""查询策略列表
查询策略列表
:param ListPoliciesRequest request
:return: ListPoliciesResponse
"""
return self.list_policies_with_http_info(request)
def list_policies_with_http_info(self, request):
"""查询策略列表
查询策略列表
:param ListPoliciesRequest request
:return: ListPoliciesResponse
"""
all_params = ['operation_type', 'vault_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
if 'operation_type' in local_var_params:
query_params.append(('operation_type', local_var_params['operation_type']))
if 'vault_id' in local_var_params:
query_params.append(('vault_id', local_var_params['vault_id']))
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/policies',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListPoliciesResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_protectable(self, request):
"""查询可保护资源
查询可保护性资源列表
:param ListProtectableRequest request
:return: ListProtectableResponse
"""
return self.list_protectable_with_http_info(request)
def list_protectable_with_http_info(self, request):
"""查询可保护资源
查询可保护性资源列表
:param ListProtectableRequest request
:return: ListProtectableResponse
"""
all_params = ['protectable_type', 'limit', 'marker', 'name', 'offset', 'status', 'id', 'server_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'protectable_type' in local_var_params:
path_params['protectable_type'] = local_var_params['protectable_type']
query_params = []
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit']))
if 'marker' in local_var_params:
query_params.append(('marker', local_var_params['marker']))
if 'name' in local_var_params:
query_params.append(('name', local_var_params['name']))
if 'offset' in local_var_params:
query_params.append(('offset', local_var_params['offset']))
if 'status' in local_var_params:
query_params.append(('status', local_var_params['status']))
if 'id' in local_var_params:
query_params.append(('id', local_var_params['id']))
if 'server_id' in local_var_params:
query_params.append(('server_id', local_var_params['server_id']))
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/protectables/{protectable_type}/instances',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListProtectableResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_vault(self, request):
"""查询存储库列表
查询存储库列表
:param ListVaultRequest request
:return: ListVaultResponse
"""
return self.list_vault_with_http_info(request)
def list_vault_with_http_info(self, request):
"""查询存储库列表
查询存储库列表
:param ListVaultRequest request
:return: ListVaultResponse
"""
all_params = ['limit', 'name', 'offset', 'cloud_type', 'protect_type', 'object_type', 'enterprise_project_id', 'id', 'policy_id', 'status', 'resource_ids']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit']))
if 'name' in local_var_params:
query_params.append(('name', local_var_params['name']))
if 'offset' in local_var_params:
query_params.append(('offset', local_var_params['offset']))
if 'cloud_type' in local_var_params:
query_params.append(('cloud_type', local_var_params['cloud_type']))
if 'protect_type' in local_var_params:
query_params.append(('protect_type', local_var_params['protect_type']))
if 'object_type' in local_var_params:
query_params.append(('object_type', local_var_params['object_type']))
if 'enterprise_project_id' in local_var_params:
query_params.append(('enterprise_project_id', local_var_params['enterprise_project_id']))
if 'id' in local_var_params:
query_params.append(('id', local_var_params['id']))
if 'policy_id' in local_var_params:
query_params.append(('policy_id', local_var_params['policy_id']))
if 'status' in local_var_params:
query_params.append(('status', local_var_params['status']))
if 'resource_ids' in local_var_params:
query_params.append(('resource_ids', local_var_params['resource_ids']))
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/vaults',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListVaultResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def remove_vault_resource(self, request):
"""移除资源
移除存储库中的资源,若移除资源,将一并删除该资源在保管库中的备份
:param RemoveVaultResourceRequest request
:return: RemoveVaultResourceResponse
"""
return self.remove_vault_resource_with_http_info(request)
def remove_vault_resource_with_http_info(self, request):
"""移除资源
移除存储库中的资源,若移除资源,将一并删除该资源在保管库中的备份
:param RemoveVaultResourceRequest request
:return: RemoveVaultResourceResponse
"""
all_params = ['vault_id', 'remove_vault_resource_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'vault_id' in local_var_params:
path_params['vault_id'] = local_var_params['vault_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/vaults/{vault_id}/removeresources',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='RemoveVaultResourceResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def restore_backup(self, request):
"""备份恢复
恢复备份数据
:param RestoreBackupRequest request
:return: RestoreBackupResponse
"""
return self.restore_backup_with_http_info(request)
def restore_backup_with_http_info(self, request):
"""备份恢复
恢复备份数据
:param RestoreBackupRequest request
:return: RestoreBackupResponse
"""
all_params = ['backup_id', 'restore_backup_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'backup_id' in local_var_params:
path_params['backup_id'] = local_var_params['backup_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/backups/{backup_id}/restore',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='RestoreBackupResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_backup(self, request):
"""查询指定备份
根据指定id查询单个副本。
:param ShowBackupRequest request
:return: ShowBackupResponse
"""
return self.show_backup_with_http_info(request)
def show_backup_with_http_info(self, request):
"""查询指定备份
根据指定id查询单个副本。
:param ShowBackupRequest request
:return: ShowBackupResponse
"""
all_params = ['backup_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'backup_id' in local_var_params:
path_params['backup_id'] = local_var_params['backup_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/backups/{backup_id}',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowBackupResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_checkpoint(self, request):
"""查询备份还原点
根据还原点ID查询指定还原点
:param ShowCheckpointRequest request
:return: ShowCheckpointResponse
"""
return self.show_checkpoint_with_http_info(request)
def show_checkpoint_with_http_info(self, request):
"""查询备份还原点
根据还原点ID查询指定还原点
:param ShowCheckpointRequest request
:return: ShowCheckpointResponse
"""
all_params = ['checkpoint_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'checkpoint_id' in local_var_params:
path_params['checkpoint_id'] = local_var_params['checkpoint_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/checkpoints/{checkpoint_id}',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowCheckpointResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_member_detail(self, request):
"""获取备份成员详情
获取备份成员的详情
:param ShowMemberDetailRequest request
:return: ShowMemberDetailResponse
"""
return self.show_member_detail_with_http_info(request)
def show_member_detail_with_http_info(self, request):
"""获取备份成员详情
获取备份成员的详情
:param ShowMemberDetailRequest request
:return: ShowMemberDetailResponse
"""
all_params = ['backup_id', 'member_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'backup_id' in local_var_params:
path_params['backup_id'] = local_var_params['backup_id']
if 'member_id' in local_var_params:
path_params['member_id'] = local_var_params['member_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/backups/{backup_id}/members/{member_id}',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowMemberDetailResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_members_detail(self, request):
"""获取备份成员列表
获取备份共享成员的列表信息
:param ShowMembersDetailRequest request
:return: ShowMembersDetailResponse
"""
return self.show_members_detail_with_http_info(request)
def show_members_detail_with_http_info(self, request):
"""获取备份成员列表
获取备份共享成员的列表信息
:param ShowMembersDetailRequest request
:return: ShowMembersDetailResponse
"""
all_params = ['backup_id', 'dest_project_id', 'image_id', 'status', 'vault_id', 'limit', 'marker', 'offset', 'sort']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'backup_id' in local_var_params:
path_params['backup_id'] = local_var_params['backup_id']
query_params = []
if 'dest_project_id' in local_var_params:
query_params.append(('dest_project_id', local_var_params['dest_project_id']))
if 'image_id' in local_var_params:
query_params.append(('image_id', local_var_params['image_id']))
if 'status' in local_var_params:
query_params.append(('status', local_var_params['status']))
if 'vault_id' in local_var_params:
query_params.append(('vault_id', local_var_params['vault_id']))
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit']))
if 'marker' in local_var_params:
query_params.append(('marker', local_var_params['marker']))
if 'offset' in local_var_params:
query_params.append(('offset', local_var_params['offset']))
if 'sort' in local_var_params:
query_params.append(('sort', local_var_params['sort']))
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/backups/{backup_id}/members',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowMembersDetailResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_op_log(self, request):
"""查询单个任务
根据指定任务ID查询任务
:param ShowOpLogRequest request
:return: ShowOpLogResponse
"""
return self.show_op_log_with_http_info(request)
def show_op_log_with_http_info(self, request):
"""查询单个任务
根据指定任务ID查询任务
:param ShowOpLogRequest request
:return: ShowOpLogResponse
"""
all_params = ['operation_log_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'operation_log_id' in local_var_params:
path_params['operation_log_id'] = local_var_params['operation_log_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/operation-logs/{operation_log_id}',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowOpLogResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_policy(self, request):
"""查询单个策略
查询单个策略
:param ShowPolicyRequest request
:return: ShowPolicyResponse
"""
return self.show_policy_with_http_info(request)
def show_policy_with_http_info(self, request):
"""查询单个策略
查询单个策略
:param ShowPolicyRequest request
:return: ShowPolicyResponse
"""
all_params = ['policy_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'policy_id' in local_var_params:
path_params['policy_id'] = local_var_params['policy_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/policies/{policy_id}',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowPolicyResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_protectable(self, request):
"""查询指定可保护资源
根据ID查询可保护性资源
:param ShowProtectableRequest request
:return: ShowProtectableResponse
"""
return self.show_protectable_with_http_info(request)
def show_protectable_with_http_info(self, request):
"""查询指定可保护资源
根据ID查询可保护性资源
:param ShowProtectableRequest request
:return: ShowProtectableResponse
"""
all_params = ['instance_id', 'protectable_type']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'instance_id' in local_var_params:
path_params['instance_id'] = local_var_params['instance_id']
if 'protectable_type' in local_var_params:
path_params['protectable_type'] = local_var_params['protectable_type']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/protectables/{protectable_type}/instances/{instance_id}',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowProtectableResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_replication_capabilities(self, request):
"""查询复制能力
查询本区域的复制能力
:param ShowReplicationCapabilitiesRequest request
:return: ShowReplicationCapabilitiesResponse
"""
return self.show_replication_capabilities_with_http_info(request)
def show_replication_capabilities_with_http_info(self, request):
"""查询复制能力
查询本区域的复制能力
:param ShowReplicationCapabilitiesRequest request
:return: ShowReplicationCapabilitiesResponse
"""
all_params = []
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/replication-capabilities',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowReplicationCapabilitiesResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_vault(self, request):
"""查询指定存储库
根据ID查询指定存储库
:param ShowVaultRequest request
:return: ShowVaultResponse
"""
return self.show_vault_with_http_info(request)
def show_vault_with_http_info(self, request):
"""查询指定存储库
根据ID查询指定存储库
:param ShowVaultRequest request
:return: ShowVaultResponse
"""
all_params = ['vault_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'vault_id' in local_var_params:
path_params['vault_id'] = local_var_params['vault_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/vaults/{vault_id}',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowVaultResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def update_member_status(self, request):
"""更新备份成员状态
更新备份共享成员的状态需要接收方执行此API。
:param UpdateMemberStatusRequest request
:return: UpdateMemberStatusResponse
"""
return self.update_member_status_with_http_info(request)
def update_member_status_with_http_info(self, request):
"""更新备份成员状态
更新备份共享成员的状态需要接收方执行此API。
:param UpdateMemberStatusRequest request
:return: UpdateMemberStatusResponse
"""
all_params = ['member_id', 'backup_id', 'update_member_status_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'member_id' in local_var_params:
path_params['member_id'] = local_var_params['member_id']
if 'backup_id' in local_var_params:
path_params['backup_id'] = local_var_params['backup_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/backups/{backup_id}/members/{member_id}',
method='PUT',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='UpdateMemberStatusResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def update_policy(self, request):
"""修改策略
修改策略
:param UpdatePolicyRequest request
:return: UpdatePolicyResponse
"""
return self.update_policy_with_http_info(request)
def update_policy_with_http_info(self, request):
"""修改策略
修改策略
:param UpdatePolicyRequest request
:return: UpdatePolicyResponse
"""
all_params = ['policy_id', 'update_policy_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'policy_id' in local_var_params:
path_params['policy_id'] = local_var_params['policy_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/policies/{policy_id}',
method='PUT',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='UpdatePolicyResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def update_vault(self, request):
"""修改存储库
根据存储库ID修改存储库
:param UpdateVaultRequest request
:return: UpdateVaultResponse
"""
return self.update_vault_with_http_info(request)
def update_vault_with_http_info(self, request):
"""修改存储库
根据存储库ID修改存储库
:param UpdateVaultRequest request
:return: UpdateVaultResponse
"""
all_params = ['vault_id', 'update_vault_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'vault_id' in local_var_params:
path_params['vault_id'] = local_var_params['vault_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/vaults/{vault_id}',
method='PUT',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='UpdateVaultResponse',
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None,
body=None, post_params=None, response_type=None, auth_settings=None, collection_formats=None,
request_type=None):
"""Makes the HTTP request and returns deserialized data.
:param resource_path: Path to method endpoint.
:param method: Method to call.
:param path_params: Path parameters in the url.
:param query_params: Query parameters in the url.
:param header_params: Header parameters to be
placed in the request header.
:param body: Request body.
:param post_params dict: Request post form parameters,
for `application/x-www-form-urlencoded`, `multipart/form-data`.
:param auth_settings list: Auth Settings names for the request.
:param response_type: Response data type.
:param collection_formats: dict of collection formats for path, query,
header, and post parameters.
:return:
Return the response directly.
"""
return self.do_http_request(
method=method,
resource_path=resource_path,
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body,
post_params=post_params,
response_type=response_type,
collection_formats=collection_formats,
request_type=request_type)