tencentcloud-sdk-region 3.0.371

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2695c4d07fcc417edf6a9cb7b628a878f7e47282
4
+ data.tar.gz: 3944ed0b34be2603e6b25a68533ce54fc42a00d8
5
+ SHA512:
6
+ metadata.gz: f83bb8b035bc908b482f245d4283d3e68e35a97e4788af45b91057787bd14ba878a53f15508945e786d79761c0a5db7a96f2ac7440d420e88799b0955fba9640
7
+ data.tar.gz: c755402ec2d05b67a9dc6b034a7b9d36828e67f8afb380753a611a878ad44e54b5578ef4ff7c0c81673b300ec6bd0c9f79464ca7d76cb4eb433ce1af7ca8f65d
data/lib/VERSION ADDED
@@ -0,0 +1 @@
1
+ 3.0.371
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tencentcloud-sdk-common'
4
+
5
+ require_relative 'v20220627/client'
6
+ require_relative 'v20220627/models'
7
+
8
+ module TencentCloud
9
+ module Region
10
+ end
11
+ end
@@ -0,0 +1,108 @@
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 Region
21
+ module V20220627
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2022-06-27'
26
+ api_endpoint = 'region.tencentcloudapi.com'
27
+ sdk_version = 'REGION_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 本接口(DescribeProducts)用于查询各个支持地域列表查询的产品信息。
33
+
34
+ # @param request: Request instance for DescribeProducts.
35
+ # @type request: :class:`Tencentcloud::region::V20220627::DescribeProductsRequest`
36
+ # @rtype: :class:`Tencentcloud::region::V20220627::DescribeProductsResponse`
37
+ def DescribeProducts(request)
38
+ body = send_request('DescribeProducts', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = DescribeProductsResponse.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
+ # 本接口(DescribeRegions)用于查询各个产品支持地域信息。
57
+
58
+ # @param request: Request instance for DescribeRegions.
59
+ # @type request: :class:`Tencentcloud::region::V20220627::DescribeRegionsRequest`
60
+ # @rtype: :class:`Tencentcloud::region::V20220627::DescribeRegionsResponse`
61
+ def DescribeRegions(request)
62
+ body = send_request('DescribeRegions', request.serialize)
63
+ response = JSON.parse(body)
64
+ if response['Response'].key?('Error') == false
65
+ model = DescribeRegionsResponse.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
+ # 本接口(DescribeZones)用于查询产品可用区信息。
81
+
82
+ # @param request: Request instance for DescribeZones.
83
+ # @type request: :class:`Tencentcloud::region::V20220627::DescribeZonesRequest`
84
+ # @rtype: :class:`Tencentcloud::region::V20220627::DescribeZonesResponse`
85
+ def DescribeZones(request)
86
+ body = send_request('DescribeZones', request.serialize)
87
+ response = JSON.parse(body)
88
+ if response['Response'].key?('Error') == false
89
+ model = DescribeZonesResponse.new
90
+ model.deserialize(response['Response'])
91
+ model
92
+ else
93
+ code = response['Response']['Error']['Code']
94
+ message = response['Response']['Error']['Message']
95
+ reqid = response['Response']['RequestId']
96
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
97
+ end
98
+ rescue TencentCloud::Common::TencentCloudSDKException => e
99
+ raise e
100
+ rescue StandardError => e
101
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
102
+ end
103
+
104
+
105
+ end
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,280 @@
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 Region
19
+ module V20220627
20
+ # DescribeProducts请求参数结构体
21
+ class DescribeProductsRequest < TencentCloud::Common::AbstractModel
22
+ # @param Limit: 返回数量,默认为 20,最大值为 100。
23
+ # @type Limit: Integer
24
+ # @param Offset: 偏移量,默认为 0。
25
+ # @type Offset: Integer
26
+
27
+ attr_accessor :Limit, :Offset
28
+
29
+ def initialize(limit=nil, offset=nil)
30
+ @Limit = limit
31
+ @Offset = offset
32
+ end
33
+
34
+ def deserialize(params)
35
+ @Limit = params['Limit']
36
+ @Offset = params['Offset']
37
+ end
38
+ end
39
+
40
+ # DescribeProducts返回参数结构体
41
+ class DescribeProductsResponse < TencentCloud::Common::AbstractModel
42
+ # @param Products: 产品详细信息列表。
43
+ # @type Products: Array
44
+ # @param TotalCount: 产品总数量。
45
+ # @type TotalCount: Integer
46
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
47
+ # @type RequestId: String
48
+
49
+ attr_accessor :Products, :TotalCount, :RequestId
50
+
51
+ def initialize(products=nil, totalcount=nil, requestid=nil)
52
+ @Products = products
53
+ @TotalCount = totalcount
54
+ @RequestId = requestid
55
+ end
56
+
57
+ def deserialize(params)
58
+ unless params['Products'].nil?
59
+ @Products = []
60
+ params['Products'].each do |i|
61
+ regionproduct_tmp = RegionProduct.new
62
+ regionproduct_tmp.deserialize(i)
63
+ @Products << regionproduct_tmp
64
+ end
65
+ end
66
+ @TotalCount = params['TotalCount']
67
+ @RequestId = params['RequestId']
68
+ end
69
+ end
70
+
71
+ # DescribeRegions请求参数结构体
72
+ class DescribeRegionsRequest < TencentCloud::Common::AbstractModel
73
+ # @param Product: 待查询产品的名称,例如cvm,具体取值请查询DescribeProducts接口
74
+ # @type Product: String
75
+
76
+ attr_accessor :Product
77
+
78
+ def initialize(product=nil)
79
+ @Product = product
80
+ end
81
+
82
+ def deserialize(params)
83
+ @Product = params['Product']
84
+ end
85
+ end
86
+
87
+ # DescribeRegions返回参数结构体
88
+ class DescribeRegionsResponse < TencentCloud::Common::AbstractModel
89
+ # @param TotalCount: 地域数量
90
+ # @type TotalCount: Integer
91
+ # @param RegionSet: 地域列表信息
92
+ # @type RegionSet: Array
93
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
94
+ # @type RequestId: String
95
+
96
+ attr_accessor :TotalCount, :RegionSet, :RequestId
97
+
98
+ def initialize(totalcount=nil, regionset=nil, requestid=nil)
99
+ @TotalCount = totalcount
100
+ @RegionSet = regionset
101
+ @RequestId = requestid
102
+ end
103
+
104
+ def deserialize(params)
105
+ @TotalCount = params['TotalCount']
106
+ unless params['RegionSet'].nil?
107
+ @RegionSet = []
108
+ params['RegionSet'].each do |i|
109
+ regioninfo_tmp = RegionInfo.new
110
+ regioninfo_tmp.deserialize(i)
111
+ @RegionSet << regioninfo_tmp
112
+ end
113
+ end
114
+ @RequestId = params['RequestId']
115
+ end
116
+ end
117
+
118
+ # DescribeZones请求参数结构体
119
+ class DescribeZonesRequest < TencentCloud::Common::AbstractModel
120
+ # @param Product: 待查询产品的名称,例如cvm,具体取值请查询DescribeProducts接口
121
+ # @type Product: String
122
+
123
+ attr_accessor :Product
124
+
125
+ def initialize(product=nil)
126
+ @Product = product
127
+ end
128
+
129
+ def deserialize(params)
130
+ @Product = params['Product']
131
+ end
132
+ end
133
+
134
+ # DescribeZones返回参数结构体
135
+ class DescribeZonesResponse < TencentCloud::Common::AbstractModel
136
+ # @param TotalCount: 可用区数量。
137
+ # @type TotalCount: Integer
138
+ # @param ZoneSet: 可用区列表信息。
139
+ # @type ZoneSet: Array
140
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
141
+ # @type RequestId: String
142
+
143
+ attr_accessor :TotalCount, :ZoneSet, :RequestId
144
+
145
+ def initialize(totalcount=nil, zoneset=nil, requestid=nil)
146
+ @TotalCount = totalcount
147
+ @ZoneSet = zoneset
148
+ @RequestId = requestid
149
+ end
150
+
151
+ def deserialize(params)
152
+ @TotalCount = params['TotalCount']
153
+ unless params['ZoneSet'].nil?
154
+ @ZoneSet = []
155
+ params['ZoneSet'].each do |i|
156
+ zoneinfo_tmp = ZoneInfo.new
157
+ zoneinfo_tmp.deserialize(i)
158
+ @ZoneSet << zoneinfo_tmp
159
+ end
160
+ end
161
+ @RequestId = params['RequestId']
162
+ end
163
+ end
164
+
165
+ # 地域信息
166
+ class RegionInfo < TencentCloud::Common::AbstractModel
167
+ # @param Region: 地域名称,例如,ap-guangzhou
168
+ # @type Region: String
169
+ # @param RegionName: 地域描述,例如,华南地区(广州)
170
+ # @type RegionName: String
171
+ # @param RegionState: 地域是否可用状态
172
+ # @type RegionState: String
173
+
174
+ attr_accessor :Region, :RegionName, :RegionState
175
+
176
+ def initialize(region=nil, regionname=nil, regionstate=nil)
177
+ @Region = region
178
+ @RegionName = regionname
179
+ @RegionState = regionstate
180
+ end
181
+
182
+ def deserialize(params)
183
+ @Region = params['Region']
184
+ @RegionName = params['RegionName']
185
+ @RegionState = params['RegionState']
186
+ end
187
+ end
188
+
189
+ # 地域管理系统支持的产品信息
190
+ class RegionProduct < TencentCloud::Common::AbstractModel
191
+ # @param Name: 产品名称,如cvm
192
+ # @type Name: String
193
+
194
+ attr_accessor :Name
195
+
196
+ def initialize(name=nil)
197
+ @Name = name
198
+ end
199
+
200
+ def deserialize(params)
201
+ @Name = params['Name']
202
+ end
203
+ end
204
+
205
+ # 可用区信息
206
+ class ZoneInfo < TencentCloud::Common::AbstractModel
207
+ # @param Zone: 可用区名称,例如,ap-guangzhou-3
208
+ # 全网可用区名称如下:
209
+ # <li> ap-chongqing-1 </li>
210
+ # <li> ap-seoul-1 </li>
211
+ # <li> ap-seoul-2 </li>
212
+ # <li> ap-chengdu-1 </li>
213
+ # <li> ap-chengdu-2 </li>
214
+ # <li> ap-hongkong-1 </li>
215
+ # <li> ap-hongkong-2 </li>
216
+ # <li> ap-shenzhen-fsi-1 </li>
217
+ # <li> ap-shenzhen-fsi-2 </li>
218
+ # <li> ap-shenzhen-fsi-3 </li>
219
+ # <li> ap-guangzhou-1(售罄)</li>
220
+ # <li> ap-guangzhou-2(售罄)</li>
221
+ # <li> ap-guangzhou-3 </li>
222
+ # <li> ap-guangzhou-4 </li>
223
+ # <li> ap-guangzhou-6 </li>
224
+ # <li> ap-tokyo-1 </li>
225
+ # <li> ap-singapore-1 </li>
226
+ # <li> ap-singapore-2 </li>
227
+ # <li> ap-shanghai-fsi-1 </li>
228
+ # <li> ap-shanghai-fsi-2 </li>
229
+ # <li> ap-shanghai-fsi-3 </li>
230
+ # <li> ap-bangkok-1 </li>
231
+ # <li> ap-shanghai-1(售罄) </li>
232
+ # <li> ap-shanghai-2 </li>
233
+ # <li> ap-shanghai-3 </li>
234
+ # <li> ap-shanghai-4 </li>
235
+ # <li> ap-shanghai-5 </li>
236
+ # <li> ap-mumbai-1 </li>
237
+ # <li> ap-mumbai-2 </li>
238
+ # <li> eu-moscow-1 </li>
239
+ # <li> ap-beijing-1 </li>
240
+ # <li> ap-beijing-2 </li>
241
+ # <li> ap-beijing-3 </li>
242
+ # <li> ap-beijing-4 </li>
243
+ # <li> ap-beijing-5 </li>
244
+ # <li> na-siliconvalley-1 </li>
245
+ # <li> na-siliconvalley-2 </li>
246
+ # <li> eu-frankfurt-1 </li>
247
+ # <li> na-toronto-1 </li>
248
+ # <li> na-ashburn-1 </li>
249
+ # <li> na-ashburn-2 </li>
250
+ # <li> ap-nanjing-1 </li>
251
+ # <li> ap-nanjing-2 </li>
252
+ # @type Zone: String
253
+ # @param ZoneName: 可用区描述,例如,广州三区
254
+ # @type ZoneName: String
255
+ # @param ZoneId: 可用区ID
256
+ # @type ZoneId: String
257
+ # @param ZoneState: 可用区状态,包含AVAILABLE和UNAVAILABLE。AVAILABLE代表可用,UNAVAILABLE代表不可用。
258
+ # @type ZoneState: String
259
+
260
+ attr_accessor :Zone, :ZoneName, :ZoneId, :ZoneState
261
+
262
+ def initialize(zone=nil, zonename=nil, zoneid=nil, zonestate=nil)
263
+ @Zone = zone
264
+ @ZoneName = zonename
265
+ @ZoneId = zoneid
266
+ @ZoneState = zonestate
267
+ end
268
+
269
+ def deserialize(params)
270
+ @Zone = params['Zone']
271
+ @ZoneName = params['ZoneName']
272
+ @ZoneId = params['ZoneId']
273
+ @ZoneState = params['ZoneState']
274
+ end
275
+ end
276
+
277
+ end
278
+ end
279
+ end
280
+
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tencentcloud-sdk-region
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.0.371
5
+ platform: ruby
6
+ authors:
7
+ - Tencent Cloud
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-08-01 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
+ REGION.
30
+ email:
31
+ - tencentcloudapi@tencent.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - lib/VERSION
37
+ - lib/tencentcloud-sdk-region.rb
38
+ - lib/v20220627/client.rb
39
+ - lib/v20220627/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-region
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 - REGION
66
+ test_files: []