def remove_pipeline_with_http_info(self, request): """删除流水线 根据id删除流水线 :param RemovePipelineRequest request :return: RemovePipelineResponse """ all_params = ['pipeline_id', 'x_language'] 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 'pipeline_id' in local_var_params: path_params['pipeline_id'] = local_var_params['pipeline_id'] query_params = [] header_params = {} if 'x_language' in local_var_params: header_params['X-Language'] = local_var_params['x_language'] form_params = {} body_params = None if isinstance(request, SdkStreamRequest): body_params = request.get_file_stream() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json']) auth_settings = ['apig-auth-iam'] return self.call_api( resource_path='/v3/pipelines/{pipeline_id}', method='DELETE', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='RemovePipelineResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def recognize_passport_with_http_info(self, request): """护照识别 识别用户上传的护照首页图片中的文字信息,并返回识别的结构化结果。当前版本支持中国护照的全字段识别。外国护照支持护照下方两行国际标准化的机读码识别,并可从中提取6-7个关键字段信息。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizePassportRequest request :return: RecognizePassportResponse """ all_params = ['project_id', 'passport_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 'project_id' in local_var_params: path_params['project_id'] = local_var_params['project_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json;charset=UTF-8']) auth_settings = [] return self.call_api( resource_path='/v2/{project_id}/ocr/passport', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='RecognizePassportResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def show_test_case_detail_with_http_info(self, request): """获取测试用例详情 获取测试用例详情 :param ShowTestCaseDetailRequest request :return: ShowTestCaseDetailResponse """ all_params = ['project_id', 'testcase_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 'project_id' in local_var_params: path_params['project_id'] = local_var_params['project_id'] if 'testcase_id' in local_var_params: path_params['testcase_id'] = local_var_params['testcase_id'] query_params = [] header_params = {} form_params = {} body_params = None if isinstance(request, SdkStreamRequest): body_params = request.get_file_stream() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json']) auth_settings = ['apig-auth-iam'] return self.call_api( resource_path='/v1/projects/{project_id}/testcases/{testcase_id}', method='GET', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='ShowTestCaseDetailResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def recognize_general_text_with_http_info(self, request): """通用文字识别 识别图片上的文字信息,返回识别的文字和坐标。支持扫描文件、电子文档、书籍、票据和表单等多种场景的文字识别。 :param RecognizeGeneralTextRequest request :return: RecognizeGeneralTextResponse """ all_params = ['project_id', 'general_text_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 'project_id' in local_var_params: path_params['project_id'] = local_var_params['project_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json;charset=UTF-8']) auth_settings = [] return self.call_api( resource_path='/v2/{project_id}/ocr/general-text', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='RecognizeGeneralTextResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def recognize_license_plate_with_http_info(self, request): """车牌识别 识别输入图片中的车牌信息,并返回其坐标和内容。 :param RecognizeLicensePlateRequest request :return: RecognizeLicensePlateResponse """ all_params = ['project_id', 'license_plate_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 'project_id' in local_var_params: path_params['project_id'] = local_var_params['project_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json;charset=UTF-8']) auth_settings = [] return self.call_api( resource_path='/v2/{project_id}/ocr/license-plate', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='RecognizeLicensePlateResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def create_function_trigger_with_http_info(self, request): """创建触发器。 创建触发器。 - 可以创建的触发器类型包括TIMER、APIG、CTS、DDS、DMS、DIS、LTS、OBS、SMN、KAFKA。 - DDS和KAFKA触发器创建时默认为DISABLE状态,其他触发器默认为ACTIVE状态。 - TIMER、DDS、DMS、KAFKA、LTS触发器支持禁用,其他触发器不支持。 :param CreateFunctionTriggerRequest request :return: CreateFunctionTriggerResponse """ all_params = ['function_urn', 'create_function_trigger_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 'function_urn' in local_var_params: path_params['function_urn'] = local_var_params['function_urn'] 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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json']) auth_settings = [] return self.call_api( resource_path='/v2/{project_id}/fgs/triggers/{function_urn}', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='CreateFunctionTriggerResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def recognize_business_card_with_http_info(self, request): """名片识别 识别名片图片上的文字信息,并返回识别的结构化结果。支持对多种不同版式名片进行结构化信息提取。 :param RecognizeBusinessCardRequest request :return: RecognizeBusinessCardResponse """ all_params = ['project_id', 'business_card_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 'project_id' in local_var_params: path_params['project_id'] = local_var_params['project_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json;charset=UTF-8']) auth_settings = [] return self.call_api( resource_path='/v2/{project_id}/ocr/business-card', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='RecognizeBusinessCardResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def attach_baremetal_server_volume_with_http_info(self, request): """裸金属服务器挂载云硬盘 裸金属服务器创建成功后,如果发现磁盘不够用或者当前磁盘不满足要求,可以将已有云硬盘挂载给裸金属服务器,作为数据盘使用 :param AttachBaremetalServerVolumeRequest request :return: AttachBaremetalServerVolumeResponse """ all_params = ['server_id', 'attach_volume'] 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 'server_id' in local_var_params: path_params['server_id'] = local_var_params['server_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json;charset=UTF-8']) auth_settings = [] return self.call_api( resource_path='/v1/{project_id}/baremetalservers/{server_id}/attachvolume', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='AttachBaremetalServerVolumeResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def reinstall_baremetal_server_os_with_http_info(self, request): """重装裸金属服务器操作系统 重装裸金属服务器的操作系统。快速发放裸金属服务器支持裸金属服务器数据盘不变的情况下,使用原镜像重装系统盘。重装操作系统支持密码或者密钥注入 :param ReinstallBaremetalServerOsRequest request :return: ReinstallBaremetalServerOsResponse """ all_params = ['server_id', 'os_reinstall_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 'server_id' in local_var_params: path_params['server_id'] = local_var_params['server_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json;charset=UTF-8']) auth_settings = [] return self.call_api( resource_path='/v1/{project_id}/baremetalservers/{server_id}/reinstallos', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='ReinstallBaremetalServerOsResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def change_baremetal_server_name_with_http_info(self, request): """修改裸金属服务器名称 修改裸金属服务器名称 :param ChangeBaremetalServerNameRequest request :return: ChangeBaremetalServerNameResponse """ all_params = ['server_id', 'change_baremetal_name_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 'server_id' in local_var_params: path_params['server_id'] = local_var_params['server_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json;charset=UTF-8']) auth_settings = [] return self.call_api( resource_path='/v1/{project_id}/baremetalservers/{server_id}', method='PUT', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='ChangeBaremetalServerNameResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def detach_baremetal_server_volume_with_http_info(self, request): """裸金属服务器卸载云磁盘 将挂载至裸金属服务器中的磁盘卸载;对于挂载在系统盘盘位(也就是“/dev/sda”挂载点)上的磁盘,不允许执行卸载操作;对于挂载在数据盘盘位(非“/dev/sda”挂载点)上的磁盘,支持离线卸载和在线卸载(裸金属服务器处于“运行中”状态)磁盘 :param DetachBaremetalServerVolumeRequest request :return: DetachBaremetalServerVolumeResponse """ all_params = ['server_id', 'attachment_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 'server_id' in local_var_params: path_params['server_id'] = local_var_params['server_id'] if 'attachment_id' in local_var_params: path_params['attachment_id'] = local_var_params['attachment_id'] query_params = [] header_params = {} form_params = {} body_params = None if isinstance(request, SdkStreamRequest): body_params = request.get_file_stream() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json']) auth_settings = [] return self.call_api( resource_path='/v1/{project_id}/baremetalservers/{server_id}/detachvolume/{attachment_id}', method='DELETE', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='DetachBaremetalServerVolumeResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def update_baremetal_server_metadata_with_http_info(self, request): """更新裸金属服务器元数据 更新裸金属服务器元数据。如果元数据中没有待更新字段,则自动添加该字段。如果元数据中已存在待更新字段,则直接更新字段值;如果元数据中的字段不再请求参数中,则保持不变 :param UpdateBaremetalServerMetadataRequest request :return: UpdateBaremetalServerMetadataResponse """ all_params = ['server_id', 'meta_data'] 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 'server_id' in local_var_params: path_params['server_id'] = local_var_params['server_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json;charset=UTF-8']) auth_settings = [] return self.call_api( resource_path='/v1/{project_id}/baremetalservers/{server_id}/metadata', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='UpdateBaremetalServerMetadataResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def batch_show_pipelines_status_with_http_info(self, request): """批量获取流水线状态 批量获取流水线状态和阶段信息 :param BatchShowPipelinesStatusRequest request :return: BatchShowPipelinesStatusResponse """ all_params = ['pipeline_ids', 'x_language'] 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 'pipeline_ids' in local_var_params: query_params.append(('pipeline_ids', local_var_params['pipeline_ids'])) header_params = {} if 'x_language' in local_var_params: header_params['X-Language'] = local_var_params['x_language'] form_params = {} body_params = None if isinstance(request, SdkStreamRequest): body_params = request.get_file_stream() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json']) auth_settings = ['apig-auth-iam'] return self.call_api( resource_path='/v3/pipelines/status', method='GET', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='BatchShowPipelinesStatusResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def show_instance_status_with_http_info(self, request): """检查流水线创建状态 检查流水线创建状态 :param ShowInstanceStatusRequest request :return: ShowInstanceStatusResponse """ all_params = ['task_id', 'x_language'] 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 'task_id' in local_var_params: path_params['task_id'] = local_var_params['task_id'] query_params = [] header_params = {} if 'x_language' in local_var_params: header_params['X-Language'] = local_var_params['x_language'] form_params = {} body_params = None if isinstance(request, SdkStreamRequest): body_params = request.get_file_stream() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json']) auth_settings = ['apig-auth-iam'] return self.call_api( resource_path='/v3/templates/{task_id}/status', method='GET', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='ShowInstanceStatusResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def list_instance_metric_with_http_info(self, request): """查询BCS组织实例监控数据详情 该接口用于BCS组织实例监控数据详情。 :param ListInstanceMetricRequest request :return: ListInstanceMetricResponse """ all_params = ['blockchain_id', 'list_instance_metric_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 'blockchain_id' in local_var_params: path_params['blockchain_id'] = local_var_params['blockchain_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json;charset=UTF-8']) auth_settings = [] return self.call_api( resource_path='/v2/{project_id}/blockchains/{blockchain_id}/entity/instance/metric/list', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='ListInstanceMetricResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def reset_pwd_one_click_with_http_info(self, request): """一键重置裸金属服务器密码 在裸金属服务器支持一键重置密码功能的前提下,重置裸金属服务器管理帐号(root用户或Administrator用户)的密码。可以通过6.10.1-查询是否支持一键重置密码API查询是否支持一键重置密码。 :param ResetPwdOneClickRequest request :return: ResetPwdOneClickResponse """ all_params = ['server_id', 'reset_password_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 'server_id' in local_var_params: path_params['server_id'] = local_var_params['server_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json;charset=UTF-8']) auth_settings = [] return self.call_api( resource_path='/v1/{project_id}/baremetalservers/{server_id}/os-reset-password', method='PUT', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='ResetPwdOneClickResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def list_template_view_histories_with_http_info(self, request): """我浏览的模板记录 查询用户浏览过的模板(只返回最近浏览的5个模板) :param ListTemplateViewHistoriesRequest request :return: ListTemplateViewHistoriesResponse """ all_params = ['platform_source', 'x_language'] 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 'platform_source' in local_var_params: query_params.append( ('platform_source', local_var_params['platform_source'])) header_params = {} if 'x_language' in local_var_params: header_params['X-Language'] = local_var_params['x_language'] form_params = {} body_params = None if isinstance(request, SdkStreamRequest): body_params = request.get_file_stream() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json']) auth_settings = [] return self.call_api(resource_path='/v1/templates/view-histories', method='GET', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='ListTemplateViewHistoriesResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def rollback_snapshot_with_http_info(self, request): """回滚快照到云硬盘 将快照数据回滚到云硬盘。支持企业项目授权功能。 :param RollbackSnapshotRequest request :return: RollbackSnapshotResponse """ all_params = ['snapshot_id', 'rollback_snapshot_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 'snapshot_id' in local_var_params: path_params['snapshot_id'] = local_var_params['snapshot_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json;charset=UTF-8']) auth_settings = [] return self.call_api( resource_path='/v2/{project_id}/cloudsnapshots/{snapshot_id}/rollback', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='RollbackSnapshotResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def async_invoke_function_with_http_info(self, request): """异步执行函数。 异步执行函数。 :param AsyncInvokeFunctionRequest request :return: AsyncInvokeFunctionResponse """ all_params = ['function_urn', 'async_invoke_function_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 'function_urn' in local_var_params: path_params['function_urn'] = local_var_params['function_urn'] 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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json']) auth_settings = [] return self.call_api( resource_path='/v2/{project_id}/fgs/functions/{function_urn}/invocations-async', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='AsyncInvokeFunctionResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def cinder_export_to_image_with_http_info(self, request): """将云硬盘导出为镜像 将系统盘或数据盘的数据导出为IMS镜像,导出的镜像在IMS的私有镜像列表中可以查 看并使用。 :param CinderExportToImageRequest request :return: CinderExportToImageResponse """ all_params = ['volume_id', 'cinder_export_to_image_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 'volume_id' in local_var_params: path_params['volume_id'] = local_var_params['volume_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json;charset=UTF-8']) auth_settings = [] return self.call_api( resource_path='/v2/{project_id}/volumes/{volume_id}/action', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='CinderExportToImageResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def recognize_general_table_with_http_info(self, request): """通用表格识别 识别用于识别用户上传的通用表格图片(或者用户提供的华为云上OBS的通用表格图片文件的URL)中的文字内容,并将识别的结果返回给用户。 :param RecognizeGeneralTableRequest request :return: RecognizeGeneralTableResponse """ all_params = ['project_id', 'general_table_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 'project_id' in local_var_params: path_params['project_id'] = local_var_params['project_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json;charset=UTF-8']) auth_settings = [] return self.call_api( resource_path='/v2/{project_id}/ocr/general-table', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='RecognizeGeneralTableResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def batch_create_volume_tags_with_http_info(self, request): """为指定云硬盘批量添加标签 为指定云硬盘批量添加标签。 添加标签时,如果云硬盘的标签已存在相同key,则会覆盖已有标签。 单个云硬盘最多支持创建10个标签。 :param BatchCreateVolumeTagsRequest request :return: BatchCreateVolumeTagsResponse """ all_params = ['volume_id', 'batch_create_volume_tags_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 'volume_id' in local_var_params: path_params['volume_id'] = local_var_params['volume_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json;charset=UTF-8']) auth_settings = [] return self.call_api( resource_path='/v2/{project_id}/cloudvolumes/{volume_id}/tags/action', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='BatchCreateVolumeTagsResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def recognize_auto_classification_with_http_info(self, request): """智能分类识别 检测定位图片上指定要识别的票证(票据、证件或其他文字载体),并对其进行结构化识别。接口以列表形式返回图片上要识别票证的位置坐标、结构化识别的内容以及对应的类别。 计费次数说明: 只对识别成功的票证进行计费,识别失败的票证不计费。例如图片中包含三张票证,有两张识别成功,一张识别失败,此时接口计费两次。 :param RecognizeAutoClassificationRequest request :return: RecognizeAutoClassificationResponse """ all_params = ['project_id', 'auto_classification_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 'project_id' in local_var_params: path_params['project_id'] = local_var_params['project_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json;charset=UTF-8']) auth_settings = [] return self.call_api( resource_path='/v2/{project_id}/ocr/auto-classification', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='RecognizeAutoClassificationResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def resize_volume_with_http_info(self, request): """扩容云硬盘 对按需或者包周期云硬盘进行扩容。 在扩容包周期云硬盘的场景下: - 如果您需要查看订单可用的优惠券,请参考\"[查询订单可用优惠券](https://support.huaweicloud.com/api-oce/zh-cn_topic_0092953630.html)\"。 - 如果您需要支付订单,请参考\"[支付包周期产品订单](https://support.huaweicloud.com/api-oce/zh-cn_topic_0075746561.html)\"。 - 如果您需要查询订单的资源开通详情,请参考\"[查询订单的资源开通详情](https://support.huaweicloud.com/api-oce/api_order_00001.html)\"。 - 如果您需要退订该包周期资源,请参考“[退订包周期资源](https://support.huaweicloud.com/api-oce/zh-cn_topic_0082522030.html)”。 :param ResizeVolumeRequest request :return: ResizeVolumeResponse """ all_params = ['volume_id', 'resize_volume_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 'volume_id' in local_var_params: path_params['volume_id'] = local_var_params['volume_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json;charset=UTF-8']) auth_settings = [] return self.call_api( resource_path='/v2.1/{project_id}/cloudvolumes/{volume_id}/action', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='ResizeVolumeResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def recognize_mvs_invoice_with_http_info(self, request): """机动车销售发票识别 识别机动车销售发票图片中的文字内容,并将识别的结果返回给用户。 说明: 该增值税发票仅限于中华人民共和国境内使用的增值税发票。 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeMvsInvoiceRequest request :return: RecognizeMvsInvoiceResponse """ all_params = ['project_id', 'mvs_invoice_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 'project_id' in local_var_params: path_params['project_id'] = local_var_params['project_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json;charset=UTF-8']) auth_settings = [] return self.call_api( resource_path='/v2/{project_id}/ocr/mvs-invoice', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='RecognizeMvsInvoiceResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def download_blockchain_sdk_config_with_http_info(self, request): """下载SDK配置 下载指定服务实例SDK配置文件 :param DownloadBlockchainSdkConfigRequest request :return: DownloadBlockchainSdkConfigResponse """ all_params = ['blockchain_id', 'download_blockchain_sdk_config_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 'blockchain_id' in local_var_params: path_params['blockchain_id'] = local_var_params['blockchain_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json;charset=UTF-8']) auth_settings = [] return self.call_api( resource_path='/v2/{project_id}/blockchains/{blockchain_id}/sdk-cfg', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='DownloadBlockchainSdkConfigResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def recognize_taxi_invoice_with_http_info(self, request): """出租车发票识别 识别出租车发票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 :param RecognizeTaxiInvoiceRequest request :return: RecognizeTaxiInvoiceResponse """ all_params = ['project_id', 'taxi_invoice_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 'project_id' in local_var_params: path_params['project_id'] = local_var_params['project_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json;charset=UTF-8']) auth_settings = [] return self.call_api( resource_path='/v2/{project_id}/ocr/taxi-invoice', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='RecognizeTaxiInvoiceResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def batch_add_peers_to_channel_with_http_info(self, request): """peer节点加入通道 peer节点加入通道,目前仅支持往一个通道中加入peer :param BatchAddPeersToChannelRequest request :return: BatchAddPeersToChannelResponse """ all_params = ['blockchain_id', 'batch_add_peers_to_channel_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 'blockchain_id' in local_var_params: path_params['blockchain_id'] = local_var_params['blockchain_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json;charset=UTF-8']) auth_settings = [] return self.call_api( resource_path='/v2/{project_id}/blockchains/{blockchain_id}/channels/peers', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='BatchAddPeersToChannelResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def update_instance_with_http_info(self, request): """修改实例信息 修改实例的名称和描述信息。 :param UpdateInstanceRequest request :return: UpdateInstanceResponse """ all_params = ['instance_id', 'update_instance_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 'instance_id' in local_var_params: path_params['instance_id'] = local_var_params['instance_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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json']) auth_settings = [] return self.call_api( resource_path='/v2/{project_id}/instances/{instance_id}', method='PUT', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='UpdateInstanceResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)
def create_pipeline_by_template_with_http_info(self, request): """基于模板快速创建流水线及流水线内任务 基于模板快速创建流水线及流水线内任务 :param CreatePipelineByTemplateRequest request :return: CreatePipelineByTemplateResponse """ all_params = ['create_pipeline_by_template_request_body', 'x_language'] 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 = {} if 'x_language' in local_var_params: header_params['X-Language'] = local_var_params['x_language'] 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() response_headers = [] header_params['Content-Type'] = http_utils.select_header_content_type( ['application/json']) auth_settings = ['apig-auth-iam'] return self.call_api( resource_path='/v3/templates/task', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, response_type='CreatePipelineByTemplateResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, request_type=request.__class__.__name__)