tencentcloud-sdk-sts 1.0.221 → 1.0.225
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/VERSION +1 -1
- data/lib/v20180813/client.rb +25 -0
- data/lib/v20180813/models.rb +52 -0
- 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: 63465fc0ca9911c211f9ffa229557adbc7f3eb60
|
4
|
+
data.tar.gz: d2b2391621ac09c0db8030d7f2cb68a464e34705
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff680d7d963d718b32e8cb794e8958de31391a908df8e1280d53175a267a2a79233ead510e7672834ffa5909ae206d7210241e6eeb6930877598e44e726857f0
|
7
|
+
data.tar.gz: f130bd3804e31eee7d32e5d63bbf23c9cb7d7b18a4f42b7886d30999f2f2068ff4e2c05d296d4dd6510c7a0faba7cfb4a614aede585500568f69fb2580c94976
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.225
|
data/lib/v20180813/client.rb
CHANGED
@@ -77,6 +77,31 @@ module TencentCloud
|
|
77
77
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
78
78
|
end
|
79
79
|
|
80
|
+
# 获取当前调用者的身份信息。
|
81
|
+
# 接口支持主账号,子账号长期密钥以及AssumeRole,GetFederationToken生成的临时凭据的身份获取。
|
82
|
+
|
83
|
+
# @param request: Request instance for GetCallerIdentity.
|
84
|
+
# @type request: :class:`Tencentcloud::sts::V20180813::GetCallerIdentityRequest`
|
85
|
+
# @rtype: :class:`Tencentcloud::sts::V20180813::GetCallerIdentityResponse`
|
86
|
+
def GetCallerIdentity(request)
|
87
|
+
body = send_request('GetCallerIdentity', request.serialize)
|
88
|
+
response = JSON.parse(body)
|
89
|
+
if response['Response'].key?('Error') == false
|
90
|
+
model = GetCallerIdentityResponse.new
|
91
|
+
model.deserialize(response['Response'])
|
92
|
+
model
|
93
|
+
else
|
94
|
+
code = response['Response']['Error']['Code']
|
95
|
+
message = response['Response']['Error']['Message']
|
96
|
+
reqid = response['Response']['RequestId']
|
97
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
98
|
+
end
|
99
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
100
|
+
raise e
|
101
|
+
rescue StandardError => e
|
102
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
103
|
+
end
|
104
|
+
|
80
105
|
# 获取联合身份临时访问凭证
|
81
106
|
|
82
107
|
# @param request: Request instance for GetFederationToken.
|
data/lib/v20180813/models.rb
CHANGED
@@ -201,6 +201,58 @@ module TencentCloud
|
|
201
201
|
end
|
202
202
|
end
|
203
203
|
|
204
|
+
# GetCallerIdentity请求参数结构体
|
205
|
+
class GetCallerIdentityRequest < TencentCloud::Common::AbstractModel
|
206
|
+
|
207
|
+
|
208
|
+
def initialize()
|
209
|
+
end
|
210
|
+
|
211
|
+
def deserialize(params)
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
# GetCallerIdentity返回参数结构体
|
216
|
+
class GetCallerIdentityResponse < TencentCloud::Common::AbstractModel
|
217
|
+
# @param Arn: 当前调用者ARN。
|
218
|
+
# @type Arn: String
|
219
|
+
# @param AccountId: 当前调用者所属主账号Uin。
|
220
|
+
# @type AccountId: String
|
221
|
+
# @param UserId: 身份标识。
|
222
|
+
# 1. 调用者是云账号时,返回的是当前账号Uin
|
223
|
+
# 2. 调用者是角色时,返回的是roleId:roleSessionName
|
224
|
+
# 3. 调用者是联合身份时,返回的是uin:federatedUserName
|
225
|
+
# @type UserId: String
|
226
|
+
# @param PrincipalId: 密钥所属账号Uin。
|
227
|
+
# 1. 调用者是云账号,返回的当前账号Uin
|
228
|
+
# 2, 调用者是角色,返回的申请角色密钥的账号Uin
|
229
|
+
# @type PrincipalId: String
|
230
|
+
# @param Type: 身份类型。
|
231
|
+
# @type Type: String
|
232
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
233
|
+
# @type RequestId: String
|
234
|
+
|
235
|
+
attr_accessor :Arn, :AccountId, :UserId, :PrincipalId, :Type, :RequestId
|
236
|
+
|
237
|
+
def initialize(arn=nil, accountid=nil, userid=nil, principalid=nil, type=nil, requestid=nil)
|
238
|
+
@Arn = arn
|
239
|
+
@AccountId = accountid
|
240
|
+
@UserId = userid
|
241
|
+
@PrincipalId = principalid
|
242
|
+
@Type = type
|
243
|
+
@RequestId = requestid
|
244
|
+
end
|
245
|
+
|
246
|
+
def deserialize(params)
|
247
|
+
@Arn = params['Arn']
|
248
|
+
@AccountId = params['AccountId']
|
249
|
+
@UserId = params['UserId']
|
250
|
+
@PrincipalId = params['PrincipalId']
|
251
|
+
@Type = params['Type']
|
252
|
+
@RequestId = params['RequestId']
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
204
256
|
# GetFederationToken请求参数结构体
|
205
257
|
class GetFederationTokenRequest < TencentCloud::Common::AbstractModel
|
206
258
|
# @param Name: 您可以自定义调用方英文名称,由字母组成。
|
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: 1.0.
|
4
|
+
version: 1.0.225
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tencent Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tencentcloud-sdk-common
|