tencentcloud-sdk-cdwpg 3.0.669
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 +7 -0
- data/lib/VERSION +1 -0
- data/lib/tencentcloud-sdk-cdwpg.rb +11 -0
- data/lib/v20201230/client.rb +84 -0
- data/lib/v20201230/models.rb +258 -0
- metadata +66 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8caee193518a5df6a219c5ec195fe7c8e07d3c1f
|
4
|
+
data.tar.gz: defe5d0b514b6967f873d403017e265376f0836d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 19d3e66b73aa8cc875e7297edc2562c8b91c692166dfc533e032db99b7318792eef997ec3e0c0b21ad8db635c20a7df9c1ca6750e370cbc8b5a768a22b34b6c1
|
7
|
+
data.tar.gz: d8e3642019c7baceb3347716df83085a53cc67b6f363490b4e94fd780d182c6d1e30aeb287bdaca6e32d652eca3dd618c7e24bb84485d87ef154c68565705143
|
data/lib/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.0.669
|
@@ -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 Cdwpg
|
21
|
+
module V20201230
|
22
|
+
class Client < TencentCloud::Common::AbstractClient
|
23
|
+
|
24
|
+
def initialize(credential, region, profile = nil)
|
25
|
+
api_version = '2020-12-30'
|
26
|
+
api_endpoint = 'cdwpg.tencentcloudapi.com'
|
27
|
+
sdk_version = 'CDWPG_' + 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 CreateInstanceByApi.
|
35
|
+
# @type request: :class:`Tencentcloud::cdwpg::V20201230::CreateInstanceByApiRequest`
|
36
|
+
# @rtype: :class:`Tencentcloud::cdwpg::V20201230::CreateInstanceByApiResponse`
|
37
|
+
def CreateInstanceByApi(request)
|
38
|
+
body = send_request('CreateInstanceByApi', request.serialize)
|
39
|
+
response = JSON.parse(body)
|
40
|
+
if response['Response'].key?('Error') == false
|
41
|
+
model = CreateInstanceByApiResponse.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 DestroyInstanceByApi.
|
59
|
+
# @type request: :class:`Tencentcloud::cdwpg::V20201230::DestroyInstanceByApiRequest`
|
60
|
+
# @rtype: :class:`Tencentcloud::cdwpg::V20201230::DestroyInstanceByApiResponse`
|
61
|
+
def DestroyInstanceByApi(request)
|
62
|
+
body = send_request('DestroyInstanceByApi', request.serialize)
|
63
|
+
response = JSON.parse(body)
|
64
|
+
if response['Response'].key?('Error') == false
|
65
|
+
model = DestroyInstanceByApiResponse.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,258 @@
|
|
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 Cdwpg
|
19
|
+
module V20201230
|
20
|
+
# 磁盘规格
|
21
|
+
class CBSSpec < TencentCloud::Common::AbstractModel
|
22
|
+
# @param DiskType: 盘类型
|
23
|
+
# @type DiskType: String
|
24
|
+
# @param DiskSize: 大小
|
25
|
+
# @type DiskSize: Integer
|
26
|
+
# @param DiskCount: 个数
|
27
|
+
# @type DiskCount: Integer
|
28
|
+
|
29
|
+
attr_accessor :DiskType, :DiskSize, :DiskCount
|
30
|
+
|
31
|
+
def initialize(disktype=nil, disksize=nil, diskcount=nil)
|
32
|
+
@DiskType = disktype
|
33
|
+
@DiskSize = disksize
|
34
|
+
@DiskCount = diskcount
|
35
|
+
end
|
36
|
+
|
37
|
+
def deserialize(params)
|
38
|
+
@DiskType = params['DiskType']
|
39
|
+
@DiskSize = params['DiskSize']
|
40
|
+
@DiskCount = params['DiskCount']
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
# 计费时间参数
|
45
|
+
class ChargeProperties < TencentCloud::Common::AbstractModel
|
46
|
+
# @param RenewFlag: 1-需要自动续期
|
47
|
+
# @type RenewFlag: Integer
|
48
|
+
# @param TimeSpan: 订单时间范围
|
49
|
+
# @type TimeSpan: Integer
|
50
|
+
# @param TimeUnit: 时间单位,一般为h和m
|
51
|
+
# @type TimeUnit: String
|
52
|
+
# @param PayMode: 计费类型0-按量计费,1-包年包月
|
53
|
+
# @type PayMode: Integer
|
54
|
+
# @param ChargeType: PREPAID、POSTPAID_BY_HOUR
|
55
|
+
# @type ChargeType: String
|
56
|
+
|
57
|
+
attr_accessor :RenewFlag, :TimeSpan, :TimeUnit, :PayMode, :ChargeType
|
58
|
+
|
59
|
+
def initialize(renewflag=nil, timespan=nil, timeunit=nil, paymode=nil, chargetype=nil)
|
60
|
+
@RenewFlag = renewflag
|
61
|
+
@TimeSpan = timespan
|
62
|
+
@TimeUnit = timeunit
|
63
|
+
@PayMode = paymode
|
64
|
+
@ChargeType = chargetype
|
65
|
+
end
|
66
|
+
|
67
|
+
def deserialize(params)
|
68
|
+
@RenewFlag = params['RenewFlag']
|
69
|
+
@TimeSpan = params['TimeSpan']
|
70
|
+
@TimeUnit = params['TimeUnit']
|
71
|
+
@PayMode = params['PayMode']
|
72
|
+
@ChargeType = params['ChargeType']
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
# CreateInstanceByApi请求参数结构体
|
77
|
+
class CreateInstanceByApiRequest < TencentCloud::Common::AbstractModel
|
78
|
+
# @param InstanceName: 实例名称
|
79
|
+
# @type InstanceName: String
|
80
|
+
# @param Zone: 可用区
|
81
|
+
# @type Zone: String
|
82
|
+
# @param UserVPCId: 私有网络
|
83
|
+
# @type UserVPCId: String
|
84
|
+
# @param UserSubnetId: 子网
|
85
|
+
# @type UserSubnetId: String
|
86
|
+
# @param ChargeProperties: 计费方式
|
87
|
+
# @type ChargeProperties: :class:`Tencentcloud::Cdwpg.v20201230.models.ChargeProperties`
|
88
|
+
# @param AdminPassword: 集群密码
|
89
|
+
# @type AdminPassword: String
|
90
|
+
# @param Resources: 资源信息
|
91
|
+
# @type Resources: Array
|
92
|
+
# @param Tags: 标签列表
|
93
|
+
# @type Tags: :class:`Tencentcloud::Cdwpg.v20201230.models.Tag`
|
94
|
+
|
95
|
+
attr_accessor :InstanceName, :Zone, :UserVPCId, :UserSubnetId, :ChargeProperties, :AdminPassword, :Resources, :Tags
|
96
|
+
|
97
|
+
def initialize(instancename=nil, zone=nil, uservpcid=nil, usersubnetid=nil, chargeproperties=nil, adminpassword=nil, resources=nil, tags=nil)
|
98
|
+
@InstanceName = instancename
|
99
|
+
@Zone = zone
|
100
|
+
@UserVPCId = uservpcid
|
101
|
+
@UserSubnetId = usersubnetid
|
102
|
+
@ChargeProperties = chargeproperties
|
103
|
+
@AdminPassword = adminpassword
|
104
|
+
@Resources = resources
|
105
|
+
@Tags = tags
|
106
|
+
end
|
107
|
+
|
108
|
+
def deserialize(params)
|
109
|
+
@InstanceName = params['InstanceName']
|
110
|
+
@Zone = params['Zone']
|
111
|
+
@UserVPCId = params['UserVPCId']
|
112
|
+
@UserSubnetId = params['UserSubnetId']
|
113
|
+
unless params['ChargeProperties'].nil?
|
114
|
+
@ChargeProperties = ChargeProperties.new
|
115
|
+
@ChargeProperties.deserialize(params['ChargeProperties'])
|
116
|
+
end
|
117
|
+
@AdminPassword = params['AdminPassword']
|
118
|
+
unless params['Resources'].nil?
|
119
|
+
@Resources = []
|
120
|
+
params['Resources'].each do |i|
|
121
|
+
resourcespecnew_tmp = ResourceSpecNew.new
|
122
|
+
resourcespecnew_tmp.deserialize(i)
|
123
|
+
@Resources << resourcespecnew_tmp
|
124
|
+
end
|
125
|
+
end
|
126
|
+
unless params['Tags'].nil?
|
127
|
+
@Tags = Tag.new
|
128
|
+
@Tags.deserialize(params['Tags'])
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
# CreateInstanceByApi返回参数结构体
|
134
|
+
class CreateInstanceByApiResponse < TencentCloud::Common::AbstractModel
|
135
|
+
# @param FlowId: 流程ID
|
136
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
137
|
+
# @type FlowId: String
|
138
|
+
# @param InstanceId: 实例ID
|
139
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
140
|
+
# @type InstanceId: String
|
141
|
+
# @param ErrorMsg: 错误信息
|
142
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
143
|
+
# @type ErrorMsg: String
|
144
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
145
|
+
# @type RequestId: String
|
146
|
+
|
147
|
+
attr_accessor :FlowId, :InstanceId, :ErrorMsg, :RequestId
|
148
|
+
|
149
|
+
def initialize(flowid=nil, instanceid=nil, errormsg=nil, requestid=nil)
|
150
|
+
@FlowId = flowid
|
151
|
+
@InstanceId = instanceid
|
152
|
+
@ErrorMsg = errormsg
|
153
|
+
@RequestId = requestid
|
154
|
+
end
|
155
|
+
|
156
|
+
def deserialize(params)
|
157
|
+
@FlowId = params['FlowId']
|
158
|
+
@InstanceId = params['InstanceId']
|
159
|
+
@ErrorMsg = params['ErrorMsg']
|
160
|
+
@RequestId = params['RequestId']
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
# DestroyInstanceByApi请求参数结构体
|
165
|
+
class DestroyInstanceByApiRequest < TencentCloud::Common::AbstractModel
|
166
|
+
# @param InstanceId: 实例名称,例如"cdwpg-xxxx"
|
167
|
+
# @type InstanceId: String
|
168
|
+
|
169
|
+
attr_accessor :InstanceId
|
170
|
+
|
171
|
+
def initialize(instanceid=nil)
|
172
|
+
@InstanceId = instanceid
|
173
|
+
end
|
174
|
+
|
175
|
+
def deserialize(params)
|
176
|
+
@InstanceId = params['InstanceId']
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
# DestroyInstanceByApi返回参数结构体
|
181
|
+
class DestroyInstanceByApiResponse < TencentCloud::Common::AbstractModel
|
182
|
+
# @param FlowId: 销毁流程Id
|
183
|
+
# @type FlowId: String
|
184
|
+
# @param ErrorMsg: 错误信息
|
185
|
+
# @type ErrorMsg: String
|
186
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
187
|
+
# @type RequestId: String
|
188
|
+
|
189
|
+
attr_accessor :FlowId, :ErrorMsg, :RequestId
|
190
|
+
|
191
|
+
def initialize(flowid=nil, errormsg=nil, requestid=nil)
|
192
|
+
@FlowId = flowid
|
193
|
+
@ErrorMsg = errormsg
|
194
|
+
@RequestId = requestid
|
195
|
+
end
|
196
|
+
|
197
|
+
def deserialize(params)
|
198
|
+
@FlowId = params['FlowId']
|
199
|
+
@ErrorMsg = params['ErrorMsg']
|
200
|
+
@RequestId = params['RequestId']
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
# 资源规格
|
205
|
+
class ResourceSpecNew < TencentCloud::Common::AbstractModel
|
206
|
+
# @param SpecName: 资源名称
|
207
|
+
# @type SpecName: String
|
208
|
+
# @param Count: 资源数
|
209
|
+
# @type Count: Integer
|
210
|
+
# @param DiskSpec: 磁盘信息
|
211
|
+
# @type DiskSpec: :class:`Tencentcloud::Cdwpg.v20201230.models.CBSSpec`
|
212
|
+
# @param Type: 资源类型,DATA
|
213
|
+
# @type Type: String
|
214
|
+
|
215
|
+
attr_accessor :SpecName, :Count, :DiskSpec, :Type
|
216
|
+
|
217
|
+
def initialize(specname=nil, count=nil, diskspec=nil, type=nil)
|
218
|
+
@SpecName = specname
|
219
|
+
@Count = count
|
220
|
+
@DiskSpec = diskspec
|
221
|
+
@Type = type
|
222
|
+
end
|
223
|
+
|
224
|
+
def deserialize(params)
|
225
|
+
@SpecName = params['SpecName']
|
226
|
+
@Count = params['Count']
|
227
|
+
unless params['DiskSpec'].nil?
|
228
|
+
@DiskSpec = CBSSpec.new
|
229
|
+
@DiskSpec.deserialize(params['DiskSpec'])
|
230
|
+
end
|
231
|
+
@Type = params['Type']
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
# 标签描述
|
236
|
+
class Tag < TencentCloud::Common::AbstractModel
|
237
|
+
# @param TagKey: 标签的键
|
238
|
+
# @type TagKey: String
|
239
|
+
# @param TagValue: 标签的值
|
240
|
+
# @type TagValue: String
|
241
|
+
|
242
|
+
attr_accessor :TagKey, :TagValue
|
243
|
+
|
244
|
+
def initialize(tagkey=nil, tagvalue=nil)
|
245
|
+
@TagKey = tagkey
|
246
|
+
@TagValue = tagvalue
|
247
|
+
end
|
248
|
+
|
249
|
+
def deserialize(params)
|
250
|
+
@TagKey = params['TagKey']
|
251
|
+
@TagValue = params['TagValue']
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
255
|
+
end
|
256
|
+
end
|
257
|
+
end
|
258
|
+
|
metadata
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tencentcloud-sdk-cdwpg
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 3.0.669
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tencent Cloud
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-09-27 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: '3.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.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
|
+
CDWPG.
|
30
|
+
email:
|
31
|
+
- tencentcloudapi@tencent.com
|
32
|
+
executables: []
|
33
|
+
extensions: []
|
34
|
+
extra_rdoc_files: []
|
35
|
+
files:
|
36
|
+
- lib/v20201230/models.rb
|
37
|
+
- lib/v20201230/client.rb
|
38
|
+
- lib/tencentcloud-sdk-cdwpg.rb
|
39
|
+
- lib/VERSION
|
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-cdwpg
|
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.0.14
|
63
|
+
signing_key:
|
64
|
+
specification_version: 4
|
65
|
+
summary: Tencent Cloud SDK for Ruby - CDWPG
|
66
|
+
test_files: []
|