tccli-intl-en 3.1.19.1__py2.py3-none-any.whl → 3.1.21.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/ckafka/ckafka_client.py +120 -8
- tccli/services/ckafka/v20190819/api.json +469 -124
- tccli/services/ckafka/v20190819/examples.json +30 -20
- tccli/services/tke/tke_client.py +168 -0
- tccli/services/tke/v20180525/api.json +227 -0
- tccli/services/tke/v20180525/examples.json +24 -0
- {tccli_intl_en-3.1.19.1.dist-info → tccli_intl_en-3.1.21.1.dist-info}/METADATA +2 -2
- {tccli_intl_en-3.1.19.1.dist-info → tccli_intl_en-3.1.21.1.dist-info}/RECORD +13 -13
- {tccli_intl_en-3.1.19.1.dist-info → tccli_intl_en-3.1.21.1.dist-info}/LICENSE +0 -0
- {tccli_intl_en-3.1.19.1.dist-info → tccli_intl_en-3.1.21.1.dist-info}/WHEEL +0 -0
- {tccli_intl_en-3.1.19.1.dist-info → tccli_intl_en-3.1.21.1.dist-info}/entry_points.txt +0 -0
- {tccli_intl_en-3.1.19.1.dist-info → tccli_intl_en-3.1.21.1.dist-info}/top_level.txt +0 -0
|
@@ -58,16 +58,10 @@
|
|
|
58
58
|
],
|
|
59
59
|
"CreateInstancePre": [
|
|
60
60
|
{
|
|
61
|
-
"document": "This example shows you how to create a
|
|
62
|
-
"input": "POST / HTTP/1.1\nHost: ckafka.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateInstancePre\n<Common request parameters>\n\n{\n
|
|
63
|
-
"output": "{\n \"Response\": {\n \"
|
|
64
|
-
"title": "Creating a Prepaid Instance"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"document": "This example shows you how to create a prepaid standard edition instance with an entry-level specification for one month.",
|
|
68
|
-
"input": "POST / HTTP/1.1\nHost: ckafka.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateInstancePre\n<Common request parameters>\n\n{\n \"InstanceName\": \"test57\",\n \"VpcId\": \"vpc-rmcgxxxx\",\n \"SubnetId\": \"subnet-mnzcxxxx\",\n \"ZoneId\": 450001,\n \"Period\": \"1m\",\n \"RenewFlag\": 2,\n \"InstanceType\": 1,\n \"KafkaVersion\": \"2.4.1\",\n \"SpecificationsType\": \"standard\",\n \"DiskSize\": 200,\n \"BandWidth\": 20,\n \"Partition\": 400\n}",
|
|
69
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"2050ebf8-e255-4b90-ba0c-2fe8465e821a\",\n \"Result\": {\n \"Data\": {\n \"DealNameInstanceIdMapping\": [\n {\n \"DealName\": \"20230608002033922780000\",\n \"InstanceIdList\": [\n \"ckafka-bz4dxxxx\"\n ]\n }\n ],\n \"DealNames\": [\n \"20230608002033922780000\"\n ],\n \"FlowId\": 0,\n \"InstanceId\": \"ckafka-bz4dxxxx\"\n },\n \"ReturnCode\": \"0\",\n \"ReturnMessage\": \"ok[apply ok]\"\n }\n }\n}",
|
|
70
|
-
"title": "Creating a Prepaid Standard Edition Instance"
|
|
61
|
+
"document": "This example shows you how to create a Prepaid Professional Edition instance.",
|
|
62
|
+
"input": "POST / HTTP/1.1\nHost: ckafka.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateInstancePre\n<Common request parameters>\n\n{\n\"InstanceName\": \"ckafka trial\"\n \"VpcId\": \"vpc-rmcgxxxx\",\n \"SubnetId\": \"subnet-mnzcxxxx\",\n \"ZoneId\": 450001,\n \"Period\": \"1m\",\n \"RenewFlag\": 0,\n \"InstanceType\": 1,\n \"KafkaVersion\": \"2.4.1\",\n \"SpecificationsType\": \"profession\",\n \"DiskSize\": 200,\n \"BandWidth\": 20,\n \"Partition\": 400,\n \"DiskType\": \"CLOUD_BASIC\",\n \"PublicNetworkMonthly\": 0,\n \"CustomSSLCertId\": \"TPNd2oBB\"\n}",
|
|
63
|
+
"output": "{\n \"Response\": {\n \"Result\": {\n \"Data\": {\n \"DealNameInstanceIdMapping\": [\n {\n \"DealName\": \"20251204581021815942281\",\n \"InstanceIdList\": [\n \"ckafka-ma4ab5n5\"\n ]\n }\n ],\n \"DealNames\": [\n \"20251204581021815942281\"\n ],\n \"FlowId\": 0,\n \"InstanceId\": \"ckafka-ma4ab5n5\"\n },\n \"ReturnCode\": \"0\",\n \"ReturnMessage\": \"ok\"\n },\n \"RequestId\": \"8c8050a7-ea8d-44f1-a00e-c09cd673afa3\"\n }\n}",
|
|
64
|
+
"title": "Creating a Prepaid Professional Edition Instance"
|
|
71
65
|
}
|
|
72
66
|
],
|
|
73
67
|
"CreatePartition": [
|
|
@@ -80,22 +74,22 @@
|
|
|
80
74
|
],
|
|
81
75
|
"CreatePostPaidInstance": [
|
|
82
76
|
{
|
|
83
|
-
"document": "This example shows you how to create a post-payment for professional edition instance with
|
|
84
|
-
"input": "POST / HTTP/1.1\nHost: ckafka.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreatePostPaidInstance\n<Common request parameters>\n\n{\n \"InstanceName\": \"test55\",\n \"VpcId\": \"vpc-rmcgxxxx\",\n \"SubnetId\": \"subnet-mnzcxxxx\",\n \"ZoneId\": 450001,\n \"InstanceType\": 1,\n \"KafkaVersion\": \"2.4.2\",\n \"SpecificationsType\": \"profession\",\n \"DiskSize\": 200,\n \"BandWidth\": 20,\n \"Partition\": 400,\n \"DiskType\": \"CLOUD_BASIC\",\n \"PublicNetworkMonthly\": 0\n}",
|
|
77
|
+
"document": "This example shows you how to create a post-payment for professional edition instance with 200GB disk capacity and 20MB/s peak bandwidth.",
|
|
78
|
+
"input": "POST / HTTP/1.1\nHost: ckafka.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreatePostPaidInstance\n<Common request parameters>\n\n{\n \"InstanceName\": \"test55\",\n \"VpcId\": \"vpc-rmcgxxxx\",\n \"SubnetId\": \"subnet-mnzcxxxx\",\n \"ZoneId\": 450001,\n \"InstanceType\": 1,\n \"KafkaVersion\": \"2.4.2\",\n \"SpecificationsType\": \"profession\",\n \"DiskSize\": 200,\n \"BandWidth\": 20,\n \"Partition\": 400,\n \"DiskType\": \"CLOUD_BASIC\",\n \"PublicNetworkMonthly\": 0,\n \"CustomSSLCertId\": \"TPNd2oBB\"\n}",
|
|
85
79
|
"output": "{\n \"Response\": {\n \"RequestId\": \"323c3bbe-db79-48c3-9b76-63aacd65b169\",\n \"Result\": {\n \"Data\": {\n \"DealNameInstanceIdMapping\": [\n {\n \"DealName\": \"20230608002033899990000\",\n \"InstanceIdList\": [\n \"ckafka-mom5xxxx\"\n ]\n }\n ],\n \"DealNames\": [\n \"2023060800203389990000\"\n ],\n \"FlowId\": 0,\n \"InstanceId\": \"ckafka-mom5xxxx\"\n },\n \"ReturnCode\": \"0\",\n \"ReturnMessage\": \"ok[apply ok]\"\n }\n }\n}",
|
|
86
80
|
"title": "Creating a Postpaid Pro Edition Instance"
|
|
87
81
|
},
|
|
88
|
-
{
|
|
89
|
-
"document": "This example shows you how to create three postpaid Pro Edition instances simultaneously.",
|
|
90
|
-
"input": "POST / HTTP/1.1\nHost: ckafka.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreatePostPaidInstance\n<Common request parameters>\n\n{\n \"InstanceName\": \"test58\",\n \"VpcId\": \"vpc-rmcg5cpf\",\n \"SubnetId\": \"subnet-mnzcs7gk\",\n \"KafkaVersion\": \"2.4.2\",\n \"SpecificationsType\": \"profession\",\n \"BandWidth\": 20,\n \"DiskSize\": 200,\n \"Partition\": 400,\n \"TopicNum\": 200,\n \"ZoneId\": 450001,\n \"InstanceNum\": 3,\n \"PublicNetworkMonthly\": 12\n}",
|
|
91
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"cda79237-6424-482a-b2d2-97d4853b33b4\",\n \"Result\": {\n \"Data\": {\n \"DealNameInstanceIdMapping\": [\n {\n \"DealName\": \"20230608002033915320000\",\n \"InstanceIdList\": [\n \"ckafka-bz4dxxxx\",\n \"ckafka-o9gdxxxx\",\n \"ckafka-aj5gxxxx\"\n ]\n }\n ],\n \"DealNames\": [\n \"20230608002033915320000\"\n ],\n \"FlowId\": 0,\n \"InstanceId\": \"ckafka-bz4dxxxx\"\n },\n \"ReturnCode\": \"0\",\n \"ReturnMessage\": \"ok[apply ok]\"\n }\n }\n}",
|
|
92
|
-
"title": "Creating Pay-As-You-Go Pro Edition Instances in Batches"
|
|
93
|
-
},
|
|
94
82
|
{
|
|
95
83
|
"document": "This example shows you how to create a triple-az Pro Edition instance.",
|
|
96
84
|
"input": "POST / HTTP/1.1\nHost: ckafka.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreatePostPaidInstance\n<Common request parameters>\n\n{\n \"InstanceName\": \"test55\",\n \"VpcId\": \"vpc-rmcgxxxx\",\n \"SubnetId\": \"subnet-mnzcxxxx\",\n \"ZoneId\": 450001,\n \"InstanceType\": 1,\n \"KafkaVersion\": \"2.4.2\",\n \"SpecificationsType\": \"profession\",\n \"DiskSize\": 200,\n \"BandWidth\": 20,\n \"Partition\": 400,\n \"DiskType\": \"CLOUD_BASIC\",\n \"PublicNetworkMonthly\": 0,\n \"MultiZoneFlag\": true,\n \"ZoneIds\": [\n 450001,\n 450002,\n 450003\n ]\n}",
|
|
97
85
|
"output": "{\n \"Response\": {\n \"RequestId\": \"323c3bbe-db79-48c3-9b76-63aacd65b169\",\n \"Result\": {\n \"Data\": {\n \"DealNameInstanceIdMapping\": [\n {\n \"DealName\": \"20230608002033899990000\",\n \"InstanceIdList\": [\n \"ckafka-mom5xxxx\"\n ]\n }\n ],\n \"DealNames\": [\n \"2023060800203389990000\"\n ],\n \"FlowId\": 0,\n \"InstanceId\": \"ckafka-mom5xxxx\"\n },\n \"ReturnCode\": \"0\",\n \"ReturnMessage\": \"ok[apply ok]\"\n }\n }\n}",
|
|
98
86
|
"title": "Creating a Postpaid Multi-AZ Pro Edition Instance"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"document": "This example shows you how to create three postpaid Pro Edition instances simultaneously.",
|
|
90
|
+
"input": "POST / HTTP/1.1\nHost: ckafka.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreatePostPaidInstance\n<Common request parameters>\n\n{\n \"InstanceName\": \"test58\",\n \"VpcId\": \"vpc-rmcg5cpf\",\n \"SubnetId\": \"subnet-mnzcs7gk\",\n \"KafkaVersion\": \"2.4.2\",\n \"SpecificationsType\": \"profession\",\n \"BandWidth\": 20,\n \"DiskSize\": 200,\n \"Partition\": 400,\n \"TopicNum\": 200,\n \"ZoneId\": 450001,\n \"InstanceNum\": 3,\n \"PublicNetworkMonthly\": 12\n}",
|
|
91
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"cda79237-6424-482a-b2d2-97d4853b33b4\",\n \"Result\": {\n \"Data\": {\n \"DealNameInstanceIdMapping\": [\n {\n \"DealName\": \"20230608002033915320000\",\n \"InstanceIdList\": [\n \"ckafka-bz4dxxxx\",\n \"ckafka-o9gdxxxx\",\n \"ckafka-aj5gxxxx\"\n ]\n }\n ],\n \"DealNames\": [\n \"20230608002033915320000\"\n ],\n \"FlowId\": 0,\n \"InstanceId\": \"ckafka-bz4dxxxx\"\n },\n \"ReturnCode\": \"0\",\n \"ReturnMessage\": \"ok[apply ok]\"\n }\n }\n}",
|
|
92
|
+
"title": "Creating Pay-As-You-Go Pro Edition Instances in Batches"
|
|
99
93
|
}
|
|
100
94
|
],
|
|
101
95
|
"CreateRoute": [
|
|
@@ -154,6 +148,14 @@
|
|
|
154
148
|
"title": "Deleting a Consumer Group Instance"
|
|
155
149
|
}
|
|
156
150
|
],
|
|
151
|
+
"DeleteGroupSubscribeTopic": [
|
|
152
|
+
{
|
|
153
|
+
"document": "This example shows you how to delete unnecessary subscription topics.",
|
|
154
|
+
"input": "POST / HTTP/1.1\nHost: ckafka.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteGroupSubscribeTopic\n<Common request parameters>\n\n{\n \"InstanceId\": \"ckafka-inbijinh\",\n \"Group\": \"consuemr\",\n \"Topic\": \"topicName\"\n}",
|
|
155
|
+
"output": "{\n \"Response\": {\n \"Result\": {\n \"ReturnCode\": \"abc\",\n \"ReturnMessage\": \"abc\",\n \"Data\": {\n \"FlowId\": 0,\n \"RouteDTO\": {\n \"RouteId\": 0\n }\n }\n },\n \"RequestId\": \"abc\"\n }\n}",
|
|
156
|
+
"title": "Deleting the Subscribed Topic of a Consumption Group"
|
|
157
|
+
}
|
|
158
|
+
],
|
|
157
159
|
"DeleteInstancePost": [
|
|
158
160
|
{
|
|
159
161
|
"document": "This example shows you how to delete post-payment instances.",
|
|
@@ -228,9 +230,9 @@
|
|
|
228
230
|
],
|
|
229
231
|
"DescribeCkafkaVersion": [
|
|
230
232
|
{
|
|
231
|
-
"document": "This example shows you how to query the
|
|
233
|
+
"document": "This example shows you how to query the instance version information.",
|
|
232
234
|
"input": "POST / HTTP/1.1\nHost: ckafka.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeCkafkaVersion\n<Common request parameters>\n\n{\n \"InstanceId\": \"ckafka-bqwlyrg8\"\n}",
|
|
233
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"d173b4fb-c6d0-4507-a822-b6f277fc4016\"\n }\n}",
|
|
235
|
+
"output": "{\n \"Response\": {\n \"Result\": {\n \"LatestBrokerVersion\": [\n {\n \"KafkaVersion\": \"0.10.2\",\n \"BrokerVersion\": \"v0.10.2.1_r1.2.11\"\n },\n {\n \"KafkaVersion\": \"3.2.3\",\n \"BrokerVersion\": \"v3.2.3_r1.0.7\"\n },\n {\n \"KafkaVersion\": \"2.8.1\",\n \"BrokerVersion\": \"v2.8.1_r1.1.6\"\n },\n {\n \"KafkaVersion\": \"2.4.1\",\n \"BrokerVersion\": \"v2.4.2_r1.2.4\"\n },\n {\n \"KafkaVersion\": \"1.1.1\",\n \"BrokerVersion\": \"v1.1.1_r1.1.14\"\n }\n ],\n \"KafkaVersion\": \"1.1.1\",\n \"CurBrokerVersion\": \"1.1.1_1.0.9\"\n },\n \"RequestId\": \"d173b4fb-c6d0-4507-a822-b6f277fc4016\"\n }\n}",
|
|
234
236
|
"title": "Querying Instance Version Information"
|
|
235
237
|
}
|
|
236
238
|
],
|
|
@@ -322,6 +324,14 @@
|
|
|
322
324
|
"title": "Retrieving Instance List Details"
|
|
323
325
|
}
|
|
324
326
|
],
|
|
327
|
+
"DescribeModifyType": [
|
|
328
|
+
{
|
|
329
|
+
"document": " ",
|
|
330
|
+
"input": "POST / HTTP/1.1\nHost: ckafka.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeModifyType\n<Common request parameters>\n\n{\n \"InstanceId\": \"ckafka-6er88krk\",\n \"BandWidth\": 320,\n \"DiskSize\": 1000,\n \"DiskType\": \"CLOUD_PREMIUM\",\n \"Partition\": 1200,\n \"Topic\": 120,\n \"Type\": \"sp_ckafka_profession\"\n}",
|
|
331
|
+
"output": "{\n \"Response\": {\n \"Result\": {\n \"ModifyType\": 1,\n \"MigrateFlag\": true,\n \"MigrateCostTime\": 17066\n },\n \"RequestId\": \"7118b7f95-43de-4d27-8sdadsa-9999999a\"\n }\n}",
|
|
332
|
+
"title": "Querying Instance Resizing Types Example"
|
|
333
|
+
}
|
|
334
|
+
],
|
|
325
335
|
"DescribeRegion": [
|
|
326
336
|
{
|
|
327
337
|
"document": " ",
|
tccli/services/tke/tke_client.py
CHANGED
|
@@ -2824,6 +2824,61 @@ def doAddVpcCniSubnets(args, parsed_globals):
|
|
|
2824
2824
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2825
2825
|
|
|
2826
2826
|
|
|
2827
|
+
def doDisableControlPlaneLogs(args, parsed_globals):
|
|
2828
|
+
g_param = parse_global_arg(parsed_globals)
|
|
2829
|
+
|
|
2830
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
2831
|
+
cred = credential.CVMRoleCredential()
|
|
2832
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
2833
|
+
cred = credential.STSAssumeRoleCredential(
|
|
2834
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2835
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2836
|
+
)
|
|
2837
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2838
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2839
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2840
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2841
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2842
|
+
else:
|
|
2843
|
+
cred = credential.Credential(
|
|
2844
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
2845
|
+
)
|
|
2846
|
+
http_profile = HttpProfile(
|
|
2847
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
2848
|
+
reqMethod="POST",
|
|
2849
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2850
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2851
|
+
)
|
|
2852
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2853
|
+
if g_param[OptionsDefine.Language]:
|
|
2854
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
2855
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
2856
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2857
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
2858
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2859
|
+
model = models.DisableControlPlaneLogsRequest()
|
|
2860
|
+
model.from_json_string(json.dumps(args))
|
|
2861
|
+
start_time = time.time()
|
|
2862
|
+
while True:
|
|
2863
|
+
rsp = client.DisableControlPlaneLogs(model)
|
|
2864
|
+
result = rsp.to_json_string()
|
|
2865
|
+
try:
|
|
2866
|
+
json_obj = json.loads(result)
|
|
2867
|
+
except TypeError as e:
|
|
2868
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
2869
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
2870
|
+
break
|
|
2871
|
+
cur_time = time.time()
|
|
2872
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
2873
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
2874
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
2875
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
2876
|
+
else:
|
|
2877
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
2878
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
2879
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2880
|
+
|
|
2881
|
+
|
|
2827
2882
|
def doDescribeExistedInstances(args, parsed_globals):
|
|
2828
2883
|
g_param = parse_global_arg(parsed_globals)
|
|
2829
2884
|
|
|
@@ -6124,6 +6179,61 @@ def doDescribeClusterRoutes(args, parsed_globals):
|
|
|
6124
6179
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
6125
6180
|
|
|
6126
6181
|
|
|
6182
|
+
def doEnableControlPlaneLogs(args, parsed_globals):
|
|
6183
|
+
g_param = parse_global_arg(parsed_globals)
|
|
6184
|
+
|
|
6185
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
6186
|
+
cred = credential.CVMRoleCredential()
|
|
6187
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
6188
|
+
cred = credential.STSAssumeRoleCredential(
|
|
6189
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6190
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6191
|
+
)
|
|
6192
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
6193
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
6194
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
6195
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6196
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6197
|
+
else:
|
|
6198
|
+
cred = credential.Credential(
|
|
6199
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
6200
|
+
)
|
|
6201
|
+
http_profile = HttpProfile(
|
|
6202
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
6203
|
+
reqMethod="POST",
|
|
6204
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
6205
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
6206
|
+
)
|
|
6207
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
6208
|
+
if g_param[OptionsDefine.Language]:
|
|
6209
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
6210
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
6211
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
|
6212
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
6213
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
6214
|
+
model = models.EnableControlPlaneLogsRequest()
|
|
6215
|
+
model.from_json_string(json.dumps(args))
|
|
6216
|
+
start_time = time.time()
|
|
6217
|
+
while True:
|
|
6218
|
+
rsp = client.EnableControlPlaneLogs(model)
|
|
6219
|
+
result = rsp.to_json_string()
|
|
6220
|
+
try:
|
|
6221
|
+
json_obj = json.loads(result)
|
|
6222
|
+
except TypeError as e:
|
|
6223
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
6224
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
6225
|
+
break
|
|
6226
|
+
cur_time = time.time()
|
|
6227
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
6228
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
6229
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
6230
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
6231
|
+
else:
|
|
6232
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
6233
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
6234
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
6235
|
+
|
|
6236
|
+
|
|
6127
6237
|
def doModifyNodePoolInstanceTypes(args, parsed_globals):
|
|
6128
6238
|
g_param = parse_global_arg(parsed_globals)
|
|
6129
6239
|
|
|
@@ -6234,6 +6344,61 @@ def doCheckInstancesUpgradeAble(args, parsed_globals):
|
|
|
6234
6344
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
6235
6345
|
|
|
6236
6346
|
|
|
6347
|
+
def doDescribeControlPlaneLogs(args, parsed_globals):
|
|
6348
|
+
g_param = parse_global_arg(parsed_globals)
|
|
6349
|
+
|
|
6350
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
6351
|
+
cred = credential.CVMRoleCredential()
|
|
6352
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
6353
|
+
cred = credential.STSAssumeRoleCredential(
|
|
6354
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6355
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6356
|
+
)
|
|
6357
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
6358
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
6359
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
6360
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6361
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6362
|
+
else:
|
|
6363
|
+
cred = credential.Credential(
|
|
6364
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
6365
|
+
)
|
|
6366
|
+
http_profile = HttpProfile(
|
|
6367
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
6368
|
+
reqMethod="POST",
|
|
6369
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
6370
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
6371
|
+
)
|
|
6372
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
6373
|
+
if g_param[OptionsDefine.Language]:
|
|
6374
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
6375
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
6376
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
|
6377
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
6378
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
6379
|
+
model = models.DescribeControlPlaneLogsRequest()
|
|
6380
|
+
model.from_json_string(json.dumps(args))
|
|
6381
|
+
start_time = time.time()
|
|
6382
|
+
while True:
|
|
6383
|
+
rsp = client.DescribeControlPlaneLogs(model)
|
|
6384
|
+
result = rsp.to_json_string()
|
|
6385
|
+
try:
|
|
6386
|
+
json_obj = json.loads(result)
|
|
6387
|
+
except TypeError as e:
|
|
6388
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
6389
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
6390
|
+
break
|
|
6391
|
+
cur_time = time.time()
|
|
6392
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
6393
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
6394
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
6395
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
6396
|
+
else:
|
|
6397
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
6398
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
6399
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
6400
|
+
|
|
6401
|
+
|
|
6237
6402
|
def doDeleteNodePool(args, parsed_globals):
|
|
6238
6403
|
g_param = parse_global_arg(parsed_globals)
|
|
6239
6404
|
|
|
@@ -7673,6 +7838,7 @@ ACTION_MAP = {
|
|
|
7673
7838
|
"DeleteClusterAsGroups": doDeleteClusterAsGroups,
|
|
7674
7839
|
"DeleteClusterRoute": doDeleteClusterRoute,
|
|
7675
7840
|
"AddVpcCniSubnets": doAddVpcCniSubnets,
|
|
7841
|
+
"DisableControlPlaneLogs": doDisableControlPlaneLogs,
|
|
7676
7842
|
"DescribeExistedInstances": doDescribeExistedInstances,
|
|
7677
7843
|
"DescribeClusterNodePools": doDescribeClusterNodePools,
|
|
7678
7844
|
"DescribeTKEEdgeClusterCredential": doDescribeTKEEdgeClusterCredential,
|
|
@@ -7733,8 +7899,10 @@ ACTION_MAP = {
|
|
|
7733
7899
|
"DescribeClusterEndpoints": doDescribeClusterEndpoints,
|
|
7734
7900
|
"ModifyClusterEndpointSP": doModifyClusterEndpointSP,
|
|
7735
7901
|
"DescribeClusterRoutes": doDescribeClusterRoutes,
|
|
7902
|
+
"EnableControlPlaneLogs": doEnableControlPlaneLogs,
|
|
7736
7903
|
"ModifyNodePoolInstanceTypes": doModifyNodePoolInstanceTypes,
|
|
7737
7904
|
"CheckInstancesUpgradeAble": doCheckInstancesUpgradeAble,
|
|
7905
|
+
"DescribeControlPlaneLogs": doDescribeControlPlaneLogs,
|
|
7738
7906
|
"DeleteNodePool": doDeleteNodePool,
|
|
7739
7907
|
"DescribeHealthCheckPolicies": doDescribeHealthCheckPolicies,
|
|
7740
7908
|
"DescribeImages": doDescribeImages,
|
|
@@ -469,6 +469,13 @@
|
|
|
469
469
|
"output": "DescribeClustersResponse",
|
|
470
470
|
"status": "online"
|
|
471
471
|
},
|
|
472
|
+
"DescribeControlPlaneLogs": {
|
|
473
|
+
"document": "This API is used to query plug-in log collection settings.",
|
|
474
|
+
"input": "DescribeControlPlaneLogsRequest",
|
|
475
|
+
"name": "Query the collection enable status of managed component logs for a user",
|
|
476
|
+
"output": "DescribeControlPlaneLogsResponse",
|
|
477
|
+
"status": "online"
|
|
478
|
+
},
|
|
472
479
|
"DescribeECMInstances": {
|
|
473
480
|
"document": "This API is used to obtain the ECM instance information.",
|
|
474
481
|
"input": "DescribeECMInstancesRequest",
|
|
@@ -679,6 +686,13 @@
|
|
|
679
686
|
"output": "DisableClusterDeletionProtectionResponse",
|
|
680
687
|
"status": "online"
|
|
681
688
|
},
|
|
689
|
+
"DisableControlPlaneLogs": {
|
|
690
|
+
"document": "This API is used to delete the log collection configuration of a plugin.",
|
|
691
|
+
"input": "DisableControlPlaneLogsRequest",
|
|
692
|
+
"name": "Disable user managed component log collection",
|
|
693
|
+
"output": "DisableControlPlaneLogsResponse",
|
|
694
|
+
"status": "online"
|
|
695
|
+
},
|
|
682
696
|
"DisableEncryptionProtection": {
|
|
683
697
|
"document": "This API is used to disable encryption protection.",
|
|
684
698
|
"input": "DisableEncryptionProtectionRequest",
|
|
@@ -700,6 +714,13 @@
|
|
|
700
714
|
"output": "EnableClusterDeletionProtectionResponse",
|
|
701
715
|
"status": "online"
|
|
702
716
|
},
|
|
717
|
+
"EnableControlPlaneLogs": {
|
|
718
|
+
"document": "This API is used to create log collection settings for plugins.",
|
|
719
|
+
"input": "EnableControlPlaneLogsRequest",
|
|
720
|
+
"name": "Enable log collection for managed components in specified clusters",
|
|
721
|
+
"output": "EnableControlPlaneLogsResponse",
|
|
722
|
+
"status": "online"
|
|
723
|
+
},
|
|
703
724
|
"EnableEncryptionProtection": {
|
|
704
725
|
"document": "This API is used to enable Encrypted Data Protection, which requires enabling KMS capability and completing KMS authorization.",
|
|
705
726
|
"input": "EnableEncryptionProtectionRequest",
|
|
@@ -3261,6 +3282,67 @@
|
|
|
3261
3282
|
],
|
|
3262
3283
|
"usage": "out"
|
|
3263
3284
|
},
|
|
3285
|
+
"ComponentLogConfig": {
|
|
3286
|
+
"document": "Component log collection configuration.",
|
|
3287
|
+
"members": [
|
|
3288
|
+
{
|
|
3289
|
+
"disabled": false,
|
|
3290
|
+
"document": "Component name",
|
|
3291
|
+
"example": "kapenter",
|
|
3292
|
+
"member": "string",
|
|
3293
|
+
"name": "Name",
|
|
3294
|
+
"output_required": true,
|
|
3295
|
+
"required": true,
|
|
3296
|
+
"type": "string",
|
|
3297
|
+
"value_allowed_null": false
|
|
3298
|
+
},
|
|
3299
|
+
{
|
|
3300
|
+
"disabled": false,
|
|
3301
|
+
"document": "Log level. for components that support dynamic adjustment, you can specify this parameter when enabling logs.",
|
|
3302
|
+
"example": "2",
|
|
3303
|
+
"member": "int64",
|
|
3304
|
+
"name": "LogLevel",
|
|
3305
|
+
"output_required": true,
|
|
3306
|
+
"required": false,
|
|
3307
|
+
"type": "int",
|
|
3308
|
+
"value_allowed_null": false
|
|
3309
|
+
},
|
|
3310
|
+
{
|
|
3311
|
+
"disabled": false,
|
|
3312
|
+
"document": "Logset ID. if not specified, auto-create.",
|
|
3313
|
+
"example": "2912eb16-a56c-4b9b-adb0-9828db1ad342",
|
|
3314
|
+
"member": "string",
|
|
3315
|
+
"name": "LogSetId",
|
|
3316
|
+
"output_required": true,
|
|
3317
|
+
"required": false,
|
|
3318
|
+
"type": "string",
|
|
3319
|
+
"value_allowed_null": false
|
|
3320
|
+
},
|
|
3321
|
+
{
|
|
3322
|
+
"disabled": false,
|
|
3323
|
+
"document": "Log topic ID. if not specified, auto-create.",
|
|
3324
|
+
"example": "2912eb16-a56c-4b9b-adb0-9828db1ad342",
|
|
3325
|
+
"member": "string",
|
|
3326
|
+
"name": "TopicId",
|
|
3327
|
+
"output_required": true,
|
|
3328
|
+
"required": false,
|
|
3329
|
+
"type": "string",
|
|
3330
|
+
"value_allowed_null": false
|
|
3331
|
+
},
|
|
3332
|
+
{
|
|
3333
|
+
"disabled": false,
|
|
3334
|
+
"document": "topic region. this parameter enables cross-region shipping of logs.",
|
|
3335
|
+
"example": "ap-guangzhou",
|
|
3336
|
+
"member": "string",
|
|
3337
|
+
"name": "TopicRegion",
|
|
3338
|
+
"output_required": true,
|
|
3339
|
+
"required": false,
|
|
3340
|
+
"type": "string",
|
|
3341
|
+
"value_allowed_null": false
|
|
3342
|
+
}
|
|
3343
|
+
],
|
|
3344
|
+
"usage": "both"
|
|
3345
|
+
},
|
|
3264
3346
|
"CreateBackupStorageLocationRequest": {
|
|
3265
3347
|
"document": "CreateBackupStorageLocation request structure.",
|
|
3266
3348
|
"members": [
|
|
@@ -7036,6 +7118,52 @@
|
|
|
7036
7118
|
],
|
|
7037
7119
|
"type": "object"
|
|
7038
7120
|
},
|
|
7121
|
+
"DescribeControlPlaneLogsRequest": {
|
|
7122
|
+
"document": "DescribeControlPlaneLogs request structure.",
|
|
7123
|
+
"members": [
|
|
7124
|
+
{
|
|
7125
|
+
"disabled": false,
|
|
7126
|
+
"document": "Cluster ID",
|
|
7127
|
+
"example": "cls-kaftesta",
|
|
7128
|
+
"member": "string",
|
|
7129
|
+
"name": "ClusterId",
|
|
7130
|
+
"required": true,
|
|
7131
|
+
"type": "string"
|
|
7132
|
+
},
|
|
7133
|
+
{
|
|
7134
|
+
"disabled": false,
|
|
7135
|
+
"document": "Cluster type. currently only support tke.",
|
|
7136
|
+
"example": "tke",
|
|
7137
|
+
"member": "string",
|
|
7138
|
+
"name": "ClusterType",
|
|
7139
|
+
"required": true,
|
|
7140
|
+
"type": "string"
|
|
7141
|
+
}
|
|
7142
|
+
],
|
|
7143
|
+
"type": "object"
|
|
7144
|
+
},
|
|
7145
|
+
"DescribeControlPlaneLogsResponse": {
|
|
7146
|
+
"document": "DescribeControlPlaneLogs response structure.",
|
|
7147
|
+
"members": [
|
|
7148
|
+
{
|
|
7149
|
+
"disabled": false,
|
|
7150
|
+
"document": "Specifies the query result of log collection configuration.",
|
|
7151
|
+
"example": "无",
|
|
7152
|
+
"member": "ComponentLogConfig",
|
|
7153
|
+
"name": "Details",
|
|
7154
|
+
"output_required": false,
|
|
7155
|
+
"type": "list",
|
|
7156
|
+
"value_allowed_null": false
|
|
7157
|
+
},
|
|
7158
|
+
{
|
|
7159
|
+
"document": "The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.",
|
|
7160
|
+
"member": "string",
|
|
7161
|
+
"name": "RequestId",
|
|
7162
|
+
"type": "string"
|
|
7163
|
+
}
|
|
7164
|
+
],
|
|
7165
|
+
"type": "object"
|
|
7166
|
+
},
|
|
7039
7167
|
"DescribeECMInstancesRequest": {
|
|
7040
7168
|
"document": "DescribeECMInstances request structure.",
|
|
7041
7169
|
"members": [
|
|
@@ -9042,6 +9170,60 @@
|
|
|
9042
9170
|
],
|
|
9043
9171
|
"type": "object"
|
|
9044
9172
|
},
|
|
9173
|
+
"DisableControlPlaneLogsRequest": {
|
|
9174
|
+
"document": "DisableControlPlaneLogs request structure.",
|
|
9175
|
+
"members": [
|
|
9176
|
+
{
|
|
9177
|
+
"disabled": false,
|
|
9178
|
+
"document": "Cluster ID",
|
|
9179
|
+
"example": "cls-kaftesta",
|
|
9180
|
+
"member": "string",
|
|
9181
|
+
"name": "ClusterId",
|
|
9182
|
+
"required": true,
|
|
9183
|
+
"type": "string"
|
|
9184
|
+
},
|
|
9185
|
+
{
|
|
9186
|
+
"disabled": false,
|
|
9187
|
+
"document": "Cluster type. currently only support tke.",
|
|
9188
|
+
"example": "tke",
|
|
9189
|
+
"member": "string",
|
|
9190
|
+
"name": "ClusterType",
|
|
9191
|
+
"required": true,
|
|
9192
|
+
"type": "string"
|
|
9193
|
+
},
|
|
9194
|
+
{
|
|
9195
|
+
"disabled": false,
|
|
9196
|
+
"document": "Component name list. currently supports cluster-autoscaler, kapenter.",
|
|
9197
|
+
"example": "[\"karpenter\"]",
|
|
9198
|
+
"member": "string",
|
|
9199
|
+
"name": "ComponentNames",
|
|
9200
|
+
"required": true,
|
|
9201
|
+
"type": "list"
|
|
9202
|
+
},
|
|
9203
|
+
{
|
|
9204
|
+
"disabled": false,
|
|
9205
|
+
"document": "Specifies whether to delete the logset and topic. if the logset and topic are in use by other collection rules, they will not be deleted.",
|
|
9206
|
+
"example": "false",
|
|
9207
|
+
"member": "bool",
|
|
9208
|
+
"name": "DeleteLogSetAndTopic",
|
|
9209
|
+
"required": false,
|
|
9210
|
+
"type": "bool"
|
|
9211
|
+
}
|
|
9212
|
+
],
|
|
9213
|
+
"type": "object"
|
|
9214
|
+
},
|
|
9215
|
+
"DisableControlPlaneLogsResponse": {
|
|
9216
|
+
"document": "DisableControlPlaneLogs response structure.",
|
|
9217
|
+
"members": [
|
|
9218
|
+
{
|
|
9219
|
+
"document": "The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.",
|
|
9220
|
+
"member": "string",
|
|
9221
|
+
"name": "RequestId",
|
|
9222
|
+
"type": "string"
|
|
9223
|
+
}
|
|
9224
|
+
],
|
|
9225
|
+
"type": "object"
|
|
9226
|
+
},
|
|
9045
9227
|
"DisableEncryptionProtectionRequest": {
|
|
9046
9228
|
"document": "DisableEncryptionProtection request structure.",
|
|
9047
9229
|
"members": [
|
|
@@ -9666,6 +9848,51 @@
|
|
|
9666
9848
|
],
|
|
9667
9849
|
"type": "object"
|
|
9668
9850
|
},
|
|
9851
|
+
"EnableControlPlaneLogsRequest": {
|
|
9852
|
+
"document": "EnableControlPlaneLogs request structure.",
|
|
9853
|
+
"members": [
|
|
9854
|
+
{
|
|
9855
|
+
"disabled": false,
|
|
9856
|
+
"document": "Cluster ID",
|
|
9857
|
+
"example": "cls-kaftesta",
|
|
9858
|
+
"member": "string",
|
|
9859
|
+
"name": "ClusterId",
|
|
9860
|
+
"required": true,
|
|
9861
|
+
"type": "string"
|
|
9862
|
+
},
|
|
9863
|
+
{
|
|
9864
|
+
"disabled": false,
|
|
9865
|
+
"document": "Cluster type. currently only support tke.",
|
|
9866
|
+
"example": "tke",
|
|
9867
|
+
"member": "string",
|
|
9868
|
+
"name": "ClusterType",
|
|
9869
|
+
"required": true,
|
|
9870
|
+
"type": "string"
|
|
9871
|
+
},
|
|
9872
|
+
{
|
|
9873
|
+
"disabled": false,
|
|
9874
|
+
"document": "Component name list. currently supports cluster-autoscaler, kapenter.",
|
|
9875
|
+
"example": "无",
|
|
9876
|
+
"member": "ComponentLogConfig",
|
|
9877
|
+
"name": "Components",
|
|
9878
|
+
"required": true,
|
|
9879
|
+
"type": "list"
|
|
9880
|
+
}
|
|
9881
|
+
],
|
|
9882
|
+
"type": "object"
|
|
9883
|
+
},
|
|
9884
|
+
"EnableControlPlaneLogsResponse": {
|
|
9885
|
+
"document": "EnableControlPlaneLogs response structure.",
|
|
9886
|
+
"members": [
|
|
9887
|
+
{
|
|
9888
|
+
"document": "The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.",
|
|
9889
|
+
"member": "string",
|
|
9890
|
+
"name": "RequestId",
|
|
9891
|
+
"type": "string"
|
|
9892
|
+
}
|
|
9893
|
+
],
|
|
9894
|
+
"type": "object"
|
|
9895
|
+
},
|
|
9669
9896
|
"EnableEncryptionProtectionRequest": {
|
|
9670
9897
|
"document": "EnableEncryptionProtection request structure.",
|
|
9671
9898
|
"members": [
|
|
@@ -548,6 +548,14 @@
|
|
|
548
548
|
"title": "Querying the list of clusters"
|
|
549
549
|
}
|
|
550
550
|
],
|
|
551
|
+
"DescribeControlPlaneLogs": [
|
|
552
|
+
{
|
|
553
|
+
"document": "This example shows you how to call when querying plug-in log collection settings.",
|
|
554
|
+
"input": "POST / HTTP/1.1\nHost: tke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeControlPlaneLogs\n<Common request parameters>\n\n{\n \"ClusterId\": \"cls-kaftesta\",\n \"ClusterType\": \"tke\"\n}",
|
|
555
|
+
"output": "{\n \"Response\": {\n \"Details\": [\n {\n \"Name\": \"karpenter\",\n \"LogLevel\": 2,\n \"LogSetId\": \"2912eb16-a56c-4b9b-adb0-9828db1ad342\",\n \"TopicRegion\": \"ap-guangzhou\",\n \"TopicId\": \"2912eb16-a56c-4b9b-adb0-9828db1ad342\"\n }\n ],\n \"RequestId\": \"583e6c4b-ff24-42f8-87f1-37e4c00d81b7\"\n }\n}",
|
|
556
|
+
"title": "Querying Plug-In Log Collection Settings"
|
|
557
|
+
}
|
|
558
|
+
],
|
|
551
559
|
"DescribeECMInstances": [
|
|
552
560
|
{
|
|
553
561
|
"document": "This example shows you how to obtain the information of instances in a cluster.",
|
|
@@ -806,6 +814,14 @@
|
|
|
806
814
|
"title": "Disabling cluster deletion protection"
|
|
807
815
|
}
|
|
808
816
|
],
|
|
817
|
+
"DisableControlPlaneLogs": [
|
|
818
|
+
{
|
|
819
|
+
"document": "This example shows you how to call the log collection settings when deleting a plugin.",
|
|
820
|
+
"input": "POST / HTTP/1.1\nHost: tke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DisableControlPlaneLogs\n<Common request parameters>\n\n{\n \"ClusterId\": \"cls-kaftesta\",\n \"ClusterType\": \"tke\",\n \"ComponentNames\": [\n \"karpenter\"\n ],\n \"DeleteLogSetAndTopic\": false\n}",
|
|
821
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
|
|
822
|
+
"title": "Delete Plugin Log Collection Settings"
|
|
823
|
+
}
|
|
824
|
+
],
|
|
809
825
|
"DisableEncryptionProtection": [
|
|
810
826
|
{
|
|
811
827
|
"document": "This example shows you how to disable encryption protection.",
|
|
@@ -830,6 +846,14 @@
|
|
|
830
846
|
"title": "Enabling cluster deletion protection"
|
|
831
847
|
}
|
|
832
848
|
],
|
|
849
|
+
"EnableControlPlaneLogs": [
|
|
850
|
+
{
|
|
851
|
+
"document": "This example shows you how to call when creating plugin log collection settings.",
|
|
852
|
+
"input": "POST / HTTP/1.1\nHost: tke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: EnableControlPlaneLogs\n<Common request parameters>\n\n{\n \"ClusterId\": \"cls-kaftesta\",\n \"ClusterType\": \"tke\",\n \"Components\": [\n {\n \"LogLevel\": 2,\n \"LogSetId\": \"2912eb16-a56c-4b9b-adb0-9828db1ad342\",\n \"Name\": \"kapenter\",\n \"TopicId\": \"2912eb16-a56c-4b9b-adb0-9828db1ad342\",\n \"TopicRegion\": \"ap-guangzhou\"\n }\n ]\n}",
|
|
853
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"f12a6e20-f950-4af9-8f8b-b6329a4961c2\"\n }\n}",
|
|
854
|
+
"title": "Creating Plugin Log Collection Configuration"
|
|
855
|
+
}
|
|
856
|
+
],
|
|
833
857
|
"EnableEncryptionProtection": [
|
|
834
858
|
{
|
|
835
859
|
"document": "This example shows you how to enable encryption protection.",
|