tencentcloud-sdk-teo 1.0.304

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c33b5fc5519920f7bbdd6ab71fc9f9e660135b1f
4
+ data.tar.gz: 41c68e4ec15191fec499583fb522356e1133e231
5
+ SHA512:
6
+ metadata.gz: b4e7b354f259d579f5b0af08f6a1423326c8c9cd62ea07a1879cab68c725f8c90b7ad6c9f0ca06e24ed8642b2f1f74b692cc90d4a64259e2a64da7775a449385
7
+ data.tar.gz: 19c2c0d79ebbde42f9702021cc59f38aa773a75b328729b47a4e479ec3bd315eaa5619a50be8d33c4d50e1ab4117062dca847e3e78a9216ab9dc9b18c4cfde41
data/lib/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.304
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tencentcloud-sdk-common'
4
+
5
+ require_relative 'v20220106/client'
6
+ require_relative 'v20220106/models'
7
+
8
+ module TencentCloud
9
+ module Teo
10
+ end
11
+ end
@@ -0,0 +1,84 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ require 'json'
18
+
19
+ module TencentCloud
20
+ module Teo
21
+ module V20220106
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2022-01-06'
26
+ api_endpoint = 'teo.tencentcloudapi.com'
27
+ sdk_version = 'TEO_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 创建清除缓存任务
33
+
34
+ # @param request: Request instance for CreatePurgeTask.
35
+ # @type request: :class:`Tencentcloud::teo::V20220106::CreatePurgeTaskRequest`
36
+ # @rtype: :class:`Tencentcloud::teo::V20220106::CreatePurgeTaskResponse`
37
+ def CreatePurgeTask(request)
38
+ body = send_request('CreatePurgeTask', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = CreatePurgeTaskResponse.new
42
+ model.deserialize(response['Response'])
43
+ model
44
+ else
45
+ code = response['Response']['Error']['Code']
46
+ message = response['Response']['Error']['Message']
47
+ reqid = response['Response']['RequestId']
48
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
49
+ end
50
+ rescue TencentCloud::Common::TencentCloudSDKException => e
51
+ raise e
52
+ rescue StandardError => e
53
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
54
+ end
55
+
56
+ # 查询清除缓存历史记录
57
+
58
+ # @param request: Request instance for DescribePurgeTasks.
59
+ # @type request: :class:`Tencentcloud::teo::V20220106::DescribePurgeTasksRequest`
60
+ # @rtype: :class:`Tencentcloud::teo::V20220106::DescribePurgeTasksResponse`
61
+ def DescribePurgeTasks(request)
62
+ body = send_request('DescribePurgeTasks', request.serialize)
63
+ response = JSON.parse(body)
64
+ if response['Response'].key?('Error') == false
65
+ model = DescribePurgeTasksResponse.new
66
+ model.deserialize(response['Response'])
67
+ model
68
+ else
69
+ code = response['Response']['Error']['Code']
70
+ message = response['Response']['Error']['Message']
71
+ reqid = response['Response']['RequestId']
72
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
73
+ end
74
+ rescue TencentCloud::Common::TencentCloudSDKException => e
75
+ raise e
76
+ rescue StandardError => e
77
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
78
+ end
79
+
80
+
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,228 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ module TencentCloud
18
+ module Teo
19
+ module V20220106
20
+ # CreatePurgeTask请求参数结构体
21
+ class CreatePurgeTaskRequest < TencentCloud::Common::AbstractModel
22
+ # @param ZoneId: Zone ID
23
+ # @type ZoneId: String
24
+ # @param Type: 类型,当前支持的类型:
25
+ # - purge_url:URL
26
+ # - purge_prefix:前缀
27
+ # - purge_host:Hostname
28
+ # - purge_all:全部缓存
29
+ # @type Type: String
30
+ # @param Targets: 内容,一行一个
31
+ # @type Targets: Array
32
+ # @param EncodeUrl: 若有编码转换,仅清除编码转换后匹配的资源
33
+ # 若内容含有非 ASCII 字符集的字符,请打开 URL Encode 开关,编码转换(编码规则遵循 RFC3986)
34
+ # @type EncodeUrl: Boolean
35
+
36
+ attr_accessor :ZoneId, :Type, :Targets, :EncodeUrl
37
+
38
+ def initialize(zoneid=nil, type=nil, targets=nil, encodeurl=nil)
39
+ @ZoneId = zoneid
40
+ @Type = type
41
+ @Targets = targets
42
+ @EncodeUrl = encodeurl
43
+ end
44
+
45
+ def deserialize(params)
46
+ @ZoneId = params['ZoneId']
47
+ @Type = params['Type']
48
+ @Targets = params['Targets']
49
+ @EncodeUrl = params['EncodeUrl']
50
+ end
51
+ end
52
+
53
+ # CreatePurgeTask返回参数结构体
54
+ class CreatePurgeTaskResponse < TencentCloud::Common::AbstractModel
55
+ # @param JobId: 任务ID
56
+ # @type JobId: String
57
+ # @param FailedList: 失败的任务列表及原因
58
+ # 注意:此字段可能返回 null,表示取不到有效值。
59
+ # @type FailedList: Array
60
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
61
+ # @type RequestId: String
62
+
63
+ attr_accessor :JobId, :FailedList, :RequestId
64
+
65
+ def initialize(jobid=nil, failedlist=nil, requestid=nil)
66
+ @JobId = jobid
67
+ @FailedList = failedlist
68
+ @RequestId = requestid
69
+ end
70
+
71
+ def deserialize(params)
72
+ @JobId = params['JobId']
73
+ unless params['FailedList'].nil?
74
+ @FailedList = []
75
+ params['FailedList'].each do |i|
76
+ failreason_tmp = FailReason.new
77
+ failreason_tmp.deserialize(i)
78
+ @FailedList << failreason_tmp
79
+ end
80
+ end
81
+ @RequestId = params['RequestId']
82
+ end
83
+ end
84
+
85
+ # DescribePurgeTasks请求参数结构体
86
+ class DescribePurgeTasksRequest < TencentCloud::Common::AbstractModel
87
+ # @param JobId: 任务ID
88
+ # @type JobId: String
89
+ # @param Type: 类型
90
+ # @type Type: String
91
+ # @param StartTime: 查询起始时间
92
+ # @type StartTime: String
93
+ # @param EndTime: 查询结束时间
94
+ # @type EndTime: String
95
+ # @param Offset: 查询起始偏移量
96
+ # @type Offset: Integer
97
+ # @param Limit: 查询最大返回的结果条数
98
+ # @type Limit: Integer
99
+ # @param Statuses: 查询的状态
100
+ # 允许的值为:processing、success、failed、timeout、invalid
101
+ # @type Statuses: Array
102
+ # @param ZoneId: zone id
103
+ # @type ZoneId: String
104
+ # @param Domains: 查询的域名列表
105
+ # @type Domains: Array
106
+ # @param Target: 查询内容
107
+ # @type Target: String
108
+
109
+ attr_accessor :JobId, :Type, :StartTime, :EndTime, :Offset, :Limit, :Statuses, :ZoneId, :Domains, :Target
110
+
111
+ def initialize(jobid=nil, type=nil, starttime=nil, endtime=nil, offset=nil, limit=nil, statuses=nil, zoneid=nil, domains=nil, target=nil)
112
+ @JobId = jobid
113
+ @Type = type
114
+ @StartTime = starttime
115
+ @EndTime = endtime
116
+ @Offset = offset
117
+ @Limit = limit
118
+ @Statuses = statuses
119
+ @ZoneId = zoneid
120
+ @Domains = domains
121
+ @Target = target
122
+ end
123
+
124
+ def deserialize(params)
125
+ @JobId = params['JobId']
126
+ @Type = params['Type']
127
+ @StartTime = params['StartTime']
128
+ @EndTime = params['EndTime']
129
+ @Offset = params['Offset']
130
+ @Limit = params['Limit']
131
+ @Statuses = params['Statuses']
132
+ @ZoneId = params['ZoneId']
133
+ @Domains = params['Domains']
134
+ @Target = params['Target']
135
+ end
136
+ end
137
+
138
+ # DescribePurgeTasks返回参数结构体
139
+ class DescribePurgeTasksResponse < TencentCloud::Common::AbstractModel
140
+ # @param TotalCount: 该查询条件总共条目数
141
+ # @type TotalCount: Integer
142
+ # @param Tasks: 任务结果列表
143
+ # @type Tasks: Array
144
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
145
+ # @type RequestId: String
146
+
147
+ attr_accessor :TotalCount, :Tasks, :RequestId
148
+
149
+ def initialize(totalcount=nil, tasks=nil, requestid=nil)
150
+ @TotalCount = totalcount
151
+ @Tasks = tasks
152
+ @RequestId = requestid
153
+ end
154
+
155
+ def deserialize(params)
156
+ @TotalCount = params['TotalCount']
157
+ unless params['Tasks'].nil?
158
+ @Tasks = []
159
+ params['Tasks'].each do |i|
160
+ task_tmp = Task.new
161
+ task_tmp.deserialize(i)
162
+ @Tasks << task_tmp
163
+ end
164
+ end
165
+ @RequestId = params['RequestId']
166
+ end
167
+ end
168
+
169
+ # 失败原因
170
+ class FailReason < TencentCloud::Common::AbstractModel
171
+ # @param Reason: 失败原因
172
+ # @type Reason: String
173
+ # @param Targets: 失败列表
174
+ # @type Targets: Array
175
+
176
+ attr_accessor :Reason, :Targets
177
+
178
+ def initialize(reason=nil, targets=nil)
179
+ @Reason = reason
180
+ @Targets = targets
181
+ end
182
+
183
+ def deserialize(params)
184
+ @Reason = params['Reason']
185
+ @Targets = params['Targets']
186
+ end
187
+ end
188
+
189
+ # 内容管理任务结果
190
+ class Task < TencentCloud::Common::AbstractModel
191
+ # @param JobId: 任务ID
192
+ # @type JobId: String
193
+ # @param Status: 状态
194
+ # @type Status: String
195
+ # @param Target: 资源
196
+ # @type Target: String
197
+ # @param Type: 任务类型
198
+ # @type Type: String
199
+ # @param CreateTime: 任务创建时间
200
+ # @type CreateTime: String
201
+ # @param UpdateTime: 任务完成时间
202
+ # @type UpdateTime: String
203
+
204
+ attr_accessor :JobId, :Status, :Target, :Type, :CreateTime, :UpdateTime
205
+
206
+ def initialize(jobid=nil, status=nil, target=nil, type=nil, createtime=nil, updatetime=nil)
207
+ @JobId = jobid
208
+ @Status = status
209
+ @Target = target
210
+ @Type = type
211
+ @CreateTime = createtime
212
+ @UpdateTime = updatetime
213
+ end
214
+
215
+ def deserialize(params)
216
+ @JobId = params['JobId']
217
+ @Status = params['Status']
218
+ @Target = params['Target']
219
+ @Type = params['Type']
220
+ @CreateTime = params['CreateTime']
221
+ @UpdateTime = params['UpdateTime']
222
+ end
223
+ end
224
+
225
+ end
226
+ end
227
+ end
228
+
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tencentcloud-sdk-teo
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.304
5
+ platform: ruby
6
+ authors:
7
+ - Tencent Cloud
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-04-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: tencentcloud-sdk-common
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.0'
27
+ description: Tencent Cloud Ruby SDK is the official software development kit, which
28
+ allows Ruby developers to write software that makes use of Tencent Cloud service
29
+ TEO.
30
+ email:
31
+ - tencentcloudapi@tencent.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - lib/VERSION
37
+ - lib/tencentcloud-sdk-teo.rb
38
+ - lib/v20220106/client.rb
39
+ - lib/v20220106/models.rb
40
+ homepage: https://github.com/TencentCloud/tencentcloud-sdk-ruby
41
+ licenses:
42
+ - Apache-2.0
43
+ metadata:
44
+ source_code_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/tencentcloud-sdk-teo
45
+ changelog_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/blob/master/CHANGELOG.md
46
+ post_install_message:
47
+ rdoc_options: []
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ requirements: []
61
+ rubyforge_project:
62
+ rubygems_version: 2.6.14
63
+ signing_key:
64
+ specification_version: 4
65
+ summary: Tencent Cloud SDK for Ruby - TEO
66
+ test_files: []