tencentcloud-sdk-sts 1.0.302 → 1.0.305
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 +24 -0
- data/lib/v20180813/models.rb +63 -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: c4e14bbe274d41100d5386844038d509dfcb4625
|
4
|
+
data.tar.gz: 4933fed5f71bb6fafea31c9f080660d839467864
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bdf9fd29c6419e31cd12af8e4cfc953569045d7caf44b77d84b93693be1e4dec43d5c74c204085fdd2e9a771264969e5940d7f143bacbd52858d0d0e848ad90
|
7
|
+
data.tar.gz: 20b425bb29c210a44b3c2158f8a12a6187c153c5d4b4a800568d4332d208a9d761afed70c34e04fe49d80b05357eb772af148497c4803c370a0bce542686e52d
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.305
|
data/lib/v20180813/client.rb
CHANGED
@@ -77,6 +77,30 @@ module TencentCloud
|
|
77
77
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
78
78
|
end
|
79
79
|
|
80
|
+
# 申请OIDC角色临时密钥
|
81
|
+
|
82
|
+
# @param request: Request instance for AssumeRoleWithWebIdentity.
|
83
|
+
# @type request: :class:`Tencentcloud::sts::V20180813::AssumeRoleWithWebIdentityRequest`
|
84
|
+
# @rtype: :class:`Tencentcloud::sts::V20180813::AssumeRoleWithWebIdentityResponse`
|
85
|
+
def AssumeRoleWithWebIdentity(request)
|
86
|
+
body = send_request('AssumeRoleWithWebIdentity', request.serialize)
|
87
|
+
response = JSON.parse(body)
|
88
|
+
if response['Response'].key?('Error') == false
|
89
|
+
model = AssumeRoleWithWebIdentityResponse.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
|
+
|
80
104
|
# 获取当前调用者的身份信息。
|
81
105
|
# 接口支持主账号,子账号长期密钥以及AssumeRole,GetFederationToken生成的临时凭据的身份获取。
|
82
106
|
|
data/lib/v20180813/models.rb
CHANGED
@@ -177,6 +177,69 @@ module TencentCloud
|
|
177
177
|
end
|
178
178
|
end
|
179
179
|
|
180
|
+
# AssumeRoleWithWebIdentity请求参数结构体
|
181
|
+
class AssumeRoleWithWebIdentityRequest < TencentCloud::Common::AbstractModel
|
182
|
+
# @param ProviderId: 身份提供商名称
|
183
|
+
# @type ProviderId: String
|
184
|
+
# @param WebIdentityToken: IdP签发的OIDC令牌
|
185
|
+
# @type WebIdentityToken: String
|
186
|
+
# @param RoleArn: 角色访问描述名
|
187
|
+
# @type RoleArn: String
|
188
|
+
# @param RoleSessionName: 会话名称
|
189
|
+
# @type RoleSessionName: String
|
190
|
+
# @param DurationSeconds: 指定临时证书的有效期,单位:秒,默认 7200 秒,最长可设定有效期为 43200 秒
|
191
|
+
# @type DurationSeconds: Integer
|
192
|
+
|
193
|
+
attr_accessor :ProviderId, :WebIdentityToken, :RoleArn, :RoleSessionName, :DurationSeconds
|
194
|
+
|
195
|
+
def initialize(providerid=nil, webidentitytoken=nil, rolearn=nil, rolesessionname=nil, durationseconds=nil)
|
196
|
+
@ProviderId = providerid
|
197
|
+
@WebIdentityToken = webidentitytoken
|
198
|
+
@RoleArn = rolearn
|
199
|
+
@RoleSessionName = rolesessionname
|
200
|
+
@DurationSeconds = durationseconds
|
201
|
+
end
|
202
|
+
|
203
|
+
def deserialize(params)
|
204
|
+
@ProviderId = params['ProviderId']
|
205
|
+
@WebIdentityToken = params['WebIdentityToken']
|
206
|
+
@RoleArn = params['RoleArn']
|
207
|
+
@RoleSessionName = params['RoleSessionName']
|
208
|
+
@DurationSeconds = params['DurationSeconds']
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
# AssumeRoleWithWebIdentity返回参数结构体
|
213
|
+
class AssumeRoleWithWebIdentityResponse < TencentCloud::Common::AbstractModel
|
214
|
+
# @param ExpiredTime: 临时秘钥过期时间(时间戳)
|
215
|
+
# @type ExpiredTime: Integer
|
216
|
+
# @param Expiration: 临时秘钥过期时间
|
217
|
+
# @type Expiration: String
|
218
|
+
# @param Credentials: 临时秘钥
|
219
|
+
# @type Credentials: :class:`Tencentcloud::Sts.v20180813.models.Credentials`
|
220
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
221
|
+
# @type RequestId: String
|
222
|
+
|
223
|
+
attr_accessor :ExpiredTime, :Expiration, :Credentials, :RequestId
|
224
|
+
|
225
|
+
def initialize(expiredtime=nil, expiration=nil, credentials=nil, requestid=nil)
|
226
|
+
@ExpiredTime = expiredtime
|
227
|
+
@Expiration = expiration
|
228
|
+
@Credentials = credentials
|
229
|
+
@RequestId = requestid
|
230
|
+
end
|
231
|
+
|
232
|
+
def deserialize(params)
|
233
|
+
@ExpiredTime = params['ExpiredTime']
|
234
|
+
@Expiration = params['Expiration']
|
235
|
+
unless params['Credentials'].nil?
|
236
|
+
@Credentials = Credentials.new
|
237
|
+
@Credentials.deserialize(params['Credentials'])
|
238
|
+
end
|
239
|
+
@RequestId = params['RequestId']
|
240
|
+
end
|
241
|
+
end
|
242
|
+
|
180
243
|
# 临时证书
|
181
244
|
class Credentials < TencentCloud::Common::AbstractModel
|
182
245
|
# @param Token: token。token长度和绑定的策略有关,最长不超过4096字节。
|
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.305
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tencent Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tencentcloud-sdk-common
|