tencentcloud-sdk-sts 3.0.1037 → 3.0.1038
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 +4 -4
- data/lib/VERSION +1 -1
- data/lib/v20180813/client.rb +24 -0
- data/lib/v20180813/models.rb +65 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e88ca8ddb6b5555d2457733d63856fc66b6ff8d
|
4
|
+
data.tar.gz: 871f8acc354d9fde1195d94b0851f4d1830f23d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 732495511d83e55ec75cc74a670c034845511c089ecb7c741f33740036ab2699a226ed6e3bf5c684cc1055dceb4952040955fed0d70b90d145063657c40729dd
|
7
|
+
data.tar.gz: dd26aec5e177e949081b8f8cf12d612f44f6344cab2e9c3a37697d00663f211adaf4af25aed20c4b119e8b204511e028e2df2efbb07732a1c1976fef1dba4cf4
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.1038
|
data/lib/v20180813/client.rb
CHANGED
@@ -176,6 +176,30 @@ module TencentCloud
|
|
176
176
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
177
177
|
end
|
178
178
|
|
179
|
+
# 获取MFA临时证书
|
180
|
+
|
181
|
+
# @param request: Request instance for GetSessionToken.
|
182
|
+
# @type request: :class:`Tencentcloud::sts::V20180813::GetSessionTokenRequest`
|
183
|
+
# @rtype: :class:`Tencentcloud::sts::V20180813::GetSessionTokenResponse`
|
184
|
+
def GetSessionToken(request)
|
185
|
+
body = send_request('GetSessionToken', request.serialize)
|
186
|
+
response = JSON.parse(body)
|
187
|
+
if response['Response'].key?('Error') == false
|
188
|
+
model = GetSessionTokenResponse.new
|
189
|
+
model.deserialize(response['Response'])
|
190
|
+
model
|
191
|
+
else
|
192
|
+
code = response['Response']['Error']['Code']
|
193
|
+
message = response['Response']['Error']['Message']
|
194
|
+
reqid = response['Response']['RequestId']
|
195
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
196
|
+
end
|
197
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
198
|
+
raise e
|
199
|
+
rescue StandardError => e
|
200
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
201
|
+
end
|
202
|
+
|
179
203
|
# 拉取API密钥列表
|
180
204
|
|
181
205
|
# @param request: Request instance for QueryApiKey.
|
data/lib/v20180813/models.rb
CHANGED
@@ -67,10 +67,14 @@ module TencentCloud
|
|
67
67
|
# @type Tags: Array
|
68
68
|
# @param SourceIdentity: 调用者身份uin
|
69
69
|
# @type SourceIdentity: String
|
70
|
+
# @param SerialNumber: MFA序列号,与进行调用的CAM用户关联的MFA设备的标识号。格式qcs::cam:uin/${ownerUin}::mfa/${mfaType}。mfaType支持softToken(软token)
|
71
|
+
# @type SerialNumber: String
|
72
|
+
# @param TokenCode: mfa身份验证码。
|
73
|
+
# @type TokenCode: String
|
70
74
|
|
71
|
-
attr_accessor :RoleArn, :RoleSessionName, :DurationSeconds, :Policy, :ExternalId, :Tags, :SourceIdentity
|
75
|
+
attr_accessor :RoleArn, :RoleSessionName, :DurationSeconds, :Policy, :ExternalId, :Tags, :SourceIdentity, :SerialNumber, :TokenCode
|
72
76
|
|
73
|
-
def initialize(rolearn=nil, rolesessionname=nil, durationseconds=nil, policy=nil, externalid=nil, tags=nil, sourceidentity=nil)
|
77
|
+
def initialize(rolearn=nil, rolesessionname=nil, durationseconds=nil, policy=nil, externalid=nil, tags=nil, sourceidentity=nil, serialnumber=nil, tokencode=nil)
|
74
78
|
@RoleArn = rolearn
|
75
79
|
@RoleSessionName = rolesessionname
|
76
80
|
@DurationSeconds = durationseconds
|
@@ -78,6 +82,8 @@ module TencentCloud
|
|
78
82
|
@ExternalId = externalid
|
79
83
|
@Tags = tags
|
80
84
|
@SourceIdentity = sourceidentity
|
85
|
+
@SerialNumber = serialnumber
|
86
|
+
@TokenCode = tokencode
|
81
87
|
end
|
82
88
|
|
83
89
|
def deserialize(params)
|
@@ -95,6 +101,8 @@ module TencentCloud
|
|
95
101
|
end
|
96
102
|
end
|
97
103
|
@SourceIdentity = params['SourceIdentity']
|
104
|
+
@SerialNumber = params['SerialNumber']
|
105
|
+
@TokenCode = params['TokenCode']
|
98
106
|
end
|
99
107
|
end
|
100
108
|
|
@@ -390,6 +398,61 @@ module TencentCloud
|
|
390
398
|
end
|
391
399
|
end
|
392
400
|
|
401
|
+
# GetSessionToken请求参数结构体
|
402
|
+
class GetSessionTokenRequest < TencentCloud::Common::AbstractModel
|
403
|
+
# @param SerialNumber: MFA序列号,与进行调用的CAM用户关联的MFA设备的标识号。格式qcs::cam:uin/${ownerUin}::mfa/${mfaType}。mfaType支持softToken(软token)
|
404
|
+
# @type SerialNumber: String
|
405
|
+
# @param TokenCode: mfa身份验证码。
|
406
|
+
# @type TokenCode: String
|
407
|
+
# @param DurationSeconds: 指定临时证书的有效期,单位:秒,默认1800秒,主账号最长可设定有效期为7200秒,子账号最长可设定有效期为129600秒。
|
408
|
+
# @type DurationSeconds: Integer
|
409
|
+
|
410
|
+
attr_accessor :SerialNumber, :TokenCode, :DurationSeconds
|
411
|
+
|
412
|
+
def initialize(serialnumber=nil, tokencode=nil, durationseconds=nil)
|
413
|
+
@SerialNumber = serialnumber
|
414
|
+
@TokenCode = tokencode
|
415
|
+
@DurationSeconds = durationseconds
|
416
|
+
end
|
417
|
+
|
418
|
+
def deserialize(params)
|
419
|
+
@SerialNumber = params['SerialNumber']
|
420
|
+
@TokenCode = params['TokenCode']
|
421
|
+
@DurationSeconds = params['DurationSeconds']
|
422
|
+
end
|
423
|
+
end
|
424
|
+
|
425
|
+
# GetSessionToken返回参数结构体
|
426
|
+
class GetSessionTokenResponse < TencentCloud::Common::AbstractModel
|
427
|
+
# @param Credentials: 临时访问凭证
|
428
|
+
# @type Credentials: :class:`Tencentcloud::Sts.v20180813.models.Credentials`
|
429
|
+
# @param ExpiredTime: 证书无效的时间,返回 Unix 时间戳,精确到秒
|
430
|
+
# @type ExpiredTime: Integer
|
431
|
+
# @param Expiration: 临时访问凭证的过期时间,以 iso8601 格式的 UTC 时间表示
|
432
|
+
# @type Expiration: String
|
433
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
434
|
+
# @type RequestId: String
|
435
|
+
|
436
|
+
attr_accessor :Credentials, :ExpiredTime, :Expiration, :RequestId
|
437
|
+
|
438
|
+
def initialize(credentials=nil, expiredtime=nil, expiration=nil, requestid=nil)
|
439
|
+
@Credentials = credentials
|
440
|
+
@ExpiredTime = expiredtime
|
441
|
+
@Expiration = expiration
|
442
|
+
@RequestId = requestid
|
443
|
+
end
|
444
|
+
|
445
|
+
def deserialize(params)
|
446
|
+
unless params['Credentials'].nil?
|
447
|
+
@Credentials = Credentials.new
|
448
|
+
@Credentials.deserialize(params['Credentials'])
|
449
|
+
end
|
450
|
+
@ExpiredTime = params['ExpiredTime']
|
451
|
+
@Expiration = params['Expiration']
|
452
|
+
@RequestId = params['RequestId']
|
453
|
+
end
|
454
|
+
end
|
455
|
+
|
393
456
|
# QueryApiKey请求参数结构体
|
394
457
|
class QueryApiKeyRequest < TencentCloud::Common::AbstractModel
|
395
458
|
# @param TargetUin: 待查询的账号uin(不填默认查当前账号uin)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tencentcloud-sdk-sts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1038
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tencent Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-04-
|
11
|
+
date: 2025-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tencentcloud-sdk-common
|