Skip to content

Commit 4ef098f

Browse files
author
BitsAdmin
committed
Merge branch 'fw_center-Python-2021-09-06-online-1433-2025_08_06_19_18_50' into 'integration_2025-08-07_1026539369730'
feat: [development task] fw_center-1433-Python (1527828) See merge request iaasng/volcengine-python-sdk!735
2 parents 2ae59bd + 56459ee commit 4ef098f

File tree

76 files changed

+7985
-272
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+7985
-272
lines changed

volcenginesdkfwcenter/.DS_Store

-6 KB
Binary file not shown.

volcenginesdkfwcenter/__init__.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,17 @@
2929
from volcenginesdkfwcenter.models.add_nat_firewall_control_policy_response import AddNatFirewallControlPolicyResponse
3030
from volcenginesdkfwcenter.models.add_vpc_firewall_acl_rule_request import AddVpcFirewallAclRuleRequest
3131
from volcenginesdkfwcenter.models.add_vpc_firewall_acl_rule_response import AddVpcFirewallAclRuleResponse
32+
from volcenginesdkfwcenter.models.address_detail_list_for_add_address_book_input import AddressDetailListForAddAddressBookInput
33+
from volcenginesdkfwcenter.models.address_detail_list_for_describe_address_book_output import AddressDetailListForDescribeAddressBookOutput
34+
from volcenginesdkfwcenter.models.address_detail_list_for_modify_address_book_input import AddressDetailListForModifyAddressBookInput
35+
from volcenginesdkfwcenter.models.address_detail_list_for_modify_address_book_list_input import AddressDetailListForModifyAddressBookListInput
3236
from volcenginesdkfwcenter.models.asset_list_for_update_asset_switch_input import AssetListForUpdateAssetSwitchInput
37+
from volcenginesdkfwcenter.models.asset_list_for_update_asset_switch_output import AssetListForUpdateAssetSwitchOutput
3338
from volcenginesdkfwcenter.models.asset_list_request import AssetListRequest
3439
from volcenginesdkfwcenter.models.asset_list_response import AssetListResponse
40+
from volcenginesdkfwcenter.models.control_policy_list_for_update_asset_switch_output import ControlPolicyListForUpdateAssetSwitchOutput
41+
from volcenginesdkfwcenter.models.create_nat_firewall_request import CreateNatFirewallRequest
42+
from volcenginesdkfwcenter.models.create_nat_firewall_response import CreateNatFirewallResponse
3543
from volcenginesdkfwcenter.models.data_for_asset_list_output import DataForAssetListOutput
3644
from volcenginesdkfwcenter.models.data_for_describe_address_book_output import DataForDescribeAddressBookOutput
3745
from volcenginesdkfwcenter.models.data_for_describe_control_policy_by_rule_id_output import DataForDescribeControlPolicyByRuleIdOutput
@@ -50,6 +58,8 @@
5058
from volcenginesdkfwcenter.models.delete_dns_control_policy_response import DeleteDnsControlPolicyResponse
5159
from volcenginesdkfwcenter.models.delete_nat_firewall_control_policy_request import DeleteNatFirewallControlPolicyRequest
5260
from volcenginesdkfwcenter.models.delete_nat_firewall_control_policy_response import DeleteNatFirewallControlPolicyResponse
61+
from volcenginesdkfwcenter.models.delete_nat_firewall_request import DeleteNatFirewallRequest
62+
from volcenginesdkfwcenter.models.delete_nat_firewall_response import DeleteNatFirewallResponse
5363
from volcenginesdkfwcenter.models.delete_vpc_firewall_acl_rule_request import DeleteVpcFirewallAclRuleRequest
5464
from volcenginesdkfwcenter.models.delete_vpc_firewall_acl_rule_response import DeleteVpcFirewallAclRuleResponse
5565
from volcenginesdkfwcenter.models.describe_address_book_request import DescribeAddressBookRequest
@@ -76,6 +86,17 @@
7686
from volcenginesdkfwcenter.models.describe_vpc_firewall_list_response import DescribeVpcFirewallListResponse
7787
from volcenginesdkfwcenter.models.describe_vpcs_request import DescribeVpcsRequest
7888
from volcenginesdkfwcenter.models.describe_vpcs_response import DescribeVpcsResponse
89+
from volcenginesdkfwcenter.models.dest_port_list_v1_for_describe_control_policy_by_rule_id_output import DestPortListV1ForDescribeControlPolicyByRuleIdOutput
90+
from volcenginesdkfwcenter.models.dest_port_list_v1_for_describe_control_policy_output import DestPortListV1ForDescribeControlPolicyOutput
91+
from volcenginesdkfwcenter.models.dest_port_list_v1_for_describe_nat_firewall_control_policy_output import DestPortListV1ForDescribeNatFirewallControlPolicyOutput
92+
from volcenginesdkfwcenter.models.dest_port_list_v1_for_describe_vpc_firewall_acl_rule_list_output import DestPortListV1ForDescribeVpcFirewallAclRuleListOutput
93+
from volcenginesdkfwcenter.models.destination_cidr_list_v1_for_describe_control_policy_by_rule_id_output import DestinationCidrListV1ForDescribeControlPolicyByRuleIdOutput
94+
from volcenginesdkfwcenter.models.destination_cidr_list_v1_for_describe_control_policy_output import DestinationCidrListV1ForDescribeControlPolicyOutput
95+
from volcenginesdkfwcenter.models.destination_cidr_list_v1_for_describe_nat_firewall_control_policy_output import DestinationCidrListV1ForDescribeNatFirewallControlPolicyOutput
96+
from volcenginesdkfwcenter.models.destination_cidr_list_v1_for_describe_vpc_firewall_acl_rule_list_output import DestinationCidrListV1ForDescribeVpcFirewallAclRuleListOutput
97+
from volcenginesdkfwcenter.models.domain_list_v1_for_describe_dns_control_policy_output import DomainListV1ForDescribeDnsControlPolicyOutput
98+
from volcenginesdkfwcenter.models.modify_address_book_list_request import ModifyAddressBookListRequest
99+
from volcenginesdkfwcenter.models.modify_address_book_list_response import ModifyAddressBookListResponse
79100
from volcenginesdkfwcenter.models.modify_address_book_request import ModifyAddressBookRequest
80101
from volcenginesdkfwcenter.models.modify_address_book_response import ModifyAddressBookResponse
81102
from volcenginesdkfwcenter.models.modify_control_policy_position_request import ModifyControlPolicyPositionRequest
@@ -92,9 +113,17 @@
92113
from volcenginesdkfwcenter.models.modify_vpc_firewall_acl_rule_position_response import ModifyVpcFirewallAclRulePositionResponse
93114
from volcenginesdkfwcenter.models.modify_vpc_firewall_acl_rule_request import ModifyVpcFirewallAclRuleRequest
94115
from volcenginesdkfwcenter.models.modify_vpc_firewall_acl_rule_response import ModifyVpcFirewallAclRuleResponse
116+
from volcenginesdkfwcenter.models.source_cidr_list_v1_for_describe_control_policy_by_rule_id_output import SourceCidrListV1ForDescribeControlPolicyByRuleIdOutput
117+
from volcenginesdkfwcenter.models.source_cidr_list_v1_for_describe_control_policy_output import SourceCidrListV1ForDescribeControlPolicyOutput
118+
from volcenginesdkfwcenter.models.source_cidr_list_v1_for_describe_nat_firewall_control_policy_output import SourceCidrListV1ForDescribeNatFirewallControlPolicyOutput
119+
from volcenginesdkfwcenter.models.source_cidr_list_v1_for_describe_vpc_firewall_acl_rule_list_output import SourceCidrListV1ForDescribeVpcFirewallAclRuleListOutput
95120
from volcenginesdkfwcenter.models.source_for_add_dns_control_policy_input import SourceForAddDnsControlPolicyInput
96121
from volcenginesdkfwcenter.models.source_for_describe_dns_control_policy_output import SourceForDescribeDnsControlPolicyOutput
97122
from volcenginesdkfwcenter.models.source_for_modify_dns_control_policy_input import SourceForModifyDnsControlPolicyInput
123+
from volcenginesdkfwcenter.models.tag_for_add_address_book_input import TagForAddAddressBookInput
124+
from volcenginesdkfwcenter.models.tag_for_create_nat_firewall_input import TagForCreateNatFirewallInput
125+
from volcenginesdkfwcenter.models.tag_for_describe_address_book_output import TagForDescribeAddressBookOutput
126+
from volcenginesdkfwcenter.models.tag_for_modify_address_book_input import TagForModifyAddressBookInput
98127
from volcenginesdkfwcenter.models.update_asset_switch_request import UpdateAssetSwitchRequest
99128
from volcenginesdkfwcenter.models.update_asset_switch_response import UpdateAssetSwitchResponse
100129
from volcenginesdkfwcenter.models.update_assets_request import UpdateAssetsRequest

volcenginesdkfwcenter/api/fwcenter_api.py

Lines changed: 291 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,103 @@ def asset_list_with_http_info(self, body, **kwargs): # noqa: E501
615615
_request_timeout=params.get('_request_timeout'),
616616
collection_formats=collection_formats)
617617

618+
def create_nat_firewall(self, body, **kwargs): # noqa: E501
619+
"""create_nat_firewall # noqa: E501
620+
621+
This method makes a synchronous HTTP request by default. To make an
622+
asynchronous HTTP request, please pass async_req=True
623+
>>> thread = api.create_nat_firewall(body, async_req=True)
624+
>>> result = thread.get()
625+
626+
:param async_req bool
627+
:param CreateNatFirewallRequest body: (required)
628+
:return: CreateNatFirewallResponse
629+
If the method is called asynchronously,
630+
returns the request thread.
631+
"""
632+
kwargs['_return_http_data_only'] = True
633+
if kwargs.get('async_req'):
634+
return self.create_nat_firewall_with_http_info(body, **kwargs) # noqa: E501
635+
else:
636+
(data) = self.create_nat_firewall_with_http_info(body, **kwargs) # noqa: E501
637+
return data
638+
639+
def create_nat_firewall_with_http_info(self, body, **kwargs): # noqa: E501
640+
"""create_nat_firewall # noqa: E501
641+
642+
This method makes a synchronous HTTP request by default. To make an
643+
asynchronous HTTP request, please pass async_req=True
644+
>>> thread = api.create_nat_firewall_with_http_info(body, async_req=True)
645+
>>> result = thread.get()
646+
647+
:param async_req bool
648+
:param CreateNatFirewallRequest body: (required)
649+
:return: CreateNatFirewallResponse
650+
If the method is called asynchronously,
651+
returns the request thread.
652+
"""
653+
654+
all_params = ['body'] # noqa: E501
655+
all_params.append('async_req')
656+
all_params.append('_return_http_data_only')
657+
all_params.append('_preload_content')
658+
all_params.append('_request_timeout')
659+
660+
params = locals()
661+
for key, val in six.iteritems(params['kwargs']):
662+
if key not in all_params:
663+
raise TypeError(
664+
"Got an unexpected keyword argument '%s'"
665+
" to method create_nat_firewall" % key
666+
)
667+
params[key] = val
668+
del params['kwargs']
669+
# verify the required parameter 'body' is set
670+
if self.api_client.client_side_validation and ('body' not in params or
671+
params['body'] is None): # noqa: E501
672+
raise ValueError("Missing the required parameter `body` when calling `create_nat_firewall`") # noqa: E501
673+
674+
collection_formats = {}
675+
676+
path_params = {}
677+
678+
query_params = []
679+
680+
header_params = {}
681+
682+
form_params = []
683+
local_var_files = {}
684+
685+
body_params = None
686+
if 'body' in params:
687+
body_params = params['body']
688+
# HTTP header `Accept`
689+
header_params['Accept'] = self.api_client.select_header_accept(
690+
['application/json']) # noqa: E501
691+
692+
# HTTP header `Content-Type`
693+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
694+
['application/json']) # noqa: E501
695+
696+
# Authentication setting
697+
auth_settings = ['volcengineSign'] # noqa: E501
698+
699+
return self.api_client.call_api(
700+
'/CreateNatFirewall/2021-09-06/fw_center/post/application_json/', 'POST',
701+
path_params,
702+
query_params,
703+
header_params,
704+
body=body_params,
705+
post_params=form_params,
706+
files=local_var_files,
707+
response_type='CreateNatFirewallResponse', # noqa: E501
708+
auth_settings=auth_settings,
709+
async_req=params.get('async_req'),
710+
_return_http_data_only=params.get('_return_http_data_only'),
711+
_preload_content=params.get('_preload_content', True),
712+
_request_timeout=params.get('_request_timeout'),
713+
collection_formats=collection_formats)
714+
618715
def delete_address_book(self, body, **kwargs): # noqa: E501
619716
"""delete_address_book # noqa: E501
620717
@@ -906,6 +1003,103 @@ def delete_dns_control_policy_with_http_info(self, body, **kwargs): # noqa: E50
9061003
_request_timeout=params.get('_request_timeout'),
9071004
collection_formats=collection_formats)
9081005

1006+
def delete_nat_firewall(self, body, **kwargs): # noqa: E501
1007+
"""delete_nat_firewall # noqa: E501
1008+
1009+
This method makes a synchronous HTTP request by default. To make an
1010+
asynchronous HTTP request, please pass async_req=True
1011+
>>> thread = api.delete_nat_firewall(body, async_req=True)
1012+
>>> result = thread.get()
1013+
1014+
:param async_req bool
1015+
:param DeleteNatFirewallRequest body: (required)
1016+
:return: DeleteNatFirewallResponse
1017+
If the method is called asynchronously,
1018+
returns the request thread.
1019+
"""
1020+
kwargs['_return_http_data_only'] = True
1021+
if kwargs.get('async_req'):
1022+
return self.delete_nat_firewall_with_http_info(body, **kwargs) # noqa: E501
1023+
else:
1024+
(data) = self.delete_nat_firewall_with_http_info(body, **kwargs) # noqa: E501
1025+
return data
1026+
1027+
def delete_nat_firewall_with_http_info(self, body, **kwargs): # noqa: E501
1028+
"""delete_nat_firewall # noqa: E501
1029+
1030+
This method makes a synchronous HTTP request by default. To make an
1031+
asynchronous HTTP request, please pass async_req=True
1032+
>>> thread = api.delete_nat_firewall_with_http_info(body, async_req=True)
1033+
>>> result = thread.get()
1034+
1035+
:param async_req bool
1036+
:param DeleteNatFirewallRequest body: (required)
1037+
:return: DeleteNatFirewallResponse
1038+
If the method is called asynchronously,
1039+
returns the request thread.
1040+
"""
1041+
1042+
all_params = ['body'] # noqa: E501
1043+
all_params.append('async_req')
1044+
all_params.append('_return_http_data_only')
1045+
all_params.append('_preload_content')
1046+
all_params.append('_request_timeout')
1047+
1048+
params = locals()
1049+
for key, val in six.iteritems(params['kwargs']):
1050+
if key not in all_params:
1051+
raise TypeError(
1052+
"Got an unexpected keyword argument '%s'"
1053+
" to method delete_nat_firewall" % key
1054+
)
1055+
params[key] = val
1056+
del params['kwargs']
1057+
# verify the required parameter 'body' is set
1058+
if self.api_client.client_side_validation and ('body' not in params or
1059+
params['body'] is None): # noqa: E501
1060+
raise ValueError("Missing the required parameter `body` when calling `delete_nat_firewall`") # noqa: E501
1061+
1062+
collection_formats = {}
1063+
1064+
path_params = {}
1065+
1066+
query_params = []
1067+
1068+
header_params = {}
1069+
1070+
form_params = []
1071+
local_var_files = {}
1072+
1073+
body_params = None
1074+
if 'body' in params:
1075+
body_params = params['body']
1076+
# HTTP header `Accept`
1077+
header_params['Accept'] = self.api_client.select_header_accept(
1078+
['application/json']) # noqa: E501
1079+
1080+
# HTTP header `Content-Type`
1081+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1082+
['application/json']) # noqa: E501
1083+
1084+
# Authentication setting
1085+
auth_settings = ['volcengineSign'] # noqa: E501
1086+
1087+
return self.api_client.call_api(
1088+
'/DeleteNatFirewall/2021-09-06/fw_center/post/application_json/', 'POST',
1089+
path_params,
1090+
query_params,
1091+
header_params,
1092+
body=body_params,
1093+
post_params=form_params,
1094+
files=local_var_files,
1095+
response_type='DeleteNatFirewallResponse', # noqa: E501
1096+
auth_settings=auth_settings,
1097+
async_req=params.get('async_req'),
1098+
_return_http_data_only=params.get('_return_http_data_only'),
1099+
_preload_content=params.get('_preload_content', True),
1100+
_request_timeout=params.get('_request_timeout'),
1101+
collection_formats=collection_formats)
1102+
9091103
def delete_nat_firewall_control_policy(self, body, **kwargs): # noqa: E501
9101104
"""delete_nat_firewall_control_policy # noqa: E501
9111105
@@ -2361,6 +2555,103 @@ def modify_address_book_with_http_info(self, body, **kwargs): # noqa: E501
23612555
_request_timeout=params.get('_request_timeout'),
23622556
collection_formats=collection_formats)
23632557

2558+
def modify_address_book_list(self, body, **kwargs): # noqa: E501
2559+
"""modify_address_book_list # noqa: E501
2560+
2561+
This method makes a synchronous HTTP request by default. To make an
2562+
asynchronous HTTP request, please pass async_req=True
2563+
>>> thread = api.modify_address_book_list(body, async_req=True)
2564+
>>> result = thread.get()
2565+
2566+
:param async_req bool
2567+
:param ModifyAddressBookListRequest body: (required)
2568+
:return: ModifyAddressBookListResponse
2569+
If the method is called asynchronously,
2570+
returns the request thread.
2571+
"""
2572+
kwargs['_return_http_data_only'] = True
2573+
if kwargs.get('async_req'):
2574+
return self.modify_address_book_list_with_http_info(body, **kwargs) # noqa: E501
2575+
else:
2576+
(data) = self.modify_address_book_list_with_http_info(body, **kwargs) # noqa: E501
2577+
return data
2578+
2579+
def modify_address_book_list_with_http_info(self, body, **kwargs): # noqa: E501
2580+
"""modify_address_book_list # noqa: E501
2581+
2582+
This method makes a synchronous HTTP request by default. To make an
2583+
asynchronous HTTP request, please pass async_req=True
2584+
>>> thread = api.modify_address_book_list_with_http_info(body, async_req=True)
2585+
>>> result = thread.get()
2586+
2587+
:param async_req bool
2588+
:param ModifyAddressBookListRequest body: (required)
2589+
:return: ModifyAddressBookListResponse
2590+
If the method is called asynchronously,
2591+
returns the request thread.
2592+
"""
2593+
2594+
all_params = ['body'] # noqa: E501
2595+
all_params.append('async_req')
2596+
all_params.append('_return_http_data_only')
2597+
all_params.append('_preload_content')
2598+
all_params.append('_request_timeout')
2599+
2600+
params = locals()
2601+
for key, val in six.iteritems(params['kwargs']):
2602+
if key not in all_params:
2603+
raise TypeError(
2604+
"Got an unexpected keyword argument '%s'"
2605+
" to method modify_address_book_list" % key
2606+
)
2607+
params[key] = val
2608+
del params['kwargs']
2609+
# verify the required parameter 'body' is set
2610+
if self.api_client.client_side_validation and ('body' not in params or
2611+
params['body'] is None): # noqa: E501
2612+
raise ValueError("Missing the required parameter `body` when calling `modify_address_book_list`") # noqa: E501
2613+
2614+
collection_formats = {}
2615+
2616+
path_params = {}
2617+
2618+
query_params = []
2619+
2620+
header_params = {}
2621+
2622+
form_params = []
2623+
local_var_files = {}
2624+
2625+
body_params = None
2626+
if 'body' in params:
2627+
body_params = params['body']
2628+
# HTTP header `Accept`
2629+
header_params['Accept'] = self.api_client.select_header_accept(
2630+
['application/json']) # noqa: E501
2631+
2632+
# HTTP header `Content-Type`
2633+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
2634+
['application/json']) # noqa: E501
2635+
2636+
# Authentication setting
2637+
auth_settings = ['volcengineSign'] # noqa: E501
2638+
2639+
return self.api_client.call_api(
2640+
'/ModifyAddressBookList/2021-09-06/fw_center/post/application_json/', 'POST',
2641+
path_params,
2642+
query_params,
2643+
header_params,
2644+
body=body_params,
2645+
post_params=form_params,
2646+
files=local_var_files,
2647+
response_type='ModifyAddressBookListResponse', # noqa: E501
2648+
auth_settings=auth_settings,
2649+
async_req=params.get('async_req'),
2650+
_return_http_data_only=params.get('_return_http_data_only'),
2651+
_preload_content=params.get('_preload_content', True),
2652+
_request_timeout=params.get('_request_timeout'),
2653+
collection_formats=collection_formats)
2654+
23642655
def modify_control_policy(self, body, **kwargs): # noqa: E501
23652656
"""modify_control_policy # noqa: E501
23662657

0 commit comments

Comments
 (0)