tencentcloud-sdk-cloudapp 3.0.867
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/VERSION +1 -0
- data/lib/tencentcloud-sdk-cloudapp.rb +11 -0
- data/lib/v20220530/client.rb +60 -0
- data/lib/v20220530/models.rb +235 -0
- metadata +66 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a90e29d359bd003811e98ddc5e1581d59c9e6d4a
|
4
|
+
data.tar.gz: d0dd77ef88a78a86516d69d163eb031caf96b029
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 45ab0ba5bcdc88d5719d04d8ac6ca20e457680bb580637ea1d412f21d2990145985443b48a44fef0b6ef3fe3328dfa3439e4fc3632cc44aabbc88f5da9bd148c
|
7
|
+
data.tar.gz: c2db4497472521b9a57af5ca0b4f909b6fbb59c3332ef71b6561d91a1024da53d00965ca7249f5c733e92a3966952037083c152e51ab7537c6ae077685aba8c1
|
data/lib/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.0.867
|
@@ -0,0 +1,60 @@
|
|
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 Cloudapp
|
21
|
+
module V20220530
|
22
|
+
class Client < TencentCloud::Common::AbstractClient
|
23
|
+
|
24
|
+
def initialize(credential, region, profile = nil)
|
25
|
+
api_version = '2022-05-30'
|
26
|
+
api_endpoint = 'cloudapp.tencentcloudapi.com'
|
27
|
+
sdk_version = 'CLOUDAPP_' + File.read(File.expand_path('../VERSION', __dir__)).strip
|
28
|
+
super(credential, region, api_version, api_endpoint, sdk_version, profile)
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
# 通过运行时roleId查询对应的软件 LICENSE
|
33
|
+
|
34
|
+
# @param request: Request instance for VerifyLicense.
|
35
|
+
# @type request: :class:`Tencentcloud::cloudapp::V20220530::VerifyLicenseRequest`
|
36
|
+
# @rtype: :class:`Tencentcloud::cloudapp::V20220530::VerifyLicenseResponse`
|
37
|
+
def VerifyLicense(request)
|
38
|
+
body = send_request('VerifyLicense', request.serialize)
|
39
|
+
response = JSON.parse(body)
|
40
|
+
if response['Response'].key?('Error') == false
|
41
|
+
model = VerifyLicenseResponse.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
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,235 @@
|
|
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 Cloudapp
|
19
|
+
module V20220530
|
20
|
+
# 表示应用实例的软件授权,包含颁发信息、激活信息等内容。
|
21
|
+
class License < TencentCloud::Common::AbstractModel
|
22
|
+
# @param LicenseId: License ID
|
23
|
+
# @type LicenseId: String
|
24
|
+
# @param LicenseMode: 软件授权模式。
|
25
|
+
|
26
|
+
# <table>
|
27
|
+
# <thead>
|
28
|
+
# <tr>
|
29
|
+
# <th>枚举值</th>
|
30
|
+
# <th>说明</th>
|
31
|
+
# </tr>
|
32
|
+
# </thead>
|
33
|
+
# <tbody><tr>
|
34
|
+
# <td>Permanent</td>
|
35
|
+
# <td>永久授权。该授权不受有效期限制。</td>
|
36
|
+
# </tr>
|
37
|
+
# <tr>
|
38
|
+
# <td>Subscription</td>
|
39
|
+
# <td>订阅授权。授权如果过了有效期,则会进入过期状态。</td>
|
40
|
+
# </tr>
|
41
|
+
# </tbody></table>
|
42
|
+
# @type LicenseMode: String
|
43
|
+
# @param LicenseStatus: 软件的授权状态。
|
44
|
+
|
45
|
+
# <table>
|
46
|
+
# <thead>
|
47
|
+
# <tr>
|
48
|
+
# <th>枚举值</th>
|
49
|
+
# <th>说明</th>
|
50
|
+
# </tr>
|
51
|
+
# </thead>
|
52
|
+
# <tbody><tr>
|
53
|
+
# <td>Issued</td>
|
54
|
+
# <td>已颁发,等待激活。一般来说,如果软件已经在运行,不会出现该状态。</td>
|
55
|
+
# </tr>
|
56
|
+
# <tr>
|
57
|
+
# <td>Active</td>
|
58
|
+
# <td>授权在有效期内,这是软件运行期间最常见的状态。</td>
|
59
|
+
# </tr>
|
60
|
+
# <tr>
|
61
|
+
# <td>Expired</td>
|
62
|
+
# <td>授权已过期。订阅类的软件授权有有效期,如果服务器时间已晚于有效期,则会进入过期状态。</td>
|
63
|
+
# </tr>
|
64
|
+
# <tr>
|
65
|
+
# <td>Deactivated</td>
|
66
|
+
# <td>授权已失效。用户如果退货软件,则授权会自动失效。</td>
|
67
|
+
# </tr>
|
68
|
+
# </tbody></table>
|
69
|
+
# @type LicenseStatus: String
|
70
|
+
# @param ProviderId: 软件供应方 ID。
|
71
|
+
# @type ProviderId: Integer
|
72
|
+
# @param SoftwarePackageId: 软件包 ID。
|
73
|
+
# @type SoftwarePackageId: String
|
74
|
+
# @param SoftwarePackageVersion: 软件包版本。
|
75
|
+
# @type SoftwarePackageVersion: String
|
76
|
+
# @param AuthorizedUserUin: 被授权的用户 UIN。
|
77
|
+
# @type AuthorizedUserUin: String
|
78
|
+
# @param AuthorizedCloudappId: 被授权的应用实例 ID。
|
79
|
+
# @type AuthorizedCloudappId: String
|
80
|
+
# @param AuthorizedCloudappRoleId: 被授权的角色 ID。
|
81
|
+
# @type AuthorizedCloudappRoleId: String
|
82
|
+
# @param AuthorizedSpecification: 被授权的软件规格,具体字段请参考结构SaleParam
|
83
|
+
# @type AuthorizedSpecification: Array
|
84
|
+
# @param BillingMode: 被授权的软件的计费模式。
|
85
|
+
|
86
|
+
# <table>
|
87
|
+
# <thead>
|
88
|
+
# <tr>
|
89
|
+
# <th>枚举值</th>
|
90
|
+
# <th>说明</th>
|
91
|
+
# </tr>
|
92
|
+
# </thead>
|
93
|
+
# <tbody><tr>
|
94
|
+
# <td>1</td>
|
95
|
+
# <td>线上计费,软件的授权从腾讯云线上购买,支持续费、退款等操作。</td>
|
96
|
+
# </tr>
|
97
|
+
# <tr>
|
98
|
+
# <td>2</td>
|
99
|
+
# <td>线下计费,软件的授权线下签订合同购买,定向客户交付,无法从线上续费和退款。</td>
|
100
|
+
# </tr>
|
101
|
+
# <tr>
|
102
|
+
# <td>4</td>
|
103
|
+
# <td>免费</td>
|
104
|
+
# </tr>
|
105
|
+
# </tbody></table>
|
106
|
+
# @type BillingMode: Integer
|
107
|
+
# @param LifeSpan: 授权时长(单位由LifeSpanUnit确定,枚举值有Y年/M月/D日三种)
|
108
|
+
# @type LifeSpan: Integer
|
109
|
+
# @param IssueDate: 授权颁发时间。
|
110
|
+
# @type IssueDate: String
|
111
|
+
# @param ActivationDate: 授权激活时间,如从未激活则返回 null。
|
112
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
113
|
+
# @type ActivationDate: String
|
114
|
+
# @param ExpirationDate: 授权过期时间,如未过期或者是永久授权,则返回 null。
|
115
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
116
|
+
# @type ExpirationDate: String
|
117
|
+
# @param LifeSpanUnit: 授权时长单位,枚举值有Y年/M月/D日三种
|
118
|
+
# @type LifeSpanUnit: String
|
119
|
+
|
120
|
+
attr_accessor :LicenseId, :LicenseMode, :LicenseStatus, :ProviderId, :SoftwarePackageId, :SoftwarePackageVersion, :AuthorizedUserUin, :AuthorizedCloudappId, :AuthorizedCloudappRoleId, :AuthorizedSpecification, :BillingMode, :LifeSpan, :IssueDate, :ActivationDate, :ExpirationDate, :LifeSpanUnit
|
121
|
+
|
122
|
+
def initialize(licenseid=nil, licensemode=nil, licensestatus=nil, providerid=nil, softwarepackageid=nil, softwarepackageversion=nil, authorizeduseruin=nil, authorizedcloudappid=nil, authorizedcloudapproleid=nil, authorizedspecification=nil, billingmode=nil, lifespan=nil, issuedate=nil, activationdate=nil, expirationdate=nil, lifespanunit=nil)
|
123
|
+
@LicenseId = licenseid
|
124
|
+
@LicenseMode = licensemode
|
125
|
+
@LicenseStatus = licensestatus
|
126
|
+
@ProviderId = providerid
|
127
|
+
@SoftwarePackageId = softwarepackageid
|
128
|
+
@SoftwarePackageVersion = softwarepackageversion
|
129
|
+
@AuthorizedUserUin = authorizeduseruin
|
130
|
+
@AuthorizedCloudappId = authorizedcloudappid
|
131
|
+
@AuthorizedCloudappRoleId = authorizedcloudapproleid
|
132
|
+
@AuthorizedSpecification = authorizedspecification
|
133
|
+
@BillingMode = billingmode
|
134
|
+
@LifeSpan = lifespan
|
135
|
+
@IssueDate = issuedate
|
136
|
+
@ActivationDate = activationdate
|
137
|
+
@ExpirationDate = expirationdate
|
138
|
+
@LifeSpanUnit = lifespanunit
|
139
|
+
end
|
140
|
+
|
141
|
+
def deserialize(params)
|
142
|
+
@LicenseId = params['LicenseId']
|
143
|
+
@LicenseMode = params['LicenseMode']
|
144
|
+
@LicenseStatus = params['LicenseStatus']
|
145
|
+
@ProviderId = params['ProviderId']
|
146
|
+
@SoftwarePackageId = params['SoftwarePackageId']
|
147
|
+
@SoftwarePackageVersion = params['SoftwarePackageVersion']
|
148
|
+
@AuthorizedUserUin = params['AuthorizedUserUin']
|
149
|
+
@AuthorizedCloudappId = params['AuthorizedCloudappId']
|
150
|
+
@AuthorizedCloudappRoleId = params['AuthorizedCloudappRoleId']
|
151
|
+
unless params['AuthorizedSpecification'].nil?
|
152
|
+
@AuthorizedSpecification = []
|
153
|
+
params['AuthorizedSpecification'].each do |i|
|
154
|
+
saleparam_tmp = SaleParam.new
|
155
|
+
saleparam_tmp.deserialize(i)
|
156
|
+
@AuthorizedSpecification << saleparam_tmp
|
157
|
+
end
|
158
|
+
end
|
159
|
+
@BillingMode = params['BillingMode']
|
160
|
+
@LifeSpan = params['LifeSpan']
|
161
|
+
@IssueDate = params['IssueDate']
|
162
|
+
@ActivationDate = params['ActivationDate']
|
163
|
+
@ExpirationDate = params['ExpirationDate']
|
164
|
+
@LifeSpanUnit = params['LifeSpanUnit']
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
# 表示商品 SKU 的单个售卖参数
|
169
|
+
class SaleParam < TencentCloud::Common::AbstractModel
|
170
|
+
# @param ParamKey: 售卖参数标识
|
171
|
+
# @type ParamKey: String
|
172
|
+
# @param ParamValue: 售卖参数值
|
173
|
+
# @type ParamValue: String
|
174
|
+
# @param ParamKeyName: 售卖参数的展示名称
|
175
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
176
|
+
# @type ParamKeyName: String
|
177
|
+
# @param ParamValueName: 售卖参数值的展示名称
|
178
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
179
|
+
# @type ParamValueName: String
|
180
|
+
|
181
|
+
attr_accessor :ParamKey, :ParamValue, :ParamKeyName, :ParamValueName
|
182
|
+
|
183
|
+
def initialize(paramkey=nil, paramvalue=nil, paramkeyname=nil, paramvaluename=nil)
|
184
|
+
@ParamKey = paramkey
|
185
|
+
@ParamValue = paramvalue
|
186
|
+
@ParamKeyName = paramkeyname
|
187
|
+
@ParamValueName = paramvaluename
|
188
|
+
end
|
189
|
+
|
190
|
+
def deserialize(params)
|
191
|
+
@ParamKey = params['ParamKey']
|
192
|
+
@ParamValue = params['ParamValue']
|
193
|
+
@ParamKeyName = params['ParamKeyName']
|
194
|
+
@ParamValueName = params['ParamValueName']
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
# VerifyLicense请求参数结构体
|
199
|
+
class VerifyLicenseRequest < TencentCloud::Common::AbstractModel
|
200
|
+
|
201
|
+
|
202
|
+
def initialize()
|
203
|
+
end
|
204
|
+
|
205
|
+
def deserialize(params)
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
# VerifyLicense返回参数结构体
|
210
|
+
class VerifyLicenseResponse < TencentCloud::Common::AbstractModel
|
211
|
+
# @param License: 软件的详细授权信息。
|
212
|
+
# @type License: :class:`Tencentcloud::Cloudapp.v20220530.models.License`
|
213
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
214
|
+
# @type RequestId: String
|
215
|
+
|
216
|
+
attr_accessor :License, :RequestId
|
217
|
+
|
218
|
+
def initialize(license=nil, requestid=nil)
|
219
|
+
@License = license
|
220
|
+
@RequestId = requestid
|
221
|
+
end
|
222
|
+
|
223
|
+
def deserialize(params)
|
224
|
+
unless params['License'].nil?
|
225
|
+
@License = License.new
|
226
|
+
@License.deserialize(params['License'])
|
227
|
+
end
|
228
|
+
@RequestId = params['RequestId']
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
end
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
metadata
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tencentcloud-sdk-cloudapp
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 3.0.867
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tencent Cloud
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-07-17 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
|
+
CLOUDAPP.
|
30
|
+
email:
|
31
|
+
- tencentcloudapi@tencent.com
|
32
|
+
executables: []
|
33
|
+
extensions: []
|
34
|
+
extra_rdoc_files: []
|
35
|
+
files:
|
36
|
+
- lib/tencentcloud-sdk-cloudapp.rb
|
37
|
+
- lib/v20220530/models.rb
|
38
|
+
- lib/v20220530/client.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-cloudapp
|
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 - CLOUDAPP
|
66
|
+
test_files: []
|