tccli 3.0.1230.1__py2.py3-none-any.whl → 3.0.1232.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/services/aiart/aiart_client.py +53 -0
- tccli/services/aiart/v20221229/api.json +98 -0
- tccli/services/aiart/v20221229/examples.json +8 -0
- tccli/services/batch/v20170312/api.json +8 -10
- tccli/services/cam/cam_client.py +53 -0
- tccli/services/cam/v20190116/api.json +125 -52
- tccli/services/cam/v20190116/examples.json +12 -4
- tccli/services/cfg/v20210820/api.json +9 -0
- tccli/services/cloudaudit/v20190319/api.json +39 -39
- tccli/services/cloudaudit/v20190319/examples.json +5 -5
- tccli/services/cvm/v20170312/api.json +59 -61
- tccli/services/cvm/v20170312/examples.json +3 -3
- tccli/services/es/v20180416/api.json +106 -8
- tccli/services/ess/v20201111/api.json +1 -1
- tccli/services/essbasic/v20210526/api.json +2 -2
- tccli/services/live/v20180801/api.json +7 -7
- tccli/services/live/v20180801/examples.json +1 -1
- tccli/services/memcached/v20190318/api.json +20 -20
- tccli/services/mps/v20190612/api.json +11 -0
- tccli/services/mqtt/mqtt_client.py +283 -71
- tccli/services/mqtt/v20240516/api.json +312 -0
- tccli/services/mqtt/v20240516/examples.json +32 -0
- tccli/services/mrs/v20200910/api.json +3 -3
- tccli/services/mrs/v20200910/examples.json +1 -1
- tccli/services/ocr/v20181119/api.json +147 -4
- tccli/services/ocr/v20181119/examples.json +3 -3
- tccli/services/postgres/v20170312/api.json +11 -9
- tccli/services/postgres/v20170312/examples.json +2 -2
- tccli/services/redis/v20180412/examples.json +2 -2
- tccli/services/ssl/v20191205/api.json +4 -4
- tccli/services/ssl/v20191205/examples.json +1 -1
- tccli/services/sts/v20180813/api.json +9 -9
- tccli/services/tcbr/v20220217/api.json +84 -88
- tccli/services/tcbr/v20220217/examples.json +14 -14
- tccli/services/tdmq/v20200217/api.json +10 -0
- tccli/services/tione/tione_client.py +166 -113
- tccli/services/tione/v20211111/api.json +939 -361
- tccli/services/tione/v20211111/examples.json +30 -22
- tccli/services/tse/tse_client.py +228 -16
- tccli/services/tse/v20201207/api.json +476 -0
- tccli/services/tse/v20201207/examples.json +32 -0
- tccli/services/vclm/v20240523/api.json +1 -1
- tccli/services/vdb/v20230616/api.json +3 -3
- tccli/services/vdb/v20230616/examples.json +1 -1
- tccli/services/vod/v20180717/api.json +6 -6
- tccli/services/vpc/v20170312/api.json +17 -7
- tccli/services/vpc/v20170312/examples.json +1 -1
- {tccli-3.0.1230.1.dist-info → tccli-3.0.1232.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1230.1.dist-info → tccli-3.0.1232.1.dist-info}/RECORD +53 -53
- {tccli-3.0.1230.1.dist-info → tccli-3.0.1232.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1230.1.dist-info → tccli-3.0.1232.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1230.1.dist-info → tccli-3.0.1232.1.dist-info}/license_files/LICENSE +0 -0
@@ -3,8 +3,8 @@
|
|
3
3
|
"ChatCompletion": [
|
4
4
|
{
|
5
5
|
"document": "与大模型聊天",
|
6
|
-
"input": "POST / HTTP/1.1\nHost: tione.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: Chat\n<公共请求参数>\n\n{\n \"Model\": \"
|
7
|
-
"output": "{\n \"Response\": {\n \"
|
6
|
+
"input": "POST / HTTP/1.1\nHost: tione.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: Chat\n<公共请求参数>\n\n{\n \"Model\": \"ms-zqs2zsgd\",\n \"Messages\": [\n {\n \"Role\": \"user\",\n \"Content\": \"你好\"\n },\n {\n \"Role\": \"assistant\",\n \"Content\": \"你好!我可以帮助你回答问题或提供信息。你想问什么?\"\n },\n {\n \"Role\": \"user\",\n \"Content\": \"你是谁\"\n }\n ]\n}",
|
7
|
+
"output": "{\n \"Response\": {\n \"Choices\": [\n {\n \"Message\": {\n \"Role\": \"assistant\",\n \"Content\": \"我是一个人工智能模型,能够理解和回复语言。我的目的在于提供信息、回答问题和聊天。\"\n },\n \"FinishReason\": \"stop\",\n \"Index\": 0\n }\n ],\n \"Model\": \"ms-zqs2zsgd\",\n \"Id\": \"e847bcd7-bff2-4cb2-a01e-92ae0aebe560\",\n \"Usage\": {\n \"CompletionTokens\": 29,\n \"PromptTokens\": 67,\n \"TotalTokens\": 96\n },\n \"RequestId\": \"e847bcd7-bff2-4cb2-a01e-92ae0aebe560\"\n }\n}",
|
8
8
|
"title": "与大模型聊天"
|
9
9
|
}
|
10
10
|
],
|
@@ -27,8 +27,8 @@
|
|
27
27
|
"CreateNotebook": [
|
28
28
|
{
|
29
29
|
"document": "创建Notebook",
|
30
|
-
"input": "POST / HTTP/1.1\nHost: tione.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateNotebook\n<公共请求参数>\n\n{\n \"Name\": \"
|
31
|
-
"output": "{\n \"Response\": {\n \"Id\": \"
|
30
|
+
"input": "POST / HTTP/1.1\nHost: tione.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateNotebook\n<公共请求参数>\n\n{\n \"Name\": \"notebook-test\",\n \"ChargeType\": \"POSTPAID_BY_HOUR\",\n \"ResourceConf\": {\n \"Cpu\": 2000,\n \"Memory\": 4096,\n \"Gpu\": 1,\n \"GpuType\": \"V100\",\n \"InstanceType\": \"TI.GN10.2XLARGE40.POST\"\n },\n \"ResourceGroupId\": \"trsg-dwpqnjmk\",\n \"VpcId\": \"vpc-4kq8vlym\",\n \"SubnetId\": \"subnet-58zkmdob\",\n \"VolumeSourceType\": \"CFS\",\n \"VolumeSizeInGB\": 1,\n \"VolumeSourceCFS\": {\n \"Id\": \"cfs-9su5kqtv\",\n \"Path\": \"/\"\n },\n \"LogEnable\": true,\n \"LogConfig\": {\n \"LogsetId\": \"4dd0a097-f629-4afc-9b99-888ef99a178f\",\n \"TopicId\": \"ea8048db-8f97-4abb-9668-f3532b9b61f8\"\n },\n \"RootAccess\": true,\n \"LifecycleScriptId\": \"ls-1007228485705742720\",\n \"DefaultCodeRepoId\": \"cr-1000669213287070080\",\n \"AdditionalCodeRepoIds\": [\n \"cr-1000669213287070081\"\n ],\n \"AutoStopping\": true,\n \"AutomaticStopTime\": 1,\n \"Tags\": [\n {\n \"TagKey\": \"test-key\",\n \"TagValue\": \"test-value\"\n }\n ],\n \"DirectInternetAccess\": true,\n \"DataConfigs\": [\n {\n \"MappingPath\": \"/home/tione/notebook\",\n \"DataSourceType\": \"CLOUD_PREMIUM\",\n \"CBSSource\": {\n \"VolumeSizeInGB\": 50\n }\n }\n ],\n \"ImageInfo\": {\n \"ImageType\": \"SYSTEM\",\n \"ImageUrl\": \"tione.tencentcloudcr.com/qcloud-ti-platform/llm-train:24.03-gpu-py310-cu124-tilearn-llm-v1.8.0\",\n \"ImageName\": \"tilearn-llm0.9-torch2.3-py3.10-cuda12.4-gpu\"\n },\n \"ImageType\": \"SYSTEM\"\n}",
|
31
|
+
"output": "{\n \"Response\": {\n \"Id\": \"nb-1188508294472113920\",\n \"RequestId\": \"ecc8d2f6-9772-40df-856f-f6e48c6a7008\"\n }\n}",
|
32
32
|
"title": "创建Notebook"
|
33
33
|
}
|
34
34
|
],
|
@@ -75,8 +75,8 @@
|
|
75
75
|
"DeleteNotebook": [
|
76
76
|
{
|
77
77
|
"document": "",
|
78
|
-
"input": "POST / HTTP/1.1\nHost: tione.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteNotebook\n<公共请求参数>\n\n{\n \"Id\": \"
|
79
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
78
|
+
"input": "POST / HTTP/1.1\nHost: tione.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteNotebook\n<公共请求参数>\n\n{\n \"Id\": \"nb-1188415493581985152\"\n}",
|
79
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"f7df11d5-58c2-4767-956d-aa7158aab668\"\n }\n}",
|
80
80
|
"title": "删除Notebook"
|
81
81
|
}
|
82
82
|
],
|
@@ -120,6 +120,22 @@
|
|
120
120
|
"title": "查询资源组节点运行中的任务"
|
121
121
|
}
|
122
122
|
],
|
123
|
+
"DescribeBillingSpecs": [
|
124
|
+
{
|
125
|
+
"document": "查询计费项列表",
|
126
|
+
"input": "POST / HTTP/1.1\nHost: tione.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeBillingSpecs\n<公共请求参数>\n\n{\n \"ChargeType\": \"PREPAID\",\n \"TaskType\": \"TRAIN\"\n}",
|
127
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"9f91ba5c-03bb-4c02-b9cc-d2740821112f\",\n \"Specs\": [\n {\n \"SpecName\": \"TI.GN10.2XLARGE40.POST\",\n \"SpecAlias\": \"8核40GB V100*1\",\n \"SpecId\": \"sv_tio_platform_cloud_post_gpu_8c40g_1v100\",\n \"Available\": false,\n \"AvailableRegion\": [\n \"ap-guangzhou\",\n \"ap-beijing\"\n ]\n }\n ]\n }\n}",
|
128
|
+
"title": "查询计费项列表 示例"
|
129
|
+
}
|
130
|
+
],
|
131
|
+
"DescribeBillingSpecsPrice": [
|
132
|
+
{
|
133
|
+
"document": "查询计费项价格",
|
134
|
+
"input": "https://tione.tencentcloudapi.com/?Action=DescribeBillingSpecsPrice\n&SpecsParam.0.SpecName=TI.S.MEDIUM.POST\n&SpecsParam.0.SpecCount=1\n&<公共请求参数>",
|
135
|
+
"output": "{\n \"Response\": {\n \"SpecsPrice\": [\n {\n \"SpecName\": \"TI.S.MEDIUM.POST\",\n \"SpecCount\": 1,\n \"TotalCost\": 70,\n \"RealTotalCost\": 70\n }\n ],\n \"RequestId\": \"b7d048fe-e335-8b6e-a8d2-d68esk\"\n }\n}",
|
136
|
+
"title": "查询计费项价格 示例"
|
137
|
+
}
|
138
|
+
],
|
123
139
|
"DescribeBuildInImages": [
|
124
140
|
{
|
125
141
|
"document": "",
|
@@ -132,7 +148,7 @@
|
|
132
148
|
{
|
133
149
|
"document": "",
|
134
150
|
"input": "POST / HTTP/1.1\nHost: tione.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeDatasets\n<公共请求参数>\n\n{\n \"DatasetIds\": [\n \"ds-c4lbz9gg\"\n ]\n}",
|
135
|
-
"output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"DatasetIdNums\": 1,\n \"DatasetGroups\": [\n {\n \"DatasetId\": \"ds-c4lbz9gg\",\n \"DatasetName\": \"test\",\n \"Creator\": \"100007955047\",\n \"DatasetVersion\": \"v1\",\n \"DatasetType\": \"TYPE_DATASET_TEXT\",\n \"DatasetTags\": [],\n \"DatasetAnnotationTaskName\": \"\",\n \"DatasetAnnotationTaskId\": \"\",\n \"Process\": 100,\n \"DatasetStatus\": \"STATUS_DATASET_SUCCESS\",\n \"ErrorMsg\": \"\",\n \"CreateTime\": \"2022-01-15 15:01:57\",\n \"UpdateTime\": \"2022-01-15 15:01:57\",\n \"ExternalTaskType\": \"\",\n \"DatasetSize\": \"11.06 M\",\n \"FileNum\": 4,\n \"StorageDataPath\": {\n \"Bucket\": \"test-gz-1256580188\",\n \"Region\": \"ap-guangzhou\",\n \"Paths\": [\n \"train-dataset/\"\n ]\n },\n \"StorageLabelPath\": {\n \"Bucket\": \"test-gz-1256580188\",\n \"Region\": \"ap-guangzhou\",\n \"Paths\": [\n \"train-output/\"\n ]\n },\n \"AnnotationStatus\": \"STATUS_NON_ANNOTATED\",\n \"AnnotationType\": \"\",\n \"AnnotationFormat\": \"\",\n \"DatasetVersions\": []\n }\n ],\n \"RequestId\": \"f015eab9-1feb-4b1d-8ea0-85fff5b4ddc7\"\n }\n}",
|
151
|
+
"output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"DatasetIdNums\": 1,\n \"DatasetGroups\": [\n {\n \"DatasetId\": \"ds-c4lbz9gg\",\n \"DatasetName\": \"test\",\n \"Creator\": \"100007955047\",\n \"DatasetVersion\": \"v1\",\n \"DatasetType\": \"TYPE_DATASET_TEXT\",\n \"DatasetScope\": \"SCOPE_DATASET_PRIVATE\",\n \"DatasetTags\": [],\n \"DatasetAnnotationTaskName\": \"\",\n \"DatasetAnnotationTaskId\": \"\",\n \"Process\": 100,\n \"DatasetStatus\": \"STATUS_DATASET_SUCCESS\",\n \"ErrorMsg\": \"\",\n \"CreateTime\": \"2022-01-15 15:01:57\",\n \"UpdateTime\": \"2022-01-15 15:01:57\",\n \"ExternalTaskType\": \"\",\n \"DatasetSize\": \"11.06 M\",\n \"FileNum\": 4,\n \"StorageDataPath\": {\n \"Bucket\": \"test-gz-1256580188\",\n \"Region\": \"ap-guangzhou\",\n \"Paths\": [\n \"train-dataset/\"\n ]\n },\n \"StorageLabelPath\": {\n \"Bucket\": \"test-gz-1256580188\",\n \"Region\": \"ap-guangzhou\",\n \"Paths\": [\n \"train-output/\"\n ]\n },\n \"AnnotationStatus\": \"STATUS_NON_ANNOTATED\",\n \"AnnotationKeyStatus\": \"STATUS_SUCCESS\",\n \"AnnotationType\": \"\",\n \"AnnotationFormat\": \"\",\n \"DatasetVersions\": []\n }\n ],\n \"RequestId\": \"f015eab9-1feb-4b1d-8ea0-85fff5b4ddc7\"\n }\n}",
|
136
152
|
"title": "查询数据集列表"
|
137
153
|
}
|
138
154
|
],
|
@@ -203,8 +219,8 @@
|
|
203
219
|
"DescribeNotebook": [
|
204
220
|
{
|
205
221
|
"document": "",
|
206
|
-
"input": "POST / HTTP/1.1\nHost: tione.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeNotebook\n<公共请求参数>\n\n{\n \"Id\": \"
|
207
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
222
|
+
"input": "POST / HTTP/1.1\nHost: tione.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeNotebook\n<公共请求参数>\n\n{\n \"Id\": \"nb-1188508294472113920\"\n}",
|
223
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"ecc8d2f6-9772-40df-856f-f6e48c6a7008\",\n \"NotebookDetail\": {\n \"ChargeType\": \"POSTPAID_BY_HOUR\",\n \"AutomaticStopTime\": 0,\n \"EndTime\": \"2024-11-14T17:22:16+08\",\n \"ChargeStatus\": \"BILLING\",\n \"Status\": \"Stopped\",\n \"UpdateTime\": \"2024-11-14T17:17:51+08\",\n \"DataSource\": \"CFS\",\n \"Message\": \"test\",\n \"VolumeSourceCFS\": {\n \"Id\": \"cfs-9su5kqtv\",\n \"Path\": \"/\",\n \"Protocol\": \"NFS\",\n \"MountType\": \"STORAGE\"\n },\n \"VolumeSourceType\": \"CFS\",\n \"ImageInfo\": {\n \"ImageType\": \"SYSTEM\",\n \"ImageUrl\": \"tione.tencentcloudcr.com/qcloud-ti-platform/llm-train:24.03-gpu-py310-cu124-tilearn-llm-v1.8.0\",\n \"ImageName\": \"tilearn-llm0.9-torch2.3-py3.10-cuda12.4-gpu\",\n \"RegistryId\": \"\",\n \"RegistryRegion\": \"\"\n },\n \"ImageType\": \"SYSTEM\",\n \"DataConfigs\": [\n {\n \"MappingPath\": \"/home/tione/notebook\",\n \"DataSourceType\": \"CFS\",\n \"DataSourceUsage\": \"test\",\n \"HDFSSource\": {\n \"Id\": \"hd-sds\",\n \"Path\": \"/date\"\n },\n \"CFSTurboSource\": {\n \"Id\": \"cfs-14csdso5\",\n \"Path\": \"/\"\n },\n \"CFSSource\": {\n \"Id\": \"cfs-14cpoxo5\",\n \"Protocol\": \"NFS\",\n \"MountType\": \"STORAGE\",\n \"Path\": \"/\"\n },\n \"COSSource\": {\n \"Bucket\": \"harry-1318247806\",\n \"Region\": \"ap-shanghai\",\n \"Paths\": [\n \"/test\"\n ]\n },\n \"GooseFSSource\": {\n \"Id\": \"\",\n \"Type\": \"\",\n \"Path\": \"\",\n \"NameSpace\": \"\"\n },\n \"LocalDiskSource\": {\n \"InstanceId\": \"\"\n },\n \"CBSSource\": {\n \"VolumeSizeInGB\": 0\n },\n \"DataSetSource\": {\n \"Id\": \"\"\n }\n }\n ],\n \"VpcId\": \"vpc-hb7u9q6e\",\n \"Tags\": [\n {\n \"TagKey\": \"test-key\",\n \"TagValue\": \"test-value\"\n }\n ],\n \"Id\": \"nb-1188508294472113920\",\n \"ResourceGroupId\": \"trsg-dwpqnjmk\",\n \"SubnetId\": \"subnet-58zkmdob\",\n \"LifecycleScriptId\": \"ls-1007228485705742720\",\n \"RootAccess\": true,\n \"Name\": \"notebook-test\",\n \"DefaultCodeRepoId\": \"cr-1000669213287070080\",\n \"ResourceConf\": {\n \"Gpu\": 1,\n \"Cpu\": 2018,\n \"GpuType\": \"V100\",\n \"InstanceType\": \"TI.S.MEDIUM.POST\",\n \"Memory\": 4000\n },\n \"AutoStopping\": true,\n \"ResourceGroupName\": \"resource-test\",\n \"LogEnable\": true,\n \"BillingInfos\": [\n \"info\"\n ],\n \"InstanceTypeAlias\": \"2C4G\",\n \"AdditionalCodeRepoIds\": [\n \"cr-1000669213287070080\"\n ],\n \"DirectInternetAccess\": true,\n \"CreateTime\": \"2024-11-11T10:50:44+08\",\n \"RuntimeInSeconds\": 100,\n \"VolumeSizeInGB\": 100,\n \"StartTime\": \"2024-11-14T19:50:10+08\",\n \"PodName\": \"nb-1188501796310898048-912gqy8i0xvk\",\n \"FailureReason\": \"no-msg\",\n \"LogConfig\": {\n \"TopicId\": \"ea8048db-8f97-4abb-9668-f3532b9b61f8\",\n \"LogsetId\": \"4dd0a097-f629-4afc-9b99-888ef99a178f\"\n }\n }\n }\n}",
|
208
224
|
"title": "Notebook详情"
|
209
225
|
}
|
210
226
|
],
|
@@ -212,7 +228,7 @@
|
|
212
228
|
{
|
213
229
|
"document": "Notebook列表",
|
214
230
|
"input": "POST / HTTP/1.1\nHost: tione.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeNotebooks\n<公共请求参数>\n\n{\n \"OrderField\": \"string\",\n \"TagFilters\": [\n {\n \"TagValues\": [\n \"string\"\n ],\n \"TagKey\": \"string\"\n }\n ],\n \"Limit\": 0,\n \"Filters\": [\n {\n \"Fuzzy\": true,\n \"Values\": [\n \"string\"\n ],\n \"Name\": \"string\",\n \"Negative\": true\n }\n ],\n \"Offset\": 0,\n \"Order\": \"string\"\n}",
|
215
|
-
"output": "{\n \"Response\": {\n \"NotebookSet\": [\n {\n \"Id\": \"
|
231
|
+
"output": "{\n \"Response\": {\n \"NotebookSet\": [\n {\n \"Id\": \"nb-1188508294472113920\",\n \"Name\": \"notebook-test\",\n \"ChargeType\": \"POSTPAID_BY_HOUR\",\n \"ResourceConf\": {\n \"Gpu\": 1,\n \"Cpu\": 2018,\n \"GpuType\": \"V100\",\n \"InstanceType\": \"TI.S.MEDIUM.POST\",\n \"Memory\": 4000\n },\n \"ResourceGroupId\": \"trsg-dwpqnjmk\",\n \"VolumeSizeInGB\": 100,\n \"BillingInfos\": [\n \"info\"\n ],\n \"Tags\": [\n {\n \"TagKey\": \"test-key\",\n \"TagValue\": \"test-value\"\n }\n ],\n \"CreateTime\": \"2024-11-11T10:50:44+08\",\n \"StartTime\": \"2024-11-11T10:51:44+08\",\n \"UpdateTime\": \"2024-11-11T10:51:44+08\",\n \"RuntimeInSeconds\": 100,\n \"ChargeStatus\": \"BILLING\",\n \"Status\": \"Stopped\",\n \"FailureReason\": \"errMsg\",\n \"EndTime\": \"2024-11-14T17:22:16+08\",\n \"PodName\": \"nb-1188501796310898048-912gqy8i0xvk\",\n \"InstanceTypeAlias\": \"2C4G\",\n \"ResourceGroupName\": \"resource-test\",\n \"AutoStopping\": true,\n \"AutomaticStopTime\": 100,\n \"VolumeSourceType\": \"CFS\",\n \"VolumeSourceCFS\": {\n \"Id\": \"cfs-9su5kqtv\",\n \"Path\": \"/\",\n \"Protocol\": \"NFS\",\n \"MountType\": \"STORAGE\"\n },\n \"Message\": \"message1\",\n \"UserTypes\": [\n \"AiMarket\"\n ],\n \"SSHConfig\": {\n \"Enable\": true,\n \"PublicKey\": \"ssh-rsa AAAA*.00=\",\n \"Port\": 6001,\n \"LoginCommand\": \"ssh -p 127.0.0.1:6001\"\n }\n }\n ],\n \"TotalCount\": 1,\n \"RequestId\": \"ecc8d2f6-9772-40df-856f-f6e48c6a7008\"\n }\n}",
|
216
232
|
"title": "Notebook列表"
|
217
233
|
}
|
218
234
|
],
|
@@ -272,19 +288,11 @@
|
|
272
288
|
"title": "上报训练自定义指标"
|
273
289
|
}
|
274
290
|
],
|
275
|
-
"SendChatMessage": [
|
276
|
-
{
|
277
|
-
"document": "多行业客服大模型对话发起对话的示例",
|
278
|
-
"input": "POST / HTTP/1.1\nHost: tione.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SendChatMessage\n<公共请求参数>\n\n{\n \"SessionId\": \"6e85ab47-e2df-d139-3823-de3d3aa51cf2\",\n \"Question\": \"你好,请介绍一下自己\"\n}",
|
279
|
-
"output": "{\n \"Response\": {\n \"Answer\": \"作为一个人工智能助手,我可以执行以下任务:\\n\\n1. 对话交流:我可以与用户进行自然、流畅的多轮对话,就各种话题进行沟通和解答。\\n2. 信息检索:懂得大量知识,能帮助用户查找和提供相关的信息,包括事实、定义、数据、新闻等。\\n3. 文本生成:能根据给定的主题或关键词生成文章、段落、摘要等文本内容。\\n4. 语言纠错:能检测和纠正拼写和语法错误,提高文本质量。\\n5. 代码辅助:能回答编程和技术相关的问题,提供代码示例和解决方案。\\n6. 其他功能:如情感分析、文本摘要、关键词提取等。\\n\\n请随时告诉我您需要帮助的问题,我会尽力为您提供解答和解决方案。\",\n \"RequestId\": \"767e79d0-48e1-486a-bdc8-e3682053db76\",\n \"SessionId\": \"6e85ab47-e2df-d139-3823-de3d3aa51cf2\"\n }\n}",
|
280
|
-
"title": "多行业客服大模型对话请求"
|
281
|
-
}
|
282
|
-
],
|
283
291
|
"StartNotebook": [
|
284
292
|
{
|
285
293
|
"document": "启动Notebook",
|
286
|
-
"input": "POST / HTTP/1.1\nHost: tione.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: StartNotebook\n<公共请求参数>\n\n{\n \"Id\": \"
|
287
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
294
|
+
"input": "POST / HTTP/1.1\nHost: tione.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: StartNotebook\n<公共请求参数>\n\n{\n \"Id\": \"nb-1188415493581985152\"\n}",
|
295
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"f7df11d5-58c2-4767-956d-aa7158aab668\"\n }\n}",
|
288
296
|
"title": "启动Notebook"
|
289
297
|
}
|
290
298
|
],
|
@@ -299,8 +307,8 @@
|
|
299
307
|
"StopNotebook": [
|
300
308
|
{
|
301
309
|
"document": "",
|
302
|
-
"input": "POST / HTTP/1.1\nHost: tione.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: StopNotebook\n<公共请求参数>\n\n{\n \"Id\": \"
|
303
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
310
|
+
"input": "POST / HTTP/1.1\nHost: tione.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: StopNotebook\n<公共请求参数>\n\n{\n \"Id\": \"nb-1188415493581985152\"\n}",
|
311
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"f7df11d5-58c2-4767-956d-aa7158aab668\"\n }\n}",
|
304
312
|
"title": "停止Notebook"
|
305
313
|
}
|
306
314
|
]
|
tccli/services/tse/tse_client.py
CHANGED
@@ -1109,6 +1109,58 @@ def doDescribeAutoScalerResourceStrategies(args, parsed_globals):
|
|
1109
1109
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1110
1110
|
|
1111
1111
|
|
1112
|
+
def doModifyNativeGatewayServiceSource(args, parsed_globals):
|
1113
|
+
g_param = parse_global_arg(parsed_globals)
|
1114
|
+
|
1115
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1116
|
+
cred = credential.CVMRoleCredential()
|
1117
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1118
|
+
cred = credential.STSAssumeRoleCredential(
|
1119
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1120
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1121
|
+
)
|
1122
|
+
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):
|
1123
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1124
|
+
else:
|
1125
|
+
cred = credential.Credential(
|
1126
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1127
|
+
)
|
1128
|
+
http_profile = HttpProfile(
|
1129
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1130
|
+
reqMethod="POST",
|
1131
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1132
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1133
|
+
)
|
1134
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1135
|
+
if g_param[OptionsDefine.Language]:
|
1136
|
+
profile.language = g_param[OptionsDefine.Language]
|
1137
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1138
|
+
client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
|
1139
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1140
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1141
|
+
model = models.ModifyNativeGatewayServiceSourceRequest()
|
1142
|
+
model.from_json_string(json.dumps(args))
|
1143
|
+
start_time = time.time()
|
1144
|
+
while True:
|
1145
|
+
rsp = client.ModifyNativeGatewayServiceSource(model)
|
1146
|
+
result = rsp.to_json_string()
|
1147
|
+
try:
|
1148
|
+
json_obj = json.loads(result)
|
1149
|
+
except TypeError as e:
|
1150
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1151
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1152
|
+
break
|
1153
|
+
cur_time = time.time()
|
1154
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1155
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1156
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1157
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1158
|
+
else:
|
1159
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1160
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1161
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1162
|
+
|
1163
|
+
|
1112
1164
|
def doUnbindAutoScalerResourceStrategyFromGroups(args, parsed_globals):
|
1113
1165
|
g_param = parse_global_arg(parsed_globals)
|
1114
1166
|
|
@@ -1317,7 +1369,7 @@ def doUpdateCloudNativeAPIGatewayCertificateInfo(args, parsed_globals):
|
|
1317
1369
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1318
1370
|
|
1319
1371
|
|
1320
|
-
def
|
1372
|
+
def doDeleteNativeGatewayServiceSource(args, parsed_globals):
|
1321
1373
|
g_param = parse_global_arg(parsed_globals)
|
1322
1374
|
|
1323
1375
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1346,11 +1398,11 @@ def doUpdateCloudNativeAPIGatewaySpec(args, parsed_globals):
|
|
1346
1398
|
client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
|
1347
1399
|
client._sdkVersion += ("_CLI_" + __version__)
|
1348
1400
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1349
|
-
model = models.
|
1401
|
+
model = models.DeleteNativeGatewayServiceSourceRequest()
|
1350
1402
|
model.from_json_string(json.dumps(args))
|
1351
1403
|
start_time = time.time()
|
1352
1404
|
while True:
|
1353
|
-
rsp = client.
|
1405
|
+
rsp = client.DeleteNativeGatewayServiceSource(model)
|
1354
1406
|
result = rsp.to_json_string()
|
1355
1407
|
try:
|
1356
1408
|
json_obj = json.loads(result)
|
@@ -1785,6 +1837,58 @@ def doPublishConfigFiles(args, parsed_globals):
|
|
1785
1837
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1786
1838
|
|
1787
1839
|
|
1840
|
+
def doCreateNativeGatewayServiceSource(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.TseClient(cred, g_param[OptionsDefine.Region], profile)
|
1867
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1868
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1869
|
+
model = models.CreateNativeGatewayServiceSourceRequest()
|
1870
|
+
model.from_json_string(json.dumps(args))
|
1871
|
+
start_time = time.time()
|
1872
|
+
while True:
|
1873
|
+
rsp = client.CreateNativeGatewayServiceSource(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
|
+
|
1788
1892
|
def doDescribeConfigFile(args, parsed_globals):
|
1789
1893
|
g_param = parse_global_arg(parsed_globals)
|
1790
1894
|
|
@@ -2409,7 +2513,7 @@ def doCreateGovernanceInstances(args, parsed_globals):
|
|
2409
2513
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2410
2514
|
|
2411
2515
|
|
2412
|
-
def
|
2516
|
+
def doDeleteCloudNativeAPIGatewayRouteRateLimit(args, parsed_globals):
|
2413
2517
|
g_param = parse_global_arg(parsed_globals)
|
2414
2518
|
|
2415
2519
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2438,11 +2542,11 @@ def doCreateOrUpdateConfigFileAndRelease(args, parsed_globals):
|
|
2438
2542
|
client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
|
2439
2543
|
client._sdkVersion += ("_CLI_" + __version__)
|
2440
2544
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2441
|
-
model = models.
|
2545
|
+
model = models.DeleteCloudNativeAPIGatewayRouteRateLimitRequest()
|
2442
2546
|
model.from_json_string(json.dumps(args))
|
2443
2547
|
start_time = time.time()
|
2444
2548
|
while True:
|
2445
|
-
rsp = client.
|
2549
|
+
rsp = client.DeleteCloudNativeAPIGatewayRouteRateLimit(model)
|
2446
2550
|
result = rsp.to_json_string()
|
2447
2551
|
try:
|
2448
2552
|
json_obj = json.loads(result)
|
@@ -2565,7 +2669,7 @@ def doDeleteAutoScalerResourceStrategy(args, parsed_globals):
|
|
2565
2669
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2566
2670
|
|
2567
2671
|
|
2568
|
-
def
|
2672
|
+
def doModifyCloudNativeAPIGatewayRoute(args, parsed_globals):
|
2569
2673
|
g_param = parse_global_arg(parsed_globals)
|
2570
2674
|
|
2571
2675
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2594,11 +2698,11 @@ def doDeleteCloudNativeAPIGatewayRouteRateLimit(args, parsed_globals):
|
|
2594
2698
|
client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
|
2595
2699
|
client._sdkVersion += ("_CLI_" + __version__)
|
2596
2700
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2597
|
-
model = models.
|
2701
|
+
model = models.ModifyCloudNativeAPIGatewayRouteRequest()
|
2598
2702
|
model.from_json_string(json.dumps(args))
|
2599
2703
|
start_time = time.time()
|
2600
2704
|
while True:
|
2601
|
-
rsp = client.
|
2705
|
+
rsp = client.ModifyCloudNativeAPIGatewayRoute(model)
|
2602
2706
|
result = rsp.to_json_string()
|
2603
2707
|
try:
|
2604
2708
|
json_obj = json.loads(result)
|
@@ -3033,6 +3137,58 @@ def doDescribeUpstreamHealthCheckConfig(args, parsed_globals):
|
|
3033
3137
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3034
3138
|
|
3035
3139
|
|
3140
|
+
def doDescribeNativeGatewayServiceSources(args, parsed_globals):
|
3141
|
+
g_param = parse_global_arg(parsed_globals)
|
3142
|
+
|
3143
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3144
|
+
cred = credential.CVMRoleCredential()
|
3145
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3146
|
+
cred = credential.STSAssumeRoleCredential(
|
3147
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3148
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3149
|
+
)
|
3150
|
+
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):
|
3151
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3152
|
+
else:
|
3153
|
+
cred = credential.Credential(
|
3154
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3155
|
+
)
|
3156
|
+
http_profile = HttpProfile(
|
3157
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3158
|
+
reqMethod="POST",
|
3159
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3160
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3161
|
+
)
|
3162
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3163
|
+
if g_param[OptionsDefine.Language]:
|
3164
|
+
profile.language = g_param[OptionsDefine.Language]
|
3165
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3166
|
+
client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
|
3167
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3168
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3169
|
+
model = models.DescribeNativeGatewayServiceSourcesRequest()
|
3170
|
+
model.from_json_string(json.dumps(args))
|
3171
|
+
start_time = time.time()
|
3172
|
+
while True:
|
3173
|
+
rsp = client.DescribeNativeGatewayServiceSources(model)
|
3174
|
+
result = rsp.to_json_string()
|
3175
|
+
try:
|
3176
|
+
json_obj = json.loads(result)
|
3177
|
+
except TypeError as e:
|
3178
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3179
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3180
|
+
break
|
3181
|
+
cur_time = time.time()
|
3182
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3183
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3184
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3185
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3186
|
+
else:
|
3187
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3188
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3189
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3190
|
+
|
3191
|
+
|
3036
3192
|
def doModifyNativeGatewayServerGroup(args, parsed_globals):
|
3037
3193
|
g_param = parse_global_arg(parsed_globals)
|
3038
3194
|
|
@@ -3553,6 +3709,58 @@ def doDescribeConfigFileReleaseVersions(args, parsed_globals):
|
|
3553
3709
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3554
3710
|
|
3555
3711
|
|
3712
|
+
def doCreateOrUpdateConfigFileAndRelease(args, parsed_globals):
|
3713
|
+
g_param = parse_global_arg(parsed_globals)
|
3714
|
+
|
3715
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3716
|
+
cred = credential.CVMRoleCredential()
|
3717
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3718
|
+
cred = credential.STSAssumeRoleCredential(
|
3719
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3720
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3721
|
+
)
|
3722
|
+
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):
|
3723
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3724
|
+
else:
|
3725
|
+
cred = credential.Credential(
|
3726
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3727
|
+
)
|
3728
|
+
http_profile = HttpProfile(
|
3729
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3730
|
+
reqMethod="POST",
|
3731
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3732
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3733
|
+
)
|
3734
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3735
|
+
if g_param[OptionsDefine.Language]:
|
3736
|
+
profile.language = g_param[OptionsDefine.Language]
|
3737
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3738
|
+
client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
|
3739
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3740
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3741
|
+
model = models.CreateOrUpdateConfigFileAndReleaseRequest()
|
3742
|
+
model.from_json_string(json.dumps(args))
|
3743
|
+
start_time = time.time()
|
3744
|
+
while True:
|
3745
|
+
rsp = client.CreateOrUpdateConfigFileAndRelease(model)
|
3746
|
+
result = rsp.to_json_string()
|
3747
|
+
try:
|
3748
|
+
json_obj = json.loads(result)
|
3749
|
+
except TypeError as e:
|
3750
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3751
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3752
|
+
break
|
3753
|
+
cur_time = time.time()
|
3754
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3755
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3756
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3757
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3758
|
+
else:
|
3759
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3760
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3761
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3762
|
+
|
3763
|
+
|
3556
3764
|
def doDescribeSREInstances(args, parsed_globals):
|
3557
3765
|
g_param = parse_global_arg(parsed_globals)
|
3558
3766
|
|
@@ -5373,7 +5581,7 @@ def doModifyConfigFiles(args, parsed_globals):
|
|
5373
5581
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5374
5582
|
|
5375
5583
|
|
5376
|
-
def
|
5584
|
+
def doUpdateCloudNativeAPIGatewaySpec(args, parsed_globals):
|
5377
5585
|
g_param = parse_global_arg(parsed_globals)
|
5378
5586
|
|
5379
5587
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -5402,11 +5610,11 @@ def doModifyCloudNativeAPIGatewayRoute(args, parsed_globals):
|
|
5402
5610
|
client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
|
5403
5611
|
client._sdkVersion += ("_CLI_" + __version__)
|
5404
5612
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5405
|
-
model = models.
|
5613
|
+
model = models.UpdateCloudNativeAPIGatewaySpecRequest()
|
5406
5614
|
model.from_json_string(json.dumps(args))
|
5407
5615
|
start_time = time.time()
|
5408
5616
|
while True:
|
5409
|
-
rsp = client.
|
5617
|
+
rsp = client.UpdateCloudNativeAPIGatewaySpec(model)
|
5410
5618
|
result = rsp.to_json_string()
|
5411
5619
|
try:
|
5412
5620
|
json_obj = json.loads(result)
|
@@ -5977,11 +6185,12 @@ ACTION_MAP = {
|
|
5977
6185
|
"DescribeWafDomains": doDescribeWafDomains,
|
5978
6186
|
"DescribeCloudNativeAPIGatewayCertificateDetails": doDescribeCloudNativeAPIGatewayCertificateDetails,
|
5979
6187
|
"DescribeAutoScalerResourceStrategies": doDescribeAutoScalerResourceStrategies,
|
6188
|
+
"ModifyNativeGatewayServiceSource": doModifyNativeGatewayServiceSource,
|
5980
6189
|
"UnbindAutoScalerResourceStrategyFromGroups": doUnbindAutoScalerResourceStrategyFromGroups,
|
5981
6190
|
"DeleteCloudNativeAPIGatewayCertificate": doDeleteCloudNativeAPIGatewayCertificate,
|
5982
6191
|
"DescribeGovernanceServiceContracts": doDescribeGovernanceServiceContracts,
|
5983
6192
|
"UpdateCloudNativeAPIGatewayCertificateInfo": doUpdateCloudNativeAPIGatewayCertificateInfo,
|
5984
|
-
"
|
6193
|
+
"DeleteNativeGatewayServiceSource": doDeleteNativeGatewayServiceSource,
|
5985
6194
|
"DescribeAllConfigFileTemplates": doDescribeAllConfigFileTemplates,
|
5986
6195
|
"CreateNativeGatewayServerGroup": doCreateNativeGatewayServerGroup,
|
5987
6196
|
"DescribeConfigFilesByGroup": doDescribeConfigFilesByGroup,
|
@@ -5990,6 +6199,7 @@ ACTION_MAP = {
|
|
5990
6199
|
"ModifyAutoScalerResourceStrategy": doModifyAutoScalerResourceStrategy,
|
5991
6200
|
"DescribeInstanceTagInfos": doDescribeInstanceTagInfos,
|
5992
6201
|
"PublishConfigFiles": doPublishConfigFiles,
|
6202
|
+
"CreateNativeGatewayServiceSource": doCreateNativeGatewayServiceSource,
|
5993
6203
|
"DescribeConfigFile": doDescribeConfigFile,
|
5994
6204
|
"DescribeConfigFileReleases": doDescribeConfigFileReleases,
|
5995
6205
|
"CloseWafProtection": doCloseWafProtection,
|
@@ -6002,10 +6212,10 @@ ACTION_MAP = {
|
|
6002
6212
|
"UpdateUpstreamTargets": doUpdateUpstreamTargets,
|
6003
6213
|
"CreateCloudNativeAPIGatewayRoute": doCreateCloudNativeAPIGatewayRoute,
|
6004
6214
|
"CreateGovernanceInstances": doCreateGovernanceInstances,
|
6005
|
-
"
|
6215
|
+
"DeleteCloudNativeAPIGatewayRouteRateLimit": doDeleteCloudNativeAPIGatewayRouteRateLimit,
|
6006
6216
|
"DeleteConfigFileReleases": doDeleteConfigFileReleases,
|
6007
6217
|
"DeleteAutoScalerResourceStrategy": doDeleteAutoScalerResourceStrategy,
|
6008
|
-
"
|
6218
|
+
"ModifyCloudNativeAPIGatewayRoute": doModifyCloudNativeAPIGatewayRoute,
|
6009
6219
|
"DeleteNativeGatewayServerGroup": doDeleteNativeGatewayServerGroup,
|
6010
6220
|
"DescribeCloudNativeAPIGatewayPorts": doDescribeCloudNativeAPIGatewayPorts,
|
6011
6221
|
"DescribeCloudNativeAPIGatewayCanaryRules": doDescribeCloudNativeAPIGatewayCanaryRules,
|
@@ -6014,6 +6224,7 @@ ACTION_MAP = {
|
|
6014
6224
|
"ModifyConsoleNetwork": doModifyConsoleNetwork,
|
6015
6225
|
"DescribeNacosReplicas": doDescribeNacosReplicas,
|
6016
6226
|
"DescribeUpstreamHealthCheckConfig": doDescribeUpstreamHealthCheckConfig,
|
6227
|
+
"DescribeNativeGatewayServiceSources": doDescribeNativeGatewayServiceSources,
|
6017
6228
|
"ModifyNativeGatewayServerGroup": doModifyNativeGatewayServerGroup,
|
6018
6229
|
"DescribeCloudNativeAPIGatewayCertificates": doDescribeCloudNativeAPIGatewayCertificates,
|
6019
6230
|
"ModifyCloudNativeAPIGatewayServiceRateLimit": doModifyCloudNativeAPIGatewayServiceRateLimit,
|
@@ -6024,6 +6235,7 @@ ACTION_MAP = {
|
|
6024
6235
|
"DescribeGovernanceServices": doDescribeGovernanceServices,
|
6025
6236
|
"DeleteCloudNativeAPIGatewayCanaryRule": doDeleteCloudNativeAPIGatewayCanaryRule,
|
6026
6237
|
"DescribeConfigFileReleaseVersions": doDescribeConfigFileReleaseVersions,
|
6238
|
+
"CreateOrUpdateConfigFileAndRelease": doCreateOrUpdateConfigFileAndRelease,
|
6027
6239
|
"DescribeSREInstances": doDescribeSREInstances,
|
6028
6240
|
"DeleteCloudNativeAPIGatewayServiceRateLimit": doDeleteCloudNativeAPIGatewayServiceRateLimit,
|
6029
6241
|
"DescribeWafProtection": doDescribeWafProtection,
|
@@ -6059,7 +6271,7 @@ ACTION_MAP = {
|
|
6059
6271
|
"CreateCloudNativeAPIGatewayPublicNetwork": doCreateCloudNativeAPIGatewayPublicNetwork,
|
6060
6272
|
"DescribeNacosServerInterfaces": doDescribeNacosServerInterfaces,
|
6061
6273
|
"ModifyConfigFiles": doModifyConfigFiles,
|
6062
|
-
"
|
6274
|
+
"UpdateCloudNativeAPIGatewaySpec": doUpdateCloudNativeAPIGatewaySpec,
|
6063
6275
|
"CreateGovernanceServices": doCreateGovernanceServices,
|
6064
6276
|
"DeleteGovernanceNamespaces": doDeleteGovernanceNamespaces,
|
6065
6277
|
"ModifyGovernanceInstances": doModifyGovernanceInstances,
|