Class: TencentCloud::Teo::V20220106::Client
- Inherits:
-
Common::AbstractClient
- Object
- Common::AbstractClient
- TencentCloud::Teo::V20220106::Client
- Defined in:
- lib/v20220106/client.rb
Instance Method Summary collapse
-
#CreatePrefetchTask(request) ⇒ Object
@rtype: :class:‘Tencentcloud::teo::V20220106::CreatePrefetchTaskResponse`.
-
#CreatePurgeTask(request) ⇒ Object
@rtype: :class:‘Tencentcloud::teo::V20220106::CreatePurgeTaskResponse`.
-
#DescribePrefetchTasks(request) ⇒ Object
@rtype: :class:‘Tencentcloud::teo::V20220106::DescribePrefetchTasksResponse`.
-
#DescribePurgeTasks(request) ⇒ Object
@rtype: :class:‘Tencentcloud::teo::V20220106::DescribePurgeTasksResponse`.
-
#DescribeZones(request) ⇒ Object
@rtype: :class:‘Tencentcloud::teo::V20220106::DescribeZonesResponse`.
-
#initialize(credential, region, profile = nil) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(credential, region, profile = nil) ⇒ Client
24 25 26 27 28 29 |
# File 'lib/v20220106/client.rb', line 24 def initialize(credential, region, profile = nil) api_version = '2022-01-06' api_endpoint = 'teo.tencentcloudapi.com' sdk_version = 'TEO_' + File.read(File.('../VERSION', __dir__)).strip super(credential, region, api_version, api_endpoint, sdk_version, profile) end |
Instance Method Details
#CreatePrefetchTask(request) ⇒ Object
@rtype: :class:‘Tencentcloud::teo::V20220106::CreatePrefetchTaskResponse`
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/v20220106/client.rb', line 39 def CreatePrefetchTask(request) body = send_request('CreatePrefetchTask', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = CreatePrefetchTaskResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#CreatePurgeTask(request) ⇒ Object
@rtype: :class:‘Tencentcloud::teo::V20220106::CreatePurgeTaskResponse`
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/v20220106/client.rb', line 65 def CreatePurgeTask(request) body = send_request('CreatePurgeTask', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = CreatePurgeTaskResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#DescribePrefetchTasks(request) ⇒ Object
@rtype: :class:‘Tencentcloud::teo::V20220106::DescribePrefetchTasksResponse`
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/v20220106/client.rb', line 89 def DescribePrefetchTasks(request) body = send_request('DescribePrefetchTasks', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribePrefetchTasksResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#DescribePurgeTasks(request) ⇒ Object
@rtype: :class:‘Tencentcloud::teo::V20220106::DescribePurgeTasksResponse`
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/v20220106/client.rb', line 113 def DescribePurgeTasks(request) body = send_request('DescribePurgeTasks', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribePurgeTasksResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#DescribeZones(request) ⇒ Object
@rtype: :class:‘Tencentcloud::teo::V20220106::DescribeZonesResponse`
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/v20220106/client.rb', line 137 def DescribeZones(request) body = send_request('DescribeZones', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeZonesResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |