Skip to content

Commit

Permalink
Optimize GetInternetTuple API.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdk-team committed Apr 10, 2024
1 parent c403b0d commit c990572
Show file tree
Hide file tree
Showing 11 changed files with 682 additions and 1 deletion.
9 changes: 9 additions & 0 deletions aliyun-python-sdk-nis/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2024-04-10 Version: 1.0.1
- Optimize GetInternetTuple API.
- Optimize CreateNetworkPath API.
- Optimize DeleteNetworkPath API.
- Optimize CreateNetworkReachableAnalysis API.
- Optimize GetNetworkReachableAnalysis API.
- Publish DeleteNetworkReachableAnalysis API.
- Publish CreateAndAnalyzeNetworkPath API.

2022-08-16 Version: 1.0.0
- Publish GetNatTopN API.

2 changes: 1 addition & 1 deletion aliyun-python-sdk-nis/aliyunsdknis/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.0.0'
__version__ = '1.0.1'
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

from aliyunsdkcore.request import RpcRequest

class CreateAndAnalyzeNetworkPathRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'nis', '2021-12-16', 'CreateAndAnalyzeNetworkPath','networkana')
self.set_method('GET')

def get_TargetId(self): # String
return self.get_query_params().get('TargetId')

def set_TargetId(self, TargetId): # String
self.add_query_param('TargetId', TargetId)
def get_TargetType(self): # String
return self.get_query_params().get('TargetType')

def set_TargetType(self, TargetType): # String
self.add_query_param('TargetType', TargetType)
def get_TargetIpAddress(self): # String
return self.get_query_params().get('TargetIpAddress')

def set_TargetIpAddress(self, TargetIpAddress): # String
self.add_query_param('TargetIpAddress', TargetIpAddress)
def get_SourcePort(self): # Integer
return self.get_query_params().get('SourcePort')

def set_SourcePort(self, SourcePort): # Integer
self.add_query_param('SourcePort', SourcePort)
def get_Protocol(self): # String
return self.get_query_params().get('Protocol')

def set_Protocol(self, Protocol): # String
self.add_query_param('Protocol', Protocol)
def get_SourceType(self): # String
return self.get_query_params().get('SourceType')

def set_SourceType(self, SourceType): # String
self.add_query_param('SourceType', SourceType)
def get_TargetPort(self): # Integer
return self.get_query_params().get('TargetPort')

def set_TargetPort(self, TargetPort): # Integer
self.add_query_param('TargetPort', TargetPort)
def get_SourceId(self): # String
return self.get_query_params().get('SourceId')

def set_SourceId(self, SourceId): # String
self.add_query_param('SourceId', SourceId)
def get_SourceIpAddress(self): # String
return self.get_query_params().get('SourceIpAddress')

def set_SourceIpAddress(self, SourceIpAddress): # String
self.add_query_param('SourceIpAddress', SourceIpAddress)
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

from aliyunsdkcore.request import RpcRequest

class CreateNetworkPathRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'nis', '2021-12-16', 'CreateNetworkPath','networkana')
self.set_method('POST')

def get_TargetId(self): # String
return self.get_query_params().get('TargetId')

def set_TargetId(self, TargetId): # String
self.add_query_param('TargetId', TargetId)
def get_TargetType(self): # String
return self.get_query_params().get('TargetType')

def set_TargetType(self, TargetType): # String
self.add_query_param('TargetType', TargetType)
def get_TargetIpAddress(self): # String
return self.get_query_params().get('TargetIpAddress')

def set_TargetIpAddress(self, TargetIpAddress): # String
self.add_query_param('TargetIpAddress', TargetIpAddress)
def get_NetworkPathName(self): # String
return self.get_query_params().get('NetworkPathName')

def set_NetworkPathName(self, NetworkPathName): # String
self.add_query_param('NetworkPathName', NetworkPathName)
def get_SourcePort(self): # Integer
return self.get_query_params().get('SourcePort')

def set_SourcePort(self, SourcePort): # Integer
self.add_query_param('SourcePort', SourcePort)
def get_ResourceGroupId(self): # String
return self.get_query_params().get('ResourceGroupId')

def set_ResourceGroupId(self, ResourceGroupId): # String
self.add_query_param('ResourceGroupId', ResourceGroupId)
def get_Protocol(self): # String
return self.get_query_params().get('Protocol')

def set_Protocol(self, Protocol): # String
self.add_query_param('Protocol', Protocol)
def get_SourceType(self): # String
return self.get_query_params().get('SourceType')

def set_SourceType(self, SourceType): # String
self.add_query_param('SourceType', SourceType)
def get_Tags(self): # RepeatList
return self.get_query_params().get('Tag')

def set_Tags(self, Tag): # RepeatList
for depth1 in range(len(Tag)):
if Tag[depth1].get('Key') is not None:
self.add_query_param('Tag.' + str(depth1 + 1) + '.Key', Tag[depth1].get('Key'))
if Tag[depth1].get('Value') is not None:
self.add_query_param('Tag.' + str(depth1 + 1) + '.Value', Tag[depth1].get('Value'))
def get_TargetPort(self): # Integer
return self.get_query_params().get('TargetPort')

def set_TargetPort(self, TargetPort): # Integer
self.add_query_param('TargetPort', TargetPort)
def get_SourceId(self): # String
return self.get_query_params().get('SourceId')

def set_SourceId(self, SourceId): # String
self.add_query_param('SourceId', SourceId)
def get_SourceIpAddress(self): # String
return self.get_query_params().get('SourceIpAddress')

def set_SourceIpAddress(self, SourceIpAddress): # String
self.add_query_param('SourceIpAddress', SourceIpAddress)
def get_NetworkPathDescription(self): # String
return self.get_query_params().get('NetworkPathDescription')

def set_NetworkPathDescription(self, NetworkPathDescription): # String
self.add_query_param('NetworkPathDescription', NetworkPathDescription)
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

from aliyunsdkcore.request import RpcRequest

class CreateNetworkReachableAnalysisRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'nis', '2021-12-16', 'CreateNetworkReachableAnalysis','networkana')
self.set_method('POST')

def get_NetworkPathId(self): # String
return self.get_query_params().get('NetworkPathId')

def set_NetworkPathId(self, NetworkPathId): # String
self.add_query_param('NetworkPathId', NetworkPathId)
def get_Tags(self): # RepeatList
return self.get_query_params().get('Tag')

def set_Tags(self, Tag): # RepeatList
for depth1 in range(len(Tag)):
if Tag[depth1].get('Key') is not None:
self.add_query_param('Tag.' + str(depth1 + 1) + '.Key', Tag[depth1].get('Key'))
if Tag[depth1].get('Value') is not None:
self.add_query_param('Tag.' + str(depth1 + 1) + '.Value', Tag[depth1].get('Value'))
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

from aliyunsdkcore.request import RpcRequest
import json

class DeleteNetworkPathRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'nis', '2021-12-16', 'DeleteNetworkPath','networkana')
self.set_method('POST')

def get_NetworkPathIds(self): # Array
return self.get_query_params().get('NetworkPathIds')

def set_NetworkPathIds(self, NetworkPathIds): # Array
self.add_query_param("NetworkPathIds", json.dumps(NetworkPathIds))
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

from aliyunsdkcore.request import RpcRequest
import json

class DeleteNetworkReachableAnalysisRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'nis', '2021-12-16', 'DeleteNetworkReachableAnalysis','networkana')
self.set_method('POST')

def get_NetworkReachableAnalysisIds(self): # Array
return self.get_query_params().get('NetworkReachableAnalysisIds')

def set_NetworkReachableAnalysisIds(self, NetworkReachableAnalysisIds): # Array
self.add_query_param("NetworkReachableAnalysisIds", json.dumps(NetworkReachableAnalysisIds))
Loading

0 comments on commit c990572

Please sign in to comment.