1 Star 17 Fork 2

tencentcloud/tencentcloud-sdk-python

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
cfs_client.py 40.39 KB
一键复制 编辑 原始数据 按行查看 历史
tencentcloud 提交于 2024-08-02 04:24 . release 3.0.1203
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022
# -*- 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.cfs.v20190719 import models
class CfsClient(AbstractClient):
_apiVersion = '2019-07-19'
_endpoint = 'cfs.tencentcloudapi.com'
_service = 'cfs'
def BindAutoSnapshotPolicy(self, request):
"""文件系统绑定快照策略,可以同时绑定多个fs,一个fs 只能跟一个策略绑定
:param request: Request instance for BindAutoSnapshotPolicy.
:type request: :class:`tencentcloud.cfs.v20190719.models.BindAutoSnapshotPolicyRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.BindAutoSnapshotPolicyResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("BindAutoSnapshotPolicy", params, headers=headers)
response = json.loads(body)
model = models.BindAutoSnapshotPolicyResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateAutoSnapshotPolicy(self, request):
"""创建定期快照策略
:param request: Request instance for CreateAutoSnapshotPolicy.
:type request: :class:`tencentcloud.cfs.v20190719.models.CreateAutoSnapshotPolicyRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.CreateAutoSnapshotPolicyResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateAutoSnapshotPolicy", params, headers=headers)
response = json.loads(body)
model = models.CreateAutoSnapshotPolicyResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateCfsFileSystem(self, request):
"""用于添加新文件系统
:param request: Request instance for CreateCfsFileSystem.
:type request: :class:`tencentcloud.cfs.v20190719.models.CreateCfsFileSystemRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.CreateCfsFileSystemResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateCfsFileSystem", params, headers=headers)
response = json.loads(body)
model = models.CreateCfsFileSystemResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateCfsPGroup(self, request):
"""本接口(CreateCfsPGroup)用于创建权限组
:param request: Request instance for CreateCfsPGroup.
:type request: :class:`tencentcloud.cfs.v20190719.models.CreateCfsPGroupRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.CreateCfsPGroupResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateCfsPGroup", params, headers=headers)
response = json.loads(body)
model = models.CreateCfsPGroupResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateCfsRule(self, request):
"""本接口(CreateCfsRule)用于创建权限组规则。
:param request: Request instance for CreateCfsRule.
:type request: :class:`tencentcloud.cfs.v20190719.models.CreateCfsRuleRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.CreateCfsRuleResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateCfsRule", params, headers=headers)
response = json.loads(body)
model = models.CreateCfsRuleResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateCfsSnapshot(self, request):
"""创建文件系统快照
:param request: Request instance for CreateCfsSnapshot.
:type request: :class:`tencentcloud.cfs.v20190719.models.CreateCfsSnapshotRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.CreateCfsSnapshotResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateCfsSnapshot", params, headers=headers)
response = json.loads(body)
model = models.CreateCfsSnapshotResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateMigrationTask(self, request):
"""用于创建迁移任务。
此接口需提交工单,开启白名单之后才能使用。
:param request: Request instance for CreateMigrationTask.
:type request: :class:`tencentcloud.cfs.v20190719.models.CreateMigrationTaskRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.CreateMigrationTaskResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateMigrationTask", params, headers=headers)
response = json.loads(body)
model = models.CreateMigrationTaskResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteAutoSnapshotPolicy(self, request):
"""删除快照定期策略
:param request: Request instance for DeleteAutoSnapshotPolicy.
:type request: :class:`tencentcloud.cfs.v20190719.models.DeleteAutoSnapshotPolicyRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DeleteAutoSnapshotPolicyResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteAutoSnapshotPolicy", params, headers=headers)
response = json.loads(body)
model = models.DeleteAutoSnapshotPolicyResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteCfsFileSystem(self, request):
"""用于删除文件系统
:param request: Request instance for DeleteCfsFileSystem.
:type request: :class:`tencentcloud.cfs.v20190719.models.DeleteCfsFileSystemRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DeleteCfsFileSystemResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteCfsFileSystem", params, headers=headers)
response = json.loads(body)
model = models.DeleteCfsFileSystemResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteCfsPGroup(self, request):
"""本接口(DeleteCfsPGroup)用于删除权限组。
:param request: Request instance for DeleteCfsPGroup.
:type request: :class:`tencentcloud.cfs.v20190719.models.DeleteCfsPGroupRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DeleteCfsPGroupResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteCfsPGroup", params, headers=headers)
response = json.loads(body)
model = models.DeleteCfsPGroupResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteCfsRule(self, request):
"""本接口(DeleteCfsRule)用于删除权限组规则。
:param request: Request instance for DeleteCfsRule.
:type request: :class:`tencentcloud.cfs.v20190719.models.DeleteCfsRuleRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DeleteCfsRuleResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteCfsRule", params, headers=headers)
response = json.loads(body)
model = models.DeleteCfsRuleResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteCfsSnapshot(self, request):
"""删除文件系统快照
:param request: Request instance for DeleteCfsSnapshot.
:type request: :class:`tencentcloud.cfs.v20190719.models.DeleteCfsSnapshotRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DeleteCfsSnapshotResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteCfsSnapshot", params, headers=headers)
response = json.loads(body)
model = models.DeleteCfsSnapshotResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteMigrationTask(self, request):
"""用于删除迁移任务。
此接口需提交工单,开启白名单之后才能使用。
:param request: Request instance for DeleteMigrationTask.
:type request: :class:`tencentcloud.cfs.v20190719.models.DeleteMigrationTaskRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DeleteMigrationTaskResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteMigrationTask", params, headers=headers)
response = json.loads(body)
model = models.DeleteMigrationTaskResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteMountTarget(self, request):
"""本接口(DeleteMountTarget)用于删除挂载点
说明:2022年6月1日之后创建的CFS文件系统删除时无需单独调用删除挂载点操作,此API仅适用老版本的CFS实例。
:param request: Request instance for DeleteMountTarget.
:type request: :class:`tencentcloud.cfs.v20190719.models.DeleteMountTargetRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DeleteMountTargetResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteMountTarget", params, headers=headers)
response = json.loads(body)
model = models.DeleteMountTargetResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteUserQuota(self, request):
"""指定条件删除文件系统配额(仅部分Turbo实例能使用,若需要调用请提交工单与我们联系)
:param request: Request instance for DeleteUserQuota.
:type request: :class:`tencentcloud.cfs.v20190719.models.DeleteUserQuotaRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DeleteUserQuotaResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteUserQuota", params, headers=headers)
response = json.loads(body)
model = models.DeleteUserQuotaResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeAutoSnapshotPolicies(self, request):
"""查询文件系统快照定期策略列表信息
:param request: Request instance for DescribeAutoSnapshotPolicies.
:type request: :class:`tencentcloud.cfs.v20190719.models.DescribeAutoSnapshotPoliciesRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DescribeAutoSnapshotPoliciesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeAutoSnapshotPolicies", params, headers=headers)
response = json.loads(body)
model = models.DescribeAutoSnapshotPoliciesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeAvailableZoneInfo(self, request):
"""本接口(DescribeAvailableZoneInfo)用于查询区域的可用情况。
:param request: Request instance for DescribeAvailableZoneInfo.
:type request: :class:`tencentcloud.cfs.v20190719.models.DescribeAvailableZoneInfoRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DescribeAvailableZoneInfoResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeAvailableZoneInfo", params, headers=headers)
response = json.loads(body)
model = models.DescribeAvailableZoneInfoResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeBucketList(self, request):
"""用于获取数据源桶列表。
此接口需提交工单,开启白名单之后才能使用。
:param request: Request instance for DescribeBucketList.
:type request: :class:`tencentcloud.cfs.v20190719.models.DescribeBucketListRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DescribeBucketListResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeBucketList", params, headers=headers)
response = json.loads(body)
model = models.DescribeBucketListResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeCfsFileSystemClients(self, request):
"""查询挂载该文件系统的客户端。此功能需要客户端安装CFS监控插件。
:param request: Request instance for DescribeCfsFileSystemClients.
:type request: :class:`tencentcloud.cfs.v20190719.models.DescribeCfsFileSystemClientsRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DescribeCfsFileSystemClientsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeCfsFileSystemClients", params, headers=headers)
response = json.loads(body)
model = models.DescribeCfsFileSystemClientsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeCfsFileSystems(self, request):
"""本接口(DescribeCfsFileSystems)用于查询文件系统
:param request: Request instance for DescribeCfsFileSystems.
:type request: :class:`tencentcloud.cfs.v20190719.models.DescribeCfsFileSystemsRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DescribeCfsFileSystemsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeCfsFileSystems", params, headers=headers)
response = json.loads(body)
model = models.DescribeCfsFileSystemsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeCfsPGroups(self, request):
"""本接口(DescribeCfsPGroups)用于查询权限组列表。
:param request: Request instance for DescribeCfsPGroups.
:type request: :class:`tencentcloud.cfs.v20190719.models.DescribeCfsPGroupsRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DescribeCfsPGroupsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeCfsPGroups", params, headers=headers)
response = json.loads(body)
model = models.DescribeCfsPGroupsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeCfsRules(self, request):
"""本接口(DescribeCfsRules)用于查询权限组规则列表。
:param request: Request instance for DescribeCfsRules.
:type request: :class:`tencentcloud.cfs.v20190719.models.DescribeCfsRulesRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DescribeCfsRulesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeCfsRules", params, headers=headers)
response = json.loads(body)
model = models.DescribeCfsRulesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeCfsServiceStatus(self, request):
"""本接口(DescribeCfsServiceStatus)用于查询用户使用CFS的服务状态。
:param request: Request instance for DescribeCfsServiceStatus.
:type request: :class:`tencentcloud.cfs.v20190719.models.DescribeCfsServiceStatusRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DescribeCfsServiceStatusResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeCfsServiceStatus", params, headers=headers)
response = json.loads(body)
model = models.DescribeCfsServiceStatusResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeCfsSnapshotOverview(self, request):
"""文件系统快照概览
:param request: Request instance for DescribeCfsSnapshotOverview.
:type request: :class:`tencentcloud.cfs.v20190719.models.DescribeCfsSnapshotOverviewRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DescribeCfsSnapshotOverviewResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeCfsSnapshotOverview", params, headers=headers)
response = json.loads(body)
model = models.DescribeCfsSnapshotOverviewResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeCfsSnapshots(self, request):
"""查询文件系统快照列表
:param request: Request instance for DescribeCfsSnapshots.
:type request: :class:`tencentcloud.cfs.v20190719.models.DescribeCfsSnapshotsRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DescribeCfsSnapshotsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeCfsSnapshots", params, headers=headers)
response = json.loads(body)
model = models.DescribeCfsSnapshotsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeMigrationTasks(self, request):
"""用于获取迁移任务列表。
此接口需提交工单,开启白名单之后才能使用。
:param request: Request instance for DescribeMigrationTasks.
:type request: :class:`tencentcloud.cfs.v20190719.models.DescribeMigrationTasksRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DescribeMigrationTasksResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeMigrationTasks", params, headers=headers)
response = json.loads(body)
model = models.DescribeMigrationTasksResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeMountTargets(self, request):
"""本接口(DescribeMountTargets)用于查询文件系统挂载点信息
:param request: Request instance for DescribeMountTargets.
:type request: :class:`tencentcloud.cfs.v20190719.models.DescribeMountTargetsRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DescribeMountTargetsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeMountTargets", params, headers=headers)
response = json.loads(body)
model = models.DescribeMountTargetsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeSnapshotOperationLogs(self, request):
"""查询快照操作日志
:param request: Request instance for DescribeSnapshotOperationLogs.
:type request: :class:`tencentcloud.cfs.v20190719.models.DescribeSnapshotOperationLogsRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DescribeSnapshotOperationLogsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeSnapshotOperationLogs", params, headers=headers)
response = json.loads(body)
model = models.DescribeSnapshotOperationLogsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeUserQuota(self, request):
"""查询文件系统配额(仅部分Turbo实例能使用,若需要调用请提交工单与我们联系)
:param request: Request instance for DescribeUserQuota.
:type request: :class:`tencentcloud.cfs.v20190719.models.DescribeUserQuotaRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.DescribeUserQuotaResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeUserQuota", params, headers=headers)
response = json.loads(body)
model = models.DescribeUserQuotaResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ModifyFileSystemAutoScaleUpRule(self, request):
"""用来设置文件系统扩容策略
:param request: Request instance for ModifyFileSystemAutoScaleUpRule.
:type request: :class:`tencentcloud.cfs.v20190719.models.ModifyFileSystemAutoScaleUpRuleRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.ModifyFileSystemAutoScaleUpRuleResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ModifyFileSystemAutoScaleUpRule", params, headers=headers)
response = json.loads(body)
model = models.ModifyFileSystemAutoScaleUpRuleResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ScaleUpFileSystem(self, request):
"""该接口用于对turbo 文件系统扩容使用
:param request: Request instance for ScaleUpFileSystem.
:type request: :class:`tencentcloud.cfs.v20190719.models.ScaleUpFileSystemRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.ScaleUpFileSystemResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ScaleUpFileSystem", params, headers=headers)
response = json.loads(body)
model = models.ScaleUpFileSystemResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def SetUserQuota(self, request):
"""设置文件系统配额,提供UID/GID的配额设置的接口(仅部分Turbo实例能使用,若需要调用请提交工单与我们联系)
:param request: Request instance for SetUserQuota.
:type request: :class:`tencentcloud.cfs.v20190719.models.SetUserQuotaRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.SetUserQuotaResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("SetUserQuota", params, headers=headers)
response = json.loads(body)
model = models.SetUserQuotaResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def SignUpCfsService(self, request):
"""本接口(SignUpCfsService)用于开通CFS服务。
:param request: Request instance for SignUpCfsService.
:type request: :class:`tencentcloud.cfs.v20190719.models.SignUpCfsServiceRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.SignUpCfsServiceResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("SignUpCfsService", params, headers=headers)
response = json.loads(body)
model = models.SignUpCfsServiceResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def StopMigrationTask(self, request):
"""用于终止迁移任务。
此接口需提交工单,开启白名单之后才能使用。
:param request: Request instance for StopMigrationTask.
:type request: :class:`tencentcloud.cfs.v20190719.models.StopMigrationTaskRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.StopMigrationTaskResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("StopMigrationTask", params, headers=headers)
response = json.loads(body)
model = models.StopMigrationTaskResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def UnbindAutoSnapshotPolicy(self, request):
"""解除文件系统绑定的快照策略
:param request: Request instance for UnbindAutoSnapshotPolicy.
:type request: :class:`tencentcloud.cfs.v20190719.models.UnbindAutoSnapshotPolicyRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.UnbindAutoSnapshotPolicyResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("UnbindAutoSnapshotPolicy", params, headers=headers)
response = json.loads(body)
model = models.UnbindAutoSnapshotPolicyResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def UpdateAutoSnapshotPolicy(self, request):
"""更新定期自动快照策略
:param request: Request instance for UpdateAutoSnapshotPolicy.
:type request: :class:`tencentcloud.cfs.v20190719.models.UpdateAutoSnapshotPolicyRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.UpdateAutoSnapshotPolicyResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("UpdateAutoSnapshotPolicy", params, headers=headers)
response = json.loads(body)
model = models.UpdateAutoSnapshotPolicyResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def UpdateCfsFileSystemName(self, request):
"""本接口(UpdateCfsFileSystemName)用于更新文件系统名
:param request: Request instance for UpdateCfsFileSystemName.
:type request: :class:`tencentcloud.cfs.v20190719.models.UpdateCfsFileSystemNameRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.UpdateCfsFileSystemNameResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("UpdateCfsFileSystemName", params, headers=headers)
response = json.loads(body)
model = models.UpdateCfsFileSystemNameResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def UpdateCfsFileSystemPGroup(self, request):
"""本接口(UpdateCfsFileSystemPGroup)用于更新文件系统所使用的权限组
:param request: Request instance for UpdateCfsFileSystemPGroup.
:type request: :class:`tencentcloud.cfs.v20190719.models.UpdateCfsFileSystemPGroupRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.UpdateCfsFileSystemPGroupResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("UpdateCfsFileSystemPGroup", params, headers=headers)
response = json.loads(body)
model = models.UpdateCfsFileSystemPGroupResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def UpdateCfsFileSystemSizeLimit(self, request):
"""本接口(UpdateCfsFileSystemSizeLimit)用于更新文件系统存储容量限制。
:param request: Request instance for UpdateCfsFileSystemSizeLimit.
:type request: :class:`tencentcloud.cfs.v20190719.models.UpdateCfsFileSystemSizeLimitRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.UpdateCfsFileSystemSizeLimitResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("UpdateCfsFileSystemSizeLimit", params, headers=headers)
response = json.loads(body)
model = models.UpdateCfsFileSystemSizeLimitResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def UpdateCfsPGroup(self, request):
"""本接口(UpdateCfsPGroup)更新权限组信息。
:param request: Request instance for UpdateCfsPGroup.
:type request: :class:`tencentcloud.cfs.v20190719.models.UpdateCfsPGroupRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.UpdateCfsPGroupResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("UpdateCfsPGroup", params, headers=headers)
response = json.loads(body)
model = models.UpdateCfsPGroupResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def UpdateCfsRule(self, request):
"""本接口(UpdateCfsRule)用于更新权限规则。
:param request: Request instance for UpdateCfsRule.
:type request: :class:`tencentcloud.cfs.v20190719.models.UpdateCfsRuleRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.UpdateCfsRuleResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("UpdateCfsRule", params, headers=headers)
response = json.loads(body)
model = models.UpdateCfsRuleResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def UpdateCfsSnapshotAttribute(self, request):
"""更新文件系统快照名称及保留时长
:param request: Request instance for UpdateCfsSnapshotAttribute.
:type request: :class:`tencentcloud.cfs.v20190719.models.UpdateCfsSnapshotAttributeRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.UpdateCfsSnapshotAttributeResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("UpdateCfsSnapshotAttribute", params, headers=headers)
response = json.loads(body)
model = models.UpdateCfsSnapshotAttributeResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def UpdateFileSystemBandwidthLimit(self, request):
"""更新文件系统吞吐
仅吞吐型支持此接口
:param request: Request instance for UpdateFileSystemBandwidthLimit.
:type request: :class:`tencentcloud.cfs.v20190719.models.UpdateFileSystemBandwidthLimitRequest`
:rtype: :class:`tencentcloud.cfs.v20190719.models.UpdateFileSystemBandwidthLimitResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("UpdateFileSystemBandwidthLimit", params, headers=headers)
response = json.loads(body)
model = models.UpdateFileSystemBandwidthLimitResponse()
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

搜索帮助