tccli 3.0.1281.1__py2.py3-none-any.whl → 3.0.1283.1__py2.py3-none-any.whl
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.
- tccli/__init__.py +1 -1
- tccli/services/acp/v20220105/api.json +12 -12
- tccli/services/acp/v20220105/examples.json +1 -1
- tccli/services/aiart/aiart_client.py +53 -0
- tccli/services/aiart/v20221229/api.json +62 -0
- tccli/services/aiart/v20221229/examples.json +8 -0
- tccli/services/antiddos/v20200309/api.json +1 -1
- tccli/services/ccc/v20200210/api.json +9 -0
- tccli/services/cdwch/v20200915/api.json +3 -3
- tccli/services/cdwch/v20200915/examples.json +1 -1
- tccli/services/chdfs/v20201112/api.json +12 -12
- tccli/services/cvm/v20170312/api.json +8 -8
- tccli/services/dlc/v20210125/api.json +11 -0
- tccli/services/ess/v20201111/api.json +2 -2
- tccli/services/essbasic/v20210526/api.json +2 -2
- tccli/services/iotexplorer/v20190423/api.json +128 -0
- tccli/services/iotexplorer/v20190423/examples.json +3 -3
- tccli/services/mongodb/v20190725/api.json +2 -2
- tccli/services/mongodb/v20190725/examples.json +2 -2
- tccli/services/mqtt/mqtt_client.py +269 -4
- tccli/services/mqtt/v20240516/api.json +979 -210
- tccli/services/mqtt/v20240516/examples.json +45 -5
- tccli/services/oceanus/v20190422/api.json +43 -4
- tccli/services/organization/organization_client.py +114 -8
- tccli/services/organization/v20210331/api.json +86 -0
- tccli/services/organization/v20210331/examples.json +16 -0
- {tccli-3.0.1281.1.dist-info → tccli-3.0.1283.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1281.1.dist-info → tccli-3.0.1283.1.dist-info}/RECORD +31 -31
- {tccli-3.0.1281.1.dist-info → tccli-3.0.1283.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1281.1.dist-info → tccli-3.0.1283.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1281.1.dist-info → tccli-3.0.1283.1.dist-info}/license_files/LICENSE +0 -0
@@ -32,6 +32,14 @@
|
|
32
32
|
"title": "示例"
|
33
33
|
}
|
34
34
|
],
|
35
|
+
"CreateHttpAuthenticator": [
|
36
|
+
{
|
37
|
+
"document": "示例",
|
38
|
+
"input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateHttpAuthenticator\n<公共请求参数>\n\n{\n \"InstanceId\": \"mqtt-3ogawe7n\",\n \"Endpoint\": \"127.0.0.1\",\n \"Status\": \"open\",\n \"Header\": [\n {\n \"Key\": \"user\",\n \"Value\": \"${username}\"\n }\n ],\n \"Body\": [\n {\n \"Key\": \"user\",\n \"Value\": \"${username}\"\n }\n ]\n}",
|
39
|
+
"output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"RequestId\": \"6f36142e-0e1a-4540-ba32-2b1d223672c6\"\n }\n}",
|
40
|
+
"title": "示例"
|
41
|
+
}
|
42
|
+
],
|
35
43
|
"CreateInsPublicEndpoint": [
|
36
44
|
{
|
37
45
|
"document": "示例",
|
@@ -75,7 +83,7 @@
|
|
75
83
|
"CreateUser": [
|
76
84
|
{
|
77
85
|
"document": "示例",
|
78
|
-
"input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateMQTTUser\n<公共请求参数>\n\n{\n \"InstanceId\": \"mqtt-
|
86
|
+
"input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateMQTTUser\n<公共请求参数>\n\n{\n \"InstanceId\": \"mqtt-12345\",\n \"Remark\": \"remark\",\n \"Username\": \"user1\",\n \"Password\": \"user1-pd\"\n}",
|
79
87
|
"output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"RequestId\": \"25cb77a7-2add-4086-8fd2-a05b5bd34776\"\n }\n}",
|
80
88
|
"title": "示例"
|
81
89
|
}
|
@@ -155,7 +163,7 @@
|
|
155
163
|
"DeleteUser": [
|
156
164
|
{
|
157
165
|
"document": "示例",
|
158
|
-
"input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteMQTTUser\n<公共请求参数>\n\n{\n \"InstanceId\": \"mqtt-7pnqmkrx\",\n \"Username\": \"
|
166
|
+
"input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteMQTTUser\n<公共请求参数>\n\n{\n \"InstanceId\": \"mqtt-7pnqmkrx\",\n \"Username\": \"user1\"\n}",
|
159
167
|
"output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"RequestId\": \"74625f9b-ce92-43d5-ba0b-9a85ddb99041\"\n }\n}",
|
160
168
|
"title": "示例"
|
161
169
|
}
|
@@ -198,11 +206,19 @@
|
|
198
206
|
"title": "示例"
|
199
207
|
}
|
200
208
|
],
|
209
|
+
"DescribeClientList": [
|
210
|
+
{
|
211
|
+
"document": "示例",
|
212
|
+
"input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeMQTTClientList\n<公共请求参数>\n\n{\n \"InstanceId\": \"mqtt-2vnk55xv\",\n \"ClientId\": \"sub\",\n \"Number\": \"10\"\n}",
|
213
|
+
"output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"Clients\": [\n {\n \"ClientAddress\": \"11.176.16.153:63066\",\n \"ClientId\": \"sub_client1\",\n \"ConnectTime\": 1710314923557,\n \"ConnectionStatus\": \"CONNECTED\",\n \"CreateTime\": 1710314923554,\n \"DisconnectTime\": 0,\n \"Keepalive\": 60,\n \"MQTTClientSubscriptions\": [\n {\n \"Qos\": 1,\n \"TopicFilter\": \"home/temp/+/\"\n },\n {\n \"Qos\": 0,\n \"TopicFilter\": \"home/humidity/+/\"\n },\n {\n \"Qos\": 2,\n \"TopicFilter\": \"home/person/+/\"\n }\n ],\n \"ProtocolVersion\": 4\n },\n {\n \"ClientAddress\": \"11.176.16.153:62048\",\n \"ClientId\": \"sub_client2\",\n \"ConnectTime\": 1710314912143,\n \"ConnectionStatus\": \"CONNECTED\",\n \"CreateTime\": 1710314912140,\n \"DisconnectTime\": 0,\n \"Keepalive\": 60,\n \"MQTTClientSubscriptions\": [\n {\n \"Qos\": 1,\n \"TopicFilter\": \"home/sun/+/\"\n },\n {\n \"Qos\": 1,\n \"TopicFilter\": \"home/temp/+/\"\n },\n {\n \"Qos\": 0,\n \"TopicFilter\": \"home/humidity/+/\"\n },\n {\n \"Qos\": 2,\n \"TopicFilter\": \"home/person/+/\"\n }\n ],\n \"ProtocolVersion\": 4\n }\n ],\n \"RequestId\": \"9f81924f-41e8-4f24-aaf2-61da7da9c713\"\n }\n}",
|
214
|
+
"title": "示例"
|
215
|
+
}
|
216
|
+
],
|
201
217
|
"DescribeDeviceCertificate": [
|
202
218
|
{
|
203
219
|
"document": "示例",
|
204
220
|
"input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeDeviceCertificate\n<公共请求参数>\n\n{\n \"DeviceCertificateSn\": \"0eef68a582b94254296e54ce754f94d707a59911\",\n \"InstanceId\": \"mqtt-jbgwp4ae\"\n}",
|
205
|
-
"output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"CaSn\": \"1b1e3bf3702110125887a3a721a7e66f05522513\",\n \"CertificateSource\": \"API\",\n \"ClientId\": \"client1\",\n \"CreatedTime\": 1724050379000,\n \"DeviceCertificate\": \"-----BEGIN CERTIFICATE-----\\nMIIEQjCCAyqgAwIBAgIUDu9opYK5QlQpblTOdU+U1welmREwDQYJKoZIhvcNAQEL\\n-----END CERTIFICATE-----\\n\",\n \"DeviceCertificateCn\": \"mqtt-test.xxx.tencent.com\",\n \"DeviceCertificateSn\": \"0eef68a582b94254296e54ce754f94d707a59911\",\n \"Format\": \"PEM\",\n \"LastActivationTime\": 1724050378987,\n \"LastInactivationTime\": 0,\n \"NotAfterTime\": 1758185683000,\n \"NotBeforeTime\": 1714985683000,\n \"RequestId\": \"1b5fc3fa-4bbf-421a-aad1-c45d49119a2c\",\n \"Status\": \"ACTIVE\",\n \"UpdateTime\": 1724050379000\n }\n}",
|
221
|
+
"output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"CaSn\": \"1b1e3bf3702110125887a3a721a7e66f05522513\",\n \"CertificateSource\": \"API\",\n \"ClientId\": \"client1\",\n \"CreatedTime\": 1724050379000,\n \"DeviceCertificate\": \"-----BEGIN CERTIFICATE-----\\nMIIEQjCCAyqgAwIBAgIUDu9opYK5QlQpblTOdU+U1welmREwDQYJKoZIhvcNAQEL\\n-----END CERTIFICATE-----\\n\",\n \"DeviceCertificateCn\": \"mqtt-test.xxx.tencent.com\",\n \"DeviceCertificateSn\": \"0eef68a582b94254296e54ce754f94d707a59911\",\n \"OrganizationalUnit\": \"TencentCloud\",\n \"Format\": \"PEM\",\n \"LastActivationTime\": 1724050378987,\n \"LastInactivationTime\": 0,\n \"NotAfterTime\": 1758185683000,\n \"NotBeforeTime\": 1714985683000,\n \"RequestId\": \"1b5fc3fa-4bbf-421a-aad1-c45d49119a2c\",\n \"Status\": \"ACTIVE\",\n \"UpdateTime\": 1724050379000\n }\n}",
|
206
222
|
"title": "示例"
|
207
223
|
}
|
208
224
|
],
|
@@ -252,11 +268,27 @@
|
|
252
268
|
"title": "示例"
|
253
269
|
}
|
254
270
|
],
|
255
|
-
"
|
271
|
+
"DescribeMessageList": [
|
256
272
|
{
|
257
273
|
"document": "示例",
|
274
|
+
"input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeMQTTMessageList\n<公共请求参数>\n\n{\n \"InstanceId\": \"mqtt-47ka4rdr\",\n \"Topic\": \"topic24\",\n \"Offset\": 0,\n \"Limit\": 20,\n \"StartTime\": 1705373755266,\n \"EndTime\": 1705632955266,\n \"TaskRequestId\": \" \"\n}",
|
275
|
+
"output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"Data\": [\n {\n \"DeadLetterResendSuccessTimes\": null,\n \"DeadLetterResendTimes\": null,\n \"Keys\": null,\n \"MsgId\": \"0B8D67F0002D6ACBCFC0557BCEBA0001\",\n \"ProduceTime\": \"2024-01-17 14:22:57\",\n \"ProducerAddr\": \"11.176.16.153:51134\",\n \"Qos\": \"1\",\n \"SubTopic\": \"/1/\",\n \"Tags\": \"MQTT_COMMON\"\n },\n {\n \"DeadLetterResendSuccessTimes\": null,\n \"DeadLetterResendTimes\": null,\n \"Keys\": null,\n \"MsgId\": \"0B8D67F0002D6ACBCFC0557B1A980000\",\n \"ProduceTime\": \"2024-01-17 14:22:11\",\n \"ProducerAddr\": \"11.176.16.153:44044\",\n \"Qos\": \"0\",\n \"SubTopic\": \"\",\n \"Tags\": \"MQTT_COMMON\"\n }\n ],\n \"RequestId\": \"116cd3f5-668f-42fe-8572-fcd5d3a31377\",\n \"TaskRequestId\": \"e3d14393-4701-4f62-8a7d-b52bd59b5ace\",\n \"TotalCount\": 2\n }\n}",
|
276
|
+
"title": "示例"
|
277
|
+
}
|
278
|
+
],
|
279
|
+
"DescribeProductSKUList": [
|
280
|
+
{
|
281
|
+
"document": "",
|
258
282
|
"input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeProductSKUList\n<公共请求参数>\n\n{}",
|
259
|
-
"output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"MQTTProductSkuList\": [\n {\n \"ClientNumLimit\":
|
283
|
+
"output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"MQTTProductSkuList\": [\n {\n \"AuthorizationPolicyLimit\": 10,\n \"ClientNumLimit\": 2000,\n \"InstanceType\": \"BASIC\",\n \"MaxSubscriptionPerClient\": 30,\n \"OnSale\": true,\n \"PriceTags\": [\n {\n \"Category\": \"v_tdmq_mqtt_instance_specification\",\n \"Code\": \"sv_tdmq_mqtt_instance_specification_basic_config\",\n \"Name\": \"tps\",\n \"Step\": 1\n },\n {\n \"Category\": \"v_tdmq_instance_specification\",\n \"Code\": \"sv_tdmq_mqtt_instance_specification_basic_tps\",\n \"Name\": \"stepTps\",\n \"Step\": 2\n }\n ],\n \"SkuCode\": \"basic_2k\",\n \"TopicNumLimit\": 100,\n \"TpsLimit\": 2000\n },\n {\n \"AuthorizationPolicyLimit\": 10,\n \"ClientNumLimit\": 5000,\n \"InstanceType\": \"BASIC\",\n \"MaxSubscriptionPerClient\": 30,\n \"OnSale\": true,\n \"PriceTags\": [\n {\n \"Category\": \"v_tdmq_mqtt_instance_specification\",\n \"Code\": \"sv_tdmq_mqtt_instance_specification_basic_config\",\n \"Name\": \"tps\",\n \"Step\": 1\n },\n {\n \"Category\": \"v_tdmq_instance_specification\",\n \"Code\": \"sv_tdmq_mqtt_instance_specification_basic_tps\",\n \"Name\": \"stepTps\",\n \"Step\": 5\n }\n ],\n \"SkuCode\": \"basic_5k\",\n \"TopicNumLimit\": 100,\n \"TpsLimit\": 5000\n }\n ],\n \"RequestId\": \"590f4a66-aa96-49d7-9572-0e01e90dc85c\",\n \"TotalCount\": 2\n }\n}",
|
284
|
+
"title": "示例"
|
285
|
+
}
|
286
|
+
],
|
287
|
+
"DescribeSharedSubscriptionLag": [
|
288
|
+
{
|
289
|
+
"document": "示例",
|
290
|
+
"input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeSharedSubscriptionLag\n<公共请求参数>\n\n{\n \"InstanceId\": \"mqtt-8x3ae7q2\",\n \"SharedSubscription\": \"$share/group/home\"\n}",
|
291
|
+
"output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"Lag\": 0,\n \"RequestId\": \"f5209cd4-34e9-4807-807d-57c35296d7e5\"\n }\n}",
|
260
292
|
"title": "示例"
|
261
293
|
}
|
262
294
|
],
|
@@ -292,6 +324,14 @@
|
|
292
324
|
"title": "示例"
|
293
325
|
}
|
294
326
|
],
|
327
|
+
"ModifyHttpAuthenticator": [
|
328
|
+
{
|
329
|
+
"document": "示例",
|
330
|
+
"input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyHttpAuthenticator\n<公共请求参数>\n\n{\n \"InstanceId\": \"mqtt-3ogawe7n\",\n \"Endpoint\": \"127.0.0.2\",\n \"Status\": \"open\"\n}",
|
331
|
+
"output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"RequestId\": \"34222ab3-e27c-4d0c-974f-ca35e59a8607\"\n }\n}",
|
332
|
+
"title": "示例"
|
333
|
+
}
|
334
|
+
],
|
295
335
|
"ModifyInsPublicEndpoint": [
|
296
336
|
{
|
297
337
|
"document": "示例",
|
@@ -2177,6 +2177,15 @@
|
|
2177
2177
|
"name": "Description",
|
2178
2178
|
"required": false,
|
2179
2179
|
"type": "string"
|
2180
|
+
},
|
2181
|
+
{
|
2182
|
+
"disabled": false,
|
2183
|
+
"document": "开启默认告警",
|
2184
|
+
"example": "1",
|
2185
|
+
"member": "int64",
|
2186
|
+
"name": "OpenJobDefaultAlarm",
|
2187
|
+
"required": false,
|
2188
|
+
"type": "int"
|
2180
2189
|
}
|
2181
2190
|
],
|
2182
2191
|
"type": "object"
|
@@ -5662,6 +5671,26 @@
|
|
5662
5671
|
"output_required": false,
|
5663
5672
|
"type": "float",
|
5664
5673
|
"value_allowed_null": true
|
5674
|
+
},
|
5675
|
+
{
|
5676
|
+
"disabled": false,
|
5677
|
+
"document": "是否开了默认告警\n注意:此字段可能返回 null,表示取不到有效值。",
|
5678
|
+
"example": "1",
|
5679
|
+
"member": "int64",
|
5680
|
+
"name": "OpenJobDefaultAlarm",
|
5681
|
+
"output_required": false,
|
5682
|
+
"type": "int",
|
5683
|
+
"value_allowed_null": true
|
5684
|
+
},
|
5685
|
+
{
|
5686
|
+
"disabled": false,
|
5687
|
+
"document": "操作中描述\n注意:此字段可能返回 null,表示取不到有效值。",
|
5688
|
+
"example": "操作中",
|
5689
|
+
"member": "string",
|
5690
|
+
"name": "ProgressDesc",
|
5691
|
+
"output_required": false,
|
5692
|
+
"type": "string",
|
5693
|
+
"value_allowed_null": true
|
5665
5694
|
}
|
5666
5695
|
],
|
5667
5696
|
"usage": "out"
|
@@ -7921,23 +7950,33 @@
|
|
7921
7950
|
},
|
7922
7951
|
{
|
7923
7952
|
"disabled": false,
|
7924
|
-
"document": "RunningCpu",
|
7953
|
+
"document": "RunningCpu\n注意:此字段可能返回 null,表示取不到有效值。",
|
7925
7954
|
"example": "0",
|
7926
7955
|
"member": "float",
|
7927
7956
|
"name": "RunningCpu",
|
7928
7957
|
"output_required": false,
|
7929
7958
|
"type": "float",
|
7930
|
-
"value_allowed_null":
|
7959
|
+
"value_allowed_null": true
|
7931
7960
|
},
|
7932
7961
|
{
|
7933
7962
|
"disabled": false,
|
7934
|
-
"document": "RunningMem",
|
7963
|
+
"document": "RunningMem\n注意:此字段可能返回 null,表示取不到有效值。",
|
7935
7964
|
"example": "0",
|
7936
7965
|
"member": "float",
|
7937
7966
|
"name": "RunningMem",
|
7938
7967
|
"output_required": false,
|
7939
7968
|
"type": "float",
|
7940
|
-
"value_allowed_null":
|
7969
|
+
"value_allowed_null": true
|
7970
|
+
},
|
7971
|
+
{
|
7972
|
+
"disabled": false,
|
7973
|
+
"document": "sql\n注意:此字段可能返回 null,表示取不到有效值。",
|
7974
|
+
"example": "select * from table",
|
7975
|
+
"member": "string",
|
7976
|
+
"name": "DecodeSqlCode",
|
7977
|
+
"output_required": false,
|
7978
|
+
"type": "string",
|
7979
|
+
"value_allowed_null": true
|
7941
7980
|
}
|
7942
7981
|
],
|
7943
7982
|
"usage": "out"
|
@@ -123,6 +123,58 @@ def doListOrganizationNodes(args, parsed_globals):
|
|
123
123
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
124
124
|
|
125
125
|
|
126
|
+
def doBindOrganizationPolicySubAccount(args, parsed_globals):
|
127
|
+
g_param = parse_global_arg(parsed_globals)
|
128
|
+
|
129
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
130
|
+
cred = credential.CVMRoleCredential()
|
131
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
132
|
+
cred = credential.STSAssumeRoleCredential(
|
133
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
134
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
135
|
+
)
|
136
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
137
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
138
|
+
else:
|
139
|
+
cred = credential.Credential(
|
140
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
141
|
+
)
|
142
|
+
http_profile = HttpProfile(
|
143
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
144
|
+
reqMethod="POST",
|
145
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
146
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
147
|
+
)
|
148
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
149
|
+
if g_param[OptionsDefine.Language]:
|
150
|
+
profile.language = g_param[OptionsDefine.Language]
|
151
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
152
|
+
client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
|
153
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
154
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
155
|
+
model = models.BindOrganizationPolicySubAccountRequest()
|
156
|
+
model.from_json_string(json.dumps(args))
|
157
|
+
start_time = time.time()
|
158
|
+
while True:
|
159
|
+
rsp = client.BindOrganizationPolicySubAccount(model)
|
160
|
+
result = rsp.to_json_string()
|
161
|
+
try:
|
162
|
+
json_obj = json.loads(result)
|
163
|
+
except TypeError as e:
|
164
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
165
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
166
|
+
break
|
167
|
+
cur_time = time.time()
|
168
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
169
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
170
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
171
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
172
|
+
else:
|
173
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
174
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
175
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
176
|
+
|
177
|
+
|
126
178
|
def doListGroupMembers(args, parsed_globals):
|
127
179
|
g_param = parse_global_arg(parsed_globals)
|
128
180
|
|
@@ -1787,6 +1839,58 @@ def doGetOrganization(args, parsed_globals):
|
|
1787
1839
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1788
1840
|
|
1789
1841
|
|
1842
|
+
def doCancelOrganizationPolicySubAccount(args, parsed_globals):
|
1843
|
+
g_param = parse_global_arg(parsed_globals)
|
1844
|
+
|
1845
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1846
|
+
cred = credential.CVMRoleCredential()
|
1847
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1848
|
+
cred = credential.STSAssumeRoleCredential(
|
1849
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1850
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1851
|
+
)
|
1852
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1853
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1854
|
+
else:
|
1855
|
+
cred = credential.Credential(
|
1856
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1857
|
+
)
|
1858
|
+
http_profile = HttpProfile(
|
1859
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1860
|
+
reqMethod="POST",
|
1861
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1862
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1863
|
+
)
|
1864
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1865
|
+
if g_param[OptionsDefine.Language]:
|
1866
|
+
profile.language = g_param[OptionsDefine.Language]
|
1867
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1868
|
+
client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
|
1869
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1870
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1871
|
+
model = models.CancelOrganizationPolicySubAccountRequest()
|
1872
|
+
model.from_json_string(json.dumps(args))
|
1873
|
+
start_time = time.time()
|
1874
|
+
while True:
|
1875
|
+
rsp = client.CancelOrganizationPolicySubAccount(model)
|
1876
|
+
result = rsp.to_json_string()
|
1877
|
+
try:
|
1878
|
+
json_obj = json.loads(result)
|
1879
|
+
except TypeError as e:
|
1880
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1881
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1882
|
+
break
|
1883
|
+
cur_time = time.time()
|
1884
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1885
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1886
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1887
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1888
|
+
else:
|
1889
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1890
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1891
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1892
|
+
|
1893
|
+
|
1790
1894
|
def doAcceptJoinShareUnitInvitation(args, parsed_globals):
|
1791
1895
|
g_param = parse_global_arg(parsed_globals)
|
1792
1896
|
|
@@ -3295,7 +3399,7 @@ def doListUserSyncProvisionings(args, parsed_globals):
|
|
3295
3399
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3296
3400
|
|
3297
3401
|
|
3298
|
-
def
|
3402
|
+
def doUpdateUserStatus(args, parsed_globals):
|
3299
3403
|
g_param = parse_global_arg(parsed_globals)
|
3300
3404
|
|
3301
3405
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3324,11 +3428,11 @@ def doUpdateOrganizationNode(args, parsed_globals):
|
|
3324
3428
|
client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
|
3325
3429
|
client._sdkVersion += ("_CLI_" + __version__)
|
3326
3430
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3327
|
-
model = models.
|
3431
|
+
model = models.UpdateUserStatusRequest()
|
3328
3432
|
model.from_json_string(json.dumps(args))
|
3329
3433
|
start_time = time.time()
|
3330
3434
|
while True:
|
3331
|
-
rsp = client.
|
3435
|
+
rsp = client.UpdateUserStatus(model)
|
3332
3436
|
result = rsp.to_json_string()
|
3333
3437
|
try:
|
3334
3438
|
json_obj = json.loads(result)
|
@@ -4959,7 +5063,7 @@ def doGetProvisioningTaskStatus(args, parsed_globals):
|
|
4959
5063
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4960
5064
|
|
4961
5065
|
|
4962
|
-
def
|
5066
|
+
def doUpdateOrganizationNode(args, parsed_globals):
|
4963
5067
|
g_param = parse_global_arg(parsed_globals)
|
4964
5068
|
|
4965
5069
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4988,11 +5092,11 @@ def doUpdateUserStatus(args, parsed_globals):
|
|
4988
5092
|
client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
|
4989
5093
|
client._sdkVersion += ("_CLI_" + __version__)
|
4990
5094
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4991
|
-
model = models.
|
5095
|
+
model = models.UpdateOrganizationNodeRequest()
|
4992
5096
|
model.from_json_string(json.dumps(args))
|
4993
5097
|
start_time = time.time()
|
4994
5098
|
while True:
|
4995
|
-
rsp = client.
|
5099
|
+
rsp = client.UpdateOrganizationNode(model)
|
4996
5100
|
result = rsp.to_json_string()
|
4997
5101
|
try:
|
4998
5102
|
json_obj = json.loads(result)
|
@@ -7106,6 +7210,7 @@ MODELS_MAP = {
|
|
7106
7210
|
ACTION_MAP = {
|
7107
7211
|
"QuitOrganization": doQuitOrganization,
|
7108
7212
|
"ListOrganizationNodes": doListOrganizationNodes,
|
7213
|
+
"BindOrganizationPolicySubAccount": doBindOrganizationPolicySubAccount,
|
7109
7214
|
"ListGroupMembers": doListGroupMembers,
|
7110
7215
|
"ListOrganizationIdentity": doListOrganizationIdentity,
|
7111
7216
|
"AddOrganizationNode": doAddOrganizationNode,
|
@@ -7138,6 +7243,7 @@ ACTION_MAP = {
|
|
7138
7243
|
"CreateRoleAssignment": doCreateRoleAssignment,
|
7139
7244
|
"CreateRoleConfiguration": doCreateRoleConfiguration,
|
7140
7245
|
"GetOrganization": doGetOrganization,
|
7246
|
+
"CancelOrganizationPolicySubAccount": doCancelOrganizationPolicySubAccount,
|
7141
7247
|
"AcceptJoinShareUnitInvitation": doAcceptJoinShareUnitInvitation,
|
7142
7248
|
"ListUsers": doListUsers,
|
7143
7249
|
"DescribePolicy": doDescribePolicy,
|
@@ -7167,7 +7273,7 @@ ACTION_MAP = {
|
|
7167
7273
|
"DescribeShareUnits": doDescribeShareUnits,
|
7168
7274
|
"ListOrganizationNodeMembers": doListOrganizationNodeMembers,
|
7169
7275
|
"ListUserSyncProvisionings": doListUserSyncProvisionings,
|
7170
|
-
"
|
7276
|
+
"UpdateUserStatus": doUpdateUserStatus,
|
7171
7277
|
"DisablePolicyType": doDisablePolicyType,
|
7172
7278
|
"CreateUserSyncProvisioning": doCreateUserSyncProvisioning,
|
7173
7279
|
"AddPermissionPolicyToRoleConfiguration": doAddPermissionPolicyToRoleConfiguration,
|
@@ -7199,7 +7305,7 @@ ACTION_MAP = {
|
|
7199
7305
|
"UpdateGroup": doUpdateGroup,
|
7200
7306
|
"CreatePolicy": doCreatePolicy,
|
7201
7307
|
"GetProvisioningTaskStatus": doGetProvisioningTaskStatus,
|
7202
|
-
"
|
7308
|
+
"UpdateOrganizationNode": doUpdateOrganizationNode,
|
7203
7309
|
"UpdateShareUnit": doUpdateShareUnit,
|
7204
7310
|
"UpdateOrganizationMember": doUpdateOrganizationMember,
|
7205
7311
|
"DescribeOrganizationAuthNode": doDescribeOrganizationAuthNode,
|
@@ -77,6 +77,13 @@
|
|
77
77
|
"output": "BindOrganizationMemberAuthAccountResponse",
|
78
78
|
"status": "online"
|
79
79
|
},
|
80
|
+
"BindOrganizationPolicySubAccount": {
|
81
|
+
"document": "绑定成员访问授权策略和组织管理员子账号",
|
82
|
+
"input": "BindOrganizationPolicySubAccountRequest",
|
83
|
+
"name": "绑定成员访问授权策略和组织管理员子账号",
|
84
|
+
"output": "BindOrganizationPolicySubAccountResponse",
|
85
|
+
"status": "online"
|
86
|
+
},
|
80
87
|
"CancelOrganizationMemberAuthAccount": {
|
81
88
|
"document": "取消组织成员和组织管理员子账号的授权关系",
|
82
89
|
"input": "CancelOrganizationMemberAuthAccountRequest",
|
@@ -84,6 +91,13 @@
|
|
84
91
|
"output": "CancelOrganizationMemberAuthAccountResponse",
|
85
92
|
"status": "online"
|
86
93
|
},
|
94
|
+
"CancelOrganizationPolicySubAccount": {
|
95
|
+
"document": "解绑成员访问授权策略和组织管理员子账号",
|
96
|
+
"input": "CancelOrganizationPolicySubAccountRequest",
|
97
|
+
"name": "解绑成员访问授权策略和组织管理员子账号",
|
98
|
+
"output": "CancelOrganizationPolicySubAccountResponse",
|
99
|
+
"status": "online"
|
100
|
+
},
|
87
101
|
"CheckAccountDelete": {
|
88
102
|
"document": "成员账号删除检查",
|
89
103
|
"input": "CheckAccountDeleteRequest",
|
@@ -1529,6 +1543,42 @@
|
|
1529
1543
|
],
|
1530
1544
|
"type": "object"
|
1531
1545
|
},
|
1546
|
+
"BindOrganizationPolicySubAccountRequest": {
|
1547
|
+
"document": "BindOrganizationPolicySubAccount请求参数结构体",
|
1548
|
+
"members": [
|
1549
|
+
{
|
1550
|
+
"disabled": false,
|
1551
|
+
"document": "策略ID。",
|
1552
|
+
"example": "10",
|
1553
|
+
"member": "int64",
|
1554
|
+
"name": "PolicyId",
|
1555
|
+
"required": true,
|
1556
|
+
"type": "int"
|
1557
|
+
},
|
1558
|
+
{
|
1559
|
+
"disabled": false,
|
1560
|
+
"document": "组织管理员子账号Uin列表。最大5个",
|
1561
|
+
"example": "[111111111111]",
|
1562
|
+
"member": "int64",
|
1563
|
+
"name": "OrgSubAccountUins",
|
1564
|
+
"required": true,
|
1565
|
+
"type": "list"
|
1566
|
+
}
|
1567
|
+
],
|
1568
|
+
"type": "object"
|
1569
|
+
},
|
1570
|
+
"BindOrganizationPolicySubAccountResponse": {
|
1571
|
+
"document": "BindOrganizationPolicySubAccount返回参数结构体",
|
1572
|
+
"members": [
|
1573
|
+
{
|
1574
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
1575
|
+
"member": "string",
|
1576
|
+
"name": "RequestId",
|
1577
|
+
"type": "string"
|
1578
|
+
}
|
1579
|
+
],
|
1580
|
+
"type": "object"
|
1581
|
+
},
|
1532
1582
|
"CancelOrganizationMemberAuthAccountRequest": {
|
1533
1583
|
"document": "CancelOrganizationMemberAuthAccount请求参数结构体",
|
1534
1584
|
"members": [
|
@@ -1574,6 +1624,42 @@
|
|
1574
1624
|
],
|
1575
1625
|
"type": "object"
|
1576
1626
|
},
|
1627
|
+
"CancelOrganizationPolicySubAccountRequest": {
|
1628
|
+
"document": "CancelOrganizationPolicySubAccount请求参数结构体",
|
1629
|
+
"members": [
|
1630
|
+
{
|
1631
|
+
"disabled": false,
|
1632
|
+
"document": "策略ID。",
|
1633
|
+
"example": "10",
|
1634
|
+
"member": "int64",
|
1635
|
+
"name": "PolicyId",
|
1636
|
+
"required": true,
|
1637
|
+
"type": "int"
|
1638
|
+
},
|
1639
|
+
{
|
1640
|
+
"disabled": false,
|
1641
|
+
"document": "组织管理员子账号Uin列表。最大5个",
|
1642
|
+
"example": "[111111111111]",
|
1643
|
+
"member": "int64",
|
1644
|
+
"name": "OrgSubAccountUins",
|
1645
|
+
"required": true,
|
1646
|
+
"type": "list"
|
1647
|
+
}
|
1648
|
+
],
|
1649
|
+
"type": "object"
|
1650
|
+
},
|
1651
|
+
"CancelOrganizationPolicySubAccountResponse": {
|
1652
|
+
"document": "CancelOrganizationPolicySubAccount返回参数结构体",
|
1653
|
+
"members": [
|
1654
|
+
{
|
1655
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
1656
|
+
"member": "string",
|
1657
|
+
"name": "RequestId",
|
1658
|
+
"type": "string"
|
1659
|
+
}
|
1660
|
+
],
|
1661
|
+
"type": "object"
|
1662
|
+
},
|
1577
1663
|
"CheckAccountDeleteRequest": {
|
1578
1664
|
"document": "CheckAccountDelete请求参数结构体",
|
1579
1665
|
"members": [
|
@@ -88,6 +88,14 @@
|
|
88
88
|
"title": "绑定组织成员和组织管理员子账号的授权关系"
|
89
89
|
}
|
90
90
|
],
|
91
|
+
"BindOrganizationPolicySubAccount": [
|
92
|
+
{
|
93
|
+
"document": "绑定成员访问授权策略和组织管理员子账号",
|
94
|
+
"input": "POST / HTTP/1.1\nHost: organization.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: BindOrganizationPolicySubAccount\n<公共请求参数>\n\n{\n \"PolicyId\": 123,\n \"OrgSubAccountUins\": [\n 111111111111\n ]\n}",
|
95
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"bebe4b80-bca5-45fe-a460-455045879f89\"\n }\n}",
|
96
|
+
"title": "绑定成员访问授权策略和组织管理员子账号"
|
97
|
+
}
|
98
|
+
],
|
91
99
|
"CancelOrganizationMemberAuthAccount": [
|
92
100
|
{
|
93
101
|
"document": "",
|
@@ -96,6 +104,14 @@
|
|
96
104
|
"title": "取消组织成员和组织管理员子账号的授权关系"
|
97
105
|
}
|
98
106
|
],
|
107
|
+
"CancelOrganizationPolicySubAccount": [
|
108
|
+
{
|
109
|
+
"document": "",
|
110
|
+
"input": "POST / HTTP/1.1\nHost: organization.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CancelOrganizationPolicySubAccount\n<公共请求参数>\n\n{\n \"PolicyId\": 123,\n \"OrgSubAccountUins\": [\n 111111111111\n ]\n}",
|
111
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"ae4cbff0-b722-4ef1-b1b0-2088af894566\"\n }\n}",
|
112
|
+
"title": "解绑成员访问授权策略和组织管理员子账号"
|
113
|
+
}
|
114
|
+
],
|
99
115
|
"CheckAccountDelete": [
|
100
116
|
{
|
101
117
|
"document": "成员账号删除检查",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: tccli
|
3
|
-
Version: 3.0.
|
3
|
+
Version: 3.0.1283.1
|
4
4
|
Summary: Universal Command Line Environment for Tencent Cloud
|
5
5
|
Project-URL: Bug Tracker, https://github.com/TencentCloud/tencentcloud-cli/issues
|
6
6
|
Project-URL: Homepage, https://github.com/TencentCloud/tencentcloud-cli
|
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 2.7
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
14
14
|
Requires-Dist: jmespath==0.10.0
|
15
15
|
Requires-Dist: six==1.16.0
|
16
|
-
Requires-Dist: tencentcloud-sdk-python>=3.0.
|
16
|
+
Requires-Dist: tencentcloud-sdk-python>=3.0.1283
|
17
17
|
Description-Content-Type: text/markdown
|
18
18
|
|
19
19
|
# 命令行工具简介
|