def ModifySnapshotAttribute(self, request): """本接口(ModifySnapshotAttribute)用于修改指定快照的属性。 * 当前仅支持修改快照名称及将非永久快照修改为永久快照。 * “快照名称”仅为方便用户自己管理之用,腾讯云并不以此名称作为提交工单或是进行快照管理操作的依据。 :param request: Request instance for ModifySnapshotAttribute. :type request: :class:`tencentcloud.cbs.v20170312.models.ModifySnapshotAttributeRequest` :rtype: :class:`tencentcloud.cbs.v20170312.models.ModifySnapshotAttributeResponse` """ try: params = request._serialize() body = self.call("ModifySnapshotAttribute", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.ModifySnapshotAttributeResponse() model._deserialize(response["Response"]) return model else: code = response["Response"]["Error"]["Code"] message = response["Response"]["Error"]["Message"] reqid = response["Response"]["RequestId"] raise TencentCloudSDKException(code, message, reqid) except Exception as e: if isinstance(e, TencentCloudSDKException): raise else: raise TencentCloudSDKException(e.message, e.message)
def ModifySnapshotAttribute(self, request): """This API (ModifySnapshotAttribute) is used to modify the attributes of a specified snapshot. * Currently, you can only modify snapshot name and change non-permanent snapshots into permanent snapshots. * "Snapshot name" is only used by users for their management. Tencent Cloud does not use the name as the basis for ticket submission or snapshot management. :param request: Request instance for ModifySnapshotAttribute. :type request: :class:`tencentcloud.cbs.v20170312.models.ModifySnapshotAttributeRequest` :rtype: :class:`tencentcloud.cbs.v20170312.models.ModifySnapshotAttributeResponse` """ try: params = request._serialize() body = self.call("ModifySnapshotAttribute", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.ModifySnapshotAttributeResponse() model._deserialize(response["Response"]) return model else: code = response["Response"]["Error"]["Code"] message = response["Response"]["Error"]["Message"] reqid = response["Response"]["RequestId"] raise TencentCloudSDKException(code, message, reqid) except Exception as e: if isinstance(e, TencentCloudSDKException): raise else: raise TencentCloudSDKException(e.message, e.message)