代码修改后的版本,全部提交
This commit is contained in:
57
TencentCloud/Sts/V20180813/Models/ApiKey.cs
Normal file
57
TencentCloud/Sts/V20180813/Models/ApiKey.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Sts.V20180813.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class ApiKey : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 密钥ID
|
||||
/// </summary>
|
||||
[JsonProperty("SecretId")]
|
||||
public string SecretId{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间(时间戳)
|
||||
/// </summary>
|
||||
[JsonProperty("CreateTime")]
|
||||
public ulong? CreateTime{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态(2:有效, 3:禁用, 4:已删除)
|
||||
/// </summary>
|
||||
[JsonProperty("Status")]
|
||||
public ulong? Status{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "SecretId", this.SecretId);
|
||||
this.SetParamSimple(map, prefix + "CreateTime", this.CreateTime);
|
||||
this.SetParamSimple(map, prefix + "Status", this.Status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
68
TencentCloud/Sts/V20180813/Models/AssumeRoleRequest.cs
Normal file
68
TencentCloud/Sts/V20180813/Models/AssumeRoleRequest.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Sts.V20180813.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class AssumeRoleRequest : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 角色的资源描述。例如:qcs::cam::uin/12345678:role/4611686018427397919、qcs::cam::uin/12345678:roleName/testRoleName
|
||||
/// </summary>
|
||||
[JsonProperty("RoleArn")]
|
||||
public string RoleArn{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临时会话名称,由用户自定义名称
|
||||
/// </summary>
|
||||
[JsonProperty("RoleSessionName")]
|
||||
public string RoleSessionName{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 指定临时证书的有效期,单位:秒,默认 7200 秒,最长可设定有效期为 43200 秒
|
||||
/// </summary>
|
||||
[JsonProperty("DurationSeconds")]
|
||||
public ulong? DurationSeconds{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 策略描述
|
||||
/// 注意:
|
||||
/// 1、policy 需要做 urlencode(如果通过 GET 方法请求云 API,发送请求前,所有参数都需要按照[云 API 规范](https://cloud.tencent.com/document/api/598/33159#1.-.E6.8B.BC.E6.8E.A5.E8.A7.84.E8.8C.83.E8.AF.B7.E6.B1.82.E4.B8.B2)再 urlencode 一次)。
|
||||
/// 2、策略语法参照[ CAM 策略语法](https://cloud.tencent.com/document/product/598/10603)。
|
||||
/// 3、策略中不能包含 principal 元素。
|
||||
/// </summary>
|
||||
[JsonProperty("Policy")]
|
||||
public string Policy{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "RoleArn", this.RoleArn);
|
||||
this.SetParamSimple(map, prefix + "RoleSessionName", this.RoleSessionName);
|
||||
this.SetParamSimple(map, prefix + "DurationSeconds", this.DurationSeconds);
|
||||
this.SetParamSimple(map, prefix + "Policy", this.Policy);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
64
TencentCloud/Sts/V20180813/Models/AssumeRoleResponse.cs
Normal file
64
TencentCloud/Sts/V20180813/Models/AssumeRoleResponse.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Sts.V20180813.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class AssumeRoleResponse : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 临时安全证书
|
||||
/// </summary>
|
||||
[JsonProperty("Credentials")]
|
||||
public Credentials Credentials{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 证书无效的时间,返回 Unix 时间戳,精确到秒
|
||||
/// </summary>
|
||||
[JsonProperty("ExpiredTime")]
|
||||
public long? ExpiredTime{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 证书无效的时间,以 iso8601 格式的 UTC 时间表示
|
||||
/// </summary>
|
||||
[JsonProperty("Expiration")]
|
||||
public string Expiration{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
/// </summary>
|
||||
[JsonProperty("RequestId")]
|
||||
public string RequestId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamObj(map, prefix + "Credentials.", this.Credentials);
|
||||
this.SetParamSimple(map, prefix + "ExpiredTime", this.ExpiredTime);
|
||||
this.SetParamSimple(map, prefix + "Expiration", this.Expiration);
|
||||
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Sts.V20180813.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class AssumeRoleWithSAMLRequest : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// base64 编码的 SAML 断言信息
|
||||
/// </summary>
|
||||
[JsonProperty("SAMLAssertion")]
|
||||
public string SAMLAssertion{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 扮演者访问描述名
|
||||
/// </summary>
|
||||
[JsonProperty("PrincipalArn")]
|
||||
public string PrincipalArn{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 角色访问描述名
|
||||
/// </summary>
|
||||
[JsonProperty("RoleArn")]
|
||||
public string RoleArn{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 会话名称
|
||||
/// </summary>
|
||||
[JsonProperty("RoleSessionName")]
|
||||
public string RoleSessionName{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 指定临时证书的有效期,单位:秒,默认 7200 秒,最长可设定有效期为 7200 秒
|
||||
/// </summary>
|
||||
[JsonProperty("DurationSeconds")]
|
||||
public ulong? DurationSeconds{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "SAMLAssertion", this.SAMLAssertion);
|
||||
this.SetParamSimple(map, prefix + "PrincipalArn", this.PrincipalArn);
|
||||
this.SetParamSimple(map, prefix + "RoleArn", this.RoleArn);
|
||||
this.SetParamSimple(map, prefix + "RoleSessionName", this.RoleSessionName);
|
||||
this.SetParamSimple(map, prefix + "DurationSeconds", this.DurationSeconds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Sts.V20180813.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class AssumeRoleWithSAMLResponse : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 对象里面包含 Token,TmpSecretId,TmpSecretKey 三元组
|
||||
/// </summary>
|
||||
[JsonProperty("Credentials")]
|
||||
public Credentials Credentials{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 证书无效的时间,返回 Unix 时间戳,精确到秒
|
||||
/// </summary>
|
||||
[JsonProperty("ExpiredTime")]
|
||||
public ulong? ExpiredTime{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 证书无效的时间,以 ISO8601 格式的 UTC 时间表示
|
||||
/// </summary>
|
||||
[JsonProperty("Expiration")]
|
||||
public string Expiration{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
/// </summary>
|
||||
[JsonProperty("RequestId")]
|
||||
public string RequestId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamObj(map, prefix + "Credentials.", this.Credentials);
|
||||
this.SetParamSimple(map, prefix + "ExpiredTime", this.ExpiredTime);
|
||||
this.SetParamSimple(map, prefix + "Expiration", this.Expiration);
|
||||
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
57
TencentCloud/Sts/V20180813/Models/Credentials.cs
Normal file
57
TencentCloud/Sts/V20180813/Models/Credentials.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Sts.V20180813.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class Credentials : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// token
|
||||
/// </summary>
|
||||
[JsonProperty("Token")]
|
||||
public string Token{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临时证书密钥ID
|
||||
/// </summary>
|
||||
[JsonProperty("TmpSecretId")]
|
||||
public string TmpSecretId{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临时证书密钥Key
|
||||
/// </summary>
|
||||
[JsonProperty("TmpSecretKey")]
|
||||
public string TmpSecretKey{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Token", this.Token);
|
||||
this.SetParamSimple(map, prefix + "TmpSecretId", this.TmpSecretId);
|
||||
this.SetParamSimple(map, prefix + "TmpSecretKey", this.TmpSecretKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Sts.V20180813.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class GetFederationTokenRequest : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 您可以自定义调用方英文名称,由字母组成。
|
||||
/// </summary>
|
||||
[JsonProperty("Name")]
|
||||
public string Name{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 策略描述
|
||||
/// 注意:
|
||||
/// 1、policy 需要做 urlencode(如果通过 GET 方法请求云 API,发送请求前,所有参数都需要按照[云 API 规范](https://cloud.tencent.com/document/api/598/33159#1.-.E6.8B.BC.E6.8E.A5.E8.A7.84.E8.8C.83.E8.AF.B7.E6.B1.82.E4.B8.B2)再 urlencode 一次)。
|
||||
/// 2、策略语法参照[ CAM 策略语法](https://cloud.tencent.com/document/product/598/10603)。
|
||||
/// 3、策略中不能包含 principal 元素。
|
||||
/// </summary>
|
||||
[JsonProperty("Policy")]
|
||||
public string Policy{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 指定临时证书的有效期,单位:秒,默认1800秒,最长可设定有效期为7200秒。
|
||||
/// </summary>
|
||||
[JsonProperty("DurationSeconds")]
|
||||
public ulong? DurationSeconds{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Name", this.Name);
|
||||
this.SetParamSimple(map, prefix + "Policy", this.Policy);
|
||||
this.SetParamSimple(map, prefix + "DurationSeconds", this.DurationSeconds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Sts.V20180813.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class GetFederationTokenResponse : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 临时证书
|
||||
/// </summary>
|
||||
[JsonProperty("Credentials")]
|
||||
public Credentials Credentials{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临时证书有效的时间,返回 Unix 时间戳,精确到秒
|
||||
/// </summary>
|
||||
[JsonProperty("ExpiredTime")]
|
||||
public ulong? ExpiredTime{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 证书有效的时间,以 iso8601 格式的 UTC 时间表示
|
||||
/// 注意:此字段可能返回 null,表示取不到有效值。
|
||||
/// </summary>
|
||||
[JsonProperty("Expiration")]
|
||||
public string Expiration{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
/// </summary>
|
||||
[JsonProperty("RequestId")]
|
||||
public string RequestId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamObj(map, prefix + "Credentials.", this.Credentials);
|
||||
this.SetParamSimple(map, prefix + "ExpiredTime", this.ExpiredTime);
|
||||
this.SetParamSimple(map, prefix + "Expiration", this.Expiration);
|
||||
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
43
TencentCloud/Sts/V20180813/Models/QueryApiKeyRequest.cs
Normal file
43
TencentCloud/Sts/V20180813/Models/QueryApiKeyRequest.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Sts.V20180813.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class QueryApiKeyRequest : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 待查询的账号(不填默认查当前账号)
|
||||
/// </summary>
|
||||
[JsonProperty("TargetUin")]
|
||||
public ulong? TargetUin{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "TargetUin", this.TargetUin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
50
TencentCloud/Sts/V20180813/Models/QueryApiKeyResponse.cs
Normal file
50
TencentCloud/Sts/V20180813/Models/QueryApiKeyResponse.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Sts.V20180813.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class QueryApiKeyResponse : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 密钥ID列表
|
||||
/// </summary>
|
||||
[JsonProperty("IdKeys")]
|
||||
public ApiKey[] IdKeys{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
/// </summary>
|
||||
[JsonProperty("RequestId")]
|
||||
public string RequestId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamArrayObj(map, prefix + "IdKeys.", this.IdKeys);
|
||||
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
216
TencentCloud/Sts/V20180813/StsClient.cs
Normal file
216
TencentCloud/Sts/V20180813/StsClient.cs
Normal file
@@ -0,0 +1,216 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Sts.V20180813
|
||||
{
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System.Threading.Tasks;
|
||||
using TencentCloud.Common;
|
||||
using TencentCloud.Common.Profile;
|
||||
using TencentCloud.Sts.V20180813.Models;
|
||||
|
||||
public class StsClient : AbstractClient{
|
||||
|
||||
private const string endpoint = "sts.tencentcloudapi.com";
|
||||
private const string version = "2018-08-13";
|
||||
|
||||
/// <summary>
|
||||
/// Client constructor.
|
||||
/// </summary>
|
||||
/// <param name="credential">Credentials.</param>
|
||||
/// <param name="region">Region name, such as "ap-guangzhou".</param>
|
||||
public StsClient(Credential credential, string region)
|
||||
: this(credential, region, new ClientProfile())
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Client Constructor.
|
||||
/// </summary>
|
||||
/// <param name="credential">Credentials.</param>
|
||||
/// <param name="region">Region name, such as "ap-guangzhou".</param>
|
||||
/// <param name="profile">Client profiles.</param>
|
||||
public StsClient(Credential credential, string region, ClientProfile profile)
|
||||
: base(endpoint, version, credential, region, profile)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 申请扮演角色
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="AssumeRoleRequest"/></param>
|
||||
/// <returns><see cref="AssumeRoleResponse"/></returns>
|
||||
public async Task<AssumeRoleResponse> AssumeRole(AssumeRoleRequest req)
|
||||
{
|
||||
JsonResponseModel<AssumeRoleResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = await this.InternalRequest(req, "AssumeRole");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<AssumeRoleResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 申请扮演角色
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="AssumeRoleRequest"/></param>
|
||||
/// <returns><see cref="AssumeRoleResponse"/></returns>
|
||||
public AssumeRoleResponse AssumeRoleSync(AssumeRoleRequest req)
|
||||
{
|
||||
JsonResponseModel<AssumeRoleResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = this.InternalRequestSync(req, "AssumeRole");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<AssumeRoleResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 本接口(AssumeRoleWithSAML)用于根据 SAML 断言申请角色临时凭证。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="AssumeRoleWithSAMLRequest"/></param>
|
||||
/// <returns><see cref="AssumeRoleWithSAMLResponse"/></returns>
|
||||
public async Task<AssumeRoleWithSAMLResponse> AssumeRoleWithSAML(AssumeRoleWithSAMLRequest req)
|
||||
{
|
||||
JsonResponseModel<AssumeRoleWithSAMLResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = await this.InternalRequest(req, "AssumeRoleWithSAML");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<AssumeRoleWithSAMLResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 本接口(AssumeRoleWithSAML)用于根据 SAML 断言申请角色临时凭证。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="AssumeRoleWithSAMLRequest"/></param>
|
||||
/// <returns><see cref="AssumeRoleWithSAMLResponse"/></returns>
|
||||
public AssumeRoleWithSAMLResponse AssumeRoleWithSAMLSync(AssumeRoleWithSAMLRequest req)
|
||||
{
|
||||
JsonResponseModel<AssumeRoleWithSAMLResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = this.InternalRequestSync(req, "AssumeRoleWithSAML");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<AssumeRoleWithSAMLResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取联合身份临时访问凭证
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="GetFederationTokenRequest"/></param>
|
||||
/// <returns><see cref="GetFederationTokenResponse"/></returns>
|
||||
public async Task<GetFederationTokenResponse> GetFederationToken(GetFederationTokenRequest req)
|
||||
{
|
||||
JsonResponseModel<GetFederationTokenResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = await this.InternalRequest(req, "GetFederationToken");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<GetFederationTokenResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取联合身份临时访问凭证
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="GetFederationTokenRequest"/></param>
|
||||
/// <returns><see cref="GetFederationTokenResponse"/></returns>
|
||||
public GetFederationTokenResponse GetFederationTokenSync(GetFederationTokenRequest req)
|
||||
{
|
||||
JsonResponseModel<GetFederationTokenResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = this.InternalRequestSync(req, "GetFederationToken");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<GetFederationTokenResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 拉取API密钥列表
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="QueryApiKeyRequest"/></param>
|
||||
/// <returns><see cref="QueryApiKeyResponse"/></returns>
|
||||
public async Task<QueryApiKeyResponse> QueryApiKey(QueryApiKeyRequest req)
|
||||
{
|
||||
JsonResponseModel<QueryApiKeyResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = await this.InternalRequest(req, "QueryApiKey");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<QueryApiKeyResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 拉取API密钥列表
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="QueryApiKeyRequest"/></param>
|
||||
/// <returns><see cref="QueryApiKeyResponse"/></returns>
|
||||
public QueryApiKeyResponse QueryApiKeySync(QueryApiKeyRequest req)
|
||||
{
|
||||
JsonResponseModel<QueryApiKeyResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = this.InternalRequestSync(req, "QueryApiKey");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<QueryApiKeyResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user