Class: TencentCloud::Ecdn::V20191012::Client
- Inherits:
-
Common::AbstractClient
- Object
- Common::AbstractClient
- TencentCloud::Ecdn::V20191012::Client
- Defined in:
- lib/v20191012/client.rb
Instance Method Summary collapse
-
#DescribeDomains(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ecdn::V20191012::DescribeDomainsResponse`.
-
#DescribeDomainsConfig(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ecdn::V20191012::DescribeDomainsConfigResponse`.
-
#DescribeEcdnDomainLogs(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ecdn::V20191012::DescribeEcdnDomainLogsResponse`.
-
#DescribeEcdnDomainStatistics(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ecdn::V20191012::DescribeEcdnDomainStatisticsResponse`.
-
#DescribeEcdnStatistics(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ecdn::V20191012::DescribeEcdnStatisticsResponse`.
-
#DescribeIpStatus(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ecdn::V20191012::DescribeIpStatusResponse`.
-
#initialize(credential, region, profile = nil) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(credential, region, profile = nil) ⇒ Client
Returns a new instance of Client.
24 25 26 27 28 29 |
# File 'lib/v20191012/client.rb', line 24 def initialize(credential, region, profile = nil) api_version = '2019-10-12' api_endpoint = 'ecdn.tencentcloudapi.com' sdk_version = 'ECDN_' + File.read(File.('../VERSION', __dir__)).strip super(credential, region, api_version, api_endpoint, sdk_version, profile) end |
Instance Method Details
#DescribeDomains(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ecdn::V20191012::DescribeDomainsResponse`
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/v20191012/client.rb', line 41 def DescribeDomains(request) body = send_request('DescribeDomains', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeDomainsResponse.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 |
#DescribeDomainsConfig(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ecdn::V20191012::DescribeDomainsConfigResponse`
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/v20191012/client.rb', line 69 def DescribeDomainsConfig(request) body = send_request('DescribeDomainsConfig', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeDomainsConfigResponse.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 |
#DescribeEcdnDomainLogs(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ecdn::V20191012::DescribeEcdnDomainLogsResponse`
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/v20191012/client.rb', line 95 def DescribeEcdnDomainLogs(request) body = send_request('DescribeEcdnDomainLogs', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeEcdnDomainLogsResponse.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 |
#DescribeEcdnDomainStatistics(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ecdn::V20191012::DescribeEcdnDomainStatisticsResponse`
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/v20191012/client.rb', line 123 def DescribeEcdnDomainStatistics(request) body = send_request('DescribeEcdnDomainStatistics', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeEcdnDomainStatisticsResponse.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 |
#DescribeEcdnStatistics(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ecdn::V20191012::DescribeEcdnStatisticsResponse`
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/v20191012/client.rb', line 157 def DescribeEcdnStatistics(request) body = send_request('DescribeEcdnStatistics', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeEcdnStatisticsResponse.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 |
#DescribeIpStatus(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ecdn::V20191012::DescribeIpStatusResponse`
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/v20191012/client.rb', line 185 def DescribeIpStatus(request) body = send_request('DescribeIpStatus', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeIpStatusResponse.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 |