class TencentCloud::Smh::V20210712::Client
def CreateLibrary(request)
-
request:
() -- Request instance for CreateLibrary.
def CreateLibrary(request) body = send_request('CreateLibrary', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = CreateLibraryResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] message = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end
def CreateUser(request)
-
request:
() -- Request instance for CreateUser.
def CreateUser(request) body = send_request('CreateUser', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = CreateUserResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] message = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end
def CreateUserLifecycle(request)
-
request:
() -- Request instance for CreateUserLifecycle.
def CreateUserLifecycle(request) body = send_request('CreateUserLifecycle', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = CreateUserLifecycleResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] message = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end
def DeleteLibrary(request)
-
request:
() -- Request instance for DeleteLibrary.
def DeleteLibrary(request) body = send_request('DeleteLibrary', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DeleteLibraryResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] message = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end
def DeleteUser(request)
-
request:
() -- Request instance for DeleteUser.
def DeleteUser(request) body = send_request('DeleteUser', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DeleteUserResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] message = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end
def DescribeLibraries(request)
-
request:
() -- Request instance for DescribeLibraries.
def DescribeLibraries(request) body = send_request('DescribeLibraries', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeLibrariesResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] message = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end
def DescribeLibrarySecret(request)
-
request:
() -- Request instance for DescribeLibrarySecret.
def DescribeLibrarySecret(request) body = send_request('DescribeLibrarySecret', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeLibrarySecretResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] message = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end
def DescribeOfficialInstances(request)
-
request:
() -- Request instance for DescribeOfficialInstances.
def DescribeOfficialInstances(request) body = send_request('DescribeOfficialInstances', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeOfficialInstancesResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] message = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end
def DescribeOfficialOverview(request)
-
request:
() -- Request instance for DescribeOfficialOverview.
def DescribeOfficialOverview(request) body = send_request('DescribeOfficialOverview', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeOfficialOverviewResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] message = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end
def DescribeTrafficPackages(request)
-
request:
() -- Request instance for DescribeTrafficPackages.
def DescribeTrafficPackages(request) body = send_request('DescribeTrafficPackages', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeTrafficPackagesResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] message = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end
def DescribeUserLifecycle(request)
-
request:
() -- Request instance for DescribeUserLifecycle.
def DescribeUserLifecycle(request) body = send_request('DescribeUserLifecycle', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeUserLifecycleResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] message = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end
def ModifyLibrary(request)
-
request:
() -- Request instance for ModifyLibrary.
def ModifyLibrary(request) body = send_request('ModifyLibrary', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = ModifyLibraryResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] message = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end
def ModifyUser(request)
-
request:
() -- Request instance for ModifyUser.
def ModifyUser(request) body = send_request('ModifyUser', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = ModifyUserResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] message = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end
def SendSmsCode(request)
-
request:
() -- Request instance for SendSmsCode.
def SendSmsCode(request) body = send_request('SendSmsCode', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = SendSmsCodeResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] message = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end
def VerifySmsCode(request)
-
request:
() -- Request instance for VerifySmsCode.
def VerifySmsCode(request) body = send_request('VerifySmsCode', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = VerifySmsCodeResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] message = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end
def initialize(credential, region, profile = nil)
def initialize(credential, region, profile = nil) api_version = '2021-07-12' api_endpoint = 'smh.tencentcloudapi.com' sdk_version = 'SMH_' + File.read(File.expand_path('../VERSION', __dir__)).strip super(credential, region, api_version, api_endpoint, sdk_version, profile) end