tccli 3.0.1321.1__py2.py3-none-any.whl → 3.0.1323.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 (55) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/batch/v20170312/api.json +18 -18
  3. tccli/services/bh/v20230418/api.json +203 -0
  4. tccli/services/bi/v20220105/api.json +69 -1
  5. tccli/services/cam/v20190116/api.json +18 -18
  6. tccli/services/cbs/v20170312/api.json +5 -5
  7. tccli/services/cdb/cdb_client.py +53 -0
  8. tccli/services/cdb/v20170320/api.json +506 -1
  9. tccli/services/cdb/v20170320/examples.json +8 -0
  10. tccli/services/cdn/v20180606/api.json +1 -1
  11. tccli/services/cdwdoris/v20211228/api.json +10 -1
  12. tccli/services/cfw/v20190904/api.json +6 -6
  13. tccli/services/cfw/v20190904/examples.json +1 -1
  14. tccli/services/cloudapp/v20220530/api.json +10 -0
  15. tccli/services/cvm/v20170312/api.json +2 -2
  16. tccli/services/cynosdb/v20190107/api.json +148 -4
  17. tccli/services/dlc/v20210125/api.json +11 -9
  18. tccli/services/emr/emr_client.py +53 -0
  19. tccli/services/emr/v20190103/api.json +218 -0
  20. tccli/services/emr/v20190103/examples.json +8 -0
  21. tccli/services/ess/v20201111/api.json +1 -1
  22. tccli/services/essbasic/v20210526/api.json +1 -1
  23. tccli/services/goosefs/v20220519/api.json +4 -4
  24. tccli/services/gs/v20191118/api.json +10 -0
  25. tccli/services/gs/v20191118/examples.json +1 -1
  26. tccli/services/keewidb/v20220308/api.json +6 -4
  27. tccli/services/live/v20180801/api.json +1 -1
  28. tccli/services/lke/v20231130/api.json +2 -2
  29. tccli/services/lkeap/v20240522/api.json +2 -2
  30. tccli/services/lkeap/v20240522/examples.json +2 -2
  31. tccli/services/mps/v20190612/api.json +27 -0
  32. tccli/services/oceanus/v20190422/api.json +425 -13
  33. tccli/services/oceanus/v20190422/examples.json +1 -1
  34. tccli/services/ses/ses_client.py +53 -0
  35. tccli/services/ses/v20201002/api.json +102 -0
  36. tccli/services/ses/v20201002/examples.json +8 -0
  37. tccli/services/sms/v20210111/api.json +1 -1
  38. tccli/services/ssl/v20191205/api.json +10 -0
  39. tccli/services/tag/v20180813/api.json +26 -26
  40. tccli/services/teo/v20220901/examples.json +3 -3
  41. tccli/services/tione/v20211111/api.json +43 -1
  42. tccli/services/trabbit/v20230418/api.json +20 -0
  43. tccli/services/trabbit/v20230418/examples.json +1 -1
  44. tccli/services/tse/v20201207/api.json +2 -2
  45. tccli/services/tsf/v20180326/api.json +12 -1
  46. tccli/services/vpc/v20170312/api.json +62 -4
  47. tccli/services/vpc/v20170312/examples.json +28 -0
  48. tccli/services/vpc/vpc_client.py +122 -16
  49. tccli/services/wedata/v20210820/api.json +110 -6
  50. tccli/services/wedata/v20210820/examples.json +3 -3
  51. {tccli-3.0.1321.1.dist-info → tccli-3.0.1323.1.dist-info}/METADATA +2 -2
  52. {tccli-3.0.1321.1.dist-info → tccli-3.0.1323.1.dist-info}/RECORD +55 -55
  53. {tccli-3.0.1321.1.dist-info → tccli-3.0.1323.1.dist-info}/WHEEL +0 -0
  54. {tccli-3.0.1321.1.dist-info → tccli-3.0.1323.1.dist-info}/entry_points.txt +0 -0
  55. {tccli-3.0.1321.1.dist-info → tccli-3.0.1323.1.dist-info}/license_files/LICENSE +0 -0
@@ -3494,6 +3494,16 @@
3494
3494
  "output_required": false,
3495
3495
  "type": "int",
3496
3496
  "value_allowed_null": false
3497
+ },
3498
+ {
3499
+ "disabled": false,
3500
+ "document": "实例对应的功能列表,true表示支持,false 表示不支持",
3501
+ "example": "{\"billing\":true,\"monitor\":true}",
3502
+ "member": "string",
3503
+ "name": "Features",
3504
+ "output_required": false,
3505
+ "type": "string",
3506
+ "value_allowed_null": false
3497
3507
  }
3498
3508
  ],
3499
3509
  "usage": "out"
@@ -4348,6 +4358,16 @@
4348
4358
  "output_required": false,
4349
4359
  "type": "int",
4350
4360
  "value_allowed_null": false
4361
+ },
4362
+ {
4363
+ "disabled": false,
4364
+ "document": "Serverless 扩展字段",
4365
+ "example": "{\"tps\":\"2000\"}",
4366
+ "member": "string",
4367
+ "name": "ServerlessExt",
4368
+ "output_required": false,
4369
+ "type": "string",
4370
+ "value_allowed_null": false
4351
4371
  }
4352
4372
  ],
4353
4373
  "usage": "out"
@@ -180,7 +180,7 @@
180
180
  {
181
181
  "document": "",
182
182
  "input": "POST / HTTP/1.1\nHost: trabbit.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ListRabbitMQServerlessInstances\n<公共请求参数>\n\n{\n \"Filters\": [],\n \"Limit\": 2,\n \"Offset\": 1\n}",
183
- "output": "{\n \"Response\": {\n \"Instances\": [\n {\n \"AutoRenewFlag\": 1,\n \"ClusterStatus\": 1,\n \"CreateTime\": 1737028115000,\n \"ExceptionInformation\": null,\n \"ExpireTime\": 1739706515000,\n \"InstanceId\": \"amqp-slfxemauoa\",\n \"InstanceName\": \"test_yunchao_8816\",\n \"InstanceType\": 1,\n \"InstanceVersion\": \"0.1.0\",\n \"MaxBandWidth\": 0,\n \"MaxStorage\": 0,\n \"MaxTps\": 2000,\n \"NodeCount\": 0,\n \"PayMode\": 0,\n \"PublicAccessEndpoint\": null,\n \"Remark\": \"\",\n \"SpecName\": \"基础版\",\n \"Status\": 1,\n \"Vpcs\": []\n },\n {\n \"AutoRenewFlag\": 1,\n \"ClusterStatus\": 1,\n \"CreateTime\": 1736912606000,\n \"ExceptionInformation\": null,\n \"ExpireTime\": 1739591006000,\n \"InstanceId\": \"amqp-slirnlmwlm\",\n \"InstanceName\": \"test_yunchao_001\",\n \"InstanceType\": 1,\n \"InstanceVersion\": \"0.1.0\",\n \"MaxBandWidth\": 0,\n \"MaxStorage\": 0,\n \"MaxTps\": 2000,\n \"NodeCount\": 0,\n \"PayMode\": 0,\n \"PublicAccessEndpoint\": null,\n \"Remark\": \"\",\n \"SpecName\": \"基础版\",\n \"Status\": 1,\n \"Vpcs\": [\n {\n \"SubnetId\": \"subnet-1j1p6omq\",\n \"VpcDataStreamEndpointStatus\": \"ON\",\n \"VpcEndpoint\": \"amqp://10.0.0.2:5672\",\n \"VpcId\": \"vpc-f7zemc2v\"\n }\n ]\n }\n ],\n \"RequestId\": \"cc77d367-76b7-4aef-b5d6-e471ed254758\",\n \"TotalCount\": 4\n }\n}",
183
+ "output": "{\n \"Response\": {\n \"Instances\": [\n {\n \"AutoRenewFlag\": 1,\n \"ClusterStatus\": 1,\n \"CreateTime\": 1737028115000,\n \"ExceptionInformation\": \"\",\n \"ExpireTime\": 1739706515000,\n \"InstanceId\": \"amqp-slfxemauoa\",\n \"InstanceName\": \"test_yunchao_8816\",\n \"InstanceType\": 1,\n \"InstanceVersion\": \"0.1.0\",\n \"MaxBandWidth\": 0,\n \"MaxStorage\": 0,\n \"MaxTps\": 2000,\n \"NodeCount\": 0,\n \"PayMode\": 0,\n \"PublicAccessEndpoint\": \"\",\n \"Remark\": \"\",\n \"SpecName\": \"基础版\",\n \"Status\": 1,\n \"Vpcs\": []\n },\n {\n \"AutoRenewFlag\": 1,\n \"ClusterStatus\": 1,\n \"CreateTime\": 1736912606000,\n \"ExceptionInformation\": \"\",\n \"ExpireTime\": 1739591006000,\n \"InstanceId\": \"amqp-slirnlmwlm\",\n \"InstanceName\": \"test_yunchao_001\",\n \"InstanceType\": 1,\n \"InstanceVersion\": \"0.1.0\",\n \"MaxBandWidth\": 0,\n \"MaxStorage\": 0,\n \"MaxTps\": 2000,\n \"NodeCount\": 0,\n \"PayMode\": 0,\n \"PublicAccessEndpoint\": \"\",\n \"Remark\": \"\",\n \"SpecName\": \"基础版\",\n \"Status\": 1,\n \"Vpcs\": [\n {\n \"SubnetId\": \"subnet-1j1p6omq\",\n \"VpcDataStreamEndpointStatus\": \"ON\",\n \"VpcEndpoint\": \"amqp://10.0.0.2:5672\",\n \"VpcId\": \"vpc-f7zemc2v\"\n }\n ]\n }\n ],\n \"RequestId\": \"cc77d367-76b7-4aef-b5d6-e471ed254758\",\n \"TotalCount\": 4\n }\n}",
184
184
  "title": "获取实例列表"
185
185
  }
186
186
  ],
@@ -836,8 +836,8 @@
836
836
  },
837
837
  "metadata": {
838
838
  "apiVersion": "2020-12-07",
839
- "api_brief": "介绍如何使用 API 对腾讯云微服务引擎进行操作,包括创建托管服务集群、查询集群信息等。",
840
- "serviceNameCN": "微服务引擎",
839
+ "api_brief": "介绍如何使用 API 对腾讯云微服务平台进行操作,包括创建托管服务集群、查询集群信息等。",
840
+ "serviceNameCN": "TSF-Polaris&Nacos&ZK&网关",
841
841
  "serviceShortName": "tse"
842
842
  },
843
843
  "objects": {
@@ -1565,7 +1565,7 @@
1565
1565
  "metadata": {
1566
1566
  "apiVersion": "2018-03-26",
1567
1567
  "api_brief": "介绍如何使用API对腾讯微服务平台TSF进行操作,包括部署组、程序包管理等。",
1568
- "serviceNameCN": "微服务平台 TSF",
1568
+ "serviceNameCN": "微服务平台",
1569
1569
  "serviceShortName": "tsf"
1570
1570
  },
1571
1571
  "objects": {
@@ -3340,6 +3340,17 @@
3340
3340
  "required": false,
3341
3341
  "type": "bool",
3342
3342
  "value_allowed_null": false
3343
+ },
3344
+ {
3345
+ "disabled": false,
3346
+ "document": "-",
3347
+ "example": "无",
3348
+ "member": "CommonOption",
3349
+ "name": "Paths",
3350
+ "output_required": false,
3351
+ "required": false,
3352
+ "type": "list",
3353
+ "value_allowed_null": false
3343
3354
  }
3344
3355
  ],
3345
3356
  "usage": "both"
@@ -112,6 +112,13 @@
112
112
  "output": "AssociateDirectConnectGatewayNatGatewayResponse",
113
113
  "status": "online"
114
114
  },
115
+ "AssociateHaVipInstance": {
116
+ "document": "本接口(AssociateHaVipInstance)用于HAVIP绑定子机或网卡(限制HaVip的飘移范围)。",
117
+ "input": "AssociateHaVipInstanceRequest",
118
+ "name": "HAVIP绑定子机或网卡",
119
+ "output": "AssociateHaVipInstanceResponse",
120
+ "status": "online"
121
+ },
115
122
  "AssociateIPv6Address": {
116
123
  "document": "本接口(AssociateIPv6Address)用于将弹性公网IPv6(简称EIPv6)实例绑定到 CVM 或弹性网卡配置的内网 IPv6 地址上。\n\n- 将 EIPv6 绑定到 CVM 上,其本质是将 EIPv6 绑定到 CVM 弹性网卡所配置的内网 IPv6 地址上。\n- 将 EIPv6 绑定到指定网卡的内网 IPv6 时,需确保该内网 IPv6 地址为未绑定状态,才能执行绑定操作。",
117
124
  "input": "AssociateIPv6AddressRequest",
@@ -1869,6 +1876,13 @@
1869
1876
  "output": "DisassociateDirectConnectGatewayNatGatewayResponse",
1870
1877
  "status": "online"
1871
1878
  },
1879
+ "DisassociateHaVipInstance": {
1880
+ "document": "本接口(DisassociateHaVipInstance)用于HAVIP解绑子机或网卡(去掉HaVip飘移范围)。",
1881
+ "input": "DisassociateHaVipInstanceRequest",
1882
+ "name": "HAVIP解绑定子机或网卡",
1883
+ "output": "DisassociateHaVipInstanceResponse",
1884
+ "status": "online"
1885
+ },
1872
1886
  "DisassociateIPv6Address": {
1873
1887
  "document": "本接口(DisassociateIPv6Address)用于解绑弹性公网 IPv6(简称EIPv6)实例。\n\n- 支持对 CVM、弹性网卡绑定的 EIPv6 实例进行解绑操作。\n- 只有状态为 BIND 和 BIND_ENI 的 EIPv6 实例才能进行解绑操作。",
1874
1888
  "input": "DisassociateIPv6AddressRequest",
@@ -3915,7 +3929,7 @@
3915
3929
  },
3916
3930
  {
3917
3931
  "disabled": false,
3918
- "document": "Anycast发布域。\n<ul style=\"margin:0\"><li>已开通Anycast公网加速白名单的用户,可选值:<ul><li>ANYCAST_ZONE_GLOBAL:全球发布域(需要额外开通Anycast全球加速白名单)</li><li>ANYCAST_ZONE_OVERSEAS:境外发布域</li><li><b>[已废弃]</b> ANYCAST_ZONE_A:发布域A(已更新为全球发布域)</li><li><b>[已废弃]</b> ANYCAST_ZONE_B:发布域B(已更新为全球发布域)</li></ul>默认值:ANYCAST_ZONE_OVERSEAS。</li></ul>",
3932
+ "document": "Anycast发布域。\n<ul style=\"margin:0\"><li>已开通Anycast公网加速白名单的用户,可选值:<ul><li>ANYCAST_ZONE_GLOBAL:全球发布域(需要额外开通Anycast全球加速白名单)</li><li>ANYCAST_ZONE_OVERSEAS:境外发布域</li></ul>默认值:ANYCAST_ZONE_OVERSEAS。</li></ul>",
3919
3933
  "example": "ANYCAST_ZONE_A",
3920
3934
  "member": "string",
3921
3935
  "name": "AnycastZone",
@@ -3932,7 +3946,7 @@
3932
3946
  "type": "list"
3933
3947
  },
3934
3948
  {
3935
- "disabled": false,
3949
+ "disabled": true,
3936
3950
  "document": "<b>[已废弃]</b> AnycastEIP不再区分是否负载均衡。原参数说明如下:\nAnycastEIP是否用于绑定负载均衡。\n<ul style=\"margin:0\"><li>已开通Anycast公网加速白名单的用户,可选值:<ul><li>TRUE:AnycastEIP可绑定对象为负载均衡</li>\n<li>FALSE:AnycastEIP可绑定对象为云服务器、NAT网关、高可用虚拟IP等</li></ul>默认值:FALSE。</li></ul>",
3937
3951
  "example": "False",
3938
3952
  "member": "bool",
@@ -4706,6 +4720,23 @@
4706
4720
  ],
4707
4721
  "type": "object"
4708
4722
  },
4723
+ "AssociateHaVipInstanceRequest": {
4724
+ "document": "AssociateHaVipInstance请求参数结构体",
4725
+ "members": [],
4726
+ "type": "object"
4727
+ },
4728
+ "AssociateHaVipInstanceResponse": {
4729
+ "document": "AssociateHaVipInstance返回参数结构体",
4730
+ "members": [
4731
+ {
4732
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
4733
+ "member": "string",
4734
+ "name": "RequestId",
4735
+ "type": "string"
4736
+ }
4737
+ ],
4738
+ "type": "object"
4739
+ },
4709
4740
  "AssociateIPv6AddressRequest": {
4710
4741
  "document": "AssociateIPv6Address请求参数结构体",
4711
4742
  "members": [
@@ -22804,6 +22835,33 @@
22804
22835
  ],
22805
22836
  "type": "object"
22806
22837
  },
22838
+ "DisassociateHaVipInstanceRequest": {
22839
+ "document": "DisassociateHaVipInstance请求参数结构体",
22840
+ "members": [
22841
+ {
22842
+ "disabled": false,
22843
+ "document": "HaVip解绑的子机或网卡。最多支持10个实例。",
22844
+ "example": "[{\"HaVipId\": \"havip-7tqt5jn6\", \"InstanceType\": \"CVM\", \"InstanceId\": \"ins-3qx9elib\"}]",
22845
+ "member": "HaVipAssociation",
22846
+ "name": "HaVipAssociationSet",
22847
+ "required": true,
22848
+ "type": "list"
22849
+ }
22850
+ ],
22851
+ "type": "object"
22852
+ },
22853
+ "DisassociateHaVipInstanceResponse": {
22854
+ "document": "DisassociateHaVipInstance返回参数结构体",
22855
+ "members": [
22856
+ {
22857
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
22858
+ "member": "string",
22859
+ "name": "RequestId",
22860
+ "type": "string"
22861
+ }
22862
+ ],
22863
+ "type": "object"
22864
+ },
22807
22865
  "DisassociateIPv6AddressRequest": {
22808
22866
  "document": "DisassociateIPv6Address请求参数结构体",
22809
22867
  "members": [
@@ -26869,7 +26927,7 @@
26869
26927
  "type": "int"
26870
26928
  },
26871
26929
  {
26872
- "disabled": false,
26930
+ "disabled": true,
26873
26931
  "document": "包月带宽起始时间(已废弃,输入无效)",
26874
26932
  "example": "2021-07-20 00:00:00",
26875
26933
  "member": "datetime",
@@ -26878,7 +26936,7 @@
26878
26936
  "type": "string"
26879
26937
  },
26880
26938
  {
26881
- "disabled": false,
26939
+ "disabled": true,
26882
26940
  "document": "包月带宽结束时间(已废弃,输入无效)",
26883
26941
  "example": "2021-07-20 00:00:00",
26884
26942
  "member": "datetime",
@@ -176,6 +176,20 @@
176
176
  "title": "专线网关绑定NAT网关"
177
177
  }
178
178
  ],
179
+ "AssociateHaVipInstance": [
180
+ {
181
+ "document": "限制HAVIP只能在指定的网卡范围内漂移。",
182
+ "input": "https://vpc.tencentcloudapi.com/?Action=AssociateHaVipInstance\n&<公共请求参数>\n{\n \"HaVipAssociationSet\": [\n {\n \"HaVipId\": \"havip-crb65sya\",\n \"InstanceId\": \"eni-pzrckpyd\",\n \"InstanceType\": \"ENI\"\n }\n ]\n}\n",
183
+ "output": "{\n \"Response\": {\n \"RequestId\": \"354f4ac3-8546-4516-8c8a-69e3ab73aa8a\"\n }\n}",
184
+ "title": "HAVIP绑定网卡"
185
+ },
186
+ {
187
+ "document": "限制HAVIP只能在指定的子机范围内漂移。",
188
+ "input": "https://vpc.tencentcloudapi.com/?Action=AssociateHaVipInstance\n&<公共请求参数>\n{\n \"HaVipAssociationSet\": [\n {\n \"HaVipId\": \"havip-crb65sya\",\n \"InstanceId\": \"ins-nkgrfbic\",\n \"InstanceType\": \"CVM\"\n }\n ]\n}\n",
189
+ "output": "{\n \"Response\": {\n \"RequestId\": \"354f4ac3-8546-4516-8c8a-69e3ab73aa8a\"\n }\n}",
190
+ "title": "HAVIP绑定子机"
191
+ }
192
+ ],
179
193
  "AssociateIPv6Address": [
180
194
  {
181
195
  "document": "弹性公网IPv6绑定弹性网卡。",
@@ -2448,6 +2462,20 @@
2448
2462
  "title": "专线网关解绑NAT网关"
2449
2463
  }
2450
2464
  ],
2465
+ "DisassociateHaVipInstance": [
2466
+ {
2467
+ "document": "将网卡从HAVIP漂移范围解绑。",
2468
+ "input": "POST / HTTP/1.1\nHost: vpc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DisassociateHaVipInstance\n<公共请求参数>\n\n{\n \"HaVipAssociationSet\": [\n {\n \"HaVipId\": \"havip-crb65sya\",\n \"InstanceId\": \"eni-pzrckpyd\",\n \"InstanceType\": \"ENI\"\n }\n ]\n}",
2469
+ "output": "{\n \"Response\": {\n \"RequestId\": \"354f4ac3-8546-4516-8c8a-69e3ab73aa8a\"\n }\n}",
2470
+ "title": "HAVIP解绑网卡"
2471
+ },
2472
+ {
2473
+ "document": "将子机从HAVIP漂移范围解绑。",
2474
+ "input": "POST / HTTP/1.1\nHost: vpc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DisassociateHaVipInstance\n<公共请求参数>\n\n{\n \"HaVipAssociationSet\": [\n {\n \"HaVipId\": \"havip-crb65sya\",\n \"InstanceId\": \"ins-nkgrfbic\",\n \"InstanceType\": \"CVM\"\n }\n ]\n}",
2475
+ "output": "{\n \"Response\": {\n \"RequestId\": \"354f4ac3-8546-4516-8c8a-69e3ab73aa8a\"\n }\n}",
2476
+ "title": "HAVIP解绑子机"
2477
+ }
2478
+ ],
2451
2479
  "DisassociateIPv6Address": [
2452
2480
  {
2453
2481
  "document": "解绑弹性公网IPv6。",
@@ -485,7 +485,7 @@ def doModifyIPv6AddressesAttributes(args, parsed_globals):
485
485
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
486
486
 
487
487
 
488
- def doCreatePrivateNatGateway(args, parsed_globals):
488
+ def doAssociateHaVipInstance(args, parsed_globals):
489
489
  g_param = parse_global_arg(parsed_globals)
490
490
 
491
491
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -514,11 +514,11 @@ def doCreatePrivateNatGateway(args, parsed_globals):
514
514
  client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
515
515
  client._sdkVersion += ("_CLI_" + __version__)
516
516
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
517
- model = models.CreatePrivateNatGatewayRequest()
517
+ model = models.AssociateHaVipInstanceRequest()
518
518
  model.from_json_string(json.dumps(args))
519
519
  start_time = time.time()
520
520
  while True:
521
- rsp = client.CreatePrivateNatGateway(model)
521
+ rsp = client.AssociateHaVipInstance(model)
522
522
  result = rsp.to_json_string()
523
523
  try:
524
524
  json_obj = json.loads(result)
@@ -1837,6 +1837,58 @@ def doDescribeIp6Addresses(args, parsed_globals):
1837
1837
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1838
1838
 
1839
1839
 
1840
+ def doCreatePrivateNatGateway(args, parsed_globals):
1841
+ g_param = parse_global_arg(parsed_globals)
1842
+
1843
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1844
+ cred = credential.CVMRoleCredential()
1845
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1846
+ cred = credential.STSAssumeRoleCredential(
1847
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1848
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1849
+ )
1850
+ 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):
1851
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1852
+ else:
1853
+ cred = credential.Credential(
1854
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1855
+ )
1856
+ http_profile = HttpProfile(
1857
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1858
+ reqMethod="POST",
1859
+ endpoint=g_param[OptionsDefine.Endpoint],
1860
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1861
+ )
1862
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1863
+ if g_param[OptionsDefine.Language]:
1864
+ profile.language = g_param[OptionsDefine.Language]
1865
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1866
+ client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
1867
+ client._sdkVersion += ("_CLI_" + __version__)
1868
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1869
+ model = models.CreatePrivateNatGatewayRequest()
1870
+ model.from_json_string(json.dumps(args))
1871
+ start_time = time.time()
1872
+ while True:
1873
+ rsp = client.CreatePrivateNatGateway(model)
1874
+ result = rsp.to_json_string()
1875
+ try:
1876
+ json_obj = json.loads(result)
1877
+ except TypeError as e:
1878
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1879
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1880
+ break
1881
+ cur_time = time.time()
1882
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1883
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1884
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1885
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1886
+ else:
1887
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1888
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1889
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1890
+
1891
+
1840
1892
  def doDeleteNetworkAclQuintupleEntries(args, parsed_globals):
1841
1893
  g_param = parse_global_arg(parsed_globals)
1842
1894
 
@@ -5321,7 +5373,7 @@ def doDescribeAddressTemplates(args, parsed_globals):
5321
5373
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5322
5374
 
5323
5375
 
5324
- def doCreateVpnConnection(args, parsed_globals):
5376
+ def doCreateAddressTemplate(args, parsed_globals):
5325
5377
  g_param = parse_global_arg(parsed_globals)
5326
5378
 
5327
5379
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -5350,11 +5402,11 @@ def doCreateVpnConnection(args, parsed_globals):
5350
5402
  client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
5351
5403
  client._sdkVersion += ("_CLI_" + __version__)
5352
5404
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
5353
- model = models.CreateVpnConnectionRequest()
5405
+ model = models.CreateAddressTemplateRequest()
5354
5406
  model.from_json_string(json.dumps(args))
5355
5407
  start_time = time.time()
5356
5408
  while True:
5357
- rsp = client.CreateVpnConnection(model)
5409
+ rsp = client.CreateAddressTemplate(model)
5358
5410
  result = rsp.to_json_string()
5359
5411
  try:
5360
5412
  json_obj = json.loads(result)
@@ -6829,6 +6881,58 @@ def doModifySnapshotPolicies(args, parsed_globals):
6829
6881
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6830
6882
 
6831
6883
 
6884
+ def doDisassociateDhcpIpWithAddressIp(args, parsed_globals):
6885
+ g_param = parse_global_arg(parsed_globals)
6886
+
6887
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
6888
+ cred = credential.CVMRoleCredential()
6889
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
6890
+ cred = credential.STSAssumeRoleCredential(
6891
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
6892
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
6893
+ )
6894
+ 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):
6895
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
6896
+ else:
6897
+ cred = credential.Credential(
6898
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
6899
+ )
6900
+ http_profile = HttpProfile(
6901
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
6902
+ reqMethod="POST",
6903
+ endpoint=g_param[OptionsDefine.Endpoint],
6904
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
6905
+ )
6906
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
6907
+ if g_param[OptionsDefine.Language]:
6908
+ profile.language = g_param[OptionsDefine.Language]
6909
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
6910
+ client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
6911
+ client._sdkVersion += ("_CLI_" + __version__)
6912
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
6913
+ model = models.DisassociateDhcpIpWithAddressIpRequest()
6914
+ model.from_json_string(json.dumps(args))
6915
+ start_time = time.time()
6916
+ while True:
6917
+ rsp = client.DisassociateDhcpIpWithAddressIp(model)
6918
+ result = rsp.to_json_string()
6919
+ try:
6920
+ json_obj = json.loads(result)
6921
+ except TypeError as e:
6922
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
6923
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
6924
+ break
6925
+ cur_time = time.time()
6926
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
6927
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
6928
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
6929
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
6930
+ else:
6931
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
6932
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
6933
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6934
+
6935
+
6832
6936
  def doDeleteVpnGatewaySslClient(args, parsed_globals):
6833
6937
  g_param = parse_global_arg(parsed_globals)
6834
6938
 
@@ -9585,7 +9689,7 @@ def doDescribePrivateNatGateways(args, parsed_globals):
9585
9689
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
9586
9690
 
9587
9691
 
9588
- def doCreateAddressTemplate(args, parsed_globals):
9692
+ def doCreateVpnConnection(args, parsed_globals):
9589
9693
  g_param = parse_global_arg(parsed_globals)
9590
9694
 
9591
9695
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -9614,11 +9718,11 @@ def doCreateAddressTemplate(args, parsed_globals):
9614
9718
  client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
9615
9719
  client._sdkVersion += ("_CLI_" + __version__)
9616
9720
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
9617
- model = models.CreateAddressTemplateRequest()
9721
+ model = models.CreateVpnConnectionRequest()
9618
9722
  model.from_json_string(json.dumps(args))
9619
9723
  start_time = time.time()
9620
9724
  while True:
9621
- rsp = client.CreateAddressTemplate(model)
9725
+ rsp = client.CreateVpnConnection(model)
9622
9726
  result = rsp.to_json_string()
9623
9727
  try:
9624
9728
  json_obj = json.loads(result)
@@ -14785,7 +14889,7 @@ def doDescribePrivateNatGatewayTranslationNatRules(args, parsed_globals):
14785
14889
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
14786
14890
 
14787
14891
 
14788
- def doDisassociateDhcpIpWithAddressIp(args, parsed_globals):
14892
+ def doDisassociateHaVipInstance(args, parsed_globals):
14789
14893
  g_param = parse_global_arg(parsed_globals)
14790
14894
 
14791
14895
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -14814,11 +14918,11 @@ def doDisassociateDhcpIpWithAddressIp(args, parsed_globals):
14814
14918
  client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
14815
14919
  client._sdkVersion += ("_CLI_" + __version__)
14816
14920
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
14817
- model = models.DisassociateDhcpIpWithAddressIpRequest()
14921
+ model = models.DisassociateHaVipInstanceRequest()
14818
14922
  model.from_json_string(json.dumps(args))
14819
14923
  start_time = time.time()
14820
14924
  while True:
14821
- rsp = client.DisassociateDhcpIpWithAddressIp(model)
14925
+ rsp = client.DisassociateHaVipInstance(model)
14822
14926
  result = rsp.to_json_string()
14823
14927
  try:
14824
14928
  json_obj = json.loads(result)
@@ -21409,7 +21513,7 @@ ACTION_MAP = {
21409
21513
  "ModifyServiceTemplateGroupAttribute": doModifyServiceTemplateGroupAttribute,
21410
21514
  "ModifyAddressInternetChargeType": doModifyAddressInternetChargeType,
21411
21515
  "ModifyIPv6AddressesAttributes": doModifyIPv6AddressesAttributes,
21412
- "CreatePrivateNatGateway": doCreatePrivateNatGateway,
21516
+ "AssociateHaVipInstance": doAssociateHaVipInstance,
21413
21517
  "AcceptVpcPeeringConnection": doAcceptVpcPeeringConnection,
21414
21518
  "EnableGatewayFlowMonitor": doEnableGatewayFlowMonitor,
21415
21519
  "DescribeAddresses": doDescribeAddresses,
@@ -21435,6 +21539,7 @@ ACTION_MAP = {
21435
21539
  "AllocateAddresses": doAllocateAddresses,
21436
21540
  "DeleteCdcLDCXList": doDeleteCdcLDCXList,
21437
21541
  "DescribeIp6Addresses": doDescribeIp6Addresses,
21542
+ "CreatePrivateNatGateway": doCreatePrivateNatGateway,
21438
21543
  "DeleteNetworkAclQuintupleEntries": doDeleteNetworkAclQuintupleEntries,
21439
21544
  "DeleteDirectConnectGateway": doDeleteDirectConnectGateway,
21440
21545
  "CreateNetworkInterface": doCreateNetworkInterface,
@@ -21502,7 +21607,7 @@ ACTION_MAP = {
21502
21607
  "DescribeVpcPrivateIpAddresses": doDescribeVpcPrivateIpAddresses,
21503
21608
  "ModifyIp6Translator": doModifyIp6Translator,
21504
21609
  "DescribeAddressTemplates": doDescribeAddressTemplates,
21505
- "CreateVpnConnection": doCreateVpnConnection,
21610
+ "CreateAddressTemplate": doCreateAddressTemplate,
21506
21611
  "TransformAddress": doTransformAddress,
21507
21612
  "DescribeVpcEndPoint": doDescribeVpcEndPoint,
21508
21613
  "DescribeIp6TranslatorQuota": doDescribeIp6TranslatorQuota,
@@ -21531,6 +21636,7 @@ ACTION_MAP = {
21531
21636
  "ModifyIPv6AddressesBandwidth": doModifyIPv6AddressesBandwidth,
21532
21637
  "RefreshDirectConnectGatewayRouteToNatGateway": doRefreshDirectConnectGatewayRouteToNatGateway,
21533
21638
  "ModifySnapshotPolicies": doModifySnapshotPolicies,
21639
+ "DisassociateDhcpIpWithAddressIp": doDisassociateDhcpIpWithAddressIp,
21534
21640
  "DeleteVpnGatewaySslClient": doDeleteVpnGatewaySslClient,
21535
21641
  "CreateNatGatewayDestinationIpPortTranslationNatRule": doCreateNatGatewayDestinationIpPortTranslationNatRule,
21536
21642
  "ModifyAddressTemplateAttribute": doModifyAddressTemplateAttribute,
@@ -21584,7 +21690,7 @@ ACTION_MAP = {
21584
21690
  "RemoveIp6Rules": doRemoveIp6Rules,
21585
21691
  "RejectVpcPeeringConnection": doRejectVpcPeeringConnection,
21586
21692
  "DescribePrivateNatGateways": doDescribePrivateNatGateways,
21587
- "CreateAddressTemplate": doCreateAddressTemplate,
21693
+ "CreateVpnConnection": doCreateVpnConnection,
21588
21694
  "ModifyCustomerGatewayAttribute": doModifyCustomerGatewayAttribute,
21589
21695
  "EnableCcnRoutes": doEnableCcnRoutes,
21590
21696
  "CreatePrivateNatGatewayDestinationIpPortTranslationNatRule": doCreatePrivateNatGatewayDestinationIpPortTranslationNatRule,
@@ -21684,7 +21790,7 @@ ACTION_MAP = {
21684
21790
  "ResetVpnGatewayInternetMaxBandwidth": doResetVpnGatewayInternetMaxBandwidth,
21685
21791
  "ModifyVpnConnectionAttribute": doModifyVpnConnectionAttribute,
21686
21792
  "DescribePrivateNatGatewayTranslationNatRules": doDescribePrivateNatGatewayTranslationNatRules,
21687
- "DisassociateDhcpIpWithAddressIp": doDisassociateDhcpIpWithAddressIp,
21793
+ "DisassociateHaVipInstance": doDisassociateHaVipInstance,
21688
21794
  "CreateHaVip": doCreateHaVip,
21689
21795
  "DescribeTenantCcns": doDescribeTenantCcns,
21690
21796
  "CreateHighPriorityRoutes": doCreateHighPriorityRoutes,