Skip to content

Commit

Permalink
CodeGen from PR 18531 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
NSP API changes (Azure#18531)

* Add proxy, check members APIs

* update

* check members API fix

* Add query by perimeter guid

* Add NSP reconcile API

* code reformat

* code reformat

* lint fix

* change description, tags

* NSP schema update, remove displayName, description

* prettier fix

* tags readonly

* remove tags

* association proxy delete as per merged PR examples

* review changse, remove 201 from POST and other changes

* update

* Logging Category remove

* NSP post 201 fix

* isMember changed to enum from string

Co-authored-by: Kaushal Kumar <[email protected]>
  • Loading branch information
SDKAuto and Kaushal Kumar committed Jun 2, 2022
1 parent 62ffa83 commit 1261b2f
Show file tree
Hide file tree
Showing 56 changed files with 1,875 additions and 3,690 deletions.
4 changes: 2 additions & 2 deletions sdk/network/azure-mgmt-network/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "0baca05c851c1749e92beb0d2134cd958827dd54",
"commit": "a8b1ff45943c441da1e4844835691e430ede5f90",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/network/resource-manager/readme.md --multiapi --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.7.2",
"autorest_command": "autorest specification/network/resource-manager/readme.md --multiapi --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.7.2",
"readme": "specification/network/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ class NetworkManagementClient(NetworkManagementClientOperationsMixin, MultiApiCl
'network_managers': '2021-02-01-preview',
'network_security_perimeters': '2021-02-01-preview',
'nsp_access_rules': '2021-02-01-preview',
'nsp_access_rules_reconcile': '2021-02-01-preview',
'nsp_associations': '2021-02-01-preview',
'nsp_associations_proxy': '2021-02-01-preview',
'nsp_profiles': '2021-02-01-preview',
'p2_svpn_server_configurations': '2019-07-01',
'perimeter_associable_resource_types': '2021-02-01-preview',
Expand Down Expand Up @@ -4902,6 +4904,19 @@ def nsp_access_rules(self):
raise ValueError("API version {} does not have operation group 'nsp_access_rules'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def nsp_access_rules_reconcile(self):
"""Instance depends on the API version:

* 2021-02-01-preview: :class:`NspAccessRulesReconcileOperations<azure.mgmt.network.v2021_02_01_preview.operations.NspAccessRulesReconcileOperations>`
"""
api_version = self._get_api_version('nsp_access_rules_reconcile')
if api_version == '2021-02-01-preview':
from .v2021_02_01_preview.operations import NspAccessRulesReconcileOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'nsp_access_rules_reconcile'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def nsp_associations(self):
"""Instance depends on the API version:
Expand All @@ -4915,6 +4930,19 @@ def nsp_associations(self):
raise ValueError("API version {} does not have operation group 'nsp_associations'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def nsp_associations_proxy(self):
"""Instance depends on the API version:

* 2021-02-01-preview: :class:`NspAssociationsProxyOperations<azure.mgmt.network.v2021_02_01_preview.operations.NspAssociationsProxyOperations>`
"""
api_version = self._get_api_version('nsp_associations_proxy')
if api_version == '2021-02-01-preview':
from .v2021_02_01_preview.operations import NspAssociationsProxyOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'nsp_associations_proxy'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def nsp_profiles(self):
"""Instance depends on the API version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ def begin_delete_bastion_shareable_link( # pylint: disable=inconsistent-return-
:type bastion_host_name: str
:param bsl_request: Post request for all the Bastion Shareable Link endpoints.
:type bsl_request: ~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListRequest
:keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
Expand Down Expand Up @@ -106,9 +103,6 @@ def begin_generatevirtualwanvpnserverconfigurationvpnprofile(
:param vpn_client_params: Parameters supplied to the generate VirtualWan VPN profile generation
operation.
:type vpn_client_params: ~azure.mgmt.network.v2021_08_01.models.VirtualWanVpnProfileParameters
:keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
Expand Down Expand Up @@ -173,9 +167,6 @@ def begin_get_active_sessions(
:type resource_group_name: str
:param bastion_host_name: The name of the Bastion Host.
:type bastion_host_name: str
:keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
Expand Down Expand Up @@ -241,9 +232,6 @@ def begin_put_bastion_shareable_link(
:type bastion_host_name: str
:param bsl_request: Post request for all the Bastion Shareable Link endpoints.
:type bsl_request: ~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListRequest
:keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
Expand Down Expand Up @@ -307,9 +295,6 @@ def check_dns_name_availability(
:param domain_name_label: The domain name to be verified. It must conform to the following
regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.
:type domain_name_label: str
:keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: DnsNameAvailabilityResult, or the result of cls(response)
:rtype: ~azure.mgmt.network.v2021_08_01.models.DnsNameAvailabilityResult
Expand Down Expand Up @@ -406,9 +391,6 @@ def disconnect_active_sessions(
:type bastion_host_name: str
:param session_ids: The list of sessionids to disconnect.
:type session_ids: ~azure.mgmt.network.v2021_08_01.models.SessionIds
:keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either BastionSessionDeleteResult or the result of
cls(response)
Expand Down Expand Up @@ -467,9 +449,6 @@ def get_bastion_shareable_link(
:type bastion_host_name: str
:param bsl_request: Post request for all the Bastion Shareable Link endpoints.
:type bsl_request: ~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListRequest
:keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either BastionShareableLinkListResult or the result of
cls(response)
Expand Down Expand Up @@ -526,9 +505,6 @@ def supported_security_providers(
:param virtual_wan_name: The name of the VirtualWAN for which supported security providers are
needed.
:type virtual_wan_name: str
:keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: VirtualWanSecurityProviders, or the result of cls(response)
:rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualWanSecurityProviders
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ class NetworkManagementClient(NetworkManagementClientOperationsMixin, MultiApiCl
'network_managers': '2021-02-01-preview',
'network_security_perimeters': '2021-02-01-preview',
'nsp_access_rules': '2021-02-01-preview',
'nsp_access_rules_reconcile': '2021-02-01-preview',
'nsp_associations': '2021-02-01-preview',
'nsp_associations_proxy': '2021-02-01-preview',
'nsp_profiles': '2021-02-01-preview',
'p2_svpn_server_configurations': '2019-07-01',
'perimeter_associable_resource_types': '2021-02-01-preview',
Expand Down Expand Up @@ -4901,6 +4903,19 @@ def nsp_access_rules(self):
raise ValueError("API version {} does not have operation group 'nsp_access_rules'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def nsp_access_rules_reconcile(self):
"""Instance depends on the API version:

* 2021-02-01-preview: :class:`NspAccessRulesReconcileOperations<azure.mgmt.network.v2021_02_01_preview.aio.operations.NspAccessRulesReconcileOperations>`
"""
api_version = self._get_api_version('nsp_access_rules_reconcile')
if api_version == '2021-02-01-preview':
from ..v2021_02_01_preview.aio.operations import NspAccessRulesReconcileOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'nsp_access_rules_reconcile'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def nsp_associations(self):
"""Instance depends on the API version:
Expand All @@ -4914,6 +4929,19 @@ def nsp_associations(self):
raise ValueError("API version {} does not have operation group 'nsp_associations'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def nsp_associations_proxy(self):
"""Instance depends on the API version:

* 2021-02-01-preview: :class:`NspAssociationsProxyOperations<azure.mgmt.network.v2021_02_01_preview.aio.operations.NspAssociationsProxyOperations>`
"""
api_version = self._get_api_version('nsp_associations_proxy')
if api_version == '2021-02-01-preview':
from ..v2021_02_01_preview.aio.operations import NspAssociationsProxyOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'nsp_associations_proxy'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def nsp_profiles(self):
"""Instance depends on the API version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ async def begin_delete_bastion_shareable_link( # pylint: disable=inconsistent-r
:type bastion_host_name: str
:param bsl_request: Post request for all the Bastion Shareable Link endpoints.
:type bsl_request: ~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListRequest
:keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
Expand Down Expand Up @@ -100,9 +97,6 @@ async def begin_generatevirtualwanvpnserverconfigurationvpnprofile(
:param vpn_client_params: Parameters supplied to the generate VirtualWan VPN profile generation
operation.
:type vpn_client_params: ~azure.mgmt.network.v2021_08_01.models.VirtualWanVpnProfileParameters
:keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
Expand Down Expand Up @@ -166,9 +160,6 @@ async def begin_get_active_sessions(
:type resource_group_name: str
:param bastion_host_name: The name of the Bastion Host.
:type bastion_host_name: str
:keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
Expand Down Expand Up @@ -233,9 +224,6 @@ async def begin_put_bastion_shareable_link(
:type bastion_host_name: str
:param bsl_request: Post request for all the Bastion Shareable Link endpoints.
:type bsl_request: ~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListRequest
:keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
Expand Down Expand Up @@ -298,9 +286,6 @@ async def check_dns_name_availability(
:param domain_name_label: The domain name to be verified. It must conform to the following
regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.
:type domain_name_label: str
:keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: DnsNameAvailabilityResult, or the result of cls(response)
:rtype: ~azure.mgmt.network.v2021_08_01.models.DnsNameAvailabilityResult
Expand Down Expand Up @@ -396,9 +381,6 @@ def disconnect_active_sessions(
:type bastion_host_name: str
:param session_ids: The list of sessionids to disconnect.
:type session_ids: ~azure.mgmt.network.v2021_08_01.models.SessionIds
:keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either BastionSessionDeleteResult or the result of
cls(response)
Expand Down Expand Up @@ -456,9 +438,6 @@ def get_bastion_shareable_link(
:type bastion_host_name: str
:param bsl_request: Post request for all the Bastion Shareable Link endpoints.
:type bsl_request: ~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListRequest
:keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either BastionShareableLinkListResult or the result of
cls(response)
Expand Down Expand Up @@ -514,9 +493,6 @@ async def supported_security_providers(
:param virtual_wan_name: The name of the VirtualWAN for which supported security providers are
needed.
:type virtual_wan_name: str
:keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: VirtualWanSecurityProviders, or the result of cls(response)
:rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualWanSecurityProviders
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "20.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "20.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "20.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "20.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "20.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "20.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "20.0.0"
VERSION = "1.0.0b1"
Loading

0 comments on commit 1261b2f

Please sign in to comment.