tccli-intl-en 3.1.11.1__py2.py3-none-any.whl → 3.1.12.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/__init__.py +6 -0
- tccli/services/ai3d/__init__.py +4 -0
- tccli/services/ai3d/ai3d_client.py +266 -0
- tccli/services/ai3d/v20250513/api.json +264 -0
- tccli/services/ai3d/v20250513/examples.json +20 -0
- tccli/services/cvm/v20170312/api.json +3 -3
- tccli/services/cvm/v20170312/examples.json +31 -31
- tccli/services/faceid/v20180301/api.json +2 -2
- tccli/services/hunyuan/__init__.py +4 -0
- tccli/services/hunyuan/hunyuan_client.py +266 -0
- tccli/services/hunyuan/v20230901/api.json +270 -0
- tccli/services/hunyuan/v20230901/examples.json +20 -0
- tccli/services/mdl/mdl_client.py +192 -24
- tccli/services/mdl/v20200326/api.json +418 -5
- tccli/services/mdl/v20200326/examples.json +24 -0
- tccli/services/mps/mps_client.py +56 -0
- tccli/services/mps/v20190612/api.json +208 -9
- tccli/services/mps/v20190612/examples.json +36 -22
- tccli/services/teo/teo_client.py +56 -0
- tccli/services/teo/v20220901/api.json +101 -2
- tccli/services/teo/v20220901/examples.json +8 -0
- {tccli_intl_en-3.1.11.1.dist-info → tccli_intl_en-3.1.12.1.dist-info}/METADATA +2 -2
- {tccli_intl_en-3.1.11.1.dist-info → tccli_intl_en-3.1.12.1.dist-info}/RECORD +28 -20
- {tccli_intl_en-3.1.11.1.dist-info → tccli_intl_en-3.1.12.1.dist-info}/LICENSE +0 -0
- {tccli_intl_en-3.1.11.1.dist-info → tccli_intl_en-3.1.12.1.dist-info}/WHEEL +0 -0
- {tccli_intl_en-3.1.11.1.dist-info → tccli_intl_en-3.1.12.1.dist-info}/entry_points.txt +0 -0
- {tccli_intl_en-3.1.11.1.dist-info → tccli_intl_en-3.1.12.1.dist-info}/top_level.txt +0 -0
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"ConvertOperatingSystems": [
|
|
44
44
|
{
|
|
45
45
|
"document": "This example shows you how to perform operating system switching on instance ins-6pb6lrmy.",
|
|
46
|
-
"input": "POST / HTTP/1.1\nHost: cvm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ConvertOperatingSystems\n<Common request parameters>\n\n{\n \"InstanceIds\": [\n \"ins-6pb6lrmy\"\n ]\n}",
|
|
47
|
-
"output": "{\n \"Response\": {\n \"SupportTargetOSList\": [\n {\n \"TargetOSType\": \"TencentOS\",\n \"TargetOSVersion\": \"2.4\"\n }\n ],\n \"TaskId\": \"12345678\",\n \"RequestId\": \"
|
|
46
|
+
"input": "POST / HTTP/1.1\nHost: cvm.intl.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ConvertOperatingSystems\n<Common request parameters>\n\n{\n \"InstanceIds\": [\n \"ins-6pb6lrmy\"\n ]\n}",
|
|
47
|
+
"output": "{\n \"Response\": {\n \"SupportTargetOSList\": [\n {\n \"TargetOSType\": \"TencentOS\",\n \"TargetOSVersion\": \"2.4\"\n }\n ],\n \"TaskId\": \"12345678\",\n \"RequestId\": \"c8825ac1-0d07-4f3c-a35e-599eb1acd6fc\"\n }\n}",
|
|
48
48
|
"title": "Performing Operating System Switching"
|
|
49
49
|
}
|
|
50
50
|
],
|
|
@@ -232,20 +232,20 @@
|
|
|
232
232
|
{
|
|
233
233
|
"document": "This example shows you how to view instance information in Guangzhou Zone 3 or Guangzhou Zone 4 and limit return results to one.",
|
|
234
234
|
"input": "POST / HTTP/1.1\nHost: cvm.intl.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeInstances\n<Common request parameters>\n\n{\n \"Limit\": 1,\n \"Filters\": [\n {\n \"Values\": [\n \"ap-guangzhou-3\",\n \"ap-guangzhou-4\"\n ],\n \"Name\": \"zone\"\n }\n ],\n \"Offset\": 0\n}",
|
|
235
|
-
"output": "{\n \"Response\": {\n \"InstanceSet\": [\n {\n \"RenewFlag\": \"NOTIFY_AND_MANUAL_RENEW\",\n \"Uuid\": \"e85f1388-0422-410d-8e50-bef540e78c18\",\n \"InstanceState\": \"RUNNING\",\n \"DisableApiTermination\": false,\n \"LatestOperationErrorMsg\": \"\",\n \"DefaultLoginPort\": 22,\n \"LicenseType\": \"TencentCloud\",\n \"DefaultLoginUser\": \"root\",\n \"LatestOperationState\": \"SUCCESS\",\n \"LoginSettings\": {\n \"KeyIds\": [\n \"skey-b4vakk62\"\n ]\n },\n \"IPv6Addresses\": [\n \"2001:0db8:86a3:08d3:1319:8a2e:0370:7344\"\n ],\n \"DedicatedClusterId\": \"\",\n \"RestrictState\": \"PROTECTIVELY_ISOLATED\",\n \"ExpiredTime\": \"2020-09-22T00:00:00+00:00\",\n \"DisasterRecoverGroupId\": \"\",\n \"Memory\": 1,\n \"CreatedTime\": \"2020-09-22T00:00:00+00:00\",\n \"CPU\": 1,\n \"RdmaIpAddresses\": [],\n \"CamRoleName\": \"\",\n \"PublicIpAddresses\": [\n \"123.207.11.190\"\n ],\n \"Tags\": [\n {\n \"Key\": \"myKey\",\n \"Value\": \"myValue\"\n }\n ],\n \"InstanceId\": \"ins-xlsyru2j\",\n \"ImageId\": \"img-8toqc6s3\",\n \"StopChargingMode\": \"NOT_APPLICABLE\",\n \"InstanceChargeType\": \"POSTPAID_BY_HOUR\",\n \"InstanceType\": \"S2.SMALL2\",\n \"SystemDisk\": {\n \"DiskSize\": 50,\n \"CdcId\": \"cdc-xxxxxxxx\",\n \"DiskId\": \"disk-czsodtl1\",\n \"DiskType\": \"CLOUD_SSD\"\n },\n \"Placement\": {\n \"HostId\": \"host-h3m57oik\",\n \"ProjectId\": 1174660,\n \"HostIds\": [],\n \"Zone\": \"ap-guangzhou-3\"\n },\n \"PrivateIpAddresses\": [\n \"172.16.32.78\"\n ],\n \"OsName\": \"CentOS 7.4 64bit\",\n \"SecurityGroupIds\": [\n \"sg-p1ezv4wz\"\n ],\n \"InstanceName\": \"myInstance\",\n \"DataDisks\": [\n {\n \"DeleteWithInstance\": true,\n \"Encrypt\": true,\n \"CdcId\": \"cdc-xxxxxxxx\",\n \"DiskType\": \"CLOUD_SSD\",\n \"ThroughputPerformance\": 0,\n \"KmsKeyId\":
|
|
235
|
+
"output": "{\n \"Response\": {\n \"InstanceSet\": [\n {\n \"RenewFlag\": \"NOTIFY_AND_MANUAL_RENEW\",\n \"Uuid\": \"e85f1388-0422-410d-8e50-bef540e78c18\",\n \"InstanceState\": \"RUNNING\",\n \"DisableApiTermination\": false,\n \"LatestOperationErrorMsg\": \"\",\n \"DefaultLoginPort\": 22,\n \"LicenseType\": \"TencentCloud\",\n \"DefaultLoginUser\": \"root\",\n \"LatestOperationState\": \"SUCCESS\",\n \"LoginSettings\": {\n \"KeyIds\": [\n \"skey-b4vakk62\"\n ]\n },\n \"IPv6Addresses\": [\n \"2001:0db8:86a3:08d3:1319:8a2e:0370:7344\"\n ],\n \"DedicatedClusterId\": \"\",\n \"RestrictState\": \"PROTECTIVELY_ISOLATED\",\n \"ExpiredTime\": \"2020-09-22T00:00:00+00:00\",\n \"DisasterRecoverGroupId\": \"\",\n \"Memory\": 1,\n \"CreatedTime\": \"2020-09-22T00:00:00+00:00\",\n \"CPU\": 1,\n \"RdmaIpAddresses\": [],\n \"CamRoleName\": \"\",\n \"PublicIpAddresses\": [\n \"123.207.11.190\"\n ],\n \"Tags\": [\n {\n \"Key\": \"myKey\",\n \"Value\": \"myValue\"\n }\n ],\n \"InstanceId\": \"ins-xlsyru2j\",\n \"ImageId\": \"img-8toqc6s3\",\n \"StopChargingMode\": \"NOT_APPLICABLE\",\n \"InstanceChargeType\": \"POSTPAID_BY_HOUR\",\n \"InstanceType\": \"S2.SMALL2\",\n \"SystemDisk\": {\n \"DiskSize\": 50,\n \"CdcId\": \"cdc-xxxxxxxx\",\n \"DiskId\": \"disk-czsodtl1\",\n \"DiskType\": \"CLOUD_SSD\"\n },\n \"Placement\": {\n \"HostId\": \"host-h3m57oik\",\n \"ProjectId\": 1174660,\n \"HostIds\": [],\n \"Zone\": \"ap-guangzhou-3\"\n },\n \"PrivateIpAddresses\": [\n \"172.16.32.78\"\n ],\n \"OsName\": \"CentOS 7.4 64bit\",\n \"SecurityGroupIds\": [\n \"sg-p1ezv4wz\"\n ],\n \"InstanceName\": \"myInstance\",\n \"DataDisks\": [\n {\n \"DeleteWithInstance\": true,\n \"Encrypt\": true,\n \"CdcId\": \"cdc-xxxxxxxx\",\n \"DiskType\": \"CLOUD_SSD\",\n \"ThroughputPerformance\": 0,\n \"KmsKeyId\": \"b29c2f37-9f2d-11ef-8836-5254009ad364\",\n \"DiskSize\": 50,\n \"DiskId\": \"disk-bzsodtn1\"\n }\n ],\n \"IsolatedSource\": \"NOTISOLATED\",\n \"VirtualPrivateCloud\": {\n \"SubnetId\": \"subnet-mv4sn55k\",\n \"AsVpcGateway\": false,\n \"Ipv6AddressCount\": 1,\n \"VpcId\": \"vpc-m0cnatxj\",\n \"PrivateIpAddresses\": [\n \"172.16.3.59\"\n ]\n },\n \"LatestOperationRequestId\": \"c7de1287-061d-4ace-8caf-6ad8e5a2f29a\",\n \"InternetAccessible\": {\n \"PublicIpAssigned\": true,\n \"InternetChargeType\": \"TRAFFIC_POSTPAID_BY_HOUR\",\n \"InternetMaxBandwidthOut\": 1\n },\n \"HpcClusterId\": \"\",\n \"LatestOperation\": \"ResetInstancesType\"\n }\n ],\n \"TotalCount\": 1,\n \"RequestId\": \"d655191e-a39d-43d2-8349-8c3f2bf4b327\"\n }\n}",
|
|
236
236
|
"title": "View Instance List"
|
|
237
237
|
},
|
|
238
|
-
{
|
|
239
|
-
"document": "This example shows you how to query instances bound with the tag key-value pair (city:shenzhen).",
|
|
240
|
-
"input": "POST / HTTP/1.1\nHost: cvm.intl.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeInstances\n<Common request parameters>\n\n{\n \"Limit\": 1,\n \"Filters\": [\n {\n \"Values\": [\n \"shenzhen\"\n ],\n \"Name\": \"tag:city\"\n }\n ],\n \"Offset\": 0\n}",
|
|
241
|
-
"output": "{\n \"Response\": {\n \"InstanceSet\": [\n {\n \"RenewFlag\": \"NOTIFY_AND_MANUAL_RENEW\",\n \"Uuid\": \"68b510db-b4c1-4630-a62b-73d0c7c970f9\",\n \"InstanceState\": \"RUNNING\",\n \"DisableApiTermination\": false,\n \"LatestOperationErrorMsg\": \"\",\n \"DefaultLoginPort\": 22,\n \"LicenseType\": \"TencentCloud\",\n \"DefaultLoginUser\": \"root\",\n \"LatestOperationState\": \"SUCCESS\",\n \"OsName\": \"CentOS 7.6 64bit\",\n \"CreatedTime\": \"2020-03-10T02:43:51Z\",\n \"RestrictState\": \"NORMAL\",\n \"ExpiredTime\": \"2020-04-10T02:47:36Z\",\n \"DisasterRecoverGroupId\": \"\",\n \"Memory\": 1,\n \"IPv6Addresses\": null,\n \"CPU\": 1,\n \"CamRoleName\": \"\",\n \"PublicIpAddresses\": [\n \"123.207.11.190\"\n ],\n \"Tags\": [\n {\n \"Key\": \"city\",\n \"Value\": \"shenzhen\"\n }\n ],\n \"InstanceId\": \"ins-9bxebleo\",\n \"ImageId\": \"img-9qabwvbn\",\n \"StopChargingMode\": \"NOT_APPLICABLE\",\n \"InstanceChargeType\": \"PREPAID\",\n \"InstanceType\": \"S1.SMALL1\",\n \"SystemDisk\": {\n \"DiskSize\": 50,\n \"DiskId\": \"disk-nucurerk\",\n \"DiskType\": \"CLOUD_PREMIUM\"\n },\n \"IsolatedSource\": \"NOTISOLATED\",\n \"Placement\": {\n \"ProjectId\": 1174660,\n \"Zone\": \"ap-guangzhou-3\"\n },\n \"PrivateIpAddresses\": [\n \"172.16.32.78\"\n ],\n \"LoginSettings\": {\n \"KeyIds\": null\n },\n \"SecurityGroupIds\": [\n \"sg-p1ezv4wz\"\n ],\n \"DedicatedClusterId\": \"\",\n \"InstanceName\": \"Test instance\",\n \"DataDisks\": [],\n \"VirtualPrivateCloud\": {\n \"Ipv6AddressCount\": 1,\n \"PrivateIpAddresses\": [\n \"172.16.3.59\"\n ],\n \"SubnetId\": \"subnet-a2676p0e\",\n \"AsVpcGateway\": false,\n \"VpcId\": \"vpc-g7wzcv7n\"\n },\n \"LatestOperationRequestId\": \"3554eb5b-1cfa-471a-ae76-dc436c9d43e8\",\n \"InternetAccessible\": {\n \"InternetMaxBandwidthOut\": 1,\n \"InternetChargeType\": \"BANDWIDTH_PREPAID\"\n },\n \"RdmaIpAddresses\": [],\n \"HpcClusterId\": \"\",\n \"LatestOperation\": \"RenewInstances\"\n }\n ],\n \"TotalCount\": 1,\n \"RequestId\": \"62DDFFC6-FDB5-44F7-20A6-59152E3D129A\"\n }\n}",
|
|
242
|
-
"title": "Querying Instances Bound to Tags"
|
|
243
|
-
},
|
|
244
238
|
{
|
|
245
239
|
"document": "This example shows you how to query the instance status after initiating StopInstances. You can check that the LatestOperation of the instance is StopInstances and the LatestOperationState is OPERATING using DescribeInstances.",
|
|
246
240
|
"input": "POST / HTTP/1.1\nHost: cvm.intl.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeInstances\n<Common request parameters>\n\n{\n \"Limit\": 1,\n \"Filters\": [\n {\n \"Values\": [\n \"ap-guangzhou-3\",\n \"ap-guangzhou-4\"\n ],\n \"Name\": \"zone\"\n }\n ],\n \"Offset\": 0\n}",
|
|
247
|
-
"output": "{\n \"Response\": {\n \"InstanceSet\": [\n {\n \"RenewFlag\": \"NOTIFY_AND_MANUAL_RENEW\",\n \"Uuid\": \"e85f1388-0422-410d-8e50-bef540e78c18\",\n \"InstanceState\": \"RUNNING\",\n \"DisableApiTermination\": false,\n \"LatestOperationErrorMsg\": \"\",\n \"DefaultLoginPort\": 22,\n \"LicenseType\": \"TencentCloud\",\n \"DefaultLoginUser\": \"root\",\n \"LatestOperationState\": \"OPERATING\",\n \"LoginSettings\": {\n \"KeyIds\": [\n \"skey-b4vakk62\"\n ]\n },\n \"IPv6Addresses\": [\n \"2001:0db8:86a3:08d3:1319:8a2e:0370:7344\"\n ],\n \"RestrictState\": \"PROTECTIVELY_ISOLATED\",\n \"ExpiredTime\": \"2020-09-22T00:00:00+00:00\",\n \"DisasterRecoverGroupId\": \"ps-xxxxxxxx\",\n \"Memory\": 1,\n \"CreatedTime\": \"2020-09-22T00:00:00+00:00\",\n \"CPU\": 1,\n \"RdmaIpAddresses\": [],\n \"CamRoleName\": \"\",\n \"DedicatedClusterId\": \"\",\n \"PublicIpAddresses\": [\n \"123.207.11.190\"\n ],\n \"Tags\": [\n {\n \"Key\": \"city\",\n \"Value\": \"shenzhen\"\n }\n ],\n \"InstanceId\": \"ins-xlsyru2j\",\n \"ImageId\": \"img-8toqc6s3\",\n \"StopChargingMode\": \"NOT_APPLICABLE\",\n \"InstanceChargeType\": \"POSTPAID_BY_HOUR\",\n \"InstanceType\": \"S2.SMALL2\",\n \"SystemDisk\": {\n \"DiskSize\": 50,\n \"CdcId\": \"cdc-xxxxxxxx\",\n \"DiskId\": \"disk-czsodtl1\",\n \"DiskType\": \"CLOUD_SSD\"\n },\n \"Placement\": {\n \"HostId\": \"host-h3m57oik\",\n \"ProjectId\": 1174660,\n \"HostIds\": [],\n \"Zone\": \"ap-guangzhou-3\"\n },\n \"PrivateIpAddresses\": [\n \"172.16.32.78\"\n ],\n \"OsName\": \"CentOS 7.4 64bit\",\n \"SecurityGroupIds\": [\n \"sg-p1ezv4wz\"\n ],\n \"InstanceName\": \"myInstance\",\n \"DataDisks\": [\n {\n \"DeleteWithInstance\": true,\n \"Encrypt\": true,\n \"CdcId\": \"cdc-xxxxxxxx\",\n \"DiskType\": \"CLOUD_SSD\",\n \"ThroughputPerformance\": 0,\n \"KmsKeyId\":
|
|
241
|
+
"output": "{\n \"Response\": {\n \"InstanceSet\": [\n {\n \"RenewFlag\": \"NOTIFY_AND_MANUAL_RENEW\",\n \"Uuid\": \"e85f1388-0422-410d-8e50-bef540e78c18\",\n \"InstanceState\": \"RUNNING\",\n \"DisableApiTermination\": false,\n \"LatestOperationErrorMsg\": \"\",\n \"DefaultLoginPort\": 22,\n \"LicenseType\": \"TencentCloud\",\n \"DefaultLoginUser\": \"root\",\n \"LatestOperationState\": \"OPERATING\",\n \"LoginSettings\": {\n \"KeyIds\": [\n \"skey-b4vakk62\"\n ]\n },\n \"IPv6Addresses\": [\n \"2001:0db8:86a3:08d3:1319:8a2e:0370:7344\"\n ],\n \"RestrictState\": \"PROTECTIVELY_ISOLATED\",\n \"ExpiredTime\": \"2020-09-22T00:00:00+00:00\",\n \"DisasterRecoverGroupId\": \"ps-xxxxxxxx\",\n \"Memory\": 1,\n \"CreatedTime\": \"2020-09-22T00:00:00+00:00\",\n \"CPU\": 1,\n \"RdmaIpAddresses\": [],\n \"CamRoleName\": \"\",\n \"DedicatedClusterId\": \"\",\n \"PublicIpAddresses\": [\n \"123.207.11.190\"\n ],\n \"Tags\": [\n {\n \"Key\": \"city\",\n \"Value\": \"shenzhen\"\n }\n ],\n \"InstanceId\": \"ins-xlsyru2j\",\n \"ImageId\": \"img-8toqc6s3\",\n \"StopChargingMode\": \"NOT_APPLICABLE\",\n \"InstanceChargeType\": \"POSTPAID_BY_HOUR\",\n \"InstanceType\": \"S2.SMALL2\",\n \"SystemDisk\": {\n \"DiskSize\": 50,\n \"CdcId\": \"cdc-xxxxxxxx\",\n \"DiskId\": \"disk-czsodtl1\",\n \"DiskType\": \"CLOUD_SSD\"\n },\n \"Placement\": {\n \"HostId\": \"host-h3m57oik\",\n \"ProjectId\": 1174660,\n \"HostIds\": [],\n \"Zone\": \"ap-guangzhou-3\"\n },\n \"PrivateIpAddresses\": [\n \"172.16.32.78\"\n ],\n \"OsName\": \"CentOS 7.4 64bit\",\n \"SecurityGroupIds\": [\n \"sg-p1ezv4wz\"\n ],\n \"InstanceName\": \"myInstance\",\n \"DataDisks\": [\n {\n \"DeleteWithInstance\": true,\n \"Encrypt\": true,\n \"CdcId\": \"cdc-xxxxxxxx\",\n \"DiskType\": \"CLOUD_SSD\",\n \"ThroughputPerformance\": 0,\n \"KmsKeyId\": \"b29c2f37-9f2d-11ef-8836-5254009ad364\",\n \"DiskSize\": 50,\n \"DiskId\": \"disk-bzsodtn1\"\n }\n ],\n \"IsolatedSource\": \"NOTISOLATED\",\n \"VirtualPrivateCloud\": {\n \"SubnetId\": \"subnet-mv4sn55k\",\n \"AsVpcGateway\": false,\n \"Ipv6AddressCount\": 1,\n \"VpcId\": \"vpc-m0cnatxj\",\n \"PrivateIpAddresses\": [\n \"172.16.3.59\"\n ]\n },\n \"LatestOperationRequestId\": \"c7de1287-061d-4ace-8caf-6ad8e5a2f29a\",\n \"InternetAccessible\": {\n \"PublicIpAssigned\": true,\n \"InternetChargeType\": \"TRAFFIC_POSTPAID_BY_HOUR\",\n \"InternetMaxBandwidthOut\": 1\n },\n \"HpcClusterId\": \"\",\n \"LatestOperation\": \"StopInstances\"\n }\n ],\n \"TotalCount\": 1,\n \"RequestId\": \"d655191e-a39d-43d2-8349-8c3f2bf4b327\"\n }\n}",
|
|
248
242
|
"title": "Querying the Latest Operation on an Instance"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"document": "This example shows you how to query instances bound with the tag key-value pair (city:shenzhen).",
|
|
246
|
+
"input": "POST / HTTP/1.1\nHost: cvm.intl.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeInstances\n<Common request parameters>\n\n{\n \"Limit\": 1,\n \"Filters\": [\n {\n \"Values\": [\n \"shenzhen\"\n ],\n \"Name\": \"tag:city\"\n }\n ],\n \"Offset\": 0\n}",
|
|
247
|
+
"output": "{\n \"Response\": {\n \"InstanceSet\": [\n {\n \"RenewFlag\": \"NOTIFY_AND_MANUAL_RENEW\",\n \"Uuid\": \"68b510db-b4c1-4630-a62b-73d0c7c970f9\",\n \"InstanceState\": \"RUNNING\",\n \"DisableApiTermination\": false,\n \"LatestOperationErrorMsg\": \"\",\n \"DefaultLoginPort\": 22,\n \"LicenseType\": \"TencentCloud\",\n \"DefaultLoginUser\": \"root\",\n \"LatestOperationState\": \"SUCCESS\",\n \"OsName\": \"CentOS 7.6 64bit\",\n \"CreatedTime\": \"2020-03-10T02:43:51Z\",\n \"RestrictState\": \"NORMAL\",\n \"ExpiredTime\": \"2020-04-10T02:47:36Z\",\n \"DisasterRecoverGroupId\": \"\",\n \"Memory\": 1,\n \"IPv6Addresses\": [\n \"fd76:3600:71e:7800:6:461d:4e8:3add\"\n ],\n \"CPU\": 1,\n \"CamRoleName\": \"\",\n \"PublicIpAddresses\": [\n \"123.207.11.190\"\n ],\n \"Tags\": [\n {\n \"Key\": \"city\",\n \"Value\": \"shenzhen\"\n }\n ],\n \"InstanceId\": \"ins-9bxebleo\",\n \"ImageId\": \"img-9qabwvbn\",\n \"StopChargingMode\": \"NOT_APPLICABLE\",\n \"InstanceChargeType\": \"PREPAID\",\n \"InstanceType\": \"S1.SMALL1\",\n \"SystemDisk\": {\n \"DiskSize\": 50,\n \"DiskId\": \"disk-nucurerk\",\n \"DiskType\": \"CLOUD_PREMIUM\"\n },\n \"IsolatedSource\": \"NOTISOLATED\",\n \"Placement\": {\n \"ProjectId\": 1174660,\n \"Zone\": \"ap-guangzhou-3\"\n },\n \"PrivateIpAddresses\": [\n \"172.16.32.78\"\n ],\n \"LoginSettings\": {\n \"KeyIds\": [\n \"skey-0lqrhzz1\"\n ]\n },\n \"SecurityGroupIds\": [\n \"sg-p1ezv4wz\"\n ],\n \"DedicatedClusterId\": \"\",\n \"InstanceName\": \"Test instance\",\n \"DataDisks\": [],\n \"VirtualPrivateCloud\": {\n \"Ipv6AddressCount\": 1,\n \"PrivateIpAddresses\": [\n \"172.16.3.59\"\n ],\n \"SubnetId\": \"subnet-a2676p0e\",\n \"AsVpcGateway\": false,\n \"VpcId\": \"vpc-g7wzcv7n\"\n },\n \"LatestOperationRequestId\": \"3554eb5b-1cfa-471a-ae76-dc436c9d43e8\",\n \"InternetAccessible\": {\n \"InternetMaxBandwidthOut\": 1,\n \"InternetChargeType\": \"BANDWIDTH_PREPAID\"\n },\n \"RdmaIpAddresses\": [],\n \"HpcClusterId\": \"\",\n \"LatestOperation\": \"RenewInstances\"\n }\n ],\n \"TotalCount\": 1,\n \"RequestId\": \"62DDFFC6-FDB5-44F7-20A6-59152E3D129A\"\n }\n}",
|
|
248
|
+
"title": "Querying Instances Bound to Tags"
|
|
249
249
|
}
|
|
250
250
|
],
|
|
251
251
|
"DescribeInstancesAttributes": [
|
|
@@ -541,13 +541,13 @@
|
|
|
541
541
|
"ModifyInstancesChargeType": [
|
|
542
542
|
{
|
|
543
543
|
"document": "This example shows you how to switch the billing mode of an instance.",
|
|
544
|
-
"input": "POST / HTTP/1.1\nHost: cvm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyInstancesChargeType\n<Common request parameters>\n\n{\n \"InstanceChargeType\": \"POSTPAID_BY_HOUR\",\n \"InstanceIds\": [\n \"ins-r8hr2upy\"\n ]\n}",
|
|
544
|
+
"input": "POST / HTTP/1.1\nHost: cvm.intl.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyInstancesChargeType\n<Common request parameters>\n\n{\n \"InstanceChargeType\": \"POSTPAID_BY_HOUR\",\n \"InstanceIds\": [\n \"ins-r8hr2upy\"\n ]\n}",
|
|
545
545
|
"output": "{\n \"Response\": {\n \"RequestId\": \"d39d6c09-44e9-4e80-8661-77b5ff3cbc15\"\n }\n}",
|
|
546
546
|
"title": "Switching Instance Billing Mode to Hourly Postpaid in This Example"
|
|
547
547
|
},
|
|
548
548
|
{
|
|
549
549
|
"document": "This example shows you how to switch the billing mode of an instance.",
|
|
550
|
-
"input": "POST / HTTP/1.1\nHost: cvm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyInstancesChargeType\n<Common request parameters>\n\n{\n \"InstanceChargeType\": \"PREPAID\",\n \"InstanceIds\": [\n \"ins-r8hr2upy\"\n ],\n \"InstanceChargePrepaid\": {\n \"Period\":
|
|
550
|
+
"input": "POST / HTTP/1.1\nHost: cvm.intl.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyInstancesChargeType\n<Common request parameters>\n\n{\n \"InstanceChargeType\": \"PREPAID\",\n \"InstanceIds\": [\n \"ins-r8hr2upy\"\n ],\n \"InstanceChargePrepaid\": {\n \"Period\": 1\n }\n}",
|
|
551
551
|
"output": "{\n \"Response\": {\n \"RequestId\": \"d39d6c09-44e9-4e80-8661-77b5ff3cbc15\"\n }\n}",
|
|
552
552
|
"title": "This Example Switches Instance Billing Mode to Prepaid Mode with a Duration of 1 Month"
|
|
553
553
|
}
|
|
@@ -580,7 +580,7 @@
|
|
|
580
580
|
{
|
|
581
581
|
"document": "This example shows you how to migrate the `ins-r8hr2upy` and `ins-5d8a23rs` instances to the `subnet-dcs9x3gz` subnet of the `vpc-1urkhbj4` VPC and specify 10.0.0.18 as the private IP of the `ins-r8hr2upy` instance and 10.0.0.19 as that of the `ins-5d8a23rs` instance.",
|
|
582
582
|
"input": "POST / HTTP/1.1\nHost: cvm.intl.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyInstancesVpcAttribute\n<Common request parameters>\n\n{\n \"VirtualPrivateCloud\": {\n \"SubnetId\": \"subnet-dcs9x3gz\",\n \"VpcId\": \"vpc-1urkhbj4\",\n \"PrivateIpAddresses\": [\n \"10.0.0.19\",\n \"10.0.0.18\"\n ]\n },\n \"InstanceIds\": [\n \"ins-5d8a23rs\",\n \"ins-r8hr2upy\"\n ]\n}",
|
|
583
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
|
583
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"c8825ac1-0d07-4f3c-a35e-599eb1acd6fc\"\n }\n}",
|
|
584
584
|
"title": "Migrating instances to a VPC and specifying the subnet and IP"
|
|
585
585
|
}
|
|
586
586
|
],
|
|
@@ -665,7 +665,7 @@
|
|
|
665
665
|
"ResetInstancesPassword": [
|
|
666
666
|
{
|
|
667
667
|
"document": "This example shows you how to reset the password of a Linux/Windows instance, and then use the new password to log in to the instance.",
|
|
668
|
-
"input": "POST / HTTP/1.1\nHost: cvm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ResetInstancesPassword\n<Common request parameters>\n\n{\n \"InstanceIds\": [\n \"ins-r8hr2upy\"
|
|
668
|
+
"input": "POST / HTTP/1.1\nHost: cvm.intl.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ResetInstancesPassword\n<Common request parameters>\n\n{\n \"InstanceIds\": [\n \"ins-r8hr2upy\"\n ],\n \"Password\": \"abc123ABC!@#\",\n \"ForceStop\": false\n}",
|
|
669
669
|
"output": "{\n \"Response\": {\n \"RequestId\": \"6ef60bec-0242-43af-bb20-270359fb54a7\"\n }\n}",
|
|
670
670
|
"title": "Resetting the password of a Linux/Windows instance"
|
|
671
671
|
}
|
|
@@ -681,41 +681,41 @@
|
|
|
681
681
|
"ResizeInstanceDisks": [
|
|
682
682
|
{
|
|
683
683
|
"document": " ",
|
|
684
|
-
"input": "POST / HTTP/1.1\nHost: cvm.intl.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ResizeInstanceDisks\n<Common request parameters>\n\n{\n \"InstanceId\": \"ins-
|
|
684
|
+
"input": "POST / HTTP/1.1\nHost: cvm.intl.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ResizeInstanceDisks\n<Common request parameters>\n\n{\n \"InstanceId\": \"ins-dyzp06q6\",\n \"SystemDisk\": {\n \"DiskSize\": 120,\n \"DiskId\": \"disk-7aj2pav4\"\n },\n \"ResizeOnline\": true\n}",
|
|
685
685
|
"output": "{\n \"Response\": {\n \"RequestId\": \"d39d6c09-44e9-4e80-8661-77b5ff3cbc15\"\n }\n}",
|
|
686
686
|
"title": "Resetting the disk size of a specific instance"
|
|
687
687
|
}
|
|
688
688
|
],
|
|
689
689
|
"RunInstances": [
|
|
690
|
-
{
|
|
691
|
-
"document": "This example shows you how to purchase 1 instance with the following configurations. Availability zone: Shanghai Zone 2; CDH: host-q88gab4i; billing mode: billed by CDH instance; image ID: img-pmqg1cw7; model: 1C1G; system disk: 50 GB premium cloud disk; data disk: 100 GB premium cloud disk; network type: VPC; public network billing: pay-as-you-go by traffic on an hourly basis; public network bandwidth cap: 10 Mbps; public IP address: randomly allocated; instance name: QCLOUD-TEST; login password: Qcloud@TestApi123++; Cloud Monitor: enabled; Cloud Security: enabled.",
|
|
692
|
-
"input": "POST / HTTP/1.1\nHost: cvm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: RunInstances\n<Common request parameters>\n\n{\n \"SystemDisk\": {\n \"DiskSize\": 50,\n \"DiskType\": \"CLOUD_PREMIUM\"\n },\n \"InstanceCount\": 1,\n \"Placement\": {\n \"HostIds\": [\n \"host-q88gab4i\"\n ],\n \"Zone\": \"ap-shanghai-2\"\n },\n \"LoginSettings\": {\n \"Password\": \"Qcloud@TestApi123++\"\n },\n \"ImageId\": \"img-pmqg1cw7\",\n \"InstanceChargeType\": \"CDHPAID\",\n \"EnhancedService\": {\n \"SecurityService\": {\n \"Enabled\": true\n },\n \"MonitorService\": {\n \"Enabled\": true\n }\n },\n \"InternetAccessible\": {\n \"PublicIpAssigned\": true,\n \"InternetChargeType\": \"TRAFFIC_POSTPAID_BY_HOUR\",\n \"InternetMaxBandwidthOut\": 10\n },\n \"InstanceName\": \"QCLOUD-TEST\",\n \"InstanceType\": \"CDH_1C1G\",\n \"DataDisks\": [\n {\n \"DiskSize\": 100,\n \"DiskType\": \"CLOUD_PREMIUM\"\n }\n ]\n}",
|
|
693
|
-
"output": "{\n \"Response\": {\n \"InstanceIdSet\": [\n \"ins-0s7wsh5x\"\n ],\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
|
|
694
|
-
"title": "Purchasing a CDH Instance"
|
|
695
|
-
},
|
|
696
690
|
{
|
|
697
691
|
"document": "This example shows you how to purchase 1 instance with the following configurations. Availability zone: Shanghai Zone 2; billing mode: monthly subscription for 1 month, with auto-renewal enabled; image ID: img-pmqg1cw7; model: 64C256G standard (S5.16XLARGE256); system disk: 50 GB premium cloud disk; data disk: 100 GB premium cloud disk; network type: VPC; public network billing: pay-as-you-go by traffic on an hourly basis; public network bandwidth cap: 10 Mbps; public IP address: randomly allocated; instance name: QCLOUD-TEST; login password: Qcloud@TestApi123++; Cloud Monitor: enabled; Cloud Security: enabled.",
|
|
698
|
-
"input": "POST / HTTP/1.1\nHost: cvm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: RunInstances\n<Common request parameters>\n\n{\n \"SystemDisk\": {\n \"DiskSize\": 50,\n \"DiskType\": \"CLOUD_PREMIUM\"\n },\n \"InstanceCount\": 1,\n \"Placement\": {\n \"Zone\": \"ap-shanghai-2\"\n },\n \"LoginSettings\": {\n \"Password\": \"Qcloud@TestApi123++\"\n },\n \"ImageId\": \"img-pmqg1cw7\",\n \"InstanceChargeType\": \"PREPAID\",\n \"EnhancedService\": {\n \"SecurityService\": {\n \"Enabled\": true\n },\n \"MonitorService\": {\n \"Enabled\": true\n }\n },\n \"InternetAccessible\": {\n \"PublicIpAssigned\": true,\n \"InternetChargeType\": \"TRAFFIC_POSTPAID_BY_HOUR\",\n \"InternetMaxBandwidthOut\": 10\n },\n \"InstanceChargePrepaid\": {\n \"RenewFlag\": \"NOTIFY_AND_AUTO_RENEW\",\n \"Period\": 1\n },\n \"InstanceName\": \"QCLOUD-TEST\",\n \"InstanceType\": \"S5.16XLARGE256\",\n \"DataDisks\": [\n {\n \"DiskSize\": 100,\n \"DiskType\": \"CLOUD_PREMIUM\"\n }\n ]\n}",
|
|
692
|
+
"input": "POST / HTTP/1.1\nHost: cvm.intl.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: RunInstances\n<Common request parameters>\n\n{\n \"SystemDisk\": {\n \"DiskSize\": 50,\n \"DiskType\": \"CLOUD_PREMIUM\"\n },\n \"InstanceCount\": 1,\n \"Placement\": {\n \"Zone\": \"ap-shanghai-2\"\n },\n \"LoginSettings\": {\n \"Password\": \"Qcloud@TestApi123++\"\n },\n \"ImageId\": \"img-pmqg1cw7\",\n \"InstanceChargeType\": \"PREPAID\",\n \"EnhancedService\": {\n \"SecurityService\": {\n \"Enabled\": true\n },\n \"MonitorService\": {\n \"Enabled\": true\n }\n },\n \"InternetAccessible\": {\n \"PublicIpAssigned\": true,\n \"InternetChargeType\": \"TRAFFIC_POSTPAID_BY_HOUR\",\n \"InternetMaxBandwidthOut\": 10\n },\n \"InstanceChargePrepaid\": {\n \"RenewFlag\": \"NOTIFY_AND_AUTO_RENEW\",\n \"Period\": 1\n },\n \"InstanceName\": \"QCLOUD-TEST\",\n \"InstanceType\": \"S5.16XLARGE256\",\n \"DataDisks\": [\n {\n \"DiskSize\": 100,\n \"DiskType\": \"CLOUD_PREMIUM\"\n }\n ]\n}",
|
|
699
693
|
"output": "{\n \"Response\": {\n \"InstanceIdSet\": [\n \"ins-bfw5zq3y\"\n ],\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
|
|
700
694
|
"title": "Purchasing a Monthly Subscription Instance"
|
|
701
695
|
},
|
|
702
696
|
{
|
|
703
|
-
"document": "This example shows you how to purchase
|
|
704
|
-
"input": "POST / HTTP/1.1\nHost: cvm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: RunInstances\n<Common request parameters>\n\n{\n \"Placement\": {\n \"Zone\": \"ap-shanghai-2\"\n },\n \"ImageId\": \"img-
|
|
705
|
-
"output": "{\n \"Response\": {\n \"InstanceIdSet\": [\n \"ins-
|
|
706
|
-
"title": "
|
|
697
|
+
"document": "This example shows you how to purchase 2 instances with the following configurations. Availability zone: Shanghai Zone 2; billing mode: pay-as-you-go on an hourly basis; image ID: img-dkwyg6sr; model: 64C256G standard (S5.16XLARGE256); system disk: 50 GB premium cloud disk; network type: VPC; VPC ID: 1urkhbj4; subnet ID: dcs9x3gz; private IP address: 10.0.0.18 and 10.0.0.19.",
|
|
698
|
+
"input": "POST / HTTP/1.1\nHost: cvm.intl.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: RunInstances\n<Common request parameters>\n\n{\n \"VirtualPrivateCloud\": {\n \"SubnetId\": \"subnet-dcs9x3gz\",\n \"VpcId\": \"vpc-1urkhbj4\",\n \"PrivateIpAddresses\": [\n \"10.0.0.19\",\n \"10.0.0.18\"\n ]\n },\n \"InstanceCount\": 2,\n \"Placement\": {\n \"Zone\": \"ap-shanghai-2\"\n },\n \"SystemDisk\": {\n \"DiskSize\": 50,\n \"DiskType\": \"CLOUD_PREMIUM\"\n },\n \"ImageId\": \"img-dkwyg6sr\",\n \"InstanceType\": \"S5.16XLARGE256\"\n}",
|
|
699
|
+
"output": "{\n \"Response\": {\n \"InstanceIdSet\": [\n \"ins-0s7wsh5x\",\n \"ins-03lw8hok\"\n ],\n \"RequestId\": \"c8825ac1-0d07-4f3c-a35e-599eb1acd6fc\"\n }\n}",
|
|
700
|
+
"title": "Creating an Instance with the Private IP Address Specified"
|
|
707
701
|
},
|
|
708
702
|
{
|
|
709
703
|
"document": "This example shows you how to purchase 1 instance with the following configurations. Availability zone: Shanghai Zone 2; billing mode: pay-as-you-go on an hourly basis; image ID: img-pmqg1cw7; model: 64C256G standard (S5.16XLARGE256); system disk: 50 GB premium cloud disk; data disk: 100 GB premium cloud disk; network type: VPC; public network billing: pay-as-you-go by traffic on an hourly basis; public network bandwidth cap: 10 Mbps; public IP address: randomly allocated; instance name: QCLOUD-TEST; login password: Qcloud@TestApi123++; Cloud Monitor: enabled; Cloud Security: enabled.",
|
|
710
|
-
"input": "POST / HTTP/1.1\nHost: cvm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: RunInstances\n<Common request parameters>\n\n{\n \"SystemDisk\": {\n \"DiskSize\": 50,\n \"DiskType\": \"CLOUD_PREMIUM\"\n },\n \"InstanceCount\": 1,\n \"Placement\": {\n \"Zone\": \"ap-shanghai-2\"\n },\n \"LoginSettings\": {\n \"Password\": \"Qcloud@TestApi123++\"\n },\n \"ImageId\": \"img-pmqg1cw7\",\n \"InstanceChargeType\": \"POSTPAID_BY_HOUR\",\n \"EnhancedService\": {\n \"SecurityService\": {\n \"Enabled\": true\n },\n \"MonitorService\": {\n \"Enabled\": true\n }\n },\n \"InternetAccessible\": {\n \"PublicIpAssigned\": true,\n \"InternetChargeType\": \"TRAFFIC_POSTPAID_BY_HOUR\",\n \"InternetMaxBandwidthOut\": 10\n },\n \"InstanceName\": \"QCLOUD-TEST\",\n \"InstanceType\": \"S5.16XLARGE256\",\n \"DataDisks\": [\n {\n \"DiskSize\": 100,\n \"DiskType\": \"CLOUD_PREMIUM\"\n }\n ]\n}",
|
|
704
|
+
"input": "POST / HTTP/1.1\nHost: cvm.intl.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: RunInstances\n<Common request parameters>\n\n{\n \"SystemDisk\": {\n \"DiskSize\": 50,\n \"DiskType\": \"CLOUD_PREMIUM\"\n },\n \"InstanceCount\": 1,\n \"Placement\": {\n \"Zone\": \"ap-shanghai-2\"\n },\n \"LoginSettings\": {\n \"Password\": \"Qcloud@TestApi123++\"\n },\n \"ImageId\": \"img-pmqg1cw7\",\n \"InstanceChargeType\": \"POSTPAID_BY_HOUR\",\n \"EnhancedService\": {\n \"SecurityService\": {\n \"Enabled\": true\n },\n \"MonitorService\": {\n \"Enabled\": true\n }\n },\n \"InternetAccessible\": {\n \"PublicIpAssigned\": true,\n \"InternetChargeType\": \"TRAFFIC_POSTPAID_BY_HOUR\",\n \"InternetMaxBandwidthOut\": 10\n },\n \"InstanceName\": \"QCLOUD-TEST\",\n \"InstanceType\": \"S5.16XLARGE256\",\n \"DataDisks\": [\n {\n \"DiskSize\": 100,\n \"DiskType\": \"CLOUD_PREMIUM\"\n }\n ]\n}",
|
|
711
705
|
"output": "{\n \"Response\": {\n \"InstanceIdSet\": [\n \"ins-32kcaqoa\"\n ],\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
|
|
712
706
|
"title": "Purchasing an Hourly-Billed Pay-as-You-Go Instance"
|
|
713
707
|
},
|
|
714
708
|
{
|
|
715
|
-
"document": "This example shows you how to purchase
|
|
716
|
-
"input": "POST / HTTP/1.1\nHost: cvm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: RunInstances\n<Common request parameters>\n\n{\n \"
|
|
717
|
-
"output": "{\n \"Response\": {\n \"InstanceIdSet\": [\n \"ins-
|
|
718
|
-
"title": "
|
|
709
|
+
"document": "This example shows you how to purchase an instance in Shanghai Zone 2 with the image ID `img-pmqg1cw7`. Only the required `Placement.Zone` and `ImageId` parameters are provided. The other parameters use system default values.",
|
|
710
|
+
"input": "POST / HTTP/1.1\nHost: cvm.intl.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: RunInstances\n<Common request parameters>\n\n{\n \"Placement\": {\n \"Zone\": \"ap-shanghai-2\"\n },\n \"ImageId\": \"img-pmqg1cw7\"\n}",
|
|
711
|
+
"output": "{\n \"Response\": {\n \"InstanceIdSet\": [\n \"ins-1vogaxgk\"\n ],\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
|
|
712
|
+
"title": "Purchasing an Instance with Only Required Parameters"
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
"document": "This example shows you how to purchase 1 instance with the following configurations. Availability zone: Shanghai Zone 2; CDH: host-q88gab4i; billing mode: billed by CDH instance; image ID: img-pmqg1cw7; model: 1C1G; system disk: 50 GB premium cloud disk; data disk: 100 GB premium cloud disk; network type: VPC; public network billing: pay-as-you-go by traffic on an hourly basis; public network bandwidth cap: 10 Mbps; public IP address: randomly allocated; instance name: QCLOUD-TEST; login password: Qcloud@TestApi123++; Cloud Monitor: enabled; Cloud Security: enabled.",
|
|
716
|
+
"input": "POST / HTTP/1.1\nHost: cvm.intl.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: RunInstances\n<Common request parameters>\n\n{\n \"SystemDisk\": {\n \"DiskSize\": 50,\n \"DiskType\": \"CLOUD_PREMIUM\"\n },\n \"InstanceCount\": 1,\n \"Placement\": {\n \"HostIds\": [\n \"host-q88gab4i\"\n ],\n \"Zone\": \"ap-shanghai-2\"\n },\n \"LoginSettings\": {\n \"Password\": \"Qcloud@TestApi123++\"\n },\n \"ImageId\": \"img-pmqg1cw7\",\n \"InstanceChargeType\": \"CDHPAID\",\n \"EnhancedService\": {\n \"SecurityService\": {\n \"Enabled\": true\n },\n \"MonitorService\": {\n \"Enabled\": true\n }\n },\n \"InternetAccessible\": {\n \"PublicIpAssigned\": true,\n \"InternetChargeType\": \"TRAFFIC_POSTPAID_BY_HOUR\",\n \"InternetMaxBandwidthOut\": 10\n },\n \"InstanceName\": \"QCLOUD-TEST\",\n \"InstanceType\": \"CDH_1C1G\",\n \"DataDisks\": [\n {\n \"DiskSize\": 100,\n \"DiskType\": \"CLOUD_PREMIUM\"\n }\n ]\n}",
|
|
717
|
+
"output": "{\n \"Response\": {\n \"InstanceIdSet\": [\n \"ins-0s7wsh5x\"\n ],\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
|
|
718
|
+
"title": "Purchasing a CDH Instance"
|
|
719
719
|
}
|
|
720
720
|
],
|
|
721
721
|
"StartInstances": [
|
|
@@ -470,7 +470,7 @@
|
|
|
470
470
|
},
|
|
471
471
|
{
|
|
472
472
|
"disabled": false,
|
|
473
|
-
"document": "
|
|
473
|
+
"document": "BASIC: Basic Version (default).",
|
|
474
474
|
"example": "ENHANCED",
|
|
475
475
|
"member": "string",
|
|
476
476
|
"name": "SdkVersion",
|
|
@@ -2251,7 +2251,7 @@
|
|
|
2251
2251
|
},
|
|
2252
2252
|
{
|
|
2253
2253
|
"disabled": false,
|
|
2254
|
-
"document": "
|
|
2254
|
+
"document": "BASIC: Basic Version (Default).",
|
|
2255
2255
|
"example": "BASIC",
|
|
2256
2256
|
"member": "string",
|
|
2257
2257
|
"name": "SdkVersion",
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
import os
|
|
3
|
+
import sys
|
|
4
|
+
import six
|
|
5
|
+
import json
|
|
6
|
+
import tccli.options_define as OptionsDefine
|
|
7
|
+
import tccli.format_output as FormatOutput
|
|
8
|
+
from tccli import __version__
|
|
9
|
+
from tccli.utils import Utils
|
|
10
|
+
from tccli.exceptions import ConfigurationError, ClientError, ParamError
|
|
11
|
+
from tencentcloud.common import credential
|
|
12
|
+
from tencentcloud.common.profile.http_profile import HttpProfile
|
|
13
|
+
from tencentcloud.common.profile.client_profile import ClientProfile
|
|
14
|
+
from tencentcloud.hunyuan.v20230901 import hunyuan_client as hunyuan_client_v20230901
|
|
15
|
+
from tencentcloud.hunyuan.v20230901 import models as models_v20230901
|
|
16
|
+
|
|
17
|
+
from jmespath import search
|
|
18
|
+
import time
|
|
19
|
+
|
|
20
|
+
def doSubmitHunyuanTo3DProJob(args, parsed_globals):
|
|
21
|
+
g_param = parse_global_arg(parsed_globals)
|
|
22
|
+
|
|
23
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
24
|
+
cred = credential.CVMRoleCredential()
|
|
25
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
26
|
+
cred = credential.STSAssumeRoleCredential(
|
|
27
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
28
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
29
|
+
)
|
|
30
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
31
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
32
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
33
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
34
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
35
|
+
else:
|
|
36
|
+
cred = credential.Credential(
|
|
37
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
38
|
+
)
|
|
39
|
+
http_profile = HttpProfile(
|
|
40
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
41
|
+
reqMethod="POST",
|
|
42
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
43
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
44
|
+
)
|
|
45
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
46
|
+
if g_param[OptionsDefine.Language]:
|
|
47
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
48
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
49
|
+
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
|
50
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
51
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
52
|
+
model = models.SubmitHunyuanTo3DProJobRequest()
|
|
53
|
+
model.from_json_string(json.dumps(args))
|
|
54
|
+
start_time = time.time()
|
|
55
|
+
while True:
|
|
56
|
+
rsp = client.SubmitHunyuanTo3DProJob(model)
|
|
57
|
+
result = rsp.to_json_string()
|
|
58
|
+
try:
|
|
59
|
+
json_obj = json.loads(result)
|
|
60
|
+
except TypeError as e:
|
|
61
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
62
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
63
|
+
break
|
|
64
|
+
cur_time = time.time()
|
|
65
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
66
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
67
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
68
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
69
|
+
else:
|
|
70
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
71
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
72
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def doQueryHunyuanTo3DProJob(args, parsed_globals):
|
|
76
|
+
g_param = parse_global_arg(parsed_globals)
|
|
77
|
+
|
|
78
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
79
|
+
cred = credential.CVMRoleCredential()
|
|
80
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
81
|
+
cred = credential.STSAssumeRoleCredential(
|
|
82
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
83
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
84
|
+
)
|
|
85
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
86
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
87
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
88
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
89
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
90
|
+
else:
|
|
91
|
+
cred = credential.Credential(
|
|
92
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
93
|
+
)
|
|
94
|
+
http_profile = HttpProfile(
|
|
95
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
96
|
+
reqMethod="POST",
|
|
97
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
98
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
99
|
+
)
|
|
100
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
101
|
+
if g_param[OptionsDefine.Language]:
|
|
102
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
103
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
104
|
+
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
|
105
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
106
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
107
|
+
model = models.QueryHunyuanTo3DProJobRequest()
|
|
108
|
+
model.from_json_string(json.dumps(args))
|
|
109
|
+
start_time = time.time()
|
|
110
|
+
while True:
|
|
111
|
+
rsp = client.QueryHunyuanTo3DProJob(model)
|
|
112
|
+
result = rsp.to_json_string()
|
|
113
|
+
try:
|
|
114
|
+
json_obj = json.loads(result)
|
|
115
|
+
except TypeError as e:
|
|
116
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
117
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
118
|
+
break
|
|
119
|
+
cur_time = time.time()
|
|
120
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
121
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
122
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
123
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
124
|
+
else:
|
|
125
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
126
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
127
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
CLIENT_MAP = {
|
|
131
|
+
"v20230901": hunyuan_client_v20230901,
|
|
132
|
+
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
MODELS_MAP = {
|
|
136
|
+
"v20230901": models_v20230901,
|
|
137
|
+
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
ACTION_MAP = {
|
|
141
|
+
"SubmitHunyuanTo3DProJob": doSubmitHunyuanTo3DProJob,
|
|
142
|
+
"QueryHunyuanTo3DProJob": doQueryHunyuanTo3DProJob,
|
|
143
|
+
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
AVAILABLE_VERSION_LIST = [
|
|
147
|
+
"v20230901",
|
|
148
|
+
|
|
149
|
+
]
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
def action_caller():
|
|
153
|
+
return ACTION_MAP
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def parse_global_arg(parsed_globals):
|
|
157
|
+
g_param = parsed_globals
|
|
158
|
+
cvm_role_flag = True
|
|
159
|
+
for param in parsed_globals.keys():
|
|
160
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
|
161
|
+
OptionsDefine.RoleSessionName]:
|
|
162
|
+
if parsed_globals[param] is not None:
|
|
163
|
+
cvm_role_flag = False
|
|
164
|
+
break
|
|
165
|
+
is_exist_profile = True
|
|
166
|
+
if not parsed_globals["profile"]:
|
|
167
|
+
is_exist_profile = False
|
|
168
|
+
g_param["profile"] = os.environ.get("TCCLI_PROFILE", "default")
|
|
169
|
+
|
|
170
|
+
configure_path = os.path.join(os.path.expanduser("~"), ".tccli")
|
|
171
|
+
is_conf_exist, conf_path = Utils.file_existed(configure_path, g_param["profile"] + ".configure")
|
|
172
|
+
is_cred_exist, cred_path = Utils.file_existed(configure_path, g_param["profile"] + ".credential")
|
|
173
|
+
|
|
174
|
+
conf = {}
|
|
175
|
+
cred = {}
|
|
176
|
+
|
|
177
|
+
if is_conf_exist:
|
|
178
|
+
conf = Utils.load_json_msg(conf_path)
|
|
179
|
+
if is_cred_exist:
|
|
180
|
+
cred = Utils.load_json_msg(cred_path)
|
|
181
|
+
|
|
182
|
+
if not (isinstance(conf, dict) and isinstance(cred, dict)):
|
|
183
|
+
raise ConfigurationError(
|
|
184
|
+
"file: %s or %s is not json format"
|
|
185
|
+
% (g_param["profile"] + ".configure", g_param["profile"] + ".credential"))
|
|
186
|
+
|
|
187
|
+
if OptionsDefine.Token not in cred:
|
|
188
|
+
cred[OptionsDefine.Token] = None
|
|
189
|
+
|
|
190
|
+
if not is_exist_profile:
|
|
191
|
+
if os.environ.get(OptionsDefine.ENV_SECRET_ID) and os.environ.get(OptionsDefine.ENV_SECRET_KEY):
|
|
192
|
+
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
|
193
|
+
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
|
194
|
+
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
|
195
|
+
cvm_role_flag = False
|
|
196
|
+
|
|
197
|
+
if os.environ.get(OptionsDefine.ENV_REGION):
|
|
198
|
+
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
|
199
|
+
|
|
200
|
+
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
|
201
|
+
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
|
202
|
+
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
|
203
|
+
cvm_role_flag = False
|
|
204
|
+
|
|
205
|
+
if cvm_role_flag:
|
|
206
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
|
207
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
|
208
|
+
|
|
209
|
+
for param in g_param.keys():
|
|
210
|
+
if g_param[param] is None:
|
|
211
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.Token]:
|
|
212
|
+
if param in cred:
|
|
213
|
+
g_param[param] = cred[param]
|
|
214
|
+
elif not (g_param[OptionsDefine.UseCVMRole.replace('-', '_')]
|
|
215
|
+
or os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN)):
|
|
216
|
+
raise ConfigurationError("%s is invalid" % param)
|
|
217
|
+
elif param in [OptionsDefine.Region, OptionsDefine.Output, OptionsDefine.Language]:
|
|
218
|
+
if param in conf[OptionsDefine.SysParam]:
|
|
219
|
+
g_param[param] = conf[OptionsDefine.SysParam][param]
|
|
220
|
+
elif param != OptionsDefine.Language:
|
|
221
|
+
raise ConfigurationError("%s is invalid" % param)
|
|
222
|
+
elif param.replace('_', '-') in [OptionsDefine.RoleArn, OptionsDefine.RoleSessionName]:
|
|
223
|
+
if param.replace('_', '-') in cred:
|
|
224
|
+
g_param[param] = cred[param.replace('_', '-')]
|
|
225
|
+
|
|
226
|
+
try:
|
|
227
|
+
if g_param[OptionsDefine.ServiceVersion]:
|
|
228
|
+
g_param[OptionsDefine.Version] = "v" + g_param[OptionsDefine.ServiceVersion].replace('-', '')
|
|
229
|
+
else:
|
|
230
|
+
version = conf["hunyuan"][OptionsDefine.Version]
|
|
231
|
+
g_param[OptionsDefine.Version] = "v" + version.replace('-', '')
|
|
232
|
+
|
|
233
|
+
if g_param[OptionsDefine.Endpoint] is None:
|
|
234
|
+
g_param[OptionsDefine.Endpoint] = conf["hunyuan"][OptionsDefine.Endpoint]
|
|
235
|
+
g_param["sts_cred_endpoint"] = conf.get("sts", {}).get("endpoint")
|
|
236
|
+
except Exception as err:
|
|
237
|
+
raise ConfigurationError("config file:%s error, %s" % (conf_path, str(err)))
|
|
238
|
+
|
|
239
|
+
if g_param[OptionsDefine.Version] not in AVAILABLE_VERSION_LIST:
|
|
240
|
+
raise Exception("available versions: %s" % " ".join(AVAILABLE_VERSION_LIST))
|
|
241
|
+
|
|
242
|
+
if g_param[OptionsDefine.Waiter]:
|
|
243
|
+
param = eval(g_param[OptionsDefine.Waiter])
|
|
244
|
+
if 'expr' not in param:
|
|
245
|
+
raise Exception('`expr` in `--waiter` must be defined')
|
|
246
|
+
if 'to' not in param:
|
|
247
|
+
raise Exception('`to` in `--waiter` must be defined')
|
|
248
|
+
if 'timeout' not in param:
|
|
249
|
+
if 'waiter' in conf and 'timeout' in conf['waiter']:
|
|
250
|
+
param['timeout'] = conf['waiter']['timeout']
|
|
251
|
+
else:
|
|
252
|
+
param['timeout'] = 180
|
|
253
|
+
if 'interval' not in param:
|
|
254
|
+
if 'waiter' in conf and 'interval' in conf['waiter']:
|
|
255
|
+
param['interval'] = conf['waiter']['interval']
|
|
256
|
+
else:
|
|
257
|
+
param['interval'] = 5
|
|
258
|
+
param['interval'] = min(param['interval'], param['timeout'])
|
|
259
|
+
g_param['OptionsDefine.WaiterInfo'] = param
|
|
260
|
+
|
|
261
|
+
if six.PY2:
|
|
262
|
+
for key, value in g_param.items():
|
|
263
|
+
if isinstance(value, six.text_type):
|
|
264
|
+
g_param[key] = value.encode('utf-8')
|
|
265
|
+
return g_param
|
|
266
|
+
|