tccli 3.0.1133.1__py2.py3-none-any.whl → 3.0.1134.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.
Files changed (46) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/asr/v20190614/api.json +2 -2
  3. tccli/services/billing/v20180709/api.json +10 -0
  4. tccli/services/cam/v20190116/api.json +41 -12
  5. tccli/services/cls/v20201016/api.json +1 -1
  6. tccli/services/cls/v20201016/examples.json +1 -1
  7. tccli/services/cmq/v20190304/api.json +53 -49
  8. tccli/services/cmq/v20190304/examples.json +2 -2
  9. tccli/services/cynosdb/cynosdb_client.py +57 -4
  10. tccli/services/cynosdb/v20190107/api.json +111 -0
  11. tccli/services/cynosdb/v20190107/examples.json +8 -0
  12. tccli/services/dlc/dlc_client.py +53 -0
  13. tccli/services/dlc/v20210125/api.json +149 -2
  14. tccli/services/dlc/v20210125/examples.json +9 -1
  15. tccli/services/dsgc/v20190723/api.json +45 -40
  16. tccli/services/dts/dts_client.py +0 -53
  17. tccli/services/dts/v20180330/api.json +0 -98
  18. tccli/services/dts/v20180330/examples.json +0 -8
  19. tccli/services/emr/v20190103/api.json +4 -4
  20. tccli/services/ess/ess_client.py +411 -305
  21. tccli/services/ess/v20201111/api.json +144 -0
  22. tccli/services/ess/v20201111/examples.json +16 -0
  23. tccli/services/essbasic/essbasic_client.py +110 -4
  24. tccli/services/essbasic/v20210526/api.json +137 -2
  25. tccli/services/essbasic/v20210526/examples.json +16 -0
  26. tccli/services/mongodb/mongodb_client.py +57 -4
  27. tccli/services/mongodb/v20190725/api.json +96 -0
  28. tccli/services/mongodb/v20190725/examples.json +8 -0
  29. tccli/services/mps/v20190612/api.json +57 -7
  30. tccli/services/mps/v20190612/examples.json +1 -1
  31. tccli/services/ocr/v20181119/api.json +373 -3
  32. tccli/services/organization/organization_client.py +118 -12
  33. tccli/services/organization/v20210331/api.json +68 -0
  34. tccli/services/organization/v20210331/examples.json +16 -0
  35. tccli/services/tdmq/tdmq_client.py +443 -19
  36. tccli/services/tdmq/v20200217/api.json +570 -0
  37. tccli/services/tdmq/v20200217/examples.json +64 -0
  38. tccli/services/trro/v20220325/api.json +6 -6
  39. tccli/services/trtc/v20190722/api.json +1 -1
  40. tccli/services/tsf/v20180326/api.json +37 -27
  41. tccli/services/tsf/v20180326/examples.json +1 -1
  42. {tccli-3.0.1133.1.dist-info → tccli-3.0.1134.1.dist-info}/METADATA +2 -2
  43. {tccli-3.0.1133.1.dist-info → tccli-3.0.1134.1.dist-info}/RECORD +46 -46
  44. {tccli-3.0.1133.1.dist-info → tccli-3.0.1134.1.dist-info}/WHEEL +0 -0
  45. {tccli-3.0.1133.1.dist-info → tccli-3.0.1134.1.dist-info}/entry_points.txt +0 -0
  46. {tccli-3.0.1133.1.dist-info → tccli-3.0.1134.1.dist-info}/license_files/LICENSE +0 -0
@@ -4862,6 +4862,364 @@
4862
4862
  ],
4863
4863
  "type": "object"
4864
4864
  },
4865
+ "FinancialBill": {
4866
+ "document": "财务票据查验返回结果",
4867
+ "members": [
4868
+ {
4869
+ "disabled": false,
4870
+ "document": "票据代码\n注意:此字段可能返回 null,表示取不到有效值。",
4871
+ "example": "无",
4872
+ "member": "string",
4873
+ "name": "Code",
4874
+ "output_required": false,
4875
+ "type": "string",
4876
+ "value_allowed_null": true
4877
+ },
4878
+ {
4879
+ "disabled": false,
4880
+ "document": "票据号码\n注意:此字段可能返回 null,表示取不到有效值。",
4881
+ "example": "无",
4882
+ "member": "string",
4883
+ "name": "Number",
4884
+ "output_required": false,
4885
+ "type": "string",
4886
+ "value_allowed_null": true
4887
+ },
4888
+ {
4889
+ "disabled": false,
4890
+ "document": "缴款人纳税识别号\n注意:此字段可能返回 null,表示取不到有效值。",
4891
+ "example": "无",
4892
+ "member": "string",
4893
+ "name": "BuyerTaxID",
4894
+ "output_required": false,
4895
+ "type": "string",
4896
+ "value_allowed_null": true
4897
+ },
4898
+ {
4899
+ "disabled": false,
4900
+ "document": "校验码\n注意:此字段可能返回 null,表示取不到有效值。",
4901
+ "example": "无",
4902
+ "member": "string",
4903
+ "name": "CheckCode",
4904
+ "output_required": false,
4905
+ "type": "string",
4906
+ "value_allowed_null": true
4907
+ },
4908
+ {
4909
+ "disabled": false,
4910
+ "document": "缴款人\n注意:此字段可能返回 null,表示取不到有效值。",
4911
+ "example": "无",
4912
+ "member": "string",
4913
+ "name": "Buyer",
4914
+ "output_required": false,
4915
+ "type": "string",
4916
+ "value_allowed_null": true
4917
+ },
4918
+ {
4919
+ "disabled": false,
4920
+ "document": "开票日期\n注意:此字段可能返回 null,表示取不到有效值。",
4921
+ "example": "无",
4922
+ "member": "string",
4923
+ "name": "Date",
4924
+ "output_required": false,
4925
+ "type": "string",
4926
+ "value_allowed_null": true
4927
+ },
4928
+ {
4929
+ "disabled": false,
4930
+ "document": "收款单位\n注意:此字段可能返回 null,表示取不到有效值。",
4931
+ "example": "无",
4932
+ "member": "string",
4933
+ "name": "SellerCompany",
4934
+ "output_required": false,
4935
+ "type": "string",
4936
+ "value_allowed_null": true
4937
+ },
4938
+ {
4939
+ "disabled": false,
4940
+ "document": "复核人\n注意:此字段可能返回 null,表示取不到有效值。",
4941
+ "example": "无",
4942
+ "member": "string",
4943
+ "name": "Reviewer",
4944
+ "output_required": false,
4945
+ "type": "string",
4946
+ "value_allowed_null": true
4947
+ },
4948
+ {
4949
+ "disabled": false,
4950
+ "document": "收款人\n注意:此字段可能返回 null,表示取不到有效值。",
4951
+ "example": "无",
4952
+ "member": "string",
4953
+ "name": "Seller",
4954
+ "output_required": false,
4955
+ "type": "string",
4956
+ "value_allowed_null": true
4957
+ },
4958
+ {
4959
+ "disabled": false,
4960
+ "document": "票据名称\n注意:此字段可能返回 null,表示取不到有效值。",
4961
+ "example": "无",
4962
+ "member": "string",
4963
+ "name": "Title",
4964
+ "output_required": false,
4965
+ "type": "string",
4966
+ "value_allowed_null": true
4967
+ },
4968
+ {
4969
+ "disabled": false,
4970
+ "document": "金额合计\n注意:此字段可能返回 null,表示取不到有效值。",
4971
+ "example": "无",
4972
+ "member": "string",
4973
+ "name": "Total",
4974
+ "output_required": false,
4975
+ "type": "string",
4976
+ "value_allowed_null": true
4977
+ },
4978
+ {
4979
+ "disabled": false,
4980
+ "document": "金额合计中文大写\n注意:此字段可能返回 null,表示取不到有效值。",
4981
+ "example": "无",
4982
+ "member": "string",
4983
+ "name": "TotalCn",
4984
+ "output_required": false,
4985
+ "type": "string",
4986
+ "value_allowed_null": true
4987
+ },
4988
+ {
4989
+ "disabled": false,
4990
+ "document": "冲红\n注意:此字段可能返回 null,表示取不到有效值。",
4991
+ "example": "无",
4992
+ "member": "string",
4993
+ "name": "RushRedStateCode",
4994
+ "output_required": false,
4995
+ "type": "string",
4996
+ "value_allowed_null": true
4997
+ },
4998
+ {
4999
+ "disabled": false,
5000
+ "document": "冲红日期\n注意:此字段可能返回 null,表示取不到有效值。",
5001
+ "example": "无",
5002
+ "member": "string",
5003
+ "name": "RushRedDate",
5004
+ "output_required": false,
5005
+ "type": "string",
5006
+ "value_allowed_null": true
5007
+ },
5008
+ {
5009
+ "disabled": false,
5010
+ "document": "冲红时间\n注意:此字段可能返回 null,表示取不到有效值。",
5011
+ "example": "无",
5012
+ "member": "string",
5013
+ "name": "RushRedTime",
5014
+ "output_required": false,
5015
+ "type": "string",
5016
+ "value_allowed_null": true
5017
+ },
5018
+ {
5019
+ "disabled": false,
5020
+ "document": "冲红原因\n注意:此字段可能返回 null,表示取不到有效值。",
5021
+ "example": "无",
5022
+ "member": "string",
5023
+ "name": "RushRedReason",
5024
+ "output_required": false,
5025
+ "type": "string",
5026
+ "value_allowed_null": true
5027
+ },
5028
+ {
5029
+ "disabled": false,
5030
+ "document": "项目明细\n注意:此字段可能返回 null,表示取不到有效值。",
5031
+ "example": "无",
5032
+ "member": "FinancialBillItem",
5033
+ "name": "FinancialBillItems",
5034
+ "output_required": false,
5035
+ "type": "list",
5036
+ "value_allowed_null": true
5037
+ },
5038
+ {
5039
+ "disabled": false,
5040
+ "document": "项目清单\n注意:此字段可能返回 null,表示取不到有效值。",
5041
+ "example": "无",
5042
+ "member": "FinancialBillItemDetails",
5043
+ "name": "FinancialBillItemDetails",
5044
+ "output_required": false,
5045
+ "type": "list",
5046
+ "value_allowed_null": true
5047
+ }
5048
+ ],
5049
+ "usage": "out"
5050
+ },
5051
+ "FinancialBillItem": {
5052
+ "document": "财务票据查验返回结果-项目明细",
5053
+ "members": [
5054
+ {
5055
+ "disabled": false,
5056
+ "document": "项目编号\n注意:此字段可能返回 null,表示取不到有效值。",
5057
+ "example": "无",
5058
+ "member": "string",
5059
+ "name": "ItemID",
5060
+ "output_required": false,
5061
+ "type": "string",
5062
+ "value_allowed_null": true
5063
+ },
5064
+ {
5065
+ "disabled": false,
5066
+ "document": "项目名称\n注意:此字段可能返回 null,表示取不到有效值。",
5067
+ "example": "无",
5068
+ "member": "string",
5069
+ "name": "Name",
5070
+ "output_required": false,
5071
+ "type": "string",
5072
+ "value_allowed_null": true
5073
+ },
5074
+ {
5075
+ "disabled": false,
5076
+ "document": "单位\n注意:此字段可能返回 null,表示取不到有效值。",
5077
+ "example": "无",
5078
+ "member": "string",
5079
+ "name": "Unit",
5080
+ "output_required": false,
5081
+ "type": "string",
5082
+ "value_allowed_null": true
5083
+ },
5084
+ {
5085
+ "disabled": false,
5086
+ "document": "数量\n注意:此字段可能返回 null,表示取不到有效值。",
5087
+ "example": "无",
5088
+ "member": "string",
5089
+ "name": "Quantity",
5090
+ "output_required": false,
5091
+ "type": "string",
5092
+ "value_allowed_null": true
5093
+ },
5094
+ {
5095
+ "disabled": false,
5096
+ "document": "规格标准\n注意:此字段可能返回 null,表示取不到有效值。",
5097
+ "example": "无",
5098
+ "member": "string",
5099
+ "name": "Standard",
5100
+ "output_required": false,
5101
+ "type": "string",
5102
+ "value_allowed_null": true
5103
+ },
5104
+ {
5105
+ "disabled": false,
5106
+ "document": "金额\n注意:此字段可能返回 null,表示取不到有效值。",
5107
+ "example": "无",
5108
+ "member": "string",
5109
+ "name": "Total",
5110
+ "output_required": false,
5111
+ "type": "string",
5112
+ "value_allowed_null": true
5113
+ },
5114
+ {
5115
+ "disabled": false,
5116
+ "document": "项目序号\n注意:此字段可能返回 null,表示取不到有效值。",
5117
+ "example": "无",
5118
+ "member": "string",
5119
+ "name": "SerialNumber",
5120
+ "output_required": false,
5121
+ "type": "string",
5122
+ "value_allowed_null": true
5123
+ },
5124
+ {
5125
+ "disabled": false,
5126
+ "document": "备注\n注意:此字段可能返回 null,表示取不到有效值。",
5127
+ "example": "无",
5128
+ "member": "string",
5129
+ "name": "Remark",
5130
+ "output_required": false,
5131
+ "type": "string",
5132
+ "value_allowed_null": true
5133
+ }
5134
+ ],
5135
+ "usage": "out"
5136
+ },
5137
+ "FinancialBillItemDetails": {
5138
+ "document": "财务票据查验返回结果-项目清单",
5139
+ "members": [
5140
+ {
5141
+ "disabled": false,
5142
+ "document": "项目编号\n注意:此字段可能返回 null,表示取不到有效值。",
5143
+ "example": "无",
5144
+ "member": "string",
5145
+ "name": "ItemID",
5146
+ "output_required": false,
5147
+ "type": "string",
5148
+ "value_allowed_null": true
5149
+ },
5150
+ {
5151
+ "disabled": false,
5152
+ "document": "项目名称\n注意:此字段可能返回 null,表示取不到有效值。",
5153
+ "example": "无",
5154
+ "member": "string",
5155
+ "name": "Name",
5156
+ "output_required": false,
5157
+ "type": "string",
5158
+ "value_allowed_null": true
5159
+ },
5160
+ {
5161
+ "disabled": false,
5162
+ "document": "单位\n注意:此字段可能返回 null,表示取不到有效值。",
5163
+ "example": "无",
5164
+ "member": "string",
5165
+ "name": "Unit",
5166
+ "output_required": false,
5167
+ "type": "string",
5168
+ "value_allowed_null": true
5169
+ },
5170
+ {
5171
+ "disabled": false,
5172
+ "document": "数量\n注意:此字段可能返回 null,表示取不到有效值。",
5173
+ "example": "无",
5174
+ "member": "string",
5175
+ "name": "Quantity",
5176
+ "output_required": false,
5177
+ "type": "string",
5178
+ "value_allowed_null": true
5179
+ },
5180
+ {
5181
+ "disabled": false,
5182
+ "document": "规格标准\n注意:此字段可能返回 null,表示取不到有效值。",
5183
+ "example": "无",
5184
+ "member": "string",
5185
+ "name": "Standard",
5186
+ "output_required": false,
5187
+ "type": "string",
5188
+ "value_allowed_null": true
5189
+ },
5190
+ {
5191
+ "disabled": false,
5192
+ "document": "金额\n注意:此字段可能返回 null,表示取不到有效值。",
5193
+ "example": "无",
5194
+ "member": "string",
5195
+ "name": "Total",
5196
+ "output_required": false,
5197
+ "type": "string",
5198
+ "value_allowed_null": true
5199
+ },
5200
+ {
5201
+ "disabled": false,
5202
+ "document": "项目序号\n注意:此字段可能返回 null,表示取不到有效值。",
5203
+ "example": "无",
5204
+ "member": "string",
5205
+ "name": "SerialNumber",
5206
+ "output_required": false,
5207
+ "type": "string",
5208
+ "value_allowed_null": true
5209
+ },
5210
+ {
5211
+ "disabled": false,
5212
+ "document": "备注\n注意:此字段可能返回 null,表示取不到有效值。",
5213
+ "example": "无",
5214
+ "member": "string",
5215
+ "name": "Remark",
5216
+ "output_required": false,
5217
+ "type": "string",
5218
+ "value_allowed_null": true
5219
+ }
5220
+ ],
5221
+ "usage": "out"
5222
+ },
4865
5223
  "FlightInvoiceInfo": {
4866
5224
  "document": "机票行程单识别结果",
4867
5225
  "members": [
@@ -5206,6 +5564,7 @@
5206
5564
  "example": "0",
5207
5565
  "member": "int64",
5208
5566
  "name": "Angle",
5567
+ "output_required": true,
5209
5568
  "type": "int",
5210
5569
  "value_allowed_null": false
5211
5570
  },
@@ -5215,6 +5574,7 @@
5215
5574
  "example": "无",
5216
5575
  "member": "TextFormula",
5217
5576
  "name": "FormulaInfos",
5577
+ "output_required": true,
5218
5578
  "type": "list",
5219
5579
  "value_allowed_null": false
5220
5580
  },
@@ -19682,7 +20042,7 @@
19682
20042
  },
19683
20043
  {
19684
20044
  "disabled": false,
19685
- "document": "票种类型 01:增值税专用发票, 02:货运运输业增值税专用发 票, 03:机动车销售统一发票, 04:增值税普通发票, 08:增值税电子专用发票(含全电), 10:增值税电子普通发票(含全电), 11:增值税普通发票(卷式), 14:增值税电子(通行费)发 票, 15:二手车销售统一发票, 32:深圳区块链发票(云南区块链因业务调整现已下线)。",
20045
+ "document": "票种类型 01:增值税专用发票, 02:货运运输业增值税专用发 票, 03:机动车销售统一发票, 04:增值税普通发票, 08:增值税电子专用发票(含全电), 10:增值税电子普通发票(含全电), 11:增值税普通发票(卷式), 14:增值税电子(通行费)发 票, 15:二手车销售统一发票,16:财务发票, 32:深圳区块链发票(云南区块链因业务调整现已下线)。",
19686
20046
  "example": "04",
19687
20047
  "member": "string",
19688
20048
  "name": "InvoiceKind",
@@ -19691,7 +20051,7 @@
19691
20051
  },
19692
20052
  {
19693
20053
  "disabled": false,
19694
- "document": "校验码后 6 位,增值税普通发票、增值税电子普通发票、增值税普通发票(卷式)、增值税电子普通发票(通行费)、全电纸质发票(增值税普通发票)时必填;\n区块链为 5 位",
20054
+ "document": "校验码后 6 位,增值税普通发票、增值税电子普通发票、增值税普通发票(卷式)、增值税电子普通发票(通行费)、全电纸质发票(增值税普通发票)、财政票据时必填;\n区块链为 5 位",
19695
20055
  "example": "921630",
19696
20056
  "member": "string",
19697
20057
  "name": "CheckCode",
@@ -19700,7 +20060,7 @@
19700
20060
  },
19701
20061
  {
19702
20062
  "disabled": false,
19703
- "document": "不含税金额,增值税专用发票、增值税电子专用发票、机动车销售统一发票、二手车销售统一发票、区块链发票时必填; 全电发票为价税合计(含税金额)",
20063
+ "document": "不含税金额,增值税专用发票、增值税电子专用发票、机动车销售统一发票、二手车销售统一发票、区块链发票、财政发票时必填; 全电发票为价税合计(含税金额)",
19704
20064
  "example": "88.88",
19705
20065
  "member": "string",
19706
20066
  "name": "Amount",
@@ -19809,6 +20169,16 @@
19809
20169
  "type": "object",
19810
20170
  "value_allowed_null": false
19811
20171
  },
20172
+ {
20173
+ "disabled": false,
20174
+ "document": "财政发票详细字段信息",
20175
+ "example": "无",
20176
+ "member": "FinancialBill",
20177
+ "name": "FinancialBill",
20178
+ "output_required": false,
20179
+ "type": "object",
20180
+ "value_allowed_null": false
20181
+ },
19812
20182
  {
19813
20183
  "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
19814
20184
  "member": "string",
@@ -435,7 +435,7 @@ def doListPoliciesForTarget(args, parsed_globals):
435
435
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
436
436
 
437
437
 
438
- def doDescribeShareUnitResources(args, parsed_globals):
438
+ def doAcceptJoinShareUnitInvitation(args, parsed_globals):
439
439
  g_param = parse_global_arg(parsed_globals)
440
440
 
441
441
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -464,11 +464,11 @@ def doDescribeShareUnitResources(args, parsed_globals):
464
464
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
465
465
  client._sdkVersion += ("_CLI_" + __version__)
466
466
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
467
- model = models.DescribeShareUnitResourcesRequest()
467
+ model = models.AcceptJoinShareUnitInvitationRequest()
468
468
  model.from_json_string(json.dumps(args))
469
469
  start_time = time.time()
470
470
  while True:
471
- rsp = client.DescribeShareUnitResources(model)
471
+ rsp = client.AcceptJoinShareUnitInvitation(model)
472
472
  result = rsp.to_json_string()
473
473
  try:
474
474
  json_obj = json.loads(result)
@@ -1163,6 +1163,58 @@ def doDeleteAccount(args, parsed_globals):
1163
1163
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1164
1164
 
1165
1165
 
1166
+ def doRejectJoinShareUnitInvitation(args, parsed_globals):
1167
+ g_param = parse_global_arg(parsed_globals)
1168
+
1169
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1170
+ cred = credential.CVMRoleCredential()
1171
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1172
+ cred = credential.STSAssumeRoleCredential(
1173
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1174
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1175
+ )
1176
+ 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):
1177
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1178
+ else:
1179
+ cred = credential.Credential(
1180
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1181
+ )
1182
+ http_profile = HttpProfile(
1183
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1184
+ reqMethod="POST",
1185
+ endpoint=g_param[OptionsDefine.Endpoint],
1186
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1187
+ )
1188
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1189
+ if g_param[OptionsDefine.Language]:
1190
+ profile.language = g_param[OptionsDefine.Language]
1191
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1192
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1193
+ client._sdkVersion += ("_CLI_" + __version__)
1194
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1195
+ model = models.RejectJoinShareUnitInvitationRequest()
1196
+ model.from_json_string(json.dumps(args))
1197
+ start_time = time.time()
1198
+ while True:
1199
+ rsp = client.RejectJoinShareUnitInvitation(model)
1200
+ result = rsp.to_json_string()
1201
+ try:
1202
+ json_obj = json.loads(result)
1203
+ except TypeError as e:
1204
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1205
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1206
+ break
1207
+ cur_time = time.time()
1208
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1209
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1210
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1211
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1212
+ else:
1213
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1214
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1215
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1216
+
1217
+
1166
1218
  def doDeleteOrganizationNodes(args, parsed_globals):
1167
1219
  g_param = parse_global_arg(parsed_globals)
1168
1220
 
@@ -1319,6 +1371,58 @@ def doDeleteShareUnitResources(args, parsed_globals):
1319
1371
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1320
1372
 
1321
1373
 
1374
+ def doDescribeShareUnits(args, parsed_globals):
1375
+ g_param = parse_global_arg(parsed_globals)
1376
+
1377
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1378
+ cred = credential.CVMRoleCredential()
1379
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1380
+ cred = credential.STSAssumeRoleCredential(
1381
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1382
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1383
+ )
1384
+ 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):
1385
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1386
+ else:
1387
+ cred = credential.Credential(
1388
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1389
+ )
1390
+ http_profile = HttpProfile(
1391
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1392
+ reqMethod="POST",
1393
+ endpoint=g_param[OptionsDefine.Endpoint],
1394
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1395
+ )
1396
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1397
+ if g_param[OptionsDefine.Language]:
1398
+ profile.language = g_param[OptionsDefine.Language]
1399
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1400
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1401
+ client._sdkVersion += ("_CLI_" + __version__)
1402
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1403
+ model = models.DescribeShareUnitsRequest()
1404
+ model.from_json_string(json.dumps(args))
1405
+ start_time = time.time()
1406
+ while True:
1407
+ rsp = client.DescribeShareUnits(model)
1408
+ result = rsp.to_json_string()
1409
+ try:
1410
+ json_obj = json.loads(result)
1411
+ except TypeError as e:
1412
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1413
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1414
+ break
1415
+ cur_time = time.time()
1416
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1417
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1418
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1419
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1420
+ else:
1421
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1422
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1423
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1424
+
1425
+
1322
1426
  def doDescribeOrganizationMemberPolicies(args, parsed_globals):
1323
1427
  g_param = parse_global_arg(parsed_globals)
1324
1428
 
@@ -2151,7 +2255,7 @@ def doDeleteOrganizationMemberFromNode(args, parsed_globals):
2151
2255
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2152
2256
 
2153
2257
 
2154
- def doCreateOrganization(args, parsed_globals):
2258
+ def doDescribeShareUnitResources(args, parsed_globals):
2155
2259
  g_param = parse_global_arg(parsed_globals)
2156
2260
 
2157
2261
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2180,11 +2284,11 @@ def doCreateOrganization(args, parsed_globals):
2180
2284
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2181
2285
  client._sdkVersion += ("_CLI_" + __version__)
2182
2286
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2183
- model = models.CreateOrganizationRequest()
2287
+ model = models.DescribeShareUnitResourcesRequest()
2184
2288
  model.from_json_string(json.dumps(args))
2185
2289
  start_time = time.time()
2186
2290
  while True:
2187
- rsp = client.CreateOrganization(model)
2291
+ rsp = client.DescribeShareUnitResources(model)
2188
2292
  result = rsp.to_json_string()
2189
2293
  try:
2190
2294
  json_obj = json.loads(result)
@@ -3295,7 +3399,7 @@ def doDescribeOrganizationNodes(args, parsed_globals):
3295
3399
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3296
3400
 
3297
3401
 
3298
- def doDescribeShareUnits(args, parsed_globals):
3402
+ def doCreateOrganization(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 doDescribeShareUnits(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.DescribeShareUnitsRequest()
3431
+ model = models.CreateOrganizationRequest()
3328
3432
  model.from_json_string(json.dumps(args))
3329
3433
  start_time = time.time()
3330
3434
  while True:
3331
- rsp = client.DescribeShareUnits(model)
3435
+ rsp = client.CreateOrganization(model)
3332
3436
  result = rsp.to_json_string()
3333
3437
  try:
3334
3438
  json_obj = json.loads(result)
@@ -3836,7 +3940,7 @@ ACTION_MAP = {
3836
3940
  "UpdateShareUnit": doUpdateShareUnit,
3837
3941
  "UpdateOrganizationMember": doUpdateOrganizationMember,
3838
3942
  "ListPoliciesForTarget": doListPoliciesForTarget,
3839
- "DescribeShareUnitResources": doDescribeShareUnitResources,
3943
+ "AcceptJoinShareUnitInvitation": doAcceptJoinShareUnitInvitation,
3840
3944
  "DeleteOrganizationMembersPolicy": doDeleteOrganizationMembersPolicy,
3841
3945
  "ListOrganizationIdentity": doListOrganizationIdentity,
3842
3946
  "AddOrganizationNode": doAddOrganizationNode,
@@ -3850,9 +3954,11 @@ ACTION_MAP = {
3850
3954
  "UpdateOrganizationIdentity": doUpdateOrganizationIdentity,
3851
3955
  "DescribeOrganizationFinancialByMonth": doDescribeOrganizationFinancialByMonth,
3852
3956
  "DeleteAccount": doDeleteAccount,
3957
+ "RejectJoinShareUnitInvitation": doRejectJoinShareUnitInvitation,
3853
3958
  "DeleteOrganizationNodes": doDeleteOrganizationNodes,
3854
3959
  "DescribeEffectivePolicy": doDescribeEffectivePolicy,
3855
3960
  "DeleteShareUnitResources": doDeleteShareUnitResources,
3961
+ "DescribeShareUnits": doDescribeShareUnits,
3856
3962
  "DescribeOrganizationMemberPolicies": doDescribeOrganizationMemberPolicies,
3857
3963
  "CancelOrganizationInvitation": doCancelOrganizationInvitation,
3858
3964
  "DeleteOrganization": doDeleteOrganization,
@@ -3869,7 +3975,7 @@ ACTION_MAP = {
3869
3975
  "MoveOrganizationNodeMembers": doMoveOrganizationNodeMembers,
3870
3976
  "ListOrganizationMembers": doListOrganizationMembers,
3871
3977
  "DeleteOrganizationMemberFromNode": doDeleteOrganizationMemberFromNode,
3872
- "CreateOrganization": doCreateOrganization,
3978
+ "DescribeShareUnitResources": doDescribeShareUnitResources,
3873
3979
  "DetachPolicy": doDetachPolicy,
3874
3980
  "CreateOrganizationIdentity": doCreateOrganizationIdentity,
3875
3981
  "DeleteOrganizationIdentity": doDeleteOrganizationIdentity,
@@ -3891,7 +3997,7 @@ ACTION_MAP = {
3891
3997
  "AddShareUnitMembers": doAddShareUnitMembers,
3892
3998
  "DescribePolicyConfig": doDescribePolicyConfig,
3893
3999
  "DescribeOrganizationNodes": doDescribeOrganizationNodes,
3894
- "DescribeShareUnits": doDescribeShareUnits,
4000
+ "CreateOrganization": doCreateOrganization,
3895
4001
  "ListOrganizationNodes": doListOrganizationNodes,
3896
4002
  "CheckAccountDelete": doCheckAccountDelete,
3897
4003
  "CreatePolicy": doCreatePolicy,