Skip to content

Commit c990572

Browse files
committed
Optimize GetInternetTuple API.
1 parent c403b0d commit c990572

11 files changed

+682
-1
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2024-04-10 Version: 1.0.1
2+
- Optimize GetInternetTuple API.
3+
- Optimize CreateNetworkPath API.
4+
- Optimize DeleteNetworkPath API.
5+
- Optimize CreateNetworkReachableAnalysis API.
6+
- Optimize GetNetworkReachableAnalysis API.
7+
- Publish DeleteNetworkReachableAnalysis API.
8+
- Publish CreateAndAnalyzeNetworkPath API.
9+
110
2022-08-16 Version: 1.0.0
211
- Publish GetNatTopN API.
312

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.0.0'
1+
__version__ = '1.0.1'
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RpcRequest
21+
22+
class CreateAndAnalyzeNetworkPathRequest(RpcRequest):
23+
24+
def __init__(self):
25+
RpcRequest.__init__(self, 'nis', '2021-12-16', 'CreateAndAnalyzeNetworkPath','networkana')
26+
self.set_method('GET')
27+
28+
def get_TargetId(self): # String
29+
return self.get_query_params().get('TargetId')
30+
31+
def set_TargetId(self, TargetId): # String
32+
self.add_query_param('TargetId', TargetId)
33+
def get_TargetType(self): # String
34+
return self.get_query_params().get('TargetType')
35+
36+
def set_TargetType(self, TargetType): # String
37+
self.add_query_param('TargetType', TargetType)
38+
def get_TargetIpAddress(self): # String
39+
return self.get_query_params().get('TargetIpAddress')
40+
41+
def set_TargetIpAddress(self, TargetIpAddress): # String
42+
self.add_query_param('TargetIpAddress', TargetIpAddress)
43+
def get_SourcePort(self): # Integer
44+
return self.get_query_params().get('SourcePort')
45+
46+
def set_SourcePort(self, SourcePort): # Integer
47+
self.add_query_param('SourcePort', SourcePort)
48+
def get_Protocol(self): # String
49+
return self.get_query_params().get('Protocol')
50+
51+
def set_Protocol(self, Protocol): # String
52+
self.add_query_param('Protocol', Protocol)
53+
def get_SourceType(self): # String
54+
return self.get_query_params().get('SourceType')
55+
56+
def set_SourceType(self, SourceType): # String
57+
self.add_query_param('SourceType', SourceType)
58+
def get_TargetPort(self): # Integer
59+
return self.get_query_params().get('TargetPort')
60+
61+
def set_TargetPort(self, TargetPort): # Integer
62+
self.add_query_param('TargetPort', TargetPort)
63+
def get_SourceId(self): # String
64+
return self.get_query_params().get('SourceId')
65+
66+
def set_SourceId(self, SourceId): # String
67+
self.add_query_param('SourceId', SourceId)
68+
def get_SourceIpAddress(self): # String
69+
return self.get_query_params().get('SourceIpAddress')
70+
71+
def set_SourceIpAddress(self, SourceIpAddress): # String
72+
self.add_query_param('SourceIpAddress', SourceIpAddress)
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RpcRequest
21+
22+
class CreateNetworkPathRequest(RpcRequest):
23+
24+
def __init__(self):
25+
RpcRequest.__init__(self, 'nis', '2021-12-16', 'CreateNetworkPath','networkana')
26+
self.set_method('POST')
27+
28+
def get_TargetId(self): # String
29+
return self.get_query_params().get('TargetId')
30+
31+
def set_TargetId(self, TargetId): # String
32+
self.add_query_param('TargetId', TargetId)
33+
def get_TargetType(self): # String
34+
return self.get_query_params().get('TargetType')
35+
36+
def set_TargetType(self, TargetType): # String
37+
self.add_query_param('TargetType', TargetType)
38+
def get_TargetIpAddress(self): # String
39+
return self.get_query_params().get('TargetIpAddress')
40+
41+
def set_TargetIpAddress(self, TargetIpAddress): # String
42+
self.add_query_param('TargetIpAddress', TargetIpAddress)
43+
def get_NetworkPathName(self): # String
44+
return self.get_query_params().get('NetworkPathName')
45+
46+
def set_NetworkPathName(self, NetworkPathName): # String
47+
self.add_query_param('NetworkPathName', NetworkPathName)
48+
def get_SourcePort(self): # Integer
49+
return self.get_query_params().get('SourcePort')
50+
51+
def set_SourcePort(self, SourcePort): # Integer
52+
self.add_query_param('SourcePort', SourcePort)
53+
def get_ResourceGroupId(self): # String
54+
return self.get_query_params().get('ResourceGroupId')
55+
56+
def set_ResourceGroupId(self, ResourceGroupId): # String
57+
self.add_query_param('ResourceGroupId', ResourceGroupId)
58+
def get_Protocol(self): # String
59+
return self.get_query_params().get('Protocol')
60+
61+
def set_Protocol(self, Protocol): # String
62+
self.add_query_param('Protocol', Protocol)
63+
def get_SourceType(self): # String
64+
return self.get_query_params().get('SourceType')
65+
66+
def set_SourceType(self, SourceType): # String
67+
self.add_query_param('SourceType', SourceType)
68+
def get_Tags(self): # RepeatList
69+
return self.get_query_params().get('Tag')
70+
71+
def set_Tags(self, Tag): # RepeatList
72+
for depth1 in range(len(Tag)):
73+
if Tag[depth1].get('Key') is not None:
74+
self.add_query_param('Tag.' + str(depth1 + 1) + '.Key', Tag[depth1].get('Key'))
75+
if Tag[depth1].get('Value') is not None:
76+
self.add_query_param('Tag.' + str(depth1 + 1) + '.Value', Tag[depth1].get('Value'))
77+
def get_TargetPort(self): # Integer
78+
return self.get_query_params().get('TargetPort')
79+
80+
def set_TargetPort(self, TargetPort): # Integer
81+
self.add_query_param('TargetPort', TargetPort)
82+
def get_SourceId(self): # String
83+
return self.get_query_params().get('SourceId')
84+
85+
def set_SourceId(self, SourceId): # String
86+
self.add_query_param('SourceId', SourceId)
87+
def get_SourceIpAddress(self): # String
88+
return self.get_query_params().get('SourceIpAddress')
89+
90+
def set_SourceIpAddress(self, SourceIpAddress): # String
91+
self.add_query_param('SourceIpAddress', SourceIpAddress)
92+
def get_NetworkPathDescription(self): # String
93+
return self.get_query_params().get('NetworkPathDescription')
94+
95+
def set_NetworkPathDescription(self, NetworkPathDescription): # String
96+
self.add_query_param('NetworkPathDescription', NetworkPathDescription)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RpcRequest
21+
22+
class CreateNetworkReachableAnalysisRequest(RpcRequest):
23+
24+
def __init__(self):
25+
RpcRequest.__init__(self, 'nis', '2021-12-16', 'CreateNetworkReachableAnalysis','networkana')
26+
self.set_method('POST')
27+
28+
def get_NetworkPathId(self): # String
29+
return self.get_query_params().get('NetworkPathId')
30+
31+
def set_NetworkPathId(self, NetworkPathId): # String
32+
self.add_query_param('NetworkPathId', NetworkPathId)
33+
def get_Tags(self): # RepeatList
34+
return self.get_query_params().get('Tag')
35+
36+
def set_Tags(self, Tag): # RepeatList
37+
for depth1 in range(len(Tag)):
38+
if Tag[depth1].get('Key') is not None:
39+
self.add_query_param('Tag.' + str(depth1 + 1) + '.Key', Tag[depth1].get('Key'))
40+
if Tag[depth1].get('Value') is not None:
41+
self.add_query_param('Tag.' + str(depth1 + 1) + '.Value', Tag[depth1].get('Value'))
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RpcRequest
21+
import json
22+
23+
class DeleteNetworkPathRequest(RpcRequest):
24+
25+
def __init__(self):
26+
RpcRequest.__init__(self, 'nis', '2021-12-16', 'DeleteNetworkPath','networkana')
27+
self.set_method('POST')
28+
29+
def get_NetworkPathIds(self): # Array
30+
return self.get_query_params().get('NetworkPathIds')
31+
32+
def set_NetworkPathIds(self, NetworkPathIds): # Array
33+
self.add_query_param("NetworkPathIds", json.dumps(NetworkPathIds))
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RpcRequest
21+
import json
22+
23+
class DeleteNetworkReachableAnalysisRequest(RpcRequest):
24+
25+
def __init__(self):
26+
RpcRequest.__init__(self, 'nis', '2021-12-16', 'DeleteNetworkReachableAnalysis','networkana')
27+
self.set_method('POST')
28+
29+
def get_NetworkReachableAnalysisIds(self): # Array
30+
return self.get_query_params().get('NetworkReachableAnalysisIds')
31+
32+
def set_NetworkReachableAnalysisIds(self, NetworkReachableAnalysisIds): # Array
33+
self.add_query_param("NetworkReachableAnalysisIds", json.dumps(NetworkReachableAnalysisIds))

0 commit comments

Comments
 (0)