tencentcloud-sdk-organization 1.0.200
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-organization.rb +14 -0
- data/lib/v20181225/client.rb +516 -0
- data/lib/v20181225/models.rb +944 -0
- data/lib/v20210331/client.rb +84 -0
- data/lib/v20210331/models.rb +119 -0
- metadata +68 -0
@@ -0,0 +1,84 @@
|
|
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 Organization
|
21
|
+
module V20210331
|
22
|
+
class Client < TencentCloud::Common::AbstractClient
|
23
|
+
|
24
|
+
def initialize(credential, region, profile = nil)
|
25
|
+
api_version = '2021-03-31'
|
26
|
+
api_endpoint = 'organization.tencentcloudapi.com'
|
27
|
+
sdk_version = 'ORGANIZATION_' + File.read(File.expand_path('../VERSION', __dir__)).strip
|
28
|
+
super(credential, region, api_version, api_endpoint, sdk_version, profile)
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
# 绑定组织成员和子账号的授权关系
|
33
|
+
|
34
|
+
# @param request: Request instance for BindOrganizationMemberAuthAccount.
|
35
|
+
# @type request: :class:`Tencentcloud::organization::V20210331::BindOrganizationMemberAuthAccountRequest`
|
36
|
+
# @rtype: :class:`Tencentcloud::organization::V20210331::BindOrganizationMemberAuthAccountResponse`
|
37
|
+
def BindOrganizationMemberAuthAccount(request)
|
38
|
+
body = send_request('BindOrganizationMemberAuthAccount', request.serialize)
|
39
|
+
response = JSON.parse(body)
|
40
|
+
if response['Response'].key?('Error') == false
|
41
|
+
model = BindOrganizationMemberAuthAccountResponse.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
|
+
|
58
|
+
# @param request: Request instance for CreateOrganizationMember.
|
59
|
+
# @type request: :class:`Tencentcloud::organization::V20210331::CreateOrganizationMemberRequest`
|
60
|
+
# @rtype: :class:`Tencentcloud::organization::V20210331::CreateOrganizationMemberResponse`
|
61
|
+
def CreateOrganizationMember(request)
|
62
|
+
body = send_request('CreateOrganizationMember', request.serialize)
|
63
|
+
response = JSON.parse(body)
|
64
|
+
if response['Response'].key?('Error') == false
|
65
|
+
model = CreateOrganizationMemberResponse.new
|
66
|
+
model.deserialize(response['Response'])
|
67
|
+
model
|
68
|
+
else
|
69
|
+
code = response['Response']['Error']['Code']
|
70
|
+
message = response['Response']['Error']['Message']
|
71
|
+
reqid = response['Response']['RequestId']
|
72
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
73
|
+
end
|
74
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
75
|
+
raise e
|
76
|
+
rescue StandardError => e
|
77
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
78
|
+
end
|
79
|
+
|
80
|
+
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,119 @@
|
|
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 Organization
|
19
|
+
module V20210331
|
20
|
+
# BindOrganizationMemberAuthAccount请求参数结构体
|
21
|
+
class BindOrganizationMemberAuthAccountRequest < TencentCloud::Common::AbstractModel
|
22
|
+
# @param MemberUin: 成员Uin。
|
23
|
+
# @type MemberUin: Integer
|
24
|
+
# @param PolicyId: 策略ID。
|
25
|
+
# @type PolicyId: Integer
|
26
|
+
# @param OrgSubAccountUins: 组织子账号Uin。
|
27
|
+
# @type OrgSubAccountUins: Array
|
28
|
+
|
29
|
+
attr_accessor :MemberUin, :PolicyId, :OrgSubAccountUins
|
30
|
+
|
31
|
+
def initialize(memberuin=nil, policyid=nil, orgsubaccountuins=nil)
|
32
|
+
@MemberUin = memberuin
|
33
|
+
@PolicyId = policyid
|
34
|
+
@OrgSubAccountUins = orgsubaccountuins
|
35
|
+
end
|
36
|
+
|
37
|
+
def deserialize(params)
|
38
|
+
@MemberUin = params['MemberUin']
|
39
|
+
@PolicyId = params['PolicyId']
|
40
|
+
@OrgSubAccountUins = params['OrgSubAccountUins']
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
# BindOrganizationMemberAuthAccount返回参数结构体
|
45
|
+
class BindOrganizationMemberAuthAccountResponse < TencentCloud::Common::AbstractModel
|
46
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
47
|
+
# @type RequestId: String
|
48
|
+
|
49
|
+
attr_accessor :RequestId
|
50
|
+
|
51
|
+
def initialize(requestid=nil)
|
52
|
+
@RequestId = requestid
|
53
|
+
end
|
54
|
+
|
55
|
+
def deserialize(params)
|
56
|
+
@RequestId = params['RequestId']
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# CreateOrganizationMember请求参数结构体
|
61
|
+
class CreateOrganizationMemberRequest < TencentCloud::Common::AbstractModel
|
62
|
+
# @param Name: 名称
|
63
|
+
# @type Name: String
|
64
|
+
# @param PolicyType: 关系策略
|
65
|
+
# @type PolicyType: String
|
66
|
+
# @param PermissionIds: 关系权限
|
67
|
+
# @type PermissionIds: Array
|
68
|
+
# @param NodeId: 需要调节的节点
|
69
|
+
# @type NodeId: Integer
|
70
|
+
# @param AccountName: 账号名
|
71
|
+
# @type AccountName: String
|
72
|
+
# @param Remark: 备注
|
73
|
+
# @type Remark: String
|
74
|
+
# @param RecordId: 重试创建传记录ID
|
75
|
+
# @type RecordId: Integer
|
76
|
+
|
77
|
+
attr_accessor :Name, :PolicyType, :PermissionIds, :NodeId, :AccountName, :Remark, :RecordId
|
78
|
+
|
79
|
+
def initialize(name=nil, policytype=nil, permissionids=nil, nodeid=nil, accountname=nil, remark=nil, recordid=nil)
|
80
|
+
@Name = name
|
81
|
+
@PolicyType = policytype
|
82
|
+
@PermissionIds = permissionids
|
83
|
+
@NodeId = nodeid
|
84
|
+
@AccountName = accountname
|
85
|
+
@Remark = remark
|
86
|
+
@RecordId = recordid
|
87
|
+
end
|
88
|
+
|
89
|
+
def deserialize(params)
|
90
|
+
@Name = params['Name']
|
91
|
+
@PolicyType = params['PolicyType']
|
92
|
+
@PermissionIds = params['PermissionIds']
|
93
|
+
@NodeId = params['NodeId']
|
94
|
+
@AccountName = params['AccountName']
|
95
|
+
@Remark = params['Remark']
|
96
|
+
@RecordId = params['RecordId']
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
# CreateOrganizationMember返回参数结构体
|
101
|
+
class CreateOrganizationMemberResponse < TencentCloud::Common::AbstractModel
|
102
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
103
|
+
# @type RequestId: String
|
104
|
+
|
105
|
+
attr_accessor :RequestId
|
106
|
+
|
107
|
+
def initialize(requestid=nil)
|
108
|
+
@RequestId = requestid
|
109
|
+
end
|
110
|
+
|
111
|
+
def deserialize(params)
|
112
|
+
@RequestId = params['RequestId']
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
metadata
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tencentcloud-sdk-organization
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.200
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tencent Cloud
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-11-11 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: '1.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.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
|
+
ORGANIZATION.
|
30
|
+
email:
|
31
|
+
- tencentcloudapi@tencent.com
|
32
|
+
executables: []
|
33
|
+
extensions: []
|
34
|
+
extra_rdoc_files: []
|
35
|
+
files:
|
36
|
+
- lib/VERSION
|
37
|
+
- lib/tencentcloud-sdk-organization.rb
|
38
|
+
- lib/v20181225/client.rb
|
39
|
+
- lib/v20181225/models.rb
|
40
|
+
- lib/v20210331/client.rb
|
41
|
+
- lib/v20210331/models.rb
|
42
|
+
homepage: https://github.com/TencentCloud/tencentcloud-sdk-ruby
|
43
|
+
licenses:
|
44
|
+
- Apache-2.0
|
45
|
+
metadata:
|
46
|
+
source_code_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/tencentcloud-sdk-organization
|
47
|
+
changelog_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/blob/master/CHANGELOG.md
|
48
|
+
post_install_message:
|
49
|
+
rdoc_options: []
|
50
|
+
require_paths:
|
51
|
+
- lib
|
52
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
57
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
requirements: []
|
63
|
+
rubyforge_project:
|
64
|
+
rubygems_version: 2.6.14
|
65
|
+
signing_key:
|
66
|
+
specification_version: 4
|
67
|
+
summary: Tencent Cloud SDK for Ruby - ORGANIZATION
|
68
|
+
test_files: []
|