1 Star 17 Fork 2

tencentcloud/tencentcloud-sdk-python

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
dasb_client.py 55.00 KB
一键复制 编辑 原始数据 按行查看 历史
tencentcloud 提交于 2024-09-13 04:16 . release 3.0.1231
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475
# -*- coding: utf8 -*-
# Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import json
from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException
from tencentcloud.common.abstract_client import AbstractClient
from tencentcloud.dasb.v20191018 import models
class DasbClient(AbstractClient):
_apiVersion = '2019-10-18'
_endpoint = 'dasb.tencentcloudapi.com'
_service = 'dasb'
def AddDeviceGroupMembers(self, request):
"""添加资产组成员
:param request: Request instance for AddDeviceGroupMembers.
:type request: :class:`tencentcloud.dasb.v20191018.models.AddDeviceGroupMembersRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.AddDeviceGroupMembersResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("AddDeviceGroupMembers", params, headers=headers)
response = json.loads(body)
model = models.AddDeviceGroupMembersResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def AddUserGroupMembers(self, request):
"""添加用户组成员
:param request: Request instance for AddUserGroupMembers.
:type request: :class:`tencentcloud.dasb.v20191018.models.AddUserGroupMembersRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.AddUserGroupMembersResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("AddUserGroupMembers", params, headers=headers)
response = json.loads(body)
model = models.AddUserGroupMembersResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def BindDeviceAccountPassword(self, request):
"""绑定主机账号密码
:param request: Request instance for BindDeviceAccountPassword.
:type request: :class:`tencentcloud.dasb.v20191018.models.BindDeviceAccountPasswordRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.BindDeviceAccountPasswordResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("BindDeviceAccountPassword", params, headers=headers)
response = json.loads(body)
model = models.BindDeviceAccountPasswordResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def BindDeviceAccountPrivateKey(self, request):
"""绑定主机账号私钥
:param request: Request instance for BindDeviceAccountPrivateKey.
:type request: :class:`tencentcloud.dasb.v20191018.models.BindDeviceAccountPrivateKeyRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.BindDeviceAccountPrivateKeyResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("BindDeviceAccountPrivateKey", params, headers=headers)
response = json.loads(body)
model = models.BindDeviceAccountPrivateKeyResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def BindDeviceResource(self, request):
"""修改资产绑定的堡垒机服务
:param request: Request instance for BindDeviceResource.
:type request: :class:`tencentcloud.dasb.v20191018.models.BindDeviceResourceRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.BindDeviceResourceResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("BindDeviceResource", params, headers=headers)
response = json.loads(body)
model = models.BindDeviceResourceResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateAcl(self, request):
"""新建访问权限
:param request: Request instance for CreateAcl.
:type request: :class:`tencentcloud.dasb.v20191018.models.CreateAclRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.CreateAclResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateAcl", params, headers=headers)
response = json.loads(body)
model = models.CreateAclResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateAssetSyncJob(self, request):
"""创建手工资产同步任务
:param request: Request instance for CreateAssetSyncJob.
:type request: :class:`tencentcloud.dasb.v20191018.models.CreateAssetSyncJobRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.CreateAssetSyncJobResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateAssetSyncJob", params, headers=headers)
response = json.loads(body)
model = models.CreateAssetSyncJobResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateChangePwdTask(self, request):
"""创建修改密码任务
:param request: Request instance for CreateChangePwdTask.
:type request: :class:`tencentcloud.dasb.v20191018.models.CreateChangePwdTaskRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.CreateChangePwdTaskResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateChangePwdTask", params, headers=headers)
response = json.loads(body)
model = models.CreateChangePwdTaskResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateCmdTemplate(self, request):
"""新建高危命令模板
:param request: Request instance for CreateCmdTemplate.
:type request: :class:`tencentcloud.dasb.v20191018.models.CreateCmdTemplateRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.CreateCmdTemplateResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateCmdTemplate", params, headers=headers)
response = json.loads(body)
model = models.CreateCmdTemplateResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateDeviceAccount(self, request):
"""新建主机账号
:param request: Request instance for CreateDeviceAccount.
:type request: :class:`tencentcloud.dasb.v20191018.models.CreateDeviceAccountRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.CreateDeviceAccountResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateDeviceAccount", params, headers=headers)
response = json.loads(body)
model = models.CreateDeviceAccountResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateDeviceGroup(self, request):
"""新建资产组
:param request: Request instance for CreateDeviceGroup.
:type request: :class:`tencentcloud.dasb.v20191018.models.CreateDeviceGroupRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.CreateDeviceGroupResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateDeviceGroup", params, headers=headers)
response = json.loads(body)
model = models.CreateDeviceGroupResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateResource(self, request):
"""创建堡垒机实例
:param request: Request instance for CreateResource.
:type request: :class:`tencentcloud.dasb.v20191018.models.CreateResourceRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.CreateResourceResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateResource", params, headers=headers)
response = json.loads(body)
model = models.CreateResourceResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateUser(self, request):
"""新建用户
:param request: Request instance for CreateUser.
:type request: :class:`tencentcloud.dasb.v20191018.models.CreateUserRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.CreateUserResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateUser", params, headers=headers)
response = json.loads(body)
model = models.CreateUserResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateUserGroup(self, request):
"""新建用户组
:param request: Request instance for CreateUserGroup.
:type request: :class:`tencentcloud.dasb.v20191018.models.CreateUserGroupRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.CreateUserGroupResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateUserGroup", params, headers=headers)
response = json.loads(body)
model = models.CreateUserGroupResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteAcls(self, request):
"""删除访问权限
:param request: Request instance for DeleteAcls.
:type request: :class:`tencentcloud.dasb.v20191018.models.DeleteAclsRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DeleteAclsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteAcls", params, headers=headers)
response = json.loads(body)
model = models.DeleteAclsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteChangePwdTask(self, request):
"""删除改密任务
:param request: Request instance for DeleteChangePwdTask.
:type request: :class:`tencentcloud.dasb.v20191018.models.DeleteChangePwdTaskRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DeleteChangePwdTaskResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteChangePwdTask", params, headers=headers)
response = json.loads(body)
model = models.DeleteChangePwdTaskResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteCmdTemplates(self, request):
"""删除高危命令模板
:param request: Request instance for DeleteCmdTemplates.
:type request: :class:`tencentcloud.dasb.v20191018.models.DeleteCmdTemplatesRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DeleteCmdTemplatesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteCmdTemplates", params, headers=headers)
response = json.loads(body)
model = models.DeleteCmdTemplatesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteDeviceAccounts(self, request):
"""删除主机账号
:param request: Request instance for DeleteDeviceAccounts.
:type request: :class:`tencentcloud.dasb.v20191018.models.DeleteDeviceAccountsRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DeleteDeviceAccountsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteDeviceAccounts", params, headers=headers)
response = json.loads(body)
model = models.DeleteDeviceAccountsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteDeviceGroupMembers(self, request):
"""删除资产组成员
:param request: Request instance for DeleteDeviceGroupMembers.
:type request: :class:`tencentcloud.dasb.v20191018.models.DeleteDeviceGroupMembersRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DeleteDeviceGroupMembersResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteDeviceGroupMembers", params, headers=headers)
response = json.loads(body)
model = models.DeleteDeviceGroupMembersResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteDeviceGroups(self, request):
"""删除资产组
:param request: Request instance for DeleteDeviceGroups.
:type request: :class:`tencentcloud.dasb.v20191018.models.DeleteDeviceGroupsRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DeleteDeviceGroupsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteDeviceGroups", params, headers=headers)
response = json.loads(body)
model = models.DeleteDeviceGroupsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteDevices(self, request):
"""删除主机
:param request: Request instance for DeleteDevices.
:type request: :class:`tencentcloud.dasb.v20191018.models.DeleteDevicesRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DeleteDevicesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteDevices", params, headers=headers)
response = json.loads(body)
model = models.DeleteDevicesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteUserGroupMembers(self, request):
"""删除用户组成员
:param request: Request instance for DeleteUserGroupMembers.
:type request: :class:`tencentcloud.dasb.v20191018.models.DeleteUserGroupMembersRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DeleteUserGroupMembersResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteUserGroupMembers", params, headers=headers)
response = json.loads(body)
model = models.DeleteUserGroupMembersResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteUserGroups(self, request):
"""删除用户组
:param request: Request instance for DeleteUserGroups.
:type request: :class:`tencentcloud.dasb.v20191018.models.DeleteUserGroupsRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DeleteUserGroupsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteUserGroups", params, headers=headers)
response = json.loads(body)
model = models.DeleteUserGroupsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteUsers(self, request):
"""删除用户
:param request: Request instance for DeleteUsers.
:type request: :class:`tencentcloud.dasb.v20191018.models.DeleteUsersRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DeleteUsersResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteUsers", params, headers=headers)
response = json.loads(body)
model = models.DeleteUsersResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeployResource(self, request):
"""开通服务,初始化资源,只针对新购资源
:param request: Request instance for DeployResource.
:type request: :class:`tencentcloud.dasb.v20191018.models.DeployResourceRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DeployResourceResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeployResource", params, headers=headers)
response = json.loads(body)
model = models.DeployResourceResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeAcls(self, request):
"""查询访问权限列表
:param request: Request instance for DescribeAcls.
:type request: :class:`tencentcloud.dasb.v20191018.models.DescribeAclsRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DescribeAclsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeAcls", params, headers=headers)
response = json.loads(body)
model = models.DescribeAclsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeAssetSyncStatus(self, request):
"""查询资产同步状态
:param request: Request instance for DescribeAssetSyncStatus.
:type request: :class:`tencentcloud.dasb.v20191018.models.DescribeAssetSyncStatusRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DescribeAssetSyncStatusResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeAssetSyncStatus", params, headers=headers)
response = json.loads(body)
model = models.DescribeAssetSyncStatusResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeChangePwdTask(self, request):
"""查询改密任务列表
:param request: Request instance for DescribeChangePwdTask.
:type request: :class:`tencentcloud.dasb.v20191018.models.DescribeChangePwdTaskRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DescribeChangePwdTaskResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeChangePwdTask", params, headers=headers)
response = json.loads(body)
model = models.DescribeChangePwdTaskResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeChangePwdTaskDetail(self, request):
"""查询改密任务详情
:param request: Request instance for DescribeChangePwdTaskDetail.
:type request: :class:`tencentcloud.dasb.v20191018.models.DescribeChangePwdTaskDetailRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DescribeChangePwdTaskDetailResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeChangePwdTaskDetail", params, headers=headers)
response = json.loads(body)
model = models.DescribeChangePwdTaskDetailResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeCmdTemplates(self, request):
"""查询命令模板列表
:param request: Request instance for DescribeCmdTemplates.
:type request: :class:`tencentcloud.dasb.v20191018.models.DescribeCmdTemplatesRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DescribeCmdTemplatesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeCmdTemplates", params, headers=headers)
response = json.loads(body)
model = models.DescribeCmdTemplatesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeDasbImageIds(self, request):
"""获取镜像列表
:param request: Request instance for DescribeDasbImageIds.
:type request: :class:`tencentcloud.dasb.v20191018.models.DescribeDasbImageIdsRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DescribeDasbImageIdsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeDasbImageIds", params, headers=headers)
response = json.loads(body)
model = models.DescribeDasbImageIdsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeDeviceAccounts(self, request):
"""查询主机账号列表
:param request: Request instance for DescribeDeviceAccounts.
:type request: :class:`tencentcloud.dasb.v20191018.models.DescribeDeviceAccountsRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DescribeDeviceAccountsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeDeviceAccounts", params, headers=headers)
response = json.loads(body)
model = models.DescribeDeviceAccountsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeDeviceGroupMembers(self, request):
"""查询资产组成员列表
:param request: Request instance for DescribeDeviceGroupMembers.
:type request: :class:`tencentcloud.dasb.v20191018.models.DescribeDeviceGroupMembersRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DescribeDeviceGroupMembersResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeDeviceGroupMembers", params, headers=headers)
response = json.loads(body)
model = models.DescribeDeviceGroupMembersResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeDeviceGroups(self, request):
"""查询资产组列表
:param request: Request instance for DescribeDeviceGroups.
:type request: :class:`tencentcloud.dasb.v20191018.models.DescribeDeviceGroupsRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DescribeDeviceGroupsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeDeviceGroups", params, headers=headers)
response = json.loads(body)
model = models.DescribeDeviceGroupsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeDevices(self, request):
"""查询资产列表
:param request: Request instance for DescribeDevices.
:type request: :class:`tencentcloud.dasb.v20191018.models.DescribeDevicesRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DescribeDevicesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeDevices", params, headers=headers)
response = json.loads(body)
model = models.DescribeDevicesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeDomains(self, request):
"""查询网络域
:param request: Request instance for DescribeDomains.
:type request: :class:`tencentcloud.dasb.v20191018.models.DescribeDomainsRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DescribeDomainsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeDomains", params, headers=headers)
response = json.loads(body)
model = models.DescribeDomainsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeLoginEvent(self, request):
"""查询登录日志
:param request: Request instance for DescribeLoginEvent.
:type request: :class:`tencentcloud.dasb.v20191018.models.DescribeLoginEventRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DescribeLoginEventResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeLoginEvent", params, headers=headers)
response = json.loads(body)
model = models.DescribeLoginEventResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeOperationEvent(self, request):
"""查询操作日志
:param request: Request instance for DescribeOperationEvent.
:type request: :class:`tencentcloud.dasb.v20191018.models.DescribeOperationEventRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DescribeOperationEventResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeOperationEvent", params, headers=headers)
response = json.loads(body)
model = models.DescribeOperationEventResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeResources(self, request):
"""查询用户购买的堡垒机服务信息,包括资源ID、授权点数、VPC、过期时间等。
:param request: Request instance for DescribeResources.
:type request: :class:`tencentcloud.dasb.v20191018.models.DescribeResourcesRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DescribeResourcesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeResources", params, headers=headers)
response = json.loads(body)
model = models.DescribeResourcesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeUserGroupMembers(self, request):
"""查询用户组成员列表
:param request: Request instance for DescribeUserGroupMembers.
:type request: :class:`tencentcloud.dasb.v20191018.models.DescribeUserGroupMembersRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DescribeUserGroupMembersResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeUserGroupMembers", params, headers=headers)
response = json.loads(body)
model = models.DescribeUserGroupMembersResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeUserGroups(self, request):
"""查询用户组列表
:param request: Request instance for DescribeUserGroups.
:type request: :class:`tencentcloud.dasb.v20191018.models.DescribeUserGroupsRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DescribeUserGroupsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeUserGroups", params, headers=headers)
response = json.loads(body)
model = models.DescribeUserGroupsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeUsers(self, request):
"""查询用户列表
:param request: Request instance for DescribeUsers.
:type request: :class:`tencentcloud.dasb.v20191018.models.DescribeUsersRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.DescribeUsersResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeUsers", params, headers=headers)
response = json.loads(body)
model = models.DescribeUsersResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ImportExternalDevice(self, request):
"""导入外部资产信息
:param request: Request instance for ImportExternalDevice.
:type request: :class:`tencentcloud.dasb.v20191018.models.ImportExternalDeviceRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.ImportExternalDeviceResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ImportExternalDevice", params, headers=headers)
response = json.loads(body)
model = models.ImportExternalDeviceResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ModifyAcl(self, request):
"""修改访问权限
:param request: Request instance for ModifyAcl.
:type request: :class:`tencentcloud.dasb.v20191018.models.ModifyAclRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.ModifyAclResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ModifyAcl", params, headers=headers)
response = json.loads(body)
model = models.ModifyAclResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ModifyChangePwdTask(self, request):
"""更新修改密码任务
:param request: Request instance for ModifyChangePwdTask.
:type request: :class:`tencentcloud.dasb.v20191018.models.ModifyChangePwdTaskRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.ModifyChangePwdTaskResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ModifyChangePwdTask", params, headers=headers)
response = json.loads(body)
model = models.ModifyChangePwdTaskResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ModifyCmdTemplate(self, request):
"""修改高危命令模板
:param request: Request instance for ModifyCmdTemplate.
:type request: :class:`tencentcloud.dasb.v20191018.models.ModifyCmdTemplateRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.ModifyCmdTemplateResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ModifyCmdTemplate", params, headers=headers)
response = json.loads(body)
model = models.ModifyCmdTemplateResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ModifyDevice(self, request):
"""修改资产信息
:param request: Request instance for ModifyDevice.
:type request: :class:`tencentcloud.dasb.v20191018.models.ModifyDeviceRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.ModifyDeviceResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ModifyDevice", params, headers=headers)
response = json.loads(body)
model = models.ModifyDeviceResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ModifyDeviceGroup(self, request):
"""修改资产组
:param request: Request instance for ModifyDeviceGroup.
:type request: :class:`tencentcloud.dasb.v20191018.models.ModifyDeviceGroupRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.ModifyDeviceGroupResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ModifyDeviceGroup", params, headers=headers)
response = json.loads(body)
model = models.ModifyDeviceGroupResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ModifyOAuthSetting(self, request):
"""设置OAuth认证参数
:param request: Request instance for ModifyOAuthSetting.
:type request: :class:`tencentcloud.dasb.v20191018.models.ModifyOAuthSettingRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.ModifyOAuthSettingResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ModifyOAuthSetting", params, headers=headers)
response = json.loads(body)
model = models.ModifyOAuthSettingResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ModifyResource(self, request):
"""资源变配
:param request: Request instance for ModifyResource.
:type request: :class:`tencentcloud.dasb.v20191018.models.ModifyResourceRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.ModifyResourceResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ModifyResource", params, headers=headers)
response = json.loads(body)
model = models.ModifyResourceResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ModifyUser(self, request):
"""修改用户信息
:param request: Request instance for ModifyUser.
:type request: :class:`tencentcloud.dasb.v20191018.models.ModifyUserRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.ModifyUserResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ModifyUser", params, headers=headers)
response = json.loads(body)
model = models.ModifyUserResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ModifyUserGroup(self, request):
"""修改用户组
:param request: Request instance for ModifyUserGroup.
:type request: :class:`tencentcloud.dasb.v20191018.models.ModifyUserGroupRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.ModifyUserGroupResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ModifyUserGroup", params, headers=headers)
response = json.loads(body)
model = models.ModifyUserGroupResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ResetDeviceAccountPassword(self, request):
"""清除设备账号绑定密码
:param request: Request instance for ResetDeviceAccountPassword.
:type request: :class:`tencentcloud.dasb.v20191018.models.ResetDeviceAccountPasswordRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.ResetDeviceAccountPasswordResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ResetDeviceAccountPassword", params, headers=headers)
response = json.loads(body)
model = models.ResetDeviceAccountPasswordResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ResetDeviceAccountPrivateKey(self, request):
"""清除设备账号绑定的密钥
:param request: Request instance for ResetDeviceAccountPrivateKey.
:type request: :class:`tencentcloud.dasb.v20191018.models.ResetDeviceAccountPrivateKeyRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.ResetDeviceAccountPrivateKeyResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ResetDeviceAccountPrivateKey", params, headers=headers)
response = json.loads(body)
model = models.ResetDeviceAccountPrivateKeyResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ResetUser(self, request):
"""重置用户
:param request: Request instance for ResetUser.
:type request: :class:`tencentcloud.dasb.v20191018.models.ResetUserRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.ResetUserResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ResetUser", params, headers=headers)
response = json.loads(body)
model = models.ResetUserResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def RunChangePwdTask(self, request):
"""执行改密任务
:param request: Request instance for RunChangePwdTask.
:type request: :class:`tencentcloud.dasb.v20191018.models.RunChangePwdTaskRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.RunChangePwdTaskResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("RunChangePwdTask", params, headers=headers)
response = json.loads(body)
model = models.RunChangePwdTaskResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def SearchAuditLog(self, request):
"""搜索审计日志
:param request: Request instance for SearchAuditLog.
:type request: :class:`tencentcloud.dasb.v20191018.models.SearchAuditLogRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.SearchAuditLogResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("SearchAuditLog", params, headers=headers)
response = json.loads(body)
model = models.SearchAuditLogResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def SearchCommand(self, request):
"""命令执行检索
:param request: Request instance for SearchCommand.
:type request: :class:`tencentcloud.dasb.v20191018.models.SearchCommandRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.SearchCommandResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("SearchCommand", params, headers=headers)
response = json.loads(body)
model = models.SearchCommandResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def SearchCommandBySid(self, request):
"""根据会话Id搜索Command
:param request: Request instance for SearchCommandBySid.
:type request: :class:`tencentcloud.dasb.v20191018.models.SearchCommandBySidRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.SearchCommandBySidResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("SearchCommandBySid", params, headers=headers)
response = json.loads(body)
model = models.SearchCommandBySidResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def SearchFile(self, request):
"""文件传输检索
:param request: Request instance for SearchFile.
:type request: :class:`tencentcloud.dasb.v20191018.models.SearchFileRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.SearchFileResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("SearchFile", params, headers=headers)
response = json.loads(body)
model = models.SearchFileResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def SearchFileBySid(self, request):
"""搜索文件传输会话下文件操作列表
:param request: Request instance for SearchFileBySid.
:type request: :class:`tencentcloud.dasb.v20191018.models.SearchFileBySidRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.SearchFileBySidResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("SearchFileBySid", params, headers=headers)
response = json.loads(body)
model = models.SearchFileBySidResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def SearchSession(self, request):
"""搜索会话
:param request: Request instance for SearchSession.
:type request: :class:`tencentcloud.dasb.v20191018.models.SearchSessionRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.SearchSessionResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("SearchSession", params, headers=headers)
response = json.loads(body)
model = models.SearchSessionResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def SearchSessionCommand(self, request):
"""命令检索
:param request: Request instance for SearchSessionCommand.
:type request: :class:`tencentcloud.dasb.v20191018.models.SearchSessionCommandRequest`
:rtype: :class:`tencentcloud.dasb.v20191018.models.SearchSessionCommandResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("SearchSessionCommand", params, headers=headers)
response = json.loads(body)
model = models.SearchSessionCommandResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tencentcloud/tencentcloud-sdk-python.git
git@gitee.com:tencentcloud/tencentcloud-sdk-python.git
tencentcloud
tencentcloud-sdk-python
tencentcloud-sdk-python
master

搜索帮助