def CreateAudit(self, request): """Parameter requirements: 1. If the value of `IsCreateNewBucket` exists, `cosRegion` and `cosBucketName` are required. 2. If the value of `IsEnableCmqNotify` is 1, `IsCreateNewQueue`, `CmqRegion`, and `CmqQueueName` are required. 3. If the value of `IsEnableCmqNotify` is 0, `IsCreateNewQueue`, `CmqRegion`, and `CmqQueueName` cannot be passed in. 4. If the value of `IsEnableKmsEncry` is 1, `KmsRegion` and `KeyId` are required. :param request: Request instance for CreateAudit. :type request: :class:`tencentcloud.cloudaudit.v20190319.models.CreateAuditRequest` :rtype: :class:`tencentcloud.cloudaudit.v20190319.models.CreateAuditResponse` """ try: params = request._serialize() body = self.call("CreateAudit", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.CreateAuditResponse() 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 CreateAudit(self, request): """参数要求: 1、如果IsCreateNewBucket的值存在的话,cosRegion和cosBucketName都是必填参数。 2、如果IsEnableCmqNotify的值是1的话,IsCreateNewQueue、CmqRegion和CmqQueueName都是必填参数。 3、如果IsEnableCmqNotify的值是0的话,IsCreateNewQueue、CmqRegion和CmqQueueName都不能传。 4、如果IsEnableKmsEncry的值是1的话,KmsRegion和KeyId属于必填项 :param request: Request instance for CreateAudit. :type request: :class:`tencentcloud.cloudaudit.v20190319.models.CreateAuditRequest` :rtype: :class:`tencentcloud.cloudaudit.v20190319.models.CreateAuditResponse` """ try: params = request._serialize() body = self.call("CreateAudit", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.CreateAuditResponse() 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 CreateAudit(self, request): """创建跟踪集 :param request: Request instance for CreateAudit. :type request: :class:`tencentcloud.cloudaudit.v20190319.models.CreateAuditRequest` :rtype: :class:`tencentcloud.cloudaudit.v20190319.models.CreateAuditResponse` """ try: params = request._serialize() body = self.call("CreateAudit", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.CreateAuditResponse() 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)