tccli 3.0.1264.1__py2.py3-none-any.whl → 3.0.1265.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 (29) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/batch/v20170312/api.json +1 -1
  3. tccli/services/bh/v20230418/api.json +490 -5
  4. tccli/services/bh/v20230418/examples.json +2 -2
  5. tccli/services/cbs/v20170312/api.json +12 -2
  6. tccli/services/cbs/v20170312/examples.json +2 -2
  7. tccli/services/chdfs/v20201112/api.json +7 -7
  8. tccli/services/cls/v20201016/api.json +10 -1
  9. tccli/services/cvm/v20170312/api.json +1 -1
  10. tccli/services/facefusion/v20220927/api.json +2 -2
  11. tccli/services/lighthouse/v20200324/api.json +7 -7
  12. tccli/services/mna/v20210119/api.json +21 -21
  13. tccli/services/mps/v20190612/api.json +84 -8
  14. tccli/services/mqtt/mqtt_client.py +658 -75
  15. tccli/services/mqtt/v20240516/api.json +1038 -54
  16. tccli/services/mqtt/v20240516/examples.json +88 -0
  17. tccli/services/ocr/v20181119/api.json +52 -22
  18. tccli/services/ssl/ssl_client.py +122 -16
  19. tccli/services/ssl/v20191205/api.json +448 -2
  20. tccli/services/ssl/v20191205/examples.json +18 -2
  21. tccli/services/tcr/v20190924/api.json +2 -2
  22. tccli/services/tmt/v20180321/api.json +1 -1
  23. tccli/services/trtc/v20190722/api.json +26 -28
  24. tccli/services/trtc/v20190722/examples.json +9 -9
  25. {tccli-3.0.1264.1.dist-info → tccli-3.0.1265.1.dist-info}/METADATA +2 -2
  26. {tccli-3.0.1264.1.dist-info → tccli-3.0.1265.1.dist-info}/RECORD +29 -29
  27. {tccli-3.0.1264.1.dist-info → tccli-3.0.1265.1.dist-info}/WHEEL +0 -0
  28. {tccli-3.0.1264.1.dist-info → tccli-3.0.1265.1.dist-info}/entry_points.txt +0 -0
  29. {tccli-3.0.1264.1.dist-info → tccli-3.0.1265.1.dist-info}/license_files/LICENSE +0 -0
@@ -16,6 +16,22 @@
16
16
  "title": "示例"
17
17
  }
18
18
  ],
19
+ "CreateInsPublicEndpoint": [
20
+ {
21
+ "document": "示例",
22
+ "input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateMQTTInsPublicEndpoint\n<公共请求参数>\n\n{\n \"InstanceId\": \"mqtt-rvb5xxrn\",\n \"Bandwidth\": 2,\n \"Rules\": [\n {\n \"IpRule\": \"1.1.1.1\",\n \"Allow\": true,\n \"Remark\": \"remark\"\n }\n ]\n}",
23
+ "output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"RequestId\": \"416510a6-f614-487d-bbca-e7fdbf72fc29\"\n }\n}",
24
+ "title": "示例"
25
+ }
26
+ ],
27
+ "CreateInstance": [
28
+ {
29
+ "document": "示例",
30
+ "input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateMQTTInstance\n<公共请求参数>\n\n{\n \"InstanceType\": \"BASIC\",\n \"Name\": \"instance-1\",\n \"SkuCode\": \"basic_1k\",\n \"Remark\": \"this is remark\",\n \"VpcList\": [\n {\n \"VpcId\": \"vpc-9a5wnirv\",\n \"SubnetId\": \"subnet-0tw6tlfi\"\n }\n ],\n \"IpRules\": [\n {\n \"Ip\": \"1.1.1.1\",\n \"Allow\": true,\n \"Remark\": \"11111111\"\n }\n ]\n}",
31
+ "output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"InstanceId\": \"mqtt-7pnqmkrx\",\n \"RequestId\": \"02107c9d-cbea-418c-bafc-740300fdefad\"\n }\n}",
32
+ "title": "示例"
33
+ }
34
+ ],
19
35
  "CreateJWKSAuthenticator": [
20
36
  {
21
37
  "document": "示例",
@@ -40,6 +56,14 @@
40
56
  "title": "示例"
41
57
  }
42
58
  ],
59
+ "CreateUser": [
60
+ {
61
+ "document": "示例",
62
+ "input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateMQTTUser\n<公共请求参数>\n\n{\n \"InstanceId\": \"mqtt-7pnqmkrx\",\n \"Remark\": \"remark\",\n \"Username\": \"123\",\n \"Password\": \"456\"\n}",
63
+ "output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"RequestId\": \"25cb77a7-2add-4086-8fd2-a05b5bd34776\"\n }\n}",
64
+ "title": "示例"
65
+ }
66
+ ],
43
67
  "DeactivateDeviceCertificate": [
44
68
  {
45
69
  "document": "示例",
@@ -72,6 +96,22 @@
72
96
  "title": "示例"
73
97
  }
74
98
  ],
99
+ "DeleteInsPublicEndpoint": [
100
+ {
101
+ "document": "示例",
102
+ "input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteMQTTInsPublicEndpoint\n<公共请求参数>\n\n{\n \"InstanceId\": \"mqtt-rvb5xxrn\"\n}",
103
+ "output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"RequestId\": \"de89c7dd-7c3e-4546-a2ca-91c5baa0415f\"\n }\n}",
104
+ "title": "示例"
105
+ }
106
+ ],
107
+ "DeleteInstance": [
108
+ {
109
+ "document": "示例",
110
+ "input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteMQTTInstance\n<公共请求参数>\n\n{\n \"InstanceId\": \"mqtt-wjgxr8jg\"\n}",
111
+ "output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"RequestId\": \"84afeb76-9175-47ec-a6f1-8d0af0c0aae6\"\n }\n}",
112
+ "title": "示例"
113
+ }
114
+ ],
75
115
  "DeleteTopic": [
76
116
  {
77
117
  "document": "示例",
@@ -80,6 +120,14 @@
80
120
  "title": "示例"
81
121
  }
82
122
  ],
123
+ "DeleteUser": [
124
+ {
125
+ "document": "示例",
126
+ "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\": \"123\"\n}",
127
+ "output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"RequestId\": \"74625f9b-ce92-43d5-ba0b-9a85ddb99041\"\n }\n}",
128
+ "title": "示例"
129
+ }
130
+ ],
83
131
  "DescribeAuthenticator": [
84
132
  {
85
133
  "document": "示例",
@@ -118,6 +166,14 @@
118
166
  "title": "示例"
119
167
  }
120
168
  ],
169
+ "DescribeInsPublicEndpoints": [
170
+ {
171
+ "document": "示例",
172
+ "input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeMQTTInsPublicEndpoints\n<公共请求参数>\n\n{\n \"InstanceId\": \"mqtt-gn8qoq3z\"\n}",
173
+ "output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"Bandwidth\": 2,\n \"Endpoints\": [\n {\n \"Host\": \"mqtt-gn8qoq3z-cd.mqtt.public.tencenttdmq.com\",\n \"Port\": 8888,\n \"SubnetId\": null,\n \"Type\": \"mqtt-ws\",\n \"Url\": \"mqtt-gn8qoq3z-cd.mqtt.public.tencenttdmq.com:8888\",\n \"VpcId\": null\n },\n {\n \"Host\": \"mqtt-gn8qoq3z-cd.mqtt.public.tencenttdmq.com\",\n \"Port\": 1883,\n \"SubnetId\": null,\n \"Type\": \"mqtt-tcp\",\n \"Url\": \"mqtt-gn8qoq3z-cd.mqtt.public.tencenttdmq.com:1883\",\n \"VpcId\": null\n },\n {\n \"Host\": \"mqtt-gn8qoq3z-cd.mqtt.public.tencenttdmq.com\",\n \"Port\": 8883,\n \"SubnetId\": null,\n \"Type\": \"mqtt-tls\",\n \"Url\": \"mqtt-gn8qoq3z-cd.mqtt.public.tencenttdmq.com:8883\",\n \"VpcId\": null\n }\n ],\n \"InstanceId\": \"mqtt-gn8qoq3z\",\n \"RequestId\": \"3891d712-94f7-4d03-9420-fae4fa3a61ea\",\n \"Rules\": [\n {\n \"Allow\": true,\n \"IpRule\": \"0.0.0.0/0\",\n \"Remark\": \"\"\n }\n ],\n \"Status\": \"NORMAL\"\n }\n}",
174
+ "title": "示例"
175
+ }
176
+ ],
121
177
  "DescribeInstance": [
122
178
  {
123
179
  "document": "示例",
@@ -150,6 +206,14 @@
150
206
  "title": "示例"
151
207
  }
152
208
  ],
209
+ "DescribeUserList": [
210
+ {
211
+ "document": "示例",
212
+ "input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeMQTTUserList\n<公共请求参数>\n\n{\n \"InstanceId\": \"mqtt-47ka4rdr\",\n \"Offset\": 0,\n \"Limit\": 10\n}",
213
+ "output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"Data\": [\n {\n \"CreatedTime\": 1705392159000,\n \"ModifiedTime\": 1705392159000,\n \"Password\": \"pwd1\",\n \"Remark\": \"remark\",\n \"Username\": \"user1\"\n }\n ],\n \"RequestId\": \"8e86117c-a56c-4598-9e1f-4a039eed6e3a\",\n \"TotalCount\": 1\n }\n}",
214
+ "title": "示例"
215
+ }
216
+ ],
153
217
  "ModifyAuthorizationPolicy": [
154
218
  {
155
219
  "document": "示例",
@@ -158,6 +222,22 @@
158
222
  "title": "示例"
159
223
  }
160
224
  ],
225
+ "ModifyInsPublicEndpoint": [
226
+ {
227
+ "document": "示例",
228
+ "input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyMQTTInsPublicEndpoint\n<公共请求参数>\n\n{\n \"InstanceId\": \"mqtt-47ka4rdr\",\n \"Bandwidth\": 2,\n \"Rules\": [\n {\n \"IpRule\": \"2.2.2.2\",\n \"Allow\": true,\n \"Remark\": \"555\"\n }\n ]\n}",
229
+ "output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"RequestId\": \"02eb3529-3440-44e9-b2c8-1e65c7017c09\"\n }\n}",
230
+ "title": "示例"
231
+ }
232
+ ],
233
+ "ModifyInstance": [
234
+ {
235
+ "document": "示例",
236
+ "input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyMQTTInstance\n<公共请求参数>\n\n{\n \"InstanceId\": \"mqtt-47ka4rdr\",\n \"Name\": \"instance-2\",\n \"Remark\": \"ramark2\"\n}",
237
+ "output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"RequestId\": \"9955522b-ac27-46c1-8a16-3ed6f98f9c5c\"\n }\n}",
238
+ "title": "示例"
239
+ }
240
+ ],
161
241
  "ModifyJWKSAuthenticator": [
162
242
  {
163
243
  "document": "示例",
@@ -182,6 +262,14 @@
182
262
  "title": "示例"
183
263
  }
184
264
  ],
265
+ "ModifyUser": [
266
+ {
267
+ "document": "示例",
268
+ "input": "POST / HTTP/1.1\nHost: mqtt.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyMQTTUser\n<公共请求参数>\n\n{\n \"InstanceId\": \"mqtt-7pnqmkrx\",\n \"Username\": \"user2\",\n \"Remark\": \"remark2\"\n}",
269
+ "output": "{\n \"Error\": null,\n \"RequestId\": null,\n \"Response\": {\n \"RequestId\": \"85d3aeee-ba25-47cc-8c17-7ad837b877ba\"\n }\n}",
270
+ "title": "示例"
271
+ }
272
+ ],
185
273
  "RegisterDeviceCertificate": [
186
274
  {
187
275
  "document": "示例",
@@ -18187,112 +18187,142 @@
18187
18187
  {
18188
18188
  "disabled": false,
18189
18189
  "document": "号牌号码\n注意:此字段可能返回 null,表示取不到有效值。",
18190
- "example": "",
18190
+ "example": "",
18191
18191
  "member": "string",
18192
18192
  "name": "PlateNo",
18193
- "required": true,
18193
+ "output_required": true,
18194
18194
  "type": "string",
18195
18195
  "value_allowed_null": true
18196
18196
  },
18197
18197
  {
18198
18198
  "disabled": false,
18199
18199
  "document": "车辆类型\n注意:此字段可能返回 null,表示取不到有效值。",
18200
- "example": "",
18200
+ "example": "",
18201
18201
  "member": "string",
18202
18202
  "name": "VehicleType",
18203
- "required": true,
18203
+ "output_required": true,
18204
18204
  "type": "string",
18205
18205
  "value_allowed_null": true
18206
18206
  },
18207
18207
  {
18208
18208
  "disabled": false,
18209
18209
  "document": "所有人\n注意:此字段可能返回 null,表示取不到有效值。",
18210
- "example": "",
18210
+ "example": "",
18211
18211
  "member": "string",
18212
18212
  "name": "Owner",
18213
- "required": true,
18213
+ "output_required": true,
18214
18214
  "type": "string",
18215
18215
  "value_allowed_null": true
18216
18216
  },
18217
18217
  {
18218
18218
  "disabled": false,
18219
18219
  "document": "住址\n注意:此字段可能返回 null,表示取不到有效值。",
18220
- "example": "",
18220
+ "example": "",
18221
18221
  "member": "string",
18222
18222
  "name": "Address",
18223
- "required": true,
18223
+ "output_required": true,
18224
18224
  "type": "string",
18225
18225
  "value_allowed_null": true
18226
18226
  },
18227
18227
  {
18228
18228
  "disabled": false,
18229
18229
  "document": "使用性质\n注意:此字段可能返回 null,表示取不到有效值。",
18230
- "example": "",
18230
+ "example": "",
18231
18231
  "member": "string",
18232
18232
  "name": "UseCharacter",
18233
- "required": true,
18233
+ "output_required": true,
18234
18234
  "type": "string",
18235
18235
  "value_allowed_null": true
18236
18236
  },
18237
18237
  {
18238
18238
  "disabled": false,
18239
18239
  "document": "品牌型号\n注意:此字段可能返回 null,表示取不到有效值。",
18240
- "example": "",
18240
+ "example": "",
18241
18241
  "member": "string",
18242
18242
  "name": "Model",
18243
- "required": true,
18243
+ "output_required": true,
18244
18244
  "type": "string",
18245
18245
  "value_allowed_null": true
18246
18246
  },
18247
18247
  {
18248
18248
  "disabled": false,
18249
18249
  "document": "车辆识别代号\n注意:此字段可能返回 null,表示取不到有效值。",
18250
- "example": "",
18250
+ "example": "",
18251
18251
  "member": "string",
18252
18252
  "name": "Vin",
18253
- "required": true,
18253
+ "output_required": true,
18254
18254
  "type": "string",
18255
18255
  "value_allowed_null": true
18256
18256
  },
18257
18257
  {
18258
18258
  "disabled": false,
18259
18259
  "document": "发动机号码\n注意:此字段可能返回 null,表示取不到有效值。",
18260
- "example": "",
18260
+ "example": "",
18261
18261
  "member": "string",
18262
18262
  "name": "EngineNo",
18263
- "required": true,
18263
+ "output_required": true,
18264
18264
  "type": "string",
18265
18265
  "value_allowed_null": true
18266
18266
  },
18267
18267
  {
18268
18268
  "disabled": false,
18269
18269
  "document": "注册日期\n注意:此字段可能返回 null,表示取不到有效值。",
18270
- "example": "",
18270
+ "example": "",
18271
18271
  "member": "string",
18272
18272
  "name": "RegisterDate",
18273
- "required": true,
18273
+ "output_required": true,
18274
18274
  "type": "string",
18275
18275
  "value_allowed_null": true
18276
18276
  },
18277
18277
  {
18278
18278
  "disabled": false,
18279
18279
  "document": "发证日期\n注意:此字段可能返回 null,表示取不到有效值。",
18280
- "example": "",
18280
+ "example": "",
18281
18281
  "member": "string",
18282
18282
  "name": "IssueDate",
18283
- "required": true,
18283
+ "output_required": true,
18284
18284
  "type": "string",
18285
18285
  "value_allowed_null": true
18286
18286
  },
18287
18287
  {
18288
18288
  "disabled": false,
18289
18289
  "document": "印章\n注意:此字段可能返回 null,表示取不到有效值。",
18290
- "example": "",
18290
+ "example": "",
18291
18291
  "member": "string",
18292
18292
  "name": "Seal",
18293
- "required": true,
18293
+ "output_required": true,
18294
18294
  "type": "string",
18295
18295
  "value_allowed_null": true
18296
+ },
18297
+ {
18298
+ "disabled": false,
18299
+ "document": "状态",
18300
+ "example": "正常",
18301
+ "member": "string",
18302
+ "name": "StateElectronic",
18303
+ "output_required": false,
18304
+ "type": "string",
18305
+ "value_allowed_null": false
18306
+ },
18307
+ {
18308
+ "disabled": false,
18309
+ "document": "检验有效期",
18310
+ "example": "2025年09月",
18311
+ "member": "string",
18312
+ "name": "InspectionValidityTimeElectronic",
18313
+ "output_required": false,
18314
+ "type": "string",
18315
+ "value_allowed_null": false
18316
+ },
18317
+ {
18318
+ "disabled": false,
18319
+ "document": "生成时间",
18320
+ "example": "2024年08月27日",
18321
+ "member": "string",
18322
+ "name": "GenerationTimeElectronic",
18323
+ "output_required": false,
18324
+ "type": "string",
18325
+ "value_allowed_null": false
18296
18326
  }
18297
18327
  ],
18298
18328
  "usage": "out"
@@ -173,7 +173,7 @@ def doDescribeHostCdnInstanceList(args, parsed_globals):
173
173
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
174
174
 
175
175
 
176
- def doCancelAuditCertificate(args, parsed_globals):
176
+ def doCheckCertificateDomainVerification(args, parsed_globals):
177
177
  g_param = parse_global_arg(parsed_globals)
178
178
 
179
179
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -202,11 +202,11 @@ def doCancelAuditCertificate(args, parsed_globals):
202
202
  client = mod.SslClient(cred, g_param[OptionsDefine.Region], profile)
203
203
  client._sdkVersion += ("_CLI_" + __version__)
204
204
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
205
- model = models.CancelAuditCertificateRequest()
205
+ model = models.CheckCertificateDomainVerificationRequest()
206
206
  model.from_json_string(json.dumps(args))
207
207
  start_time = time.time()
208
208
  while True:
209
- rsp = client.CancelAuditCertificate(model)
209
+ rsp = client.CheckCertificateDomainVerification(model)
210
210
  result = rsp.to_json_string()
211
211
  try:
212
212
  json_obj = json.loads(result)
@@ -381,6 +381,58 @@ def doDeleteManager(args, parsed_globals):
381
381
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
382
382
 
383
383
 
384
+ def doCertificateInfoSubmit(args, parsed_globals):
385
+ g_param = parse_global_arg(parsed_globals)
386
+
387
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
388
+ cred = credential.CVMRoleCredential()
389
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
390
+ cred = credential.STSAssumeRoleCredential(
391
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
392
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
393
+ )
394
+ 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):
395
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
396
+ else:
397
+ cred = credential.Credential(
398
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
399
+ )
400
+ http_profile = HttpProfile(
401
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
402
+ reqMethod="POST",
403
+ endpoint=g_param[OptionsDefine.Endpoint],
404
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
405
+ )
406
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
407
+ if g_param[OptionsDefine.Language]:
408
+ profile.language = g_param[OptionsDefine.Language]
409
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
410
+ client = mod.SslClient(cred, g_param[OptionsDefine.Region], profile)
411
+ client._sdkVersion += ("_CLI_" + __version__)
412
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
413
+ model = models.CertificateInfoSubmitRequest()
414
+ model.from_json_string(json.dumps(args))
415
+ start_time = time.time()
416
+ while True:
417
+ rsp = client.CertificateInfoSubmit(model)
418
+ result = rsp.to_json_string()
419
+ try:
420
+ json_obj = json.loads(result)
421
+ except TypeError as e:
422
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
423
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
424
+ break
425
+ cur_time = time.time()
426
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
427
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
428
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
429
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
430
+ else:
431
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
432
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
433
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
434
+
435
+
384
436
  def doDescribeDownloadCertificateUrl(args, parsed_globals):
385
437
  g_param = parse_global_arg(parsed_globals)
386
438
 
@@ -1005,6 +1057,58 @@ def doCancelCertificateOrder(args, parsed_globals):
1005
1057
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1006
1058
 
1007
1059
 
1060
+ def doCertificateOrderSubmit(args, parsed_globals):
1061
+ g_param = parse_global_arg(parsed_globals)
1062
+
1063
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1064
+ cred = credential.CVMRoleCredential()
1065
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1066
+ cred = credential.STSAssumeRoleCredential(
1067
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1068
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1069
+ )
1070
+ 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):
1071
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1072
+ else:
1073
+ cred = credential.Credential(
1074
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1075
+ )
1076
+ http_profile = HttpProfile(
1077
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1078
+ reqMethod="POST",
1079
+ endpoint=g_param[OptionsDefine.Endpoint],
1080
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1081
+ )
1082
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1083
+ if g_param[OptionsDefine.Language]:
1084
+ profile.language = g_param[OptionsDefine.Language]
1085
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1086
+ client = mod.SslClient(cred, g_param[OptionsDefine.Region], profile)
1087
+ client._sdkVersion += ("_CLI_" + __version__)
1088
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1089
+ model = models.CertificateOrderSubmitRequest()
1090
+ model.from_json_string(json.dumps(args))
1091
+ start_time = time.time()
1092
+ while True:
1093
+ rsp = client.CertificateOrderSubmit(model)
1094
+ result = rsp.to_json_string()
1095
+ try:
1096
+ json_obj = json.loads(result)
1097
+ except TypeError as e:
1098
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1099
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1100
+ break
1101
+ cur_time = time.time()
1102
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1103
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1104
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1105
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1106
+ else:
1107
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1108
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1109
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1110
+
1111
+
1008
1112
  def doDownloadCertificate(args, parsed_globals):
1009
1113
  g_param = parse_global_arg(parsed_globals)
1010
1114
 
@@ -1941,7 +2045,7 @@ def doDescribeCertificateBindResourceTaskResult(args, parsed_globals):
1941
2045
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1942
2046
 
1943
2047
 
1944
- def doCheckCertificateDomainVerification(args, parsed_globals):
2048
+ def doCancelAuditCertificate(args, parsed_globals):
1945
2049
  g_param = parse_global_arg(parsed_globals)
1946
2050
 
1947
2051
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1970,11 +2074,11 @@ def doCheckCertificateDomainVerification(args, parsed_globals):
1970
2074
  client = mod.SslClient(cred, g_param[OptionsDefine.Region], profile)
1971
2075
  client._sdkVersion += ("_CLI_" + __version__)
1972
2076
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1973
- model = models.CheckCertificateDomainVerificationRequest()
2077
+ model = models.CancelAuditCertificateRequest()
1974
2078
  model.from_json_string(json.dumps(args))
1975
2079
  start_time = time.time()
1976
2080
  while True:
1977
- rsp = client.CheckCertificateDomainVerification(model)
2081
+ rsp = client.CancelAuditCertificate(model)
1978
2082
  result = rsp.to_json_string()
1979
2083
  try:
1980
2084
  json_obj = json.loads(result)
@@ -2357,7 +2461,7 @@ def doDescribeHostUpdateRecord(args, parsed_globals):
2357
2461
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2358
2462
 
2359
2463
 
2360
- def doCreateCertificateByPackage(args, parsed_globals):
2464
+ def doCreateCertificate(args, parsed_globals):
2361
2465
  g_param = parse_global_arg(parsed_globals)
2362
2466
 
2363
2467
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2386,11 +2490,11 @@ def doCreateCertificateByPackage(args, parsed_globals):
2386
2490
  client = mod.SslClient(cred, g_param[OptionsDefine.Region], profile)
2387
2491
  client._sdkVersion += ("_CLI_" + __version__)
2388
2492
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2389
- model = models.CreateCertificateByPackageRequest()
2493
+ model = models.CreateCertificateRequest()
2390
2494
  model.from_json_string(json.dumps(args))
2391
2495
  start_time = time.time()
2392
2496
  while True:
2393
- rsp = client.CreateCertificateByPackage(model)
2497
+ rsp = client.CreateCertificate(model)
2394
2498
  result = rsp.to_json_string()
2395
2499
  try:
2396
2500
  json_obj = json.loads(result)
@@ -2721,7 +2825,7 @@ def doDescribeHostApiGatewayInstanceList(args, parsed_globals):
2721
2825
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2722
2826
 
2723
2827
 
2724
- def doCreateCertificate(args, parsed_globals):
2828
+ def doCreateCertificateByPackage(args, parsed_globals):
2725
2829
  g_param = parse_global_arg(parsed_globals)
2726
2830
 
2727
2831
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2750,11 +2854,11 @@ def doCreateCertificate(args, parsed_globals):
2750
2854
  client = mod.SslClient(cred, g_param[OptionsDefine.Region], profile)
2751
2855
  client._sdkVersion += ("_CLI_" + __version__)
2752
2856
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2753
- model = models.CreateCertificateRequest()
2857
+ model = models.CreateCertificateByPackageRequest()
2754
2858
  model.from_json_string(json.dumps(args))
2755
2859
  start_time = time.time()
2756
2860
  while True:
2757
- rsp = client.CreateCertificate(model)
2861
+ rsp = client.CreateCertificateByPackage(model)
2758
2862
  result = rsp.to_json_string()
2759
2863
  try:
2760
2864
  json_obj = json.loads(result)
@@ -3203,10 +3307,11 @@ ACTION_MAP = {
3203
3307
  "DescribeHostCosInstanceList": doDescribeHostCosInstanceList,
3204
3308
  "DescribeCertificates": doDescribeCertificates,
3205
3309
  "DescribeHostCdnInstanceList": doDescribeHostCdnInstanceList,
3206
- "CancelAuditCertificate": doCancelAuditCertificate,
3310
+ "CheckCertificateDomainVerification": doCheckCertificateDomainVerification,
3207
3311
  "DescribeHostTkeInstanceList": doDescribeHostTkeInstanceList,
3208
3312
  "UploadRevokeLetter": doUploadRevokeLetter,
3209
3313
  "DeleteManager": doDeleteManager,
3314
+ "CertificateInfoSubmit": doCertificateInfoSubmit,
3210
3315
  "DescribeDownloadCertificateUrl": doDescribeDownloadCertificateUrl,
3211
3316
  "DeployCertificateInstance": doDeployCertificateInstance,
3212
3317
  "SubmitAuditManager": doSubmitAuditManager,
@@ -3219,6 +3324,7 @@ ACTION_MAP = {
3219
3324
  "DescribeHostClbInstanceList": doDescribeHostClbInstanceList,
3220
3325
  "DescribeHostTeoInstanceList": doDescribeHostTeoInstanceList,
3221
3326
  "CancelCertificateOrder": doCancelCertificateOrder,
3327
+ "CertificateOrderSubmit": doCertificateOrderSubmit,
3222
3328
  "DownloadCertificate": doDownloadCertificate,
3223
3329
  "DeleteCertificate": doDeleteCertificate,
3224
3330
  "VerifyManager": doVerifyManager,
@@ -3237,7 +3343,7 @@ ACTION_MAP = {
3237
3343
  "DeployCertificateRecordRollback": doDeployCertificateRecordRollback,
3238
3344
  "DeployCertificateRecordRetry": doDeployCertificateRecordRetry,
3239
3345
  "DescribeCertificateBindResourceTaskResult": doDescribeCertificateBindResourceTaskResult,
3240
- "CheckCertificateDomainVerification": doCheckCertificateDomainVerification,
3346
+ "CancelAuditCertificate": doCancelAuditCertificate,
3241
3347
  "DescribeHostDeployRecord": doDescribeHostDeployRecord,
3242
3348
  "UpdateCertificateRecordRetry": doUpdateCertificateRecordRetry,
3243
3349
  "DescribeDeleteCertificatesTaskResult": doDescribeDeleteCertificatesTaskResult,
@@ -3245,14 +3351,14 @@ ACTION_MAP = {
3245
3351
  "ModifyCertificateAlias": doModifyCertificateAlias,
3246
3352
  "DescribeHostUpdateRecordDetail": doDescribeHostUpdateRecordDetail,
3247
3353
  "DescribeHostUpdateRecord": doDescribeHostUpdateRecord,
3248
- "CreateCertificateByPackage": doCreateCertificateByPackage,
3354
+ "CreateCertificate": doCreateCertificate,
3249
3355
  "UploadConfirmLetter": doUploadConfirmLetter,
3250
3356
  "DescribeHostLighthouseInstanceList": doDescribeHostLighthouseInstanceList,
3251
3357
  "UpdateCertificateRecordRollback": doUpdateCertificateRecordRollback,
3252
3358
  "DescribeHostVodInstanceList": doDescribeHostVodInstanceList,
3253
3359
  "DescribeCertificateOperateLogs": doDescribeCertificateOperateLogs,
3254
3360
  "DescribeHostApiGatewayInstanceList": doDescribeHostApiGatewayInstanceList,
3255
- "CreateCertificate": doCreateCertificate,
3361
+ "CreateCertificateByPackage": doCreateCertificateByPackage,
3256
3362
  "CreateCertificateBindResourceSyncTask": doCreateCertificateBindResourceSyncTask,
3257
3363
  "ModifyCertificatesExpiringNotificationSwitch": doModifyCertificatesExpiringNotificationSwitch,
3258
3364
  "ReplaceCertificate": doReplaceCertificate,