diff --git a/sdk/network/azure-mgmt-network/_meta.json b/sdk/network/azure-mgmt-network/_meta.json index 5d470392da94..af7ae6c44909 100644 --- a/sdk/network/azure-mgmt-network/_meta.json +++ b/sdk/network/azure-mgmt-network/_meta.json @@ -4,7 +4,7 @@ "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "54f1c87938269d4706629dc04c26ee1f3634585a", + "commit": "e12807b3f0ad25773ad99a319b5f35588f10d25b", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/network/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/network/resource-manager/readme.md" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/_network_management_client.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/_network_management_client.py new file mode 100644 index 000000000000..b39cac4fc144 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/_network_management_client.py @@ -0,0 +1,8595 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from azure.profiles import KnownProfiles, ProfileDefinition +from azure.profiles.multiapiclient import MultiApiClientMixin +from msrest import Deserializer, Serializer + +from ._configuration import NetworkManagementClientConfiguration +from ._operations_mixin import NetworkManagementClientOperationsMixin + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +class _SDKClient(object): + def __init__(self, *args, **kwargs): + """This is a fake class to support current implemetation of MultiApiClientMixin." + Will be removed in final version of multiapi azure-core based client + """ + pass + +class NetworkManagementClient(NetworkManagementClientOperationsMixin, MultiApiClientMixin, _SDKClient): + """Network Client. + + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param api_version: API version to use if no profile is provided, or if missing in profile. + :type api_version: str + :param base_url: Service URL + :type base_url: str + :param profile: A profile definition, from KnownProfiles to dict. + :type profile: azure.profiles.KnownProfiles + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + DEFAULT_API_VERSION = '2021-03-01' + _PROFILE_TAG = "azure.mgmt.network.NetworkManagementClient" + LATEST_PROFILE = ProfileDefinition({ + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + 'active_connectivity_configurations': '2021-02-01-preview', + 'active_security_admin_rules': '2021-02-01-preview', + 'active_security_user_rules': '2021-02-01-preview', + 'admin_rule_collections': '2021-02-01-preview', + 'admin_rules': '2021-02-01-preview', + 'connectivity_configurations': '2021-02-01-preview', + 'effective_connectivity_configurations': '2021-02-01-preview', + 'effective_virtual_networks': '2021-02-01-preview', + 'firewall_policy_rule_groups': '2020-04-01', + 'interface_endpoints': '2019-02-01', + 'network_groups': '2021-02-01-preview', + 'network_manager_commits': '2021-02-01-preview', + 'network_manager_deployment_status': '2021-02-01-preview', + 'network_manager_effective_security_admin_rules': '2021-02-01-preview', + 'network_managers': '2021-02-01-preview', + 'network_security_perimeters': '2021-02-01-preview', + 'p2_svpn_server_configurations': '2019-07-01', + 'perimeter_associable_resource_types': '2021-02-01-preview', + 'security_admin_configurations': '2021-02-01-preview', + 'security_user_configurations': '2021-02-01-preview', + 'user_rule_collections': '2021-02-01-preview', + 'user_rules': '2021-02-01-preview', + }}, + _PROFILE_TAG + " latest" + ) + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + api_version=None, # type: Optional[str] + base_url=None, # type: Optional[str] + profile=KnownProfiles.default, # type: KnownProfiles + **kwargs # type: Any + ): + if not base_url: + base_url = 'https://management.azure.com' + self._config = NetworkManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + super(NetworkManagementClient, self).__init__( + api_version=api_version, + profile=profile + ) + + @classmethod + def _models_dict(cls, api_version): + return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} + + @classmethod + def models(cls, api_version=DEFAULT_API_VERSION): + """Module depends on the API version: + + * 2015-06-15: :mod:`v2015_06_15.models` + * 2016-09-01: :mod:`v2016_09_01.models` + * 2016-12-01: :mod:`v2016_12_01.models` + * 2017-03-01: :mod:`v2017_03_01.models` + * 2017-06-01: :mod:`v2017_06_01.models` + * 2017-09-01: :mod:`v2017_09_01.models` + * 2017-10-01: :mod:`v2017_10_01.models` + * 2017-11-01: :mod:`v2017_11_01.models` + * 2018-01-01: :mod:`v2018_01_01.models` + * 2018-02-01: :mod:`v2018_02_01.models` + * 2018-04-01: :mod:`v2018_04_01.models` + * 2018-06-01: :mod:`v2018_06_01.models` + * 2018-07-01: :mod:`v2018_07_01.models` + * 2018-08-01: :mod:`v2018_08_01.models` + * 2018-10-01: :mod:`v2018_10_01.models` + * 2018-11-01: :mod:`v2018_11_01.models` + * 2018-12-01: :mod:`v2018_12_01.models` + * 2019-02-01: :mod:`v2019_02_01.models` + * 2019-04-01: :mod:`v2019_04_01.models` + * 2019-06-01: :mod:`v2019_06_01.models` + * 2019-07-01: :mod:`v2019_07_01.models` + * 2019-08-01: :mod:`v2019_08_01.models` + * 2019-09-01: :mod:`v2019_09_01.models` + * 2019-11-01: :mod:`v2019_11_01.models` + * 2019-12-01: :mod:`v2019_12_01.models` + * 2020-03-01: :mod:`v2020_03_01.models` + * 2020-04-01: :mod:`v2020_04_01.models` + * 2020-05-01: :mod:`v2020_05_01.models` + * 2020-06-01: :mod:`v2020_06_01.models` + * 2020-07-01: :mod:`v2020_07_01.models` + * 2020-08-01: :mod:`v2020_08_01.models` + * 2020-11-01: :mod:`v2020_11_01.models` + * 2021-02-01: :mod:`v2021_02_01.models` + * 2021-02-01-preview: :mod:`v2021_02_01_preview.models` + * 2021-03-01: :mod:`v2021_03_01.models` + """ + if api_version == '2015-06-15': + from .v2015_06_15 import models + return models + elif api_version == '2016-09-01': + from .v2016_09_01 import models + return models + elif api_version == '2016-12-01': + from .v2016_12_01 import models + return models + elif api_version == '2017-03-01': + from .v2017_03_01 import models + return models + elif api_version == '2017-06-01': + from .v2017_06_01 import models + return models + elif api_version == '2017-09-01': + from .v2017_09_01 import models + return models + elif api_version == '2017-10-01': + from .v2017_10_01 import models + return models + elif api_version == '2017-11-01': + from .v2017_11_01 import models + return models + elif api_version == '2018-01-01': + from .v2018_01_01 import models + return models + elif api_version == '2018-02-01': + from .v2018_02_01 import models + return models + elif api_version == '2018-04-01': + from .v2018_04_01 import models + return models + elif api_version == '2018-06-01': + from .v2018_06_01 import models + return models + elif api_version == '2018-07-01': + from .v2018_07_01 import models + return models + elif api_version == '2018-08-01': + from .v2018_08_01 import models + return models + elif api_version == '2018-10-01': + from .v2018_10_01 import models + return models + elif api_version == '2018-11-01': + from .v2018_11_01 import models + return models + elif api_version == '2018-12-01': + from .v2018_12_01 import models + return models + elif api_version == '2019-02-01': + from .v2019_02_01 import models + return models + elif api_version == '2019-04-01': + from .v2019_04_01 import models + return models + elif api_version == '2019-06-01': + from .v2019_06_01 import models + return models + elif api_version == '2019-07-01': + from .v2019_07_01 import models + return models + elif api_version == '2019-08-01': + from .v2019_08_01 import models + return models + elif api_version == '2019-09-01': + from .v2019_09_01 import models + return models + elif api_version == '2019-11-01': + from .v2019_11_01 import models + return models + elif api_version == '2019-12-01': + from .v2019_12_01 import models + return models + elif api_version == '2020-03-01': + from .v2020_03_01 import models + return models + elif api_version == '2020-04-01': + from .v2020_04_01 import models + return models + elif api_version == '2020-05-01': + from .v2020_05_01 import models + return models + elif api_version == '2020-06-01': + from .v2020_06_01 import models + return models + elif api_version == '2020-07-01': + from .v2020_07_01 import models + return models + elif api_version == '2020-08-01': + from .v2020_08_01 import models + return models + elif api_version == '2020-11-01': + from .v2020_11_01 import models + return models + elif api_version == '2021-02-01': + from .v2021_02_01 import models + return models + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview import models + return models + elif api_version == '2021-03-01': + from .v2021_03_01 import models + return models + raise ValueError("API version {} is not available".format(api_version)) + + @property + def active_connectivity_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ActiveConnectivityConfigurationsOperations` + """ + api_version = self._get_api_version('active_connectivity_configurations') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import ActiveConnectivityConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'active_connectivity_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def active_security_admin_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ActiveSecurityAdminRulesOperations` + """ + api_version = self._get_api_version('active_security_admin_rules') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import ActiveSecurityAdminRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'active_security_admin_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def active_security_user_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ActiveSecurityUserRulesOperations` + """ + api_version = self._get_api_version('active_security_user_rules') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import ActiveSecurityUserRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'active_security_user_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def admin_rule_collections(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`AdminRuleCollectionsOperations` + """ + api_version = self._get_api_version('admin_rule_collections') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import AdminRuleCollectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'admin_rule_collections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def admin_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`AdminRulesOperations` + """ + api_version = self._get_api_version('admin_rules') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import AdminRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'admin_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def application_gateway_private_endpoint_connections(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2020-06-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2020-07-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2020-08-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2020-11-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2021-02-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2021-03-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + """ + api_version = self._get_api_version('application_gateway_private_endpoint_connections') + if api_version == '2020-05-01': + from .v2020_05_01.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'application_gateway_private_endpoint_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def application_gateway_private_link_resources(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2020-06-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2020-07-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2020-08-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2020-11-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2021-02-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2021-03-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + """ + api_version = self._get_api_version('application_gateway_private_link_resources') + if api_version == '2020-05-01': + from .v2020_05_01.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'application_gateway_private_link_resources'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def application_gateways(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`ApplicationGatewaysOperations` + * 2016-09-01: :class:`ApplicationGatewaysOperations` + * 2016-12-01: :class:`ApplicationGatewaysOperations` + * 2017-03-01: :class:`ApplicationGatewaysOperations` + * 2017-06-01: :class:`ApplicationGatewaysOperations` + * 2017-09-01: :class:`ApplicationGatewaysOperations` + * 2017-10-01: :class:`ApplicationGatewaysOperations` + * 2017-11-01: :class:`ApplicationGatewaysOperations` + * 2018-01-01: :class:`ApplicationGatewaysOperations` + * 2018-02-01: :class:`ApplicationGatewaysOperations` + * 2018-04-01: :class:`ApplicationGatewaysOperations` + * 2018-06-01: :class:`ApplicationGatewaysOperations` + * 2018-07-01: :class:`ApplicationGatewaysOperations` + * 2018-08-01: :class:`ApplicationGatewaysOperations` + * 2018-10-01: :class:`ApplicationGatewaysOperations` + * 2018-11-01: :class:`ApplicationGatewaysOperations` + * 2018-12-01: :class:`ApplicationGatewaysOperations` + * 2019-02-01: :class:`ApplicationGatewaysOperations` + * 2019-04-01: :class:`ApplicationGatewaysOperations` + * 2019-06-01: :class:`ApplicationGatewaysOperations` + * 2019-07-01: :class:`ApplicationGatewaysOperations` + * 2019-08-01: :class:`ApplicationGatewaysOperations` + * 2019-09-01: :class:`ApplicationGatewaysOperations` + * 2019-11-01: :class:`ApplicationGatewaysOperations` + * 2019-12-01: :class:`ApplicationGatewaysOperations` + * 2020-03-01: :class:`ApplicationGatewaysOperations` + * 2020-04-01: :class:`ApplicationGatewaysOperations` + * 2020-05-01: :class:`ApplicationGatewaysOperations` + * 2020-06-01: :class:`ApplicationGatewaysOperations` + * 2020-07-01: :class:`ApplicationGatewaysOperations` + * 2020-08-01: :class:`ApplicationGatewaysOperations` + * 2020-11-01: :class:`ApplicationGatewaysOperations` + * 2021-02-01: :class:`ApplicationGatewaysOperations` + * 2021-03-01: :class:`ApplicationGatewaysOperations` + """ + api_version = self._get_api_version('application_gateways') + if api_version == '2015-06-15': + from .v2015_06_15.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ApplicationGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'application_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def application_security_groups(self): + """Instance depends on the API version: + + * 2017-09-01: :class:`ApplicationSecurityGroupsOperations` + * 2017-10-01: :class:`ApplicationSecurityGroupsOperations` + * 2017-11-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-01-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-02-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-04-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-06-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-07-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-08-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-10-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-11-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-12-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-02-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-04-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-06-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-07-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-08-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-09-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-11-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-12-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-03-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-04-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-05-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-06-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-07-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-08-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-11-01: :class:`ApplicationSecurityGroupsOperations` + * 2021-02-01: :class:`ApplicationSecurityGroupsOperations` + * 2021-03-01: :class:`ApplicationSecurityGroupsOperations` + """ + api_version = self._get_api_version('application_security_groups') + if api_version == '2017-09-01': + from .v2017_09_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ApplicationSecurityGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'application_security_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def available_delegations(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`AvailableDelegationsOperations` + * 2018-10-01: :class:`AvailableDelegationsOperations` + * 2018-11-01: :class:`AvailableDelegationsOperations` + * 2018-12-01: :class:`AvailableDelegationsOperations` + * 2019-02-01: :class:`AvailableDelegationsOperations` + * 2019-04-01: :class:`AvailableDelegationsOperations` + * 2019-06-01: :class:`AvailableDelegationsOperations` + * 2019-07-01: :class:`AvailableDelegationsOperations` + * 2019-08-01: :class:`AvailableDelegationsOperations` + * 2019-09-01: :class:`AvailableDelegationsOperations` + * 2019-11-01: :class:`AvailableDelegationsOperations` + * 2019-12-01: :class:`AvailableDelegationsOperations` + * 2020-03-01: :class:`AvailableDelegationsOperations` + * 2020-04-01: :class:`AvailableDelegationsOperations` + * 2020-05-01: :class:`AvailableDelegationsOperations` + * 2020-06-01: :class:`AvailableDelegationsOperations` + * 2020-07-01: :class:`AvailableDelegationsOperations` + * 2020-08-01: :class:`AvailableDelegationsOperations` + * 2020-11-01: :class:`AvailableDelegationsOperations` + * 2021-02-01: :class:`AvailableDelegationsOperations` + * 2021-03-01: :class:`AvailableDelegationsOperations` + """ + api_version = self._get_api_version('available_delegations') + if api_version == '2018-08-01': + from .v2018_08_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import AvailableDelegationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'available_delegations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def available_endpoint_services(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`AvailableEndpointServicesOperations` + * 2017-09-01: :class:`AvailableEndpointServicesOperations` + * 2017-10-01: :class:`AvailableEndpointServicesOperations` + * 2017-11-01: :class:`AvailableEndpointServicesOperations` + * 2018-01-01: :class:`AvailableEndpointServicesOperations` + * 2018-02-01: :class:`AvailableEndpointServicesOperations` + * 2018-04-01: :class:`AvailableEndpointServicesOperations` + * 2018-06-01: :class:`AvailableEndpointServicesOperations` + * 2018-07-01: :class:`AvailableEndpointServicesOperations` + * 2018-08-01: :class:`AvailableEndpointServicesOperations` + * 2018-10-01: :class:`AvailableEndpointServicesOperations` + * 2018-11-01: :class:`AvailableEndpointServicesOperations` + * 2018-12-01: :class:`AvailableEndpointServicesOperations` + * 2019-02-01: :class:`AvailableEndpointServicesOperations` + * 2019-04-01: :class:`AvailableEndpointServicesOperations` + * 2019-06-01: :class:`AvailableEndpointServicesOperations` + * 2019-07-01: :class:`AvailableEndpointServicesOperations` + * 2019-08-01: :class:`AvailableEndpointServicesOperations` + * 2019-09-01: :class:`AvailableEndpointServicesOperations` + * 2019-11-01: :class:`AvailableEndpointServicesOperations` + * 2019-12-01: :class:`AvailableEndpointServicesOperations` + * 2020-03-01: :class:`AvailableEndpointServicesOperations` + * 2020-04-01: :class:`AvailableEndpointServicesOperations` + * 2020-05-01: :class:`AvailableEndpointServicesOperations` + * 2020-06-01: :class:`AvailableEndpointServicesOperations` + * 2020-07-01: :class:`AvailableEndpointServicesOperations` + * 2020-08-01: :class:`AvailableEndpointServicesOperations` + * 2020-11-01: :class:`AvailableEndpointServicesOperations` + * 2021-02-01: :class:`AvailableEndpointServicesOperations` + * 2021-03-01: :class:`AvailableEndpointServicesOperations` + """ + api_version = self._get_api_version('available_endpoint_services') + if api_version == '2017-06-01': + from .v2017_06_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import AvailableEndpointServicesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'available_endpoint_services'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def available_private_endpoint_types(self): + """Instance depends on the API version: + + * 2019-04-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2019-06-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2019-07-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2019-08-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2019-09-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2019-11-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2019-12-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-03-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-04-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-05-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-06-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-07-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-08-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-11-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2021-02-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2021-03-01: :class:`AvailablePrivateEndpointTypesOperations` + """ + api_version = self._get_api_version('available_private_endpoint_types') + if api_version == '2019-04-01': + from .v2019_04_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'available_private_endpoint_types'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def available_resource_group_delegations(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2018-10-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2018-11-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2018-12-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-02-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-04-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-06-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-07-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-08-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-09-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-11-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-12-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-03-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-04-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-05-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-06-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-07-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-08-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-11-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2021-02-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2021-03-01: :class:`AvailableResourceGroupDelegationsOperations` + """ + api_version = self._get_api_version('available_resource_group_delegations') + if api_version == '2018-08-01': + from .v2018_08_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'available_resource_group_delegations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def available_service_aliases(self): + """Instance depends on the API version: + + * 2019-08-01: :class:`AvailableServiceAliasesOperations` + * 2019-09-01: :class:`AvailableServiceAliasesOperations` + * 2019-11-01: :class:`AvailableServiceAliasesOperations` + * 2019-12-01: :class:`AvailableServiceAliasesOperations` + * 2020-03-01: :class:`AvailableServiceAliasesOperations` + * 2020-04-01: :class:`AvailableServiceAliasesOperations` + * 2020-05-01: :class:`AvailableServiceAliasesOperations` + * 2020-06-01: :class:`AvailableServiceAliasesOperations` + * 2020-07-01: :class:`AvailableServiceAliasesOperations` + * 2020-08-01: :class:`AvailableServiceAliasesOperations` + * 2020-11-01: :class:`AvailableServiceAliasesOperations` + * 2021-02-01: :class:`AvailableServiceAliasesOperations` + * 2021-03-01: :class:`AvailableServiceAliasesOperations` + """ + api_version = self._get_api_version('available_service_aliases') + if api_version == '2019-08-01': + from .v2019_08_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import AvailableServiceAliasesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'available_service_aliases'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def azure_firewall_fqdn_tags(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`AzureFirewallFqdnTagsOperations` + * 2018-10-01: :class:`AzureFirewallFqdnTagsOperations` + * 2018-11-01: :class:`AzureFirewallFqdnTagsOperations` + * 2018-12-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-02-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-04-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-06-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-07-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-08-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-09-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-11-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-12-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-03-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-04-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-05-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-06-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-07-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-08-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-11-01: :class:`AzureFirewallFqdnTagsOperations` + * 2021-02-01: :class:`AzureFirewallFqdnTagsOperations` + * 2021-03-01: :class:`AzureFirewallFqdnTagsOperations` + """ + api_version = self._get_api_version('azure_firewall_fqdn_tags') + if api_version == '2018-08-01': + from .v2018_08_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'azure_firewall_fqdn_tags'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def azure_firewalls(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`AzureFirewallsOperations` + * 2018-06-01: :class:`AzureFirewallsOperations` + * 2018-07-01: :class:`AzureFirewallsOperations` + * 2018-08-01: :class:`AzureFirewallsOperations` + * 2018-10-01: :class:`AzureFirewallsOperations` + * 2018-11-01: :class:`AzureFirewallsOperations` + * 2018-12-01: :class:`AzureFirewallsOperations` + * 2019-02-01: :class:`AzureFirewallsOperations` + * 2019-04-01: :class:`AzureFirewallsOperations` + * 2019-06-01: :class:`AzureFirewallsOperations` + * 2019-07-01: :class:`AzureFirewallsOperations` + * 2019-08-01: :class:`AzureFirewallsOperations` + * 2019-09-01: :class:`AzureFirewallsOperations` + * 2019-11-01: :class:`AzureFirewallsOperations` + * 2019-12-01: :class:`AzureFirewallsOperations` + * 2020-03-01: :class:`AzureFirewallsOperations` + * 2020-04-01: :class:`AzureFirewallsOperations` + * 2020-05-01: :class:`AzureFirewallsOperations` + * 2020-06-01: :class:`AzureFirewallsOperations` + * 2020-07-01: :class:`AzureFirewallsOperations` + * 2020-08-01: :class:`AzureFirewallsOperations` + * 2020-11-01: :class:`AzureFirewallsOperations` + * 2021-02-01: :class:`AzureFirewallsOperations` + * 2021-03-01: :class:`AzureFirewallsOperations` + """ + api_version = self._get_api_version('azure_firewalls') + if api_version == '2018-04-01': + from .v2018_04_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import AzureFirewallsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'azure_firewalls'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def bastion_hosts(self): + """Instance depends on the API version: + + * 2019-04-01: :class:`BastionHostsOperations` + * 2019-06-01: :class:`BastionHostsOperations` + * 2019-07-01: :class:`BastionHostsOperations` + * 2019-08-01: :class:`BastionHostsOperations` + * 2019-09-01: :class:`BastionHostsOperations` + * 2019-11-01: :class:`BastionHostsOperations` + * 2019-12-01: :class:`BastionHostsOperations` + * 2020-03-01: :class:`BastionHostsOperations` + * 2020-04-01: :class:`BastionHostsOperations` + * 2020-05-01: :class:`BastionHostsOperations` + * 2020-06-01: :class:`BastionHostsOperations` + * 2020-07-01: :class:`BastionHostsOperations` + * 2020-08-01: :class:`BastionHostsOperations` + * 2020-11-01: :class:`BastionHostsOperations` + * 2021-02-01: :class:`BastionHostsOperations` + * 2021-03-01: :class:`BastionHostsOperations` + """ + api_version = self._get_api_version('bastion_hosts') + if api_version == '2019-04-01': + from .v2019_04_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import BastionHostsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'bastion_hosts'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def bgp_service_communities(self): + """Instance depends on the API version: + + * 2016-12-01: :class:`BgpServiceCommunitiesOperations` + * 2017-03-01: :class:`BgpServiceCommunitiesOperations` + * 2017-06-01: :class:`BgpServiceCommunitiesOperations` + * 2017-09-01: :class:`BgpServiceCommunitiesOperations` + * 2017-10-01: :class:`BgpServiceCommunitiesOperations` + * 2017-11-01: :class:`BgpServiceCommunitiesOperations` + * 2018-01-01: :class:`BgpServiceCommunitiesOperations` + * 2018-02-01: :class:`BgpServiceCommunitiesOperations` + * 2018-04-01: :class:`BgpServiceCommunitiesOperations` + * 2018-06-01: :class:`BgpServiceCommunitiesOperations` + * 2018-07-01: :class:`BgpServiceCommunitiesOperations` + * 2018-08-01: :class:`BgpServiceCommunitiesOperations` + * 2018-10-01: :class:`BgpServiceCommunitiesOperations` + * 2018-11-01: :class:`BgpServiceCommunitiesOperations` + * 2018-12-01: :class:`BgpServiceCommunitiesOperations` + * 2019-02-01: :class:`BgpServiceCommunitiesOperations` + * 2019-04-01: :class:`BgpServiceCommunitiesOperations` + * 2019-06-01: :class:`BgpServiceCommunitiesOperations` + * 2019-07-01: :class:`BgpServiceCommunitiesOperations` + * 2019-08-01: :class:`BgpServiceCommunitiesOperations` + * 2019-09-01: :class:`BgpServiceCommunitiesOperations` + * 2019-11-01: :class:`BgpServiceCommunitiesOperations` + * 2019-12-01: :class:`BgpServiceCommunitiesOperations` + * 2020-03-01: :class:`BgpServiceCommunitiesOperations` + * 2020-04-01: :class:`BgpServiceCommunitiesOperations` + * 2020-05-01: :class:`BgpServiceCommunitiesOperations` + * 2020-06-01: :class:`BgpServiceCommunitiesOperations` + * 2020-07-01: :class:`BgpServiceCommunitiesOperations` + * 2020-08-01: :class:`BgpServiceCommunitiesOperations` + * 2020-11-01: :class:`BgpServiceCommunitiesOperations` + * 2021-02-01: :class:`BgpServiceCommunitiesOperations` + * 2021-03-01: :class:`BgpServiceCommunitiesOperations` + """ + api_version = self._get_api_version('bgp_service_communities') + if api_version == '2016-12-01': + from .v2016_12_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import BgpServiceCommunitiesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'bgp_service_communities'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def connection_monitors(self): + """Instance depends on the API version: + + * 2017-10-01: :class:`ConnectionMonitorsOperations` + * 2017-11-01: :class:`ConnectionMonitorsOperations` + * 2018-01-01: :class:`ConnectionMonitorsOperations` + * 2018-02-01: :class:`ConnectionMonitorsOperations` + * 2018-04-01: :class:`ConnectionMonitorsOperations` + * 2018-06-01: :class:`ConnectionMonitorsOperations` + * 2018-07-01: :class:`ConnectionMonitorsOperations` + * 2018-08-01: :class:`ConnectionMonitorsOperations` + * 2018-10-01: :class:`ConnectionMonitorsOperations` + * 2018-11-01: :class:`ConnectionMonitorsOperations` + * 2018-12-01: :class:`ConnectionMonitorsOperations` + * 2019-02-01: :class:`ConnectionMonitorsOperations` + * 2019-04-01: :class:`ConnectionMonitorsOperations` + * 2019-06-01: :class:`ConnectionMonitorsOperations` + * 2019-07-01: :class:`ConnectionMonitorsOperations` + * 2019-08-01: :class:`ConnectionMonitorsOperations` + * 2019-09-01: :class:`ConnectionMonitorsOperations` + * 2019-11-01: :class:`ConnectionMonitorsOperations` + * 2019-12-01: :class:`ConnectionMonitorsOperations` + * 2020-03-01: :class:`ConnectionMonitorsOperations` + * 2020-04-01: :class:`ConnectionMonitorsOperations` + * 2020-05-01: :class:`ConnectionMonitorsOperations` + * 2020-06-01: :class:`ConnectionMonitorsOperations` + * 2020-07-01: :class:`ConnectionMonitorsOperations` + * 2020-08-01: :class:`ConnectionMonitorsOperations` + * 2020-11-01: :class:`ConnectionMonitorsOperations` + * 2021-02-01: :class:`ConnectionMonitorsOperations` + * 2021-03-01: :class:`ConnectionMonitorsOperations` + """ + api_version = self._get_api_version('connection_monitors') + if api_version == '2017-10-01': + from .v2017_10_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ConnectionMonitorsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'connection_monitors'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def connectivity_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ConnectivityConfigurationsOperations` + """ + api_version = self._get_api_version('connectivity_configurations') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import ConnectivityConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'connectivity_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def custom_ip_prefixes(self): + """Instance depends on the API version: + + * 2020-06-01: :class:`CustomIPPrefixesOperations` + * 2020-07-01: :class:`CustomIPPrefixesOperations` + * 2020-08-01: :class:`CustomIPPrefixesOperations` + * 2020-11-01: :class:`CustomIPPrefixesOperations` + * 2021-02-01: :class:`CustomIPPrefixesOperations` + * 2021-03-01: :class:`CustomIPPrefixesOperations` + """ + api_version = self._get_api_version('custom_ip_prefixes') + if api_version == '2020-06-01': + from .v2020_06_01.operations import CustomIPPrefixesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import CustomIPPrefixesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import CustomIPPrefixesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import CustomIPPrefixesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import CustomIPPrefixesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import CustomIPPrefixesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'custom_ip_prefixes'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def ddos_custom_policies(self): + """Instance depends on the API version: + + * 2018-11-01: :class:`DdosCustomPoliciesOperations` + * 2018-12-01: :class:`DdosCustomPoliciesOperations` + * 2019-02-01: :class:`DdosCustomPoliciesOperations` + * 2019-04-01: :class:`DdosCustomPoliciesOperations` + * 2019-06-01: :class:`DdosCustomPoliciesOperations` + * 2019-07-01: :class:`DdosCustomPoliciesOperations` + * 2019-08-01: :class:`DdosCustomPoliciesOperations` + * 2019-09-01: :class:`DdosCustomPoliciesOperations` + * 2019-11-01: :class:`DdosCustomPoliciesOperations` + * 2019-12-01: :class:`DdosCustomPoliciesOperations` + * 2020-03-01: :class:`DdosCustomPoliciesOperations` + * 2020-04-01: :class:`DdosCustomPoliciesOperations` + * 2020-05-01: :class:`DdosCustomPoliciesOperations` + * 2020-06-01: :class:`DdosCustomPoliciesOperations` + * 2020-07-01: :class:`DdosCustomPoliciesOperations` + * 2020-08-01: :class:`DdosCustomPoliciesOperations` + * 2020-11-01: :class:`DdosCustomPoliciesOperations` + * 2021-02-01: :class:`DdosCustomPoliciesOperations` + * 2021-03-01: :class:`DdosCustomPoliciesOperations` + """ + api_version = self._get_api_version('ddos_custom_policies') + if api_version == '2018-11-01': + from .v2018_11_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import DdosCustomPoliciesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'ddos_custom_policies'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def ddos_protection_plans(self): + """Instance depends on the API version: + + * 2018-02-01: :class:`DdosProtectionPlansOperations` + * 2018-04-01: :class:`DdosProtectionPlansOperations` + * 2018-06-01: :class:`DdosProtectionPlansOperations` + * 2018-07-01: :class:`DdosProtectionPlansOperations` + * 2018-08-01: :class:`DdosProtectionPlansOperations` + * 2018-10-01: :class:`DdosProtectionPlansOperations` + * 2018-11-01: :class:`DdosProtectionPlansOperations` + * 2018-12-01: :class:`DdosProtectionPlansOperations` + * 2019-02-01: :class:`DdosProtectionPlansOperations` + * 2019-04-01: :class:`DdosProtectionPlansOperations` + * 2019-06-01: :class:`DdosProtectionPlansOperations` + * 2019-07-01: :class:`DdosProtectionPlansOperations` + * 2019-08-01: :class:`DdosProtectionPlansOperations` + * 2019-09-01: :class:`DdosProtectionPlansOperations` + * 2019-11-01: :class:`DdosProtectionPlansOperations` + * 2019-12-01: :class:`DdosProtectionPlansOperations` + * 2020-03-01: :class:`DdosProtectionPlansOperations` + * 2020-04-01: :class:`DdosProtectionPlansOperations` + * 2020-05-01: :class:`DdosProtectionPlansOperations` + * 2020-06-01: :class:`DdosProtectionPlansOperations` + * 2020-07-01: :class:`DdosProtectionPlansOperations` + * 2020-08-01: :class:`DdosProtectionPlansOperations` + * 2020-11-01: :class:`DdosProtectionPlansOperations` + * 2021-02-01: :class:`DdosProtectionPlansOperations` + * 2021-03-01: :class:`DdosProtectionPlansOperations` + """ + api_version = self._get_api_version('ddos_protection_plans') + if api_version == '2018-02-01': + from .v2018_02_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import DdosProtectionPlansOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'ddos_protection_plans'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def default_security_rules(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`DefaultSecurityRulesOperations` + * 2017-09-01: :class:`DefaultSecurityRulesOperations` + * 2017-10-01: :class:`DefaultSecurityRulesOperations` + * 2017-11-01: :class:`DefaultSecurityRulesOperations` + * 2018-01-01: :class:`DefaultSecurityRulesOperations` + * 2018-02-01: :class:`DefaultSecurityRulesOperations` + * 2018-04-01: :class:`DefaultSecurityRulesOperations` + * 2018-06-01: :class:`DefaultSecurityRulesOperations` + * 2018-07-01: :class:`DefaultSecurityRulesOperations` + * 2018-08-01: :class:`DefaultSecurityRulesOperations` + * 2018-10-01: :class:`DefaultSecurityRulesOperations` + * 2018-11-01: :class:`DefaultSecurityRulesOperations` + * 2018-12-01: :class:`DefaultSecurityRulesOperations` + * 2019-02-01: :class:`DefaultSecurityRulesOperations` + * 2019-04-01: :class:`DefaultSecurityRulesOperations` + * 2019-06-01: :class:`DefaultSecurityRulesOperations` + * 2019-07-01: :class:`DefaultSecurityRulesOperations` + * 2019-08-01: :class:`DefaultSecurityRulesOperations` + * 2019-09-01: :class:`DefaultSecurityRulesOperations` + * 2019-11-01: :class:`DefaultSecurityRulesOperations` + * 2019-12-01: :class:`DefaultSecurityRulesOperations` + * 2020-03-01: :class:`DefaultSecurityRulesOperations` + * 2020-04-01: :class:`DefaultSecurityRulesOperations` + * 2020-05-01: :class:`DefaultSecurityRulesOperations` + * 2020-06-01: :class:`DefaultSecurityRulesOperations` + * 2020-07-01: :class:`DefaultSecurityRulesOperations` + * 2020-08-01: :class:`DefaultSecurityRulesOperations` + * 2020-11-01: :class:`DefaultSecurityRulesOperations` + * 2021-02-01: :class:`DefaultSecurityRulesOperations` + * 2021-03-01: :class:`DefaultSecurityRulesOperations` + """ + api_version = self._get_api_version('default_security_rules') + if api_version == '2017-06-01': + from .v2017_06_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import DefaultSecurityRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'default_security_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def dscp_configuration(self): + """Instance depends on the API version: + + * 2020-06-01: :class:`DscpConfigurationOperations` + * 2020-07-01: :class:`DscpConfigurationOperations` + * 2020-08-01: :class:`DscpConfigurationOperations` + * 2020-11-01: :class:`DscpConfigurationOperations` + * 2021-02-01: :class:`DscpConfigurationOperations` + * 2021-03-01: :class:`DscpConfigurationOperations` + """ + api_version = self._get_api_version('dscp_configuration') + if api_version == '2020-06-01': + from .v2020_06_01.operations import DscpConfigurationOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import DscpConfigurationOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import DscpConfigurationOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import DscpConfigurationOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import DscpConfigurationOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import DscpConfigurationOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'dscp_configuration'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def effective_connectivity_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`EffectiveConnectivityConfigurationsOperations` + """ + api_version = self._get_api_version('effective_connectivity_configurations') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import EffectiveConnectivityConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'effective_connectivity_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def effective_virtual_networks(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`EffectiveVirtualNetworksOperations` + """ + api_version = self._get_api_version('effective_virtual_networks') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import EffectiveVirtualNetworksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'effective_virtual_networks'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_circuit_authorizations(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2016-09-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2016-12-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2017-03-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2017-06-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2017-09-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2017-10-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2017-11-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-01-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-02-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-04-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-06-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-07-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-08-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-10-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-11-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-12-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-02-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-04-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-06-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-07-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-08-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-09-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-11-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-12-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-03-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-04-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-05-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-06-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-07-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-08-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-11-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2021-02-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2021-03-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + """ + api_version = self._get_api_version('express_route_circuit_authorizations') + if api_version == '2015-06-15': + from .v2015_06_15.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_circuit_authorizations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_circuit_connections(self): + """Instance depends on the API version: + + * 2018-02-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-04-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-06-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-07-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-08-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-10-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-11-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-12-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-02-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-04-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-06-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-07-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-08-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-09-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-11-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-12-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-03-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-04-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-05-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-06-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-07-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-08-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-11-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2021-02-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2021-03-01: :class:`ExpressRouteCircuitConnectionsOperations` + """ + api_version = self._get_api_version('express_route_circuit_connections') + if api_version == '2018-02-01': + from .v2018_02_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_circuit_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_circuit_peerings(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`ExpressRouteCircuitPeeringsOperations` + * 2016-09-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2016-12-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2017-03-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2017-06-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2017-09-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2017-10-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2017-11-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-01-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-02-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-04-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-06-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-07-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-08-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-10-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-11-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-12-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-02-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-04-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-06-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-07-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-08-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-09-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-11-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-12-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-03-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-04-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-05-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-06-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-07-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-08-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-11-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2021-02-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2021-03-01: :class:`ExpressRouteCircuitPeeringsOperations` + """ + api_version = self._get_api_version('express_route_circuit_peerings') + if api_version == '2015-06-15': + from .v2015_06_15.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_circuit_peerings'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_circuits(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`ExpressRouteCircuitsOperations` + * 2016-09-01: :class:`ExpressRouteCircuitsOperations` + * 2016-12-01: :class:`ExpressRouteCircuitsOperations` + * 2017-03-01: :class:`ExpressRouteCircuitsOperations` + * 2017-06-01: :class:`ExpressRouteCircuitsOperations` + * 2017-09-01: :class:`ExpressRouteCircuitsOperations` + * 2017-10-01: :class:`ExpressRouteCircuitsOperations` + * 2017-11-01: :class:`ExpressRouteCircuitsOperations` + * 2018-01-01: :class:`ExpressRouteCircuitsOperations` + * 2018-02-01: :class:`ExpressRouteCircuitsOperations` + * 2018-04-01: :class:`ExpressRouteCircuitsOperations` + * 2018-06-01: :class:`ExpressRouteCircuitsOperations` + * 2018-07-01: :class:`ExpressRouteCircuitsOperations` + * 2018-08-01: :class:`ExpressRouteCircuitsOperations` + * 2018-10-01: :class:`ExpressRouteCircuitsOperations` + * 2018-11-01: :class:`ExpressRouteCircuitsOperations` + * 2018-12-01: :class:`ExpressRouteCircuitsOperations` + * 2019-02-01: :class:`ExpressRouteCircuitsOperations` + * 2019-04-01: :class:`ExpressRouteCircuitsOperations` + * 2019-06-01: :class:`ExpressRouteCircuitsOperations` + * 2019-07-01: :class:`ExpressRouteCircuitsOperations` + * 2019-08-01: :class:`ExpressRouteCircuitsOperations` + * 2019-09-01: :class:`ExpressRouteCircuitsOperations` + * 2019-11-01: :class:`ExpressRouteCircuitsOperations` + * 2019-12-01: :class:`ExpressRouteCircuitsOperations` + * 2020-03-01: :class:`ExpressRouteCircuitsOperations` + * 2020-04-01: :class:`ExpressRouteCircuitsOperations` + * 2020-05-01: :class:`ExpressRouteCircuitsOperations` + * 2020-06-01: :class:`ExpressRouteCircuitsOperations` + * 2020-07-01: :class:`ExpressRouteCircuitsOperations` + * 2020-08-01: :class:`ExpressRouteCircuitsOperations` + * 2020-11-01: :class:`ExpressRouteCircuitsOperations` + * 2021-02-01: :class:`ExpressRouteCircuitsOperations` + * 2021-03-01: :class:`ExpressRouteCircuitsOperations` + """ + api_version = self._get_api_version('express_route_circuits') + if api_version == '2015-06-15': + from .v2015_06_15.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ExpressRouteCircuitsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_circuits'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_connections(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`ExpressRouteConnectionsOperations` + * 2018-10-01: :class:`ExpressRouteConnectionsOperations` + * 2018-11-01: :class:`ExpressRouteConnectionsOperations` + * 2018-12-01: :class:`ExpressRouteConnectionsOperations` + * 2019-02-01: :class:`ExpressRouteConnectionsOperations` + * 2019-04-01: :class:`ExpressRouteConnectionsOperations` + * 2019-06-01: :class:`ExpressRouteConnectionsOperations` + * 2019-07-01: :class:`ExpressRouteConnectionsOperations` + * 2019-08-01: :class:`ExpressRouteConnectionsOperations` + * 2019-09-01: :class:`ExpressRouteConnectionsOperations` + * 2019-11-01: :class:`ExpressRouteConnectionsOperations` + * 2019-12-01: :class:`ExpressRouteConnectionsOperations` + * 2020-03-01: :class:`ExpressRouteConnectionsOperations` + * 2020-04-01: :class:`ExpressRouteConnectionsOperations` + * 2020-05-01: :class:`ExpressRouteConnectionsOperations` + * 2020-06-01: :class:`ExpressRouteConnectionsOperations` + * 2020-07-01: :class:`ExpressRouteConnectionsOperations` + * 2020-08-01: :class:`ExpressRouteConnectionsOperations` + * 2020-11-01: :class:`ExpressRouteConnectionsOperations` + * 2021-02-01: :class:`ExpressRouteConnectionsOperations` + * 2021-03-01: :class:`ExpressRouteConnectionsOperations` + """ + api_version = self._get_api_version('express_route_connections') + if api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ExpressRouteConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_cross_connection_peerings(self): + """Instance depends on the API version: + + * 2018-02-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-04-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-06-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-07-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-08-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-10-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-11-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-12-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-02-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-04-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-06-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-07-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-08-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-09-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-11-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-12-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-03-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-04-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-05-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-06-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-07-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-08-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-11-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2021-02-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2021-03-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + """ + api_version = self._get_api_version('express_route_cross_connection_peerings') + if api_version == '2018-02-01': + from .v2018_02_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_cross_connection_peerings'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_cross_connections(self): + """Instance depends on the API version: + + * 2018-02-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-04-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-06-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-07-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-08-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-10-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-11-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-12-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-02-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-04-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-06-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-07-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-08-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-09-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-11-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-12-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-03-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-04-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-05-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-06-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-07-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-08-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-11-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2021-02-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2021-03-01: :class:`ExpressRouteCrossConnectionsOperations` + """ + api_version = self._get_api_version('express_route_cross_connections') + if api_version == '2018-02-01': + from .v2018_02_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_cross_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_gateways(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`ExpressRouteGatewaysOperations` + * 2018-10-01: :class:`ExpressRouteGatewaysOperations` + * 2018-11-01: :class:`ExpressRouteGatewaysOperations` + * 2018-12-01: :class:`ExpressRouteGatewaysOperations` + * 2019-02-01: :class:`ExpressRouteGatewaysOperations` + * 2019-04-01: :class:`ExpressRouteGatewaysOperations` + * 2019-06-01: :class:`ExpressRouteGatewaysOperations` + * 2019-07-01: :class:`ExpressRouteGatewaysOperations` + * 2019-08-01: :class:`ExpressRouteGatewaysOperations` + * 2019-09-01: :class:`ExpressRouteGatewaysOperations` + * 2019-11-01: :class:`ExpressRouteGatewaysOperations` + * 2019-12-01: :class:`ExpressRouteGatewaysOperations` + * 2020-03-01: :class:`ExpressRouteGatewaysOperations` + * 2020-04-01: :class:`ExpressRouteGatewaysOperations` + * 2020-05-01: :class:`ExpressRouteGatewaysOperations` + * 2020-06-01: :class:`ExpressRouteGatewaysOperations` + * 2020-07-01: :class:`ExpressRouteGatewaysOperations` + * 2020-08-01: :class:`ExpressRouteGatewaysOperations` + * 2020-11-01: :class:`ExpressRouteGatewaysOperations` + * 2021-02-01: :class:`ExpressRouteGatewaysOperations` + * 2021-03-01: :class:`ExpressRouteGatewaysOperations` + """ + api_version = self._get_api_version('express_route_gateways') + if api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ExpressRouteGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_links(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`ExpressRouteLinksOperations` + * 2018-10-01: :class:`ExpressRouteLinksOperations` + * 2018-11-01: :class:`ExpressRouteLinksOperations` + * 2018-12-01: :class:`ExpressRouteLinksOperations` + * 2019-02-01: :class:`ExpressRouteLinksOperations` + * 2019-04-01: :class:`ExpressRouteLinksOperations` + * 2019-06-01: :class:`ExpressRouteLinksOperations` + * 2019-07-01: :class:`ExpressRouteLinksOperations` + * 2019-08-01: :class:`ExpressRouteLinksOperations` + * 2019-09-01: :class:`ExpressRouteLinksOperations` + * 2019-11-01: :class:`ExpressRouteLinksOperations` + * 2019-12-01: :class:`ExpressRouteLinksOperations` + * 2020-03-01: :class:`ExpressRouteLinksOperations` + * 2020-04-01: :class:`ExpressRouteLinksOperations` + * 2020-05-01: :class:`ExpressRouteLinksOperations` + * 2020-06-01: :class:`ExpressRouteLinksOperations` + * 2020-07-01: :class:`ExpressRouteLinksOperations` + * 2020-08-01: :class:`ExpressRouteLinksOperations` + * 2020-11-01: :class:`ExpressRouteLinksOperations` + * 2021-02-01: :class:`ExpressRouteLinksOperations` + * 2021-03-01: :class:`ExpressRouteLinksOperations` + """ + api_version = self._get_api_version('express_route_links') + if api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ExpressRouteLinksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_links'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_ports(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`ExpressRoutePortsOperations` + * 2018-10-01: :class:`ExpressRoutePortsOperations` + * 2018-11-01: :class:`ExpressRoutePortsOperations` + * 2018-12-01: :class:`ExpressRoutePortsOperations` + * 2019-02-01: :class:`ExpressRoutePortsOperations` + * 2019-04-01: :class:`ExpressRoutePortsOperations` + * 2019-06-01: :class:`ExpressRoutePortsOperations` + * 2019-07-01: :class:`ExpressRoutePortsOperations` + * 2019-08-01: :class:`ExpressRoutePortsOperations` + * 2019-09-01: :class:`ExpressRoutePortsOperations` + * 2019-11-01: :class:`ExpressRoutePortsOperations` + * 2019-12-01: :class:`ExpressRoutePortsOperations` + * 2020-03-01: :class:`ExpressRoutePortsOperations` + * 2020-04-01: :class:`ExpressRoutePortsOperations` + * 2020-05-01: :class:`ExpressRoutePortsOperations` + * 2020-06-01: :class:`ExpressRoutePortsOperations` + * 2020-07-01: :class:`ExpressRoutePortsOperations` + * 2020-08-01: :class:`ExpressRoutePortsOperations` + * 2020-11-01: :class:`ExpressRoutePortsOperations` + * 2021-02-01: :class:`ExpressRoutePortsOperations` + * 2021-03-01: :class:`ExpressRoutePortsOperations` + """ + api_version = self._get_api_version('express_route_ports') + if api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ExpressRoutePortsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_ports'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_ports_locations(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`ExpressRoutePortsLocationsOperations` + * 2018-10-01: :class:`ExpressRoutePortsLocationsOperations` + * 2018-11-01: :class:`ExpressRoutePortsLocationsOperations` + * 2018-12-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-02-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-04-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-06-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-07-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-08-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-09-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-11-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-12-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-03-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-04-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-05-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-06-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-07-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-08-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-11-01: :class:`ExpressRoutePortsLocationsOperations` + * 2021-02-01: :class:`ExpressRoutePortsLocationsOperations` + * 2021-03-01: :class:`ExpressRoutePortsLocationsOperations` + """ + api_version = self._get_api_version('express_route_ports_locations') + if api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_ports_locations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_service_providers(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`ExpressRouteServiceProvidersOperations` + * 2016-09-01: :class:`ExpressRouteServiceProvidersOperations` + * 2016-12-01: :class:`ExpressRouteServiceProvidersOperations` + * 2017-03-01: :class:`ExpressRouteServiceProvidersOperations` + * 2017-06-01: :class:`ExpressRouteServiceProvidersOperations` + * 2017-09-01: :class:`ExpressRouteServiceProvidersOperations` + * 2017-10-01: :class:`ExpressRouteServiceProvidersOperations` + * 2017-11-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-01-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-02-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-04-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-06-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-07-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-08-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-10-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-11-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-12-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-02-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-04-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-06-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-07-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-08-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-09-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-11-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-12-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-03-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-04-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-05-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-06-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-07-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-08-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-11-01: :class:`ExpressRouteServiceProvidersOperations` + * 2021-02-01: :class:`ExpressRouteServiceProvidersOperations` + * 2021-03-01: :class:`ExpressRouteServiceProvidersOperations` + """ + api_version = self._get_api_version('express_route_service_providers') + if api_version == '2015-06-15': + from .v2015_06_15.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_service_providers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def firewall_policies(self): + """Instance depends on the API version: + + * 2019-06-01: :class:`FirewallPoliciesOperations` + * 2019-07-01: :class:`FirewallPoliciesOperations` + * 2019-08-01: :class:`FirewallPoliciesOperations` + * 2019-09-01: :class:`FirewallPoliciesOperations` + * 2019-11-01: :class:`FirewallPoliciesOperations` + * 2019-12-01: :class:`FirewallPoliciesOperations` + * 2020-03-01: :class:`FirewallPoliciesOperations` + * 2020-04-01: :class:`FirewallPoliciesOperations` + * 2020-05-01: :class:`FirewallPoliciesOperations` + * 2020-06-01: :class:`FirewallPoliciesOperations` + * 2020-07-01: :class:`FirewallPoliciesOperations` + * 2020-08-01: :class:`FirewallPoliciesOperations` + * 2020-11-01: :class:`FirewallPoliciesOperations` + * 2021-02-01: :class:`FirewallPoliciesOperations` + * 2021-03-01: :class:`FirewallPoliciesOperations` + """ + api_version = self._get_api_version('firewall_policies') + if api_version == '2019-06-01': + from .v2019_06_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import FirewallPoliciesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policies'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def firewall_policy_rule_collection_groups(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2020-06-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2020-07-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2020-08-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2020-11-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2021-02-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2021-03-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + """ + api_version = self._get_api_version('firewall_policy_rule_collection_groups') + if api_version == '2020-05-01': + from .v2020_05_01.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policy_rule_collection_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def firewall_policy_rule_groups(self): + """Instance depends on the API version: + + * 2019-06-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2019-07-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2019-08-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2019-09-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2019-11-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2019-12-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2020-03-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2020-04-01: :class:`FirewallPolicyRuleGroupsOperations` + """ + api_version = self._get_api_version('firewall_policy_rule_groups') + if api_version == '2019-06-01': + from .v2019_06_01.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import FirewallPolicyRuleGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policy_rule_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def flow_logs(self): + """Instance depends on the API version: + + * 2019-11-01: :class:`FlowLogsOperations` + * 2019-12-01: :class:`FlowLogsOperations` + * 2020-03-01: :class:`FlowLogsOperations` + * 2020-04-01: :class:`FlowLogsOperations` + * 2020-05-01: :class:`FlowLogsOperations` + * 2020-06-01: :class:`FlowLogsOperations` + * 2020-07-01: :class:`FlowLogsOperations` + * 2020-08-01: :class:`FlowLogsOperations` + * 2020-11-01: :class:`FlowLogsOperations` + * 2021-02-01: :class:`FlowLogsOperations` + * 2021-03-01: :class:`FlowLogsOperations` + """ + api_version = self._get_api_version('flow_logs') + if api_version == '2019-11-01': + from .v2019_11_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import FlowLogsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'flow_logs'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def hub_route_tables(self): + """Instance depends on the API version: + + * 2020-04-01: :class:`HubRouteTablesOperations` + * 2020-05-01: :class:`HubRouteTablesOperations` + * 2020-06-01: :class:`HubRouteTablesOperations` + * 2020-07-01: :class:`HubRouteTablesOperations` + * 2020-08-01: :class:`HubRouteTablesOperations` + * 2020-11-01: :class:`HubRouteTablesOperations` + * 2021-02-01: :class:`HubRouteTablesOperations` + * 2021-03-01: :class:`HubRouteTablesOperations` + """ + api_version = self._get_api_version('hub_route_tables') + if api_version == '2020-04-01': + from .v2020_04_01.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import HubRouteTablesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'hub_route_tables'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def hub_virtual_network_connections(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2018-06-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2018-07-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2018-08-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2018-10-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2018-11-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2018-12-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-02-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-04-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-06-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-07-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-08-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-09-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-11-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-12-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-03-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-04-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-05-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-06-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-07-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-08-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-11-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2021-02-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2021-03-01: :class:`HubVirtualNetworkConnectionsOperations` + """ + api_version = self._get_api_version('hub_virtual_network_connections') + if api_version == '2018-04-01': + from .v2018_04_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'hub_virtual_network_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def inbound_nat_rules(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`InboundNatRulesOperations` + * 2017-09-01: :class:`InboundNatRulesOperations` + * 2017-10-01: :class:`InboundNatRulesOperations` + * 2017-11-01: :class:`InboundNatRulesOperations` + * 2018-01-01: :class:`InboundNatRulesOperations` + * 2018-02-01: :class:`InboundNatRulesOperations` + * 2018-04-01: :class:`InboundNatRulesOperations` + * 2018-06-01: :class:`InboundNatRulesOperations` + * 2018-07-01: :class:`InboundNatRulesOperations` + * 2018-08-01: :class:`InboundNatRulesOperations` + * 2018-10-01: :class:`InboundNatRulesOperations` + * 2018-11-01: :class:`InboundNatRulesOperations` + * 2018-12-01: :class:`InboundNatRulesOperations` + * 2019-02-01: :class:`InboundNatRulesOperations` + * 2019-04-01: :class:`InboundNatRulesOperations` + * 2019-06-01: :class:`InboundNatRulesOperations` + * 2019-07-01: :class:`InboundNatRulesOperations` + * 2019-08-01: :class:`InboundNatRulesOperations` + * 2019-09-01: :class:`InboundNatRulesOperations` + * 2019-11-01: :class:`InboundNatRulesOperations` + * 2019-12-01: :class:`InboundNatRulesOperations` + * 2020-03-01: :class:`InboundNatRulesOperations` + * 2020-04-01: :class:`InboundNatRulesOperations` + * 2020-05-01: :class:`InboundNatRulesOperations` + * 2020-06-01: :class:`InboundNatRulesOperations` + * 2020-07-01: :class:`InboundNatRulesOperations` + * 2020-08-01: :class:`InboundNatRulesOperations` + * 2020-11-01: :class:`InboundNatRulesOperations` + * 2021-02-01: :class:`InboundNatRulesOperations` + * 2021-03-01: :class:`InboundNatRulesOperations` + """ + api_version = self._get_api_version('inbound_nat_rules') + if api_version == '2017-06-01': + from .v2017_06_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import InboundNatRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'inbound_nat_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def inbound_security_rule(self): + """Instance depends on the API version: + + * 2020-06-01: :class:`InboundSecurityRuleOperations` + * 2020-07-01: :class:`InboundSecurityRuleOperations` + * 2020-08-01: :class:`InboundSecurityRuleOperations` + * 2020-11-01: :class:`InboundSecurityRuleOperations` + * 2021-02-01: :class:`InboundSecurityRuleOperations` + * 2021-03-01: :class:`InboundSecurityRuleOperations` + """ + api_version = self._get_api_version('inbound_security_rule') + if api_version == '2020-06-01': + from .v2020_06_01.operations import InboundSecurityRuleOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import InboundSecurityRuleOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import InboundSecurityRuleOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import InboundSecurityRuleOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import InboundSecurityRuleOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import InboundSecurityRuleOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'inbound_security_rule'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def interface_endpoints(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`InterfaceEndpointsOperations` + * 2018-10-01: :class:`InterfaceEndpointsOperations` + * 2018-11-01: :class:`InterfaceEndpointsOperations` + * 2018-12-01: :class:`InterfaceEndpointsOperations` + * 2019-02-01: :class:`InterfaceEndpointsOperations` + """ + api_version = self._get_api_version('interface_endpoints') + if api_version == '2018-08-01': + from .v2018_08_01.operations import InterfaceEndpointsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import InterfaceEndpointsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import InterfaceEndpointsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import InterfaceEndpointsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import InterfaceEndpointsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'interface_endpoints'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def ip_allocations(self): + """Instance depends on the API version: + + * 2020-03-01: :class:`IpAllocationsOperations` + * 2020-04-01: :class:`IpAllocationsOperations` + * 2020-05-01: :class:`IpAllocationsOperations` + * 2020-06-01: :class:`IpAllocationsOperations` + * 2020-07-01: :class:`IpAllocationsOperations` + * 2020-08-01: :class:`IpAllocationsOperations` + * 2020-11-01: :class:`IpAllocationsOperations` + * 2021-02-01: :class:`IpAllocationsOperations` + * 2021-03-01: :class:`IpAllocationsOperations` + """ + api_version = self._get_api_version('ip_allocations') + if api_version == '2020-03-01': + from .v2020_03_01.operations import IpAllocationsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import IpAllocationsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import IpAllocationsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import IpAllocationsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import IpAllocationsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import IpAllocationsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import IpAllocationsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import IpAllocationsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import IpAllocationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'ip_allocations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def ip_groups(self): + """Instance depends on the API version: + + * 2019-09-01: :class:`IpGroupsOperations` + * 2019-11-01: :class:`IpGroupsOperations` + * 2019-12-01: :class:`IpGroupsOperations` + * 2020-03-01: :class:`IpGroupsOperations` + * 2020-04-01: :class:`IpGroupsOperations` + * 2020-05-01: :class:`IpGroupsOperations` + * 2020-06-01: :class:`IpGroupsOperations` + * 2020-07-01: :class:`IpGroupsOperations` + * 2020-08-01: :class:`IpGroupsOperations` + * 2020-11-01: :class:`IpGroupsOperations` + * 2021-02-01: :class:`IpGroupsOperations` + * 2021-03-01: :class:`IpGroupsOperations` + """ + api_version = self._get_api_version('ip_groups') + if api_version == '2019-09-01': + from .v2019_09_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import IpGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'ip_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancer_backend_address_pools(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2017-09-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2017-10-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2017-11-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-01-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-02-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-04-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-06-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-07-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-08-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-10-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-11-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-12-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-02-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-04-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-06-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-07-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-08-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-09-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-11-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-12-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-03-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-04-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-05-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-06-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-07-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-08-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-11-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2021-02-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2021-03-01: :class:`LoadBalancerBackendAddressPoolsOperations` + """ + api_version = self._get_api_version('load_balancer_backend_address_pools') + if api_version == '2017-06-01': + from .v2017_06_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancer_backend_address_pools'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancer_frontend_ip_configurations(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2017-09-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2017-10-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2017-11-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-01-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-02-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-04-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-06-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-07-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-08-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-10-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-11-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-12-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-02-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-04-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-06-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-07-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-08-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-09-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-11-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-12-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-03-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-04-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-05-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-06-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-07-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-08-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-11-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2021-02-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2021-03-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + """ + api_version = self._get_api_version('load_balancer_frontend_ip_configurations') + if api_version == '2017-06-01': + from .v2017_06_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancer_frontend_ip_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancer_load_balancing_rules(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2017-09-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2017-10-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2017-11-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-01-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-02-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-04-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-06-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-07-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-08-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-10-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-11-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-12-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-02-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-04-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-06-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-07-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-08-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-09-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-11-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-12-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-03-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-04-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-05-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-06-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-07-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-08-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-11-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2021-02-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2021-03-01: :class:`LoadBalancerLoadBalancingRulesOperations` + """ + api_version = self._get_api_version('load_balancer_load_balancing_rules') + if api_version == '2017-06-01': + from .v2017_06_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancer_load_balancing_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancer_network_interfaces(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2017-09-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2017-10-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2017-11-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-01-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-02-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-04-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-06-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-07-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-08-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-10-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-11-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-12-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-02-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-04-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-06-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-07-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-08-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-09-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-11-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-12-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-03-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-04-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-05-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-06-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-07-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-08-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-11-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2021-02-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2021-03-01: :class:`LoadBalancerNetworkInterfacesOperations` + """ + api_version = self._get_api_version('load_balancer_network_interfaces') + if api_version == '2017-06-01': + from .v2017_06_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancer_network_interfaces'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancer_outbound_rules(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`LoadBalancerOutboundRulesOperations` + * 2018-10-01: :class:`LoadBalancerOutboundRulesOperations` + * 2018-11-01: :class:`LoadBalancerOutboundRulesOperations` + * 2018-12-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-02-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-04-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-06-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-07-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-08-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-09-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-11-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-12-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-03-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-04-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-05-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-06-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-07-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-08-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-11-01: :class:`LoadBalancerOutboundRulesOperations` + * 2021-02-01: :class:`LoadBalancerOutboundRulesOperations` + * 2021-03-01: :class:`LoadBalancerOutboundRulesOperations` + """ + api_version = self._get_api_version('load_balancer_outbound_rules') + if api_version == '2018-08-01': + from .v2018_08_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancer_outbound_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancer_probes(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`LoadBalancerProbesOperations` + * 2017-09-01: :class:`LoadBalancerProbesOperations` + * 2017-10-01: :class:`LoadBalancerProbesOperations` + * 2017-11-01: :class:`LoadBalancerProbesOperations` + * 2018-01-01: :class:`LoadBalancerProbesOperations` + * 2018-02-01: :class:`LoadBalancerProbesOperations` + * 2018-04-01: :class:`LoadBalancerProbesOperations` + * 2018-06-01: :class:`LoadBalancerProbesOperations` + * 2018-07-01: :class:`LoadBalancerProbesOperations` + * 2018-08-01: :class:`LoadBalancerProbesOperations` + * 2018-10-01: :class:`LoadBalancerProbesOperations` + * 2018-11-01: :class:`LoadBalancerProbesOperations` + * 2018-12-01: :class:`LoadBalancerProbesOperations` + * 2019-02-01: :class:`LoadBalancerProbesOperations` + * 2019-04-01: :class:`LoadBalancerProbesOperations` + * 2019-06-01: :class:`LoadBalancerProbesOperations` + * 2019-07-01: :class:`LoadBalancerProbesOperations` + * 2019-08-01: :class:`LoadBalancerProbesOperations` + * 2019-09-01: :class:`LoadBalancerProbesOperations` + * 2019-11-01: :class:`LoadBalancerProbesOperations` + * 2019-12-01: :class:`LoadBalancerProbesOperations` + * 2020-03-01: :class:`LoadBalancerProbesOperations` + * 2020-04-01: :class:`LoadBalancerProbesOperations` + * 2020-05-01: :class:`LoadBalancerProbesOperations` + * 2020-06-01: :class:`LoadBalancerProbesOperations` + * 2020-07-01: :class:`LoadBalancerProbesOperations` + * 2020-08-01: :class:`LoadBalancerProbesOperations` + * 2020-11-01: :class:`LoadBalancerProbesOperations` + * 2021-02-01: :class:`LoadBalancerProbesOperations` + * 2021-03-01: :class:`LoadBalancerProbesOperations` + """ + api_version = self._get_api_version('load_balancer_probes') + if api_version == '2017-06-01': + from .v2017_06_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import LoadBalancerProbesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancer_probes'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancers(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`LoadBalancersOperations` + * 2016-09-01: :class:`LoadBalancersOperations` + * 2016-12-01: :class:`LoadBalancersOperations` + * 2017-03-01: :class:`LoadBalancersOperations` + * 2017-06-01: :class:`LoadBalancersOperations` + * 2017-09-01: :class:`LoadBalancersOperations` + * 2017-10-01: :class:`LoadBalancersOperations` + * 2017-11-01: :class:`LoadBalancersOperations` + * 2018-01-01: :class:`LoadBalancersOperations` + * 2018-02-01: :class:`LoadBalancersOperations` + * 2018-04-01: :class:`LoadBalancersOperations` + * 2018-06-01: :class:`LoadBalancersOperations` + * 2018-07-01: :class:`LoadBalancersOperations` + * 2018-08-01: :class:`LoadBalancersOperations` + * 2018-10-01: :class:`LoadBalancersOperations` + * 2018-11-01: :class:`LoadBalancersOperations` + * 2018-12-01: :class:`LoadBalancersOperations` + * 2019-02-01: :class:`LoadBalancersOperations` + * 2019-04-01: :class:`LoadBalancersOperations` + * 2019-06-01: :class:`LoadBalancersOperations` + * 2019-07-01: :class:`LoadBalancersOperations` + * 2019-08-01: :class:`LoadBalancersOperations` + * 2019-09-01: :class:`LoadBalancersOperations` + * 2019-11-01: :class:`LoadBalancersOperations` + * 2019-12-01: :class:`LoadBalancersOperations` + * 2020-03-01: :class:`LoadBalancersOperations` + * 2020-04-01: :class:`LoadBalancersOperations` + * 2020-05-01: :class:`LoadBalancersOperations` + * 2020-06-01: :class:`LoadBalancersOperations` + * 2020-07-01: :class:`LoadBalancersOperations` + * 2020-08-01: :class:`LoadBalancersOperations` + * 2020-11-01: :class:`LoadBalancersOperations` + * 2021-02-01: :class:`LoadBalancersOperations` + * 2021-03-01: :class:`LoadBalancersOperations` + """ + api_version = self._get_api_version('load_balancers') + if api_version == '2015-06-15': + from .v2015_06_15.operations import LoadBalancersOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import LoadBalancersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def local_network_gateways(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`LocalNetworkGatewaysOperations` + * 2016-09-01: :class:`LocalNetworkGatewaysOperations` + * 2016-12-01: :class:`LocalNetworkGatewaysOperations` + * 2017-03-01: :class:`LocalNetworkGatewaysOperations` + * 2017-06-01: :class:`LocalNetworkGatewaysOperations` + * 2017-09-01: :class:`LocalNetworkGatewaysOperations` + * 2017-10-01: :class:`LocalNetworkGatewaysOperations` + * 2017-11-01: :class:`LocalNetworkGatewaysOperations` + * 2018-01-01: :class:`LocalNetworkGatewaysOperations` + * 2018-02-01: :class:`LocalNetworkGatewaysOperations` + * 2018-04-01: :class:`LocalNetworkGatewaysOperations` + * 2018-06-01: :class:`LocalNetworkGatewaysOperations` + * 2018-07-01: :class:`LocalNetworkGatewaysOperations` + * 2018-08-01: :class:`LocalNetworkGatewaysOperations` + * 2018-10-01: :class:`LocalNetworkGatewaysOperations` + * 2018-11-01: :class:`LocalNetworkGatewaysOperations` + * 2018-12-01: :class:`LocalNetworkGatewaysOperations` + * 2019-02-01: :class:`LocalNetworkGatewaysOperations` + * 2019-04-01: :class:`LocalNetworkGatewaysOperations` + * 2019-06-01: :class:`LocalNetworkGatewaysOperations` + * 2019-07-01: :class:`LocalNetworkGatewaysOperations` + * 2019-08-01: :class:`LocalNetworkGatewaysOperations` + * 2019-09-01: :class:`LocalNetworkGatewaysOperations` + * 2019-11-01: :class:`LocalNetworkGatewaysOperations` + * 2019-12-01: :class:`LocalNetworkGatewaysOperations` + * 2020-03-01: :class:`LocalNetworkGatewaysOperations` + * 2020-04-01: :class:`LocalNetworkGatewaysOperations` + * 2020-05-01: :class:`LocalNetworkGatewaysOperations` + * 2020-06-01: :class:`LocalNetworkGatewaysOperations` + * 2020-07-01: :class:`LocalNetworkGatewaysOperations` + * 2020-08-01: :class:`LocalNetworkGatewaysOperations` + * 2020-11-01: :class:`LocalNetworkGatewaysOperations` + * 2021-02-01: :class:`LocalNetworkGatewaysOperations` + * 2021-03-01: :class:`LocalNetworkGatewaysOperations` + """ + api_version = self._get_api_version('local_network_gateways') + if api_version == '2015-06-15': + from .v2015_06_15.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import LocalNetworkGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'local_network_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def nat_gateways(self): + """Instance depends on the API version: + + * 2019-02-01: :class:`NatGatewaysOperations` + * 2019-04-01: :class:`NatGatewaysOperations` + * 2019-06-01: :class:`NatGatewaysOperations` + * 2019-07-01: :class:`NatGatewaysOperations` + * 2019-08-01: :class:`NatGatewaysOperations` + * 2019-09-01: :class:`NatGatewaysOperations` + * 2019-11-01: :class:`NatGatewaysOperations` + * 2019-12-01: :class:`NatGatewaysOperations` + * 2020-03-01: :class:`NatGatewaysOperations` + * 2020-04-01: :class:`NatGatewaysOperations` + * 2020-05-01: :class:`NatGatewaysOperations` + * 2020-06-01: :class:`NatGatewaysOperations` + * 2020-07-01: :class:`NatGatewaysOperations` + * 2020-08-01: :class:`NatGatewaysOperations` + * 2020-11-01: :class:`NatGatewaysOperations` + * 2021-02-01: :class:`NatGatewaysOperations` + * 2021-03-01: :class:`NatGatewaysOperations` + """ + api_version = self._get_api_version('nat_gateways') + if api_version == '2019-02-01': + from .v2019_02_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import NatGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'nat_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def nat_rules(self): + """Instance depends on the API version: + + * 2020-08-01: :class:`NatRulesOperations` + * 2020-11-01: :class:`NatRulesOperations` + * 2021-02-01: :class:`NatRulesOperations` + * 2021-03-01: :class:`NatRulesOperations` + """ + api_version = self._get_api_version('nat_rules') + if api_version == '2020-08-01': + from .v2020_08_01.operations import NatRulesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NatRulesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NatRulesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import NatRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'nat_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_groups(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkGroupsOperations` + """ + api_version = self._get_api_version('network_groups') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NetworkGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_interface_ip_configurations(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2017-09-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2017-10-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2017-11-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-01-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-02-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-04-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-06-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-07-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-08-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-10-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-11-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-12-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-02-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-04-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-06-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-07-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-08-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-09-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-11-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-12-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-03-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-04-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-05-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-06-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-07-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-08-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-11-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2021-02-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2021-03-01: :class:`NetworkInterfaceIPConfigurationsOperations` + """ + api_version = self._get_api_version('network_interface_ip_configurations') + if api_version == '2017-06-01': + from .v2017_06_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_interface_ip_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_interface_load_balancers(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2017-09-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2017-10-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2017-11-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-01-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-02-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-04-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-06-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-07-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-08-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-10-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-11-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-12-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-02-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-04-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-06-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-07-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-08-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-09-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-11-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-12-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-03-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-04-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-05-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-06-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-07-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-08-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-11-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2021-02-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2021-03-01: :class:`NetworkInterfaceLoadBalancersOperations` + """ + api_version = self._get_api_version('network_interface_load_balancers') + if api_version == '2017-06-01': + from .v2017_06_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_interface_load_balancers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_interface_tap_configurations(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2018-10-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2018-11-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2018-12-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-02-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-04-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-06-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-07-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-08-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-09-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-11-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-12-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-03-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-04-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-05-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-06-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-07-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-08-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-11-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2021-02-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2021-03-01: :class:`NetworkInterfaceTapConfigurationsOperations` + """ + api_version = self._get_api_version('network_interface_tap_configurations') + if api_version == '2018-08-01': + from .v2018_08_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_interface_tap_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_interfaces(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`NetworkInterfacesOperations` + * 2016-09-01: :class:`NetworkInterfacesOperations` + * 2016-12-01: :class:`NetworkInterfacesOperations` + * 2017-03-01: :class:`NetworkInterfacesOperations` + * 2017-06-01: :class:`NetworkInterfacesOperations` + * 2017-09-01: :class:`NetworkInterfacesOperations` + * 2017-10-01: :class:`NetworkInterfacesOperations` + * 2017-11-01: :class:`NetworkInterfacesOperations` + * 2018-01-01: :class:`NetworkInterfacesOperations` + * 2018-02-01: :class:`NetworkInterfacesOperations` + * 2018-04-01: :class:`NetworkInterfacesOperations` + * 2018-06-01: :class:`NetworkInterfacesOperations` + * 2018-07-01: :class:`NetworkInterfacesOperations` + * 2018-08-01: :class:`NetworkInterfacesOperations` + * 2018-10-01: :class:`NetworkInterfacesOperations` + * 2018-11-01: :class:`NetworkInterfacesOperations` + * 2018-12-01: :class:`NetworkInterfacesOperations` + * 2019-02-01: :class:`NetworkInterfacesOperations` + * 2019-04-01: :class:`NetworkInterfacesOperations` + * 2019-06-01: :class:`NetworkInterfacesOperations` + * 2019-07-01: :class:`NetworkInterfacesOperations` + * 2019-08-01: :class:`NetworkInterfacesOperations` + * 2019-09-01: :class:`NetworkInterfacesOperations` + * 2019-11-01: :class:`NetworkInterfacesOperations` + * 2019-12-01: :class:`NetworkInterfacesOperations` + * 2020-03-01: :class:`NetworkInterfacesOperations` + * 2020-04-01: :class:`NetworkInterfacesOperations` + * 2020-05-01: :class:`NetworkInterfacesOperations` + * 2020-06-01: :class:`NetworkInterfacesOperations` + * 2020-07-01: :class:`NetworkInterfacesOperations` + * 2020-08-01: :class:`NetworkInterfacesOperations` + * 2020-11-01: :class:`NetworkInterfacesOperations` + * 2021-02-01: :class:`NetworkInterfacesOperations` + * 2021-03-01: :class:`NetworkInterfacesOperations` + """ + api_version = self._get_api_version('network_interfaces') + if api_version == '2015-06-15': + from .v2015_06_15.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import NetworkInterfacesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_interfaces'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_manager_commits(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagerCommitsOperations` + """ + api_version = self._get_api_version('network_manager_commits') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NetworkManagerCommitsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_manager_commits'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_manager_deployment_status(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagerDeploymentStatusOperations` + """ + api_version = self._get_api_version('network_manager_deployment_status') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NetworkManagerDeploymentStatusOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_manager_deployment_status'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_manager_effective_security_admin_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagerEffectiveSecurityAdminRulesOperations` + """ + api_version = self._get_api_version('network_manager_effective_security_admin_rules') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NetworkManagerEffectiveSecurityAdminRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_manager_effective_security_admin_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_managers(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagersOperations` + """ + api_version = self._get_api_version('network_managers') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NetworkManagersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_managers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_profiles(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`NetworkProfilesOperations` + * 2018-10-01: :class:`NetworkProfilesOperations` + * 2018-11-01: :class:`NetworkProfilesOperations` + * 2018-12-01: :class:`NetworkProfilesOperations` + * 2019-02-01: :class:`NetworkProfilesOperations` + * 2019-04-01: :class:`NetworkProfilesOperations` + * 2019-06-01: :class:`NetworkProfilesOperations` + * 2019-07-01: :class:`NetworkProfilesOperations` + * 2019-08-01: :class:`NetworkProfilesOperations` + * 2019-09-01: :class:`NetworkProfilesOperations` + * 2019-11-01: :class:`NetworkProfilesOperations` + * 2019-12-01: :class:`NetworkProfilesOperations` + * 2020-03-01: :class:`NetworkProfilesOperations` + * 2020-04-01: :class:`NetworkProfilesOperations` + * 2020-05-01: :class:`NetworkProfilesOperations` + * 2020-06-01: :class:`NetworkProfilesOperations` + * 2020-07-01: :class:`NetworkProfilesOperations` + * 2020-08-01: :class:`NetworkProfilesOperations` + * 2020-11-01: :class:`NetworkProfilesOperations` + * 2021-02-01: :class:`NetworkProfilesOperations` + * 2021-03-01: :class:`NetworkProfilesOperations` + """ + api_version = self._get_api_version('network_profiles') + if api_version == '2018-08-01': + from .v2018_08_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import NetworkProfilesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_profiles'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_security_groups(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`NetworkSecurityGroupsOperations` + * 2016-09-01: :class:`NetworkSecurityGroupsOperations` + * 2016-12-01: :class:`NetworkSecurityGroupsOperations` + * 2017-03-01: :class:`NetworkSecurityGroupsOperations` + * 2017-06-01: :class:`NetworkSecurityGroupsOperations` + * 2017-09-01: :class:`NetworkSecurityGroupsOperations` + * 2017-10-01: :class:`NetworkSecurityGroupsOperations` + * 2017-11-01: :class:`NetworkSecurityGroupsOperations` + * 2018-01-01: :class:`NetworkSecurityGroupsOperations` + * 2018-02-01: :class:`NetworkSecurityGroupsOperations` + * 2018-04-01: :class:`NetworkSecurityGroupsOperations` + * 2018-06-01: :class:`NetworkSecurityGroupsOperations` + * 2018-07-01: :class:`NetworkSecurityGroupsOperations` + * 2018-08-01: :class:`NetworkSecurityGroupsOperations` + * 2018-10-01: :class:`NetworkSecurityGroupsOperations` + * 2018-11-01: :class:`NetworkSecurityGroupsOperations` + * 2018-12-01: :class:`NetworkSecurityGroupsOperations` + * 2019-02-01: :class:`NetworkSecurityGroupsOperations` + * 2019-04-01: :class:`NetworkSecurityGroupsOperations` + * 2019-06-01: :class:`NetworkSecurityGroupsOperations` + * 2019-07-01: :class:`NetworkSecurityGroupsOperations` + * 2019-08-01: :class:`NetworkSecurityGroupsOperations` + * 2019-09-01: :class:`NetworkSecurityGroupsOperations` + * 2019-11-01: :class:`NetworkSecurityGroupsOperations` + * 2019-12-01: :class:`NetworkSecurityGroupsOperations` + * 2020-03-01: :class:`NetworkSecurityGroupsOperations` + * 2020-04-01: :class:`NetworkSecurityGroupsOperations` + * 2020-05-01: :class:`NetworkSecurityGroupsOperations` + * 2020-06-01: :class:`NetworkSecurityGroupsOperations` + * 2020-07-01: :class:`NetworkSecurityGroupsOperations` + * 2020-08-01: :class:`NetworkSecurityGroupsOperations` + * 2020-11-01: :class:`NetworkSecurityGroupsOperations` + * 2021-02-01: :class:`NetworkSecurityGroupsOperations` + * 2021-03-01: :class:`NetworkSecurityGroupsOperations` + """ + api_version = self._get_api_version('network_security_groups') + if api_version == '2015-06-15': + from .v2015_06_15.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import NetworkSecurityGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_security_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_security_perimeters(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkSecurityPerimetersOperations` + """ + api_version = self._get_api_version('network_security_perimeters') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NetworkSecurityPerimetersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_security_perimeters'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_virtual_appliances(self): + """Instance depends on the API version: + + * 2019-12-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-03-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-04-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-05-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-06-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-07-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-08-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-11-01: :class:`NetworkVirtualAppliancesOperations` + * 2021-02-01: :class:`NetworkVirtualAppliancesOperations` + * 2021-03-01: :class:`NetworkVirtualAppliancesOperations` + """ + api_version = self._get_api_version('network_virtual_appliances') + if api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import NetworkVirtualAppliancesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_virtual_appliances'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_watchers(self): + """Instance depends on the API version: + + * 2016-09-01: :class:`NetworkWatchersOperations` + * 2016-12-01: :class:`NetworkWatchersOperations` + * 2017-03-01: :class:`NetworkWatchersOperations` + * 2017-06-01: :class:`NetworkWatchersOperations` + * 2017-09-01: :class:`NetworkWatchersOperations` + * 2017-10-01: :class:`NetworkWatchersOperations` + * 2017-11-01: :class:`NetworkWatchersOperations` + * 2018-01-01: :class:`NetworkWatchersOperations` + * 2018-02-01: :class:`NetworkWatchersOperations` + * 2018-04-01: :class:`NetworkWatchersOperations` + * 2018-06-01: :class:`NetworkWatchersOperations` + * 2018-07-01: :class:`NetworkWatchersOperations` + * 2018-08-01: :class:`NetworkWatchersOperations` + * 2018-10-01: :class:`NetworkWatchersOperations` + * 2018-11-01: :class:`NetworkWatchersOperations` + * 2018-12-01: :class:`NetworkWatchersOperations` + * 2019-02-01: :class:`NetworkWatchersOperations` + * 2019-04-01: :class:`NetworkWatchersOperations` + * 2019-06-01: :class:`NetworkWatchersOperations` + * 2019-07-01: :class:`NetworkWatchersOperations` + * 2019-08-01: :class:`NetworkWatchersOperations` + * 2019-09-01: :class:`NetworkWatchersOperations` + * 2019-11-01: :class:`NetworkWatchersOperations` + * 2019-12-01: :class:`NetworkWatchersOperations` + * 2020-03-01: :class:`NetworkWatchersOperations` + * 2020-04-01: :class:`NetworkWatchersOperations` + * 2020-05-01: :class:`NetworkWatchersOperations` + * 2020-06-01: :class:`NetworkWatchersOperations` + * 2020-07-01: :class:`NetworkWatchersOperations` + * 2020-08-01: :class:`NetworkWatchersOperations` + * 2020-11-01: :class:`NetworkWatchersOperations` + * 2021-02-01: :class:`NetworkWatchersOperations` + * 2021-03-01: :class:`NetworkWatchersOperations` + """ + api_version = self._get_api_version('network_watchers') + if api_version == '2016-09-01': + from .v2016_09_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import NetworkWatchersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_watchers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def operations(self): + """Instance depends on the API version: + + * 2017-09-01: :class:`Operations` + * 2017-10-01: :class:`Operations` + * 2017-11-01: :class:`Operations` + * 2018-01-01: :class:`Operations` + * 2018-02-01: :class:`Operations` + * 2018-04-01: :class:`Operations` + * 2018-06-01: :class:`Operations` + * 2018-07-01: :class:`Operations` + * 2018-08-01: :class:`Operations` + * 2018-10-01: :class:`Operations` + * 2018-11-01: :class:`Operations` + * 2018-12-01: :class:`Operations` + * 2019-02-01: :class:`Operations` + * 2019-04-01: :class:`Operations` + * 2019-06-01: :class:`Operations` + * 2019-07-01: :class:`Operations` + * 2019-08-01: :class:`Operations` + * 2019-09-01: :class:`Operations` + * 2019-11-01: :class:`Operations` + * 2019-12-01: :class:`Operations` + * 2020-03-01: :class:`Operations` + * 2020-04-01: :class:`Operations` + * 2020-05-01: :class:`Operations` + * 2020-06-01: :class:`Operations` + * 2020-07-01: :class:`Operations` + * 2020-08-01: :class:`Operations` + * 2020-11-01: :class:`Operations` + * 2021-02-01: :class:`Operations` + * 2021-03-01: :class:`Operations` + """ + api_version = self._get_api_version('operations') + if api_version == '2017-09-01': + from .v2017_09_01.operations import Operations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import Operations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import Operations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import Operations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import Operations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import Operations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import Operations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import Operations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import Operations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import Operations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import Operations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import Operations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import Operations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import Operations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import Operations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import Operations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import Operations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import Operations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import Operations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import Operations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import Operations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import Operations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import Operations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import Operations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import Operations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import Operations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import Operations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import Operations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import Operations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def p2_svpn_gateways(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`P2SVpnGatewaysOperations` + * 2018-10-01: :class:`P2SVpnGatewaysOperations` + * 2018-11-01: :class:`P2SVpnGatewaysOperations` + * 2018-12-01: :class:`P2SVpnGatewaysOperations` + * 2019-02-01: :class:`P2SVpnGatewaysOperations` + * 2019-04-01: :class:`P2SVpnGatewaysOperations` + * 2019-06-01: :class:`P2SVpnGatewaysOperations` + * 2019-07-01: :class:`P2SVpnGatewaysOperations` + * 2019-08-01: :class:`P2SVpnGatewaysOperations` + * 2019-09-01: :class:`P2SVpnGatewaysOperations` + * 2019-11-01: :class:`P2SVpnGatewaysOperations` + * 2019-12-01: :class:`P2SVpnGatewaysOperations` + * 2020-03-01: :class:`P2SVpnGatewaysOperations` + * 2020-04-01: :class:`P2SVpnGatewaysOperations` + * 2020-05-01: :class:`P2SVpnGatewaysOperations` + * 2020-06-01: :class:`P2SVpnGatewaysOperations` + * 2020-07-01: :class:`P2SVpnGatewaysOperations` + * 2020-08-01: :class:`P2SVpnGatewaysOperations` + * 2020-11-01: :class:`P2SVpnGatewaysOperations` + * 2021-02-01: :class:`P2SVpnGatewaysOperations` + * 2021-03-01: :class:`P2SVpnGatewaysOperations` + """ + api_version = self._get_api_version('p2_svpn_gateways') + if api_version == '2018-08-01': + from .v2018_08_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import P2SVpnGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'p2_svpn_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def p2_svpn_server_configurations(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`P2SVpnServerConfigurationsOperations` + * 2018-10-01: :class:`P2SVpnServerConfigurationsOperations` + * 2018-11-01: :class:`P2SVpnServerConfigurationsOperations` + * 2018-12-01: :class:`P2SVpnServerConfigurationsOperations` + * 2019-02-01: :class:`P2SVpnServerConfigurationsOperations` + * 2019-04-01: :class:`P2SVpnServerConfigurationsOperations` + * 2019-06-01: :class:`P2SVpnServerConfigurationsOperations` + * 2019-07-01: :class:`P2SVpnServerConfigurationsOperations` + """ + api_version = self._get_api_version('p2_svpn_server_configurations') + if api_version == '2018-08-01': + from .v2018_08_01.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import P2SVpnServerConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'p2_svpn_server_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def packet_captures(self): + """Instance depends on the API version: + + * 2016-09-01: :class:`PacketCapturesOperations` + * 2016-12-01: :class:`PacketCapturesOperations` + * 2017-03-01: :class:`PacketCapturesOperations` + * 2017-06-01: :class:`PacketCapturesOperations` + * 2017-09-01: :class:`PacketCapturesOperations` + * 2017-10-01: :class:`PacketCapturesOperations` + * 2017-11-01: :class:`PacketCapturesOperations` + * 2018-01-01: :class:`PacketCapturesOperations` + * 2018-02-01: :class:`PacketCapturesOperations` + * 2018-04-01: :class:`PacketCapturesOperations` + * 2018-06-01: :class:`PacketCapturesOperations` + * 2018-07-01: :class:`PacketCapturesOperations` + * 2018-08-01: :class:`PacketCapturesOperations` + * 2018-10-01: :class:`PacketCapturesOperations` + * 2018-11-01: :class:`PacketCapturesOperations` + * 2018-12-01: :class:`PacketCapturesOperations` + * 2019-02-01: :class:`PacketCapturesOperations` + * 2019-04-01: :class:`PacketCapturesOperations` + * 2019-06-01: :class:`PacketCapturesOperations` + * 2019-07-01: :class:`PacketCapturesOperations` + * 2019-08-01: :class:`PacketCapturesOperations` + * 2019-09-01: :class:`PacketCapturesOperations` + * 2019-11-01: :class:`PacketCapturesOperations` + * 2019-12-01: :class:`PacketCapturesOperations` + * 2020-03-01: :class:`PacketCapturesOperations` + * 2020-04-01: :class:`PacketCapturesOperations` + * 2020-05-01: :class:`PacketCapturesOperations` + * 2020-06-01: :class:`PacketCapturesOperations` + * 2020-07-01: :class:`PacketCapturesOperations` + * 2020-08-01: :class:`PacketCapturesOperations` + * 2020-11-01: :class:`PacketCapturesOperations` + * 2021-02-01: :class:`PacketCapturesOperations` + * 2021-03-01: :class:`PacketCapturesOperations` + """ + api_version = self._get_api_version('packet_captures') + if api_version == '2016-09-01': + from .v2016_09_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import PacketCapturesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'packet_captures'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def peer_express_route_circuit_connections(self): + """Instance depends on the API version: + + * 2018-12-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-02-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-04-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-06-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-07-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-08-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-09-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-11-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-12-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-03-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-04-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-05-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-06-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-07-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-08-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-11-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2021-02-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2021-03-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + """ + api_version = self._get_api_version('peer_express_route_circuit_connections') + if api_version == '2018-12-01': + from .v2018_12_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'peer_express_route_circuit_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def perimeter_associable_resource_types(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`PerimeterAssociableResourceTypesOperations` + """ + api_version = self._get_api_version('perimeter_associable_resource_types') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import PerimeterAssociableResourceTypesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'perimeter_associable_resource_types'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def private_dns_zone_groups(self): + """Instance depends on the API version: + + * 2020-03-01: :class:`PrivateDnsZoneGroupsOperations` + * 2020-04-01: :class:`PrivateDnsZoneGroupsOperations` + * 2020-05-01: :class:`PrivateDnsZoneGroupsOperations` + * 2020-06-01: :class:`PrivateDnsZoneGroupsOperations` + * 2020-07-01: :class:`PrivateDnsZoneGroupsOperations` + * 2020-08-01: :class:`PrivateDnsZoneGroupsOperations` + * 2020-11-01: :class:`PrivateDnsZoneGroupsOperations` + * 2021-02-01: :class:`PrivateDnsZoneGroupsOperations` + * 2021-03-01: :class:`PrivateDnsZoneGroupsOperations` + """ + api_version = self._get_api_version('private_dns_zone_groups') + if api_version == '2020-03-01': + from .v2020_03_01.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import PrivateDnsZoneGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'private_dns_zone_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def private_endpoints(self): + """Instance depends on the API version: + + * 2019-04-01: :class:`PrivateEndpointsOperations` + * 2019-06-01: :class:`PrivateEndpointsOperations` + * 2019-07-01: :class:`PrivateEndpointsOperations` + * 2019-08-01: :class:`PrivateEndpointsOperations` + * 2019-09-01: :class:`PrivateEndpointsOperations` + * 2019-11-01: :class:`PrivateEndpointsOperations` + * 2019-12-01: :class:`PrivateEndpointsOperations` + * 2020-03-01: :class:`PrivateEndpointsOperations` + * 2020-04-01: :class:`PrivateEndpointsOperations` + * 2020-05-01: :class:`PrivateEndpointsOperations` + * 2020-06-01: :class:`PrivateEndpointsOperations` + * 2020-07-01: :class:`PrivateEndpointsOperations` + * 2020-08-01: :class:`PrivateEndpointsOperations` + * 2020-11-01: :class:`PrivateEndpointsOperations` + * 2021-02-01: :class:`PrivateEndpointsOperations` + * 2021-03-01: :class:`PrivateEndpointsOperations` + """ + api_version = self._get_api_version('private_endpoints') + if api_version == '2019-04-01': + from .v2019_04_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import PrivateEndpointsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'private_endpoints'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def private_link_services(self): + """Instance depends on the API version: + + * 2019-04-01: :class:`PrivateLinkServicesOperations` + * 2019-06-01: :class:`PrivateLinkServicesOperations` + * 2019-07-01: :class:`PrivateLinkServicesOperations` + * 2019-08-01: :class:`PrivateLinkServicesOperations` + * 2019-09-01: :class:`PrivateLinkServicesOperations` + * 2019-11-01: :class:`PrivateLinkServicesOperations` + * 2019-12-01: :class:`PrivateLinkServicesOperations` + * 2020-03-01: :class:`PrivateLinkServicesOperations` + * 2020-04-01: :class:`PrivateLinkServicesOperations` + * 2020-05-01: :class:`PrivateLinkServicesOperations` + * 2020-06-01: :class:`PrivateLinkServicesOperations` + * 2020-07-01: :class:`PrivateLinkServicesOperations` + * 2020-08-01: :class:`PrivateLinkServicesOperations` + * 2020-11-01: :class:`PrivateLinkServicesOperations` + * 2021-02-01: :class:`PrivateLinkServicesOperations` + * 2021-03-01: :class:`PrivateLinkServicesOperations` + """ + api_version = self._get_api_version('private_link_services') + if api_version == '2019-04-01': + from .v2019_04_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import PrivateLinkServicesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'private_link_services'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def public_ip_addresses(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`PublicIPAddressesOperations` + * 2016-09-01: :class:`PublicIPAddressesOperations` + * 2016-12-01: :class:`PublicIPAddressesOperations` + * 2017-03-01: :class:`PublicIPAddressesOperations` + * 2017-06-01: :class:`PublicIPAddressesOperations` + * 2017-09-01: :class:`PublicIPAddressesOperations` + * 2017-10-01: :class:`PublicIPAddressesOperations` + * 2017-11-01: :class:`PublicIPAddressesOperations` + * 2018-01-01: :class:`PublicIPAddressesOperations` + * 2018-02-01: :class:`PublicIPAddressesOperations` + * 2018-04-01: :class:`PublicIPAddressesOperations` + * 2018-06-01: :class:`PublicIPAddressesOperations` + * 2018-07-01: :class:`PublicIPAddressesOperations` + * 2018-08-01: :class:`PublicIPAddressesOperations` + * 2018-10-01: :class:`PublicIPAddressesOperations` + * 2018-11-01: :class:`PublicIPAddressesOperations` + * 2018-12-01: :class:`PublicIPAddressesOperations` + * 2019-02-01: :class:`PublicIPAddressesOperations` + * 2019-04-01: :class:`PublicIPAddressesOperations` + * 2019-06-01: :class:`PublicIPAddressesOperations` + * 2019-07-01: :class:`PublicIPAddressesOperations` + * 2019-08-01: :class:`PublicIPAddressesOperations` + * 2019-09-01: :class:`PublicIPAddressesOperations` + * 2019-11-01: :class:`PublicIPAddressesOperations` + * 2019-12-01: :class:`PublicIPAddressesOperations` + * 2020-03-01: :class:`PublicIPAddressesOperations` + * 2020-04-01: :class:`PublicIPAddressesOperations` + * 2020-05-01: :class:`PublicIPAddressesOperations` + * 2020-06-01: :class:`PublicIPAddressesOperations` + * 2020-07-01: :class:`PublicIPAddressesOperations` + * 2020-08-01: :class:`PublicIPAddressesOperations` + * 2020-11-01: :class:`PublicIPAddressesOperations` + * 2021-02-01: :class:`PublicIPAddressesOperations` + * 2021-03-01: :class:`PublicIPAddressesOperations` + """ + api_version = self._get_api_version('public_ip_addresses') + if api_version == '2015-06-15': + from .v2015_06_15.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import PublicIPAddressesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'public_ip_addresses'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def public_ip_prefixes(self): + """Instance depends on the API version: + + * 2018-07-01: :class:`PublicIPPrefixesOperations` + * 2018-08-01: :class:`PublicIPPrefixesOperations` + * 2018-10-01: :class:`PublicIPPrefixesOperations` + * 2018-11-01: :class:`PublicIPPrefixesOperations` + * 2018-12-01: :class:`PublicIPPrefixesOperations` + * 2019-02-01: :class:`PublicIPPrefixesOperations` + * 2019-04-01: :class:`PublicIPPrefixesOperations` + * 2019-06-01: :class:`PublicIPPrefixesOperations` + * 2019-07-01: :class:`PublicIPPrefixesOperations` + * 2019-08-01: :class:`PublicIPPrefixesOperations` + * 2019-09-01: :class:`PublicIPPrefixesOperations` + * 2019-11-01: :class:`PublicIPPrefixesOperations` + * 2019-12-01: :class:`PublicIPPrefixesOperations` + * 2020-03-01: :class:`PublicIPPrefixesOperations` + * 2020-04-01: :class:`PublicIPPrefixesOperations` + * 2020-05-01: :class:`PublicIPPrefixesOperations` + * 2020-06-01: :class:`PublicIPPrefixesOperations` + * 2020-07-01: :class:`PublicIPPrefixesOperations` + * 2020-08-01: :class:`PublicIPPrefixesOperations` + * 2020-11-01: :class:`PublicIPPrefixesOperations` + * 2021-02-01: :class:`PublicIPPrefixesOperations` + * 2021-03-01: :class:`PublicIPPrefixesOperations` + """ + api_version = self._get_api_version('public_ip_prefixes') + if api_version == '2018-07-01': + from .v2018_07_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import PublicIPPrefixesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'public_ip_prefixes'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def resource_navigation_links(self): + """Instance depends on the API version: + + * 2019-02-01: :class:`ResourceNavigationLinksOperations` + * 2019-04-01: :class:`ResourceNavigationLinksOperations` + * 2019-06-01: :class:`ResourceNavigationLinksOperations` + * 2019-07-01: :class:`ResourceNavigationLinksOperations` + * 2019-08-01: :class:`ResourceNavigationLinksOperations` + * 2019-09-01: :class:`ResourceNavigationLinksOperations` + * 2019-11-01: :class:`ResourceNavigationLinksOperations` + * 2019-12-01: :class:`ResourceNavigationLinksOperations` + * 2020-03-01: :class:`ResourceNavigationLinksOperations` + * 2020-04-01: :class:`ResourceNavigationLinksOperations` + * 2020-05-01: :class:`ResourceNavigationLinksOperations` + * 2020-06-01: :class:`ResourceNavigationLinksOperations` + * 2020-07-01: :class:`ResourceNavigationLinksOperations` + * 2020-08-01: :class:`ResourceNavigationLinksOperations` + * 2020-11-01: :class:`ResourceNavigationLinksOperations` + * 2021-02-01: :class:`ResourceNavigationLinksOperations` + * 2021-03-01: :class:`ResourceNavigationLinksOperations` + """ + api_version = self._get_api_version('resource_navigation_links') + if api_version == '2019-02-01': + from .v2019_02_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ResourceNavigationLinksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'resource_navigation_links'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def route_filter_rules(self): + """Instance depends on the API version: + + * 2016-12-01: :class:`RouteFilterRulesOperations` + * 2017-03-01: :class:`RouteFilterRulesOperations` + * 2017-06-01: :class:`RouteFilterRulesOperations` + * 2017-09-01: :class:`RouteFilterRulesOperations` + * 2017-10-01: :class:`RouteFilterRulesOperations` + * 2017-11-01: :class:`RouteFilterRulesOperations` + * 2018-01-01: :class:`RouteFilterRulesOperations` + * 2018-02-01: :class:`RouteFilterRulesOperations` + * 2018-04-01: :class:`RouteFilterRulesOperations` + * 2018-06-01: :class:`RouteFilterRulesOperations` + * 2018-07-01: :class:`RouteFilterRulesOperations` + * 2018-08-01: :class:`RouteFilterRulesOperations` + * 2018-10-01: :class:`RouteFilterRulesOperations` + * 2018-11-01: :class:`RouteFilterRulesOperations` + * 2018-12-01: :class:`RouteFilterRulesOperations` + * 2019-02-01: :class:`RouteFilterRulesOperations` + * 2019-04-01: :class:`RouteFilterRulesOperations` + * 2019-06-01: :class:`RouteFilterRulesOperations` + * 2019-07-01: :class:`RouteFilterRulesOperations` + * 2019-08-01: :class:`RouteFilterRulesOperations` + * 2019-09-01: :class:`RouteFilterRulesOperations` + * 2019-11-01: :class:`RouteFilterRulesOperations` + * 2019-12-01: :class:`RouteFilterRulesOperations` + * 2020-03-01: :class:`RouteFilterRulesOperations` + * 2020-04-01: :class:`RouteFilterRulesOperations` + * 2020-05-01: :class:`RouteFilterRulesOperations` + * 2020-06-01: :class:`RouteFilterRulesOperations` + * 2020-07-01: :class:`RouteFilterRulesOperations` + * 2020-08-01: :class:`RouteFilterRulesOperations` + * 2020-11-01: :class:`RouteFilterRulesOperations` + * 2021-02-01: :class:`RouteFilterRulesOperations` + * 2021-03-01: :class:`RouteFilterRulesOperations` + """ + api_version = self._get_api_version('route_filter_rules') + if api_version == '2016-12-01': + from .v2016_12_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import RouteFilterRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'route_filter_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def route_filters(self): + """Instance depends on the API version: + + * 2016-12-01: :class:`RouteFiltersOperations` + * 2017-03-01: :class:`RouteFiltersOperations` + * 2017-06-01: :class:`RouteFiltersOperations` + * 2017-09-01: :class:`RouteFiltersOperations` + * 2017-10-01: :class:`RouteFiltersOperations` + * 2017-11-01: :class:`RouteFiltersOperations` + * 2018-01-01: :class:`RouteFiltersOperations` + * 2018-02-01: :class:`RouteFiltersOperations` + * 2018-04-01: :class:`RouteFiltersOperations` + * 2018-06-01: :class:`RouteFiltersOperations` + * 2018-07-01: :class:`RouteFiltersOperations` + * 2018-08-01: :class:`RouteFiltersOperations` + * 2018-10-01: :class:`RouteFiltersOperations` + * 2018-11-01: :class:`RouteFiltersOperations` + * 2018-12-01: :class:`RouteFiltersOperations` + * 2019-02-01: :class:`RouteFiltersOperations` + * 2019-04-01: :class:`RouteFiltersOperations` + * 2019-06-01: :class:`RouteFiltersOperations` + * 2019-07-01: :class:`RouteFiltersOperations` + * 2019-08-01: :class:`RouteFiltersOperations` + * 2019-09-01: :class:`RouteFiltersOperations` + * 2019-11-01: :class:`RouteFiltersOperations` + * 2019-12-01: :class:`RouteFiltersOperations` + * 2020-03-01: :class:`RouteFiltersOperations` + * 2020-04-01: :class:`RouteFiltersOperations` + * 2020-05-01: :class:`RouteFiltersOperations` + * 2020-06-01: :class:`RouteFiltersOperations` + * 2020-07-01: :class:`RouteFiltersOperations` + * 2020-08-01: :class:`RouteFiltersOperations` + * 2020-11-01: :class:`RouteFiltersOperations` + * 2021-02-01: :class:`RouteFiltersOperations` + * 2021-03-01: :class:`RouteFiltersOperations` + """ + api_version = self._get_api_version('route_filters') + if api_version == '2016-12-01': + from .v2016_12_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import RouteFiltersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'route_filters'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def route_tables(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`RouteTablesOperations` + * 2016-09-01: :class:`RouteTablesOperations` + * 2016-12-01: :class:`RouteTablesOperations` + * 2017-03-01: :class:`RouteTablesOperations` + * 2017-06-01: :class:`RouteTablesOperations` + * 2017-09-01: :class:`RouteTablesOperations` + * 2017-10-01: :class:`RouteTablesOperations` + * 2017-11-01: :class:`RouteTablesOperations` + * 2018-01-01: :class:`RouteTablesOperations` + * 2018-02-01: :class:`RouteTablesOperations` + * 2018-04-01: :class:`RouteTablesOperations` + * 2018-06-01: :class:`RouteTablesOperations` + * 2018-07-01: :class:`RouteTablesOperations` + * 2018-08-01: :class:`RouteTablesOperations` + * 2018-10-01: :class:`RouteTablesOperations` + * 2018-11-01: :class:`RouteTablesOperations` + * 2018-12-01: :class:`RouteTablesOperations` + * 2019-02-01: :class:`RouteTablesOperations` + * 2019-04-01: :class:`RouteTablesOperations` + * 2019-06-01: :class:`RouteTablesOperations` + * 2019-07-01: :class:`RouteTablesOperations` + * 2019-08-01: :class:`RouteTablesOperations` + * 2019-09-01: :class:`RouteTablesOperations` + * 2019-11-01: :class:`RouteTablesOperations` + * 2019-12-01: :class:`RouteTablesOperations` + * 2020-03-01: :class:`RouteTablesOperations` + * 2020-04-01: :class:`RouteTablesOperations` + * 2020-05-01: :class:`RouteTablesOperations` + * 2020-06-01: :class:`RouteTablesOperations` + * 2020-07-01: :class:`RouteTablesOperations` + * 2020-08-01: :class:`RouteTablesOperations` + * 2020-11-01: :class:`RouteTablesOperations` + * 2021-02-01: :class:`RouteTablesOperations` + * 2021-03-01: :class:`RouteTablesOperations` + """ + api_version = self._get_api_version('route_tables') + if api_version == '2015-06-15': + from .v2015_06_15.operations import RouteTablesOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import RouteTablesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'route_tables'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def routes(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`RoutesOperations` + * 2016-09-01: :class:`RoutesOperations` + * 2016-12-01: :class:`RoutesOperations` + * 2017-03-01: :class:`RoutesOperations` + * 2017-06-01: :class:`RoutesOperations` + * 2017-09-01: :class:`RoutesOperations` + * 2017-10-01: :class:`RoutesOperations` + * 2017-11-01: :class:`RoutesOperations` + * 2018-01-01: :class:`RoutesOperations` + * 2018-02-01: :class:`RoutesOperations` + * 2018-04-01: :class:`RoutesOperations` + * 2018-06-01: :class:`RoutesOperations` + * 2018-07-01: :class:`RoutesOperations` + * 2018-08-01: :class:`RoutesOperations` + * 2018-10-01: :class:`RoutesOperations` + * 2018-11-01: :class:`RoutesOperations` + * 2018-12-01: :class:`RoutesOperations` + * 2019-02-01: :class:`RoutesOperations` + * 2019-04-01: :class:`RoutesOperations` + * 2019-06-01: :class:`RoutesOperations` + * 2019-07-01: :class:`RoutesOperations` + * 2019-08-01: :class:`RoutesOperations` + * 2019-09-01: :class:`RoutesOperations` + * 2019-11-01: :class:`RoutesOperations` + * 2019-12-01: :class:`RoutesOperations` + * 2020-03-01: :class:`RoutesOperations` + * 2020-04-01: :class:`RoutesOperations` + * 2020-05-01: :class:`RoutesOperations` + * 2020-06-01: :class:`RoutesOperations` + * 2020-07-01: :class:`RoutesOperations` + * 2020-08-01: :class:`RoutesOperations` + * 2020-11-01: :class:`RoutesOperations` + * 2021-02-01: :class:`RoutesOperations` + * 2021-03-01: :class:`RoutesOperations` + """ + api_version = self._get_api_version('routes') + if api_version == '2015-06-15': + from .v2015_06_15.operations import RoutesOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import RoutesOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import RoutesOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import RoutesOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import RoutesOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import RoutesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import RoutesOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import RoutesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import RoutesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import RoutesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import RoutesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import RoutesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import RoutesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import RoutesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import RoutesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import RoutesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import RoutesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import RoutesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import RoutesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import RoutesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import RoutesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import RoutesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import RoutesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import RoutesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import RoutesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import RoutesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import RoutesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import RoutesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import RoutesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import RoutesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import RoutesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import RoutesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import RoutesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import RoutesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'routes'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def security_admin_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`SecurityAdminConfigurationsOperations` + """ + api_version = self._get_api_version('security_admin_configurations') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import SecurityAdminConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'security_admin_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def security_partner_providers(self): + """Instance depends on the API version: + + * 2020-03-01: :class:`SecurityPartnerProvidersOperations` + * 2020-04-01: :class:`SecurityPartnerProvidersOperations` + * 2020-05-01: :class:`SecurityPartnerProvidersOperations` + * 2020-06-01: :class:`SecurityPartnerProvidersOperations` + * 2020-07-01: :class:`SecurityPartnerProvidersOperations` + * 2020-08-01: :class:`SecurityPartnerProvidersOperations` + * 2020-11-01: :class:`SecurityPartnerProvidersOperations` + * 2021-02-01: :class:`SecurityPartnerProvidersOperations` + * 2021-03-01: :class:`SecurityPartnerProvidersOperations` + """ + api_version = self._get_api_version('security_partner_providers') + if api_version == '2020-03-01': + from .v2020_03_01.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import SecurityPartnerProvidersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'security_partner_providers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def security_rules(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`SecurityRulesOperations` + * 2016-09-01: :class:`SecurityRulesOperations` + * 2016-12-01: :class:`SecurityRulesOperations` + * 2017-03-01: :class:`SecurityRulesOperations` + * 2017-06-01: :class:`SecurityRulesOperations` + * 2017-09-01: :class:`SecurityRulesOperations` + * 2017-10-01: :class:`SecurityRulesOperations` + * 2017-11-01: :class:`SecurityRulesOperations` + * 2018-01-01: :class:`SecurityRulesOperations` + * 2018-02-01: :class:`SecurityRulesOperations` + * 2018-04-01: :class:`SecurityRulesOperations` + * 2018-06-01: :class:`SecurityRulesOperations` + * 2018-07-01: :class:`SecurityRulesOperations` + * 2018-08-01: :class:`SecurityRulesOperations` + * 2018-10-01: :class:`SecurityRulesOperations` + * 2018-11-01: :class:`SecurityRulesOperations` + * 2018-12-01: :class:`SecurityRulesOperations` + * 2019-02-01: :class:`SecurityRulesOperations` + * 2019-04-01: :class:`SecurityRulesOperations` + * 2019-06-01: :class:`SecurityRulesOperations` + * 2019-07-01: :class:`SecurityRulesOperations` + * 2019-08-01: :class:`SecurityRulesOperations` + * 2019-09-01: :class:`SecurityRulesOperations` + * 2019-11-01: :class:`SecurityRulesOperations` + * 2019-12-01: :class:`SecurityRulesOperations` + * 2020-03-01: :class:`SecurityRulesOperations` + * 2020-04-01: :class:`SecurityRulesOperations` + * 2020-05-01: :class:`SecurityRulesOperations` + * 2020-06-01: :class:`SecurityRulesOperations` + * 2020-07-01: :class:`SecurityRulesOperations` + * 2020-08-01: :class:`SecurityRulesOperations` + * 2020-11-01: :class:`SecurityRulesOperations` + * 2021-02-01: :class:`SecurityRulesOperations` + * 2021-03-01: :class:`SecurityRulesOperations` + """ + api_version = self._get_api_version('security_rules') + if api_version == '2015-06-15': + from .v2015_06_15.operations import SecurityRulesOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import SecurityRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'security_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def security_user_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`SecurityUserConfigurationsOperations` + """ + api_version = self._get_api_version('security_user_configurations') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import SecurityUserConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'security_user_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def service_association_links(self): + """Instance depends on the API version: + + * 2019-02-01: :class:`ServiceAssociationLinksOperations` + * 2019-04-01: :class:`ServiceAssociationLinksOperations` + * 2019-06-01: :class:`ServiceAssociationLinksOperations` + * 2019-07-01: :class:`ServiceAssociationLinksOperations` + * 2019-08-01: :class:`ServiceAssociationLinksOperations` + * 2019-09-01: :class:`ServiceAssociationLinksOperations` + * 2019-11-01: :class:`ServiceAssociationLinksOperations` + * 2019-12-01: :class:`ServiceAssociationLinksOperations` + * 2020-03-01: :class:`ServiceAssociationLinksOperations` + * 2020-04-01: :class:`ServiceAssociationLinksOperations` + * 2020-05-01: :class:`ServiceAssociationLinksOperations` + * 2020-06-01: :class:`ServiceAssociationLinksOperations` + * 2020-07-01: :class:`ServiceAssociationLinksOperations` + * 2020-08-01: :class:`ServiceAssociationLinksOperations` + * 2020-11-01: :class:`ServiceAssociationLinksOperations` + * 2021-02-01: :class:`ServiceAssociationLinksOperations` + * 2021-03-01: :class:`ServiceAssociationLinksOperations` + """ + api_version = self._get_api_version('service_association_links') + if api_version == '2019-02-01': + from .v2019_02_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ServiceAssociationLinksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'service_association_links'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def service_endpoint_policies(self): + """Instance depends on the API version: + + * 2018-07-01: :class:`ServiceEndpointPoliciesOperations` + * 2018-08-01: :class:`ServiceEndpointPoliciesOperations` + * 2018-10-01: :class:`ServiceEndpointPoliciesOperations` + * 2018-11-01: :class:`ServiceEndpointPoliciesOperations` + * 2018-12-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-02-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-04-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-06-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-07-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-08-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-09-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-11-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-12-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-03-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-04-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-05-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-06-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-07-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-08-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-11-01: :class:`ServiceEndpointPoliciesOperations` + * 2021-02-01: :class:`ServiceEndpointPoliciesOperations` + * 2021-03-01: :class:`ServiceEndpointPoliciesOperations` + """ + api_version = self._get_api_version('service_endpoint_policies') + if api_version == '2018-07-01': + from .v2018_07_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ServiceEndpointPoliciesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'service_endpoint_policies'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def service_endpoint_policy_definitions(self): + """Instance depends on the API version: + + * 2018-07-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2018-08-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2018-10-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2018-11-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2018-12-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-02-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-04-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-06-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-07-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-08-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-09-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-11-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-12-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-03-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-04-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-05-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-06-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-07-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-08-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-11-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2021-02-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2021-03-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + """ + api_version = self._get_api_version('service_endpoint_policy_definitions') + if api_version == '2018-07-01': + from .v2018_07_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'service_endpoint_policy_definitions'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def service_tag_information(self): + """Instance depends on the API version: + + * 2021-03-01: :class:`ServiceTagInformationOperations` + """ + api_version = self._get_api_version('service_tag_information') + if api_version == '2021-03-01': + from .v2021_03_01.operations import ServiceTagInformationOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'service_tag_information'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def service_tags(self): + """Instance depends on the API version: + + * 2019-04-01: :class:`ServiceTagsOperations` + * 2019-06-01: :class:`ServiceTagsOperations` + * 2019-07-01: :class:`ServiceTagsOperations` + * 2019-08-01: :class:`ServiceTagsOperations` + * 2019-09-01: :class:`ServiceTagsOperations` + * 2019-11-01: :class:`ServiceTagsOperations` + * 2019-12-01: :class:`ServiceTagsOperations` + * 2020-03-01: :class:`ServiceTagsOperations` + * 2020-04-01: :class:`ServiceTagsOperations` + * 2020-05-01: :class:`ServiceTagsOperations` + * 2020-06-01: :class:`ServiceTagsOperations` + * 2020-07-01: :class:`ServiceTagsOperations` + * 2020-08-01: :class:`ServiceTagsOperations` + * 2020-11-01: :class:`ServiceTagsOperations` + * 2021-02-01: :class:`ServiceTagsOperations` + * 2021-03-01: :class:`ServiceTagsOperations` + """ + api_version = self._get_api_version('service_tags') + if api_version == '2019-04-01': + from .v2019_04_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ServiceTagsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'service_tags'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def subnets(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`SubnetsOperations` + * 2016-09-01: :class:`SubnetsOperations` + * 2016-12-01: :class:`SubnetsOperations` + * 2017-03-01: :class:`SubnetsOperations` + * 2017-06-01: :class:`SubnetsOperations` + * 2017-09-01: :class:`SubnetsOperations` + * 2017-10-01: :class:`SubnetsOperations` + * 2017-11-01: :class:`SubnetsOperations` + * 2018-01-01: :class:`SubnetsOperations` + * 2018-02-01: :class:`SubnetsOperations` + * 2018-04-01: :class:`SubnetsOperations` + * 2018-06-01: :class:`SubnetsOperations` + * 2018-07-01: :class:`SubnetsOperations` + * 2018-08-01: :class:`SubnetsOperations` + * 2018-10-01: :class:`SubnetsOperations` + * 2018-11-01: :class:`SubnetsOperations` + * 2018-12-01: :class:`SubnetsOperations` + * 2019-02-01: :class:`SubnetsOperations` + * 2019-04-01: :class:`SubnetsOperations` + * 2019-06-01: :class:`SubnetsOperations` + * 2019-07-01: :class:`SubnetsOperations` + * 2019-08-01: :class:`SubnetsOperations` + * 2019-09-01: :class:`SubnetsOperations` + * 2019-11-01: :class:`SubnetsOperations` + * 2019-12-01: :class:`SubnetsOperations` + * 2020-03-01: :class:`SubnetsOperations` + * 2020-04-01: :class:`SubnetsOperations` + * 2020-05-01: :class:`SubnetsOperations` + * 2020-06-01: :class:`SubnetsOperations` + * 2020-07-01: :class:`SubnetsOperations` + * 2020-08-01: :class:`SubnetsOperations` + * 2020-11-01: :class:`SubnetsOperations` + * 2021-02-01: :class:`SubnetsOperations` + * 2021-03-01: :class:`SubnetsOperations` + """ + api_version = self._get_api_version('subnets') + if api_version == '2015-06-15': + from .v2015_06_15.operations import SubnetsOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import SubnetsOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import SubnetsOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import SubnetsOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import SubnetsOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import SubnetsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import SubnetsOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import SubnetsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import SubnetsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import SubnetsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import SubnetsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import SubnetsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import SubnetsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import SubnetsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import SubnetsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import SubnetsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import SubnetsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import SubnetsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import SubnetsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import SubnetsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import SubnetsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import SubnetsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import SubnetsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import SubnetsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import SubnetsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import SubnetsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import SubnetsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import SubnetsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import SubnetsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import SubnetsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import SubnetsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import SubnetsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import SubnetsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import SubnetsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'subnets'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def usages(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`UsagesOperations` + * 2016-09-01: :class:`UsagesOperations` + * 2016-12-01: :class:`UsagesOperations` + * 2017-03-01: :class:`UsagesOperations` + * 2017-06-01: :class:`UsagesOperations` + * 2017-09-01: :class:`UsagesOperations` + * 2017-10-01: :class:`UsagesOperations` + * 2017-11-01: :class:`UsagesOperations` + * 2018-01-01: :class:`UsagesOperations` + * 2018-02-01: :class:`UsagesOperations` + * 2018-04-01: :class:`UsagesOperations` + * 2018-06-01: :class:`UsagesOperations` + * 2018-07-01: :class:`UsagesOperations` + * 2018-08-01: :class:`UsagesOperations` + * 2018-10-01: :class:`UsagesOperations` + * 2018-11-01: :class:`UsagesOperations` + * 2018-12-01: :class:`UsagesOperations` + * 2019-02-01: :class:`UsagesOperations` + * 2019-04-01: :class:`UsagesOperations` + * 2019-06-01: :class:`UsagesOperations` + * 2019-07-01: :class:`UsagesOperations` + * 2019-08-01: :class:`UsagesOperations` + * 2019-09-01: :class:`UsagesOperations` + * 2019-11-01: :class:`UsagesOperations` + * 2019-12-01: :class:`UsagesOperations` + * 2020-03-01: :class:`UsagesOperations` + * 2020-04-01: :class:`UsagesOperations` + * 2020-05-01: :class:`UsagesOperations` + * 2020-06-01: :class:`UsagesOperations` + * 2020-07-01: :class:`UsagesOperations` + * 2020-08-01: :class:`UsagesOperations` + * 2020-11-01: :class:`UsagesOperations` + * 2021-02-01: :class:`UsagesOperations` + * 2021-03-01: :class:`UsagesOperations` + """ + api_version = self._get_api_version('usages') + if api_version == '2015-06-15': + from .v2015_06_15.operations import UsagesOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import UsagesOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import UsagesOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import UsagesOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import UsagesOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import UsagesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import UsagesOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import UsagesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import UsagesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import UsagesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import UsagesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import UsagesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import UsagesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import UsagesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import UsagesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import UsagesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import UsagesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import UsagesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import UsagesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import UsagesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import UsagesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import UsagesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import UsagesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import UsagesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import UsagesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import UsagesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import UsagesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import UsagesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import UsagesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import UsagesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import UsagesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import UsagesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import UsagesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import UsagesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'usages'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def user_rule_collections(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`UserRuleCollectionsOperations` + """ + api_version = self._get_api_version('user_rule_collections') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import UserRuleCollectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'user_rule_collections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def user_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`UserRulesOperations` + """ + api_version = self._get_api_version('user_rules') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import UserRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'user_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_appliance_sites(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`VirtualApplianceSitesOperations` + * 2020-06-01: :class:`VirtualApplianceSitesOperations` + * 2020-07-01: :class:`VirtualApplianceSitesOperations` + * 2020-08-01: :class:`VirtualApplianceSitesOperations` + * 2020-11-01: :class:`VirtualApplianceSitesOperations` + * 2021-02-01: :class:`VirtualApplianceSitesOperations` + * 2021-03-01: :class:`VirtualApplianceSitesOperations` + """ + api_version = self._get_api_version('virtual_appliance_sites') + if api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VirtualApplianceSitesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_appliance_sites'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_appliance_skus(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`VirtualApplianceSkusOperations` + * 2020-06-01: :class:`VirtualApplianceSkusOperations` + * 2020-07-01: :class:`VirtualApplianceSkusOperations` + * 2020-08-01: :class:`VirtualApplianceSkusOperations` + * 2020-11-01: :class:`VirtualApplianceSkusOperations` + * 2021-02-01: :class:`VirtualApplianceSkusOperations` + * 2021-03-01: :class:`VirtualApplianceSkusOperations` + """ + api_version = self._get_api_version('virtual_appliance_skus') + if api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VirtualApplianceSkusOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_appliance_skus'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_hub_bgp_connection(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`VirtualHubBgpConnectionOperations` + * 2020-06-01: :class:`VirtualHubBgpConnectionOperations` + * 2020-07-01: :class:`VirtualHubBgpConnectionOperations` + * 2020-08-01: :class:`VirtualHubBgpConnectionOperations` + * 2020-11-01: :class:`VirtualHubBgpConnectionOperations` + * 2021-02-01: :class:`VirtualHubBgpConnectionOperations` + * 2021-03-01: :class:`VirtualHubBgpConnectionOperations` + """ + api_version = self._get_api_version('virtual_hub_bgp_connection') + if api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VirtualHubBgpConnectionOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_hub_bgp_connection'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_hub_bgp_connections(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`VirtualHubBgpConnectionsOperations` + * 2020-06-01: :class:`VirtualHubBgpConnectionsOperations` + * 2020-07-01: :class:`VirtualHubBgpConnectionsOperations` + * 2020-08-01: :class:`VirtualHubBgpConnectionsOperations` + * 2020-11-01: :class:`VirtualHubBgpConnectionsOperations` + * 2021-02-01: :class:`VirtualHubBgpConnectionsOperations` + * 2021-03-01: :class:`VirtualHubBgpConnectionsOperations` + """ + api_version = self._get_api_version('virtual_hub_bgp_connections') + if api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VirtualHubBgpConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_hub_bgp_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_hub_ip_configuration(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`VirtualHubIpConfigurationOperations` + * 2020-06-01: :class:`VirtualHubIpConfigurationOperations` + * 2020-07-01: :class:`VirtualHubIpConfigurationOperations` + * 2020-08-01: :class:`VirtualHubIpConfigurationOperations` + * 2020-11-01: :class:`VirtualHubIpConfigurationOperations` + * 2021-02-01: :class:`VirtualHubIpConfigurationOperations` + * 2021-03-01: :class:`VirtualHubIpConfigurationOperations` + """ + api_version = self._get_api_version('virtual_hub_ip_configuration') + if api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VirtualHubIpConfigurationOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_hub_ip_configuration'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_hub_route_table_v2_s(self): + """Instance depends on the API version: + + * 2019-09-01: :class:`VirtualHubRouteTableV2SOperations` + * 2019-11-01: :class:`VirtualHubRouteTableV2SOperations` + * 2019-12-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-03-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-04-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-05-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-06-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-07-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-08-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-11-01: :class:`VirtualHubRouteTableV2SOperations` + * 2021-02-01: :class:`VirtualHubRouteTableV2SOperations` + * 2021-03-01: :class:`VirtualHubRouteTableV2SOperations` + """ + api_version = self._get_api_version('virtual_hub_route_table_v2_s') + if api_version == '2019-09-01': + from .v2019_09_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_hub_route_table_v2_s'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_hubs(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`VirtualHubsOperations` + * 2018-06-01: :class:`VirtualHubsOperations` + * 2018-07-01: :class:`VirtualHubsOperations` + * 2018-08-01: :class:`VirtualHubsOperations` + * 2018-10-01: :class:`VirtualHubsOperations` + * 2018-11-01: :class:`VirtualHubsOperations` + * 2018-12-01: :class:`VirtualHubsOperations` + * 2019-02-01: :class:`VirtualHubsOperations` + * 2019-04-01: :class:`VirtualHubsOperations` + * 2019-06-01: :class:`VirtualHubsOperations` + * 2019-07-01: :class:`VirtualHubsOperations` + * 2019-08-01: :class:`VirtualHubsOperations` + * 2019-09-01: :class:`VirtualHubsOperations` + * 2019-11-01: :class:`VirtualHubsOperations` + * 2019-12-01: :class:`VirtualHubsOperations` + * 2020-03-01: :class:`VirtualHubsOperations` + * 2020-04-01: :class:`VirtualHubsOperations` + * 2020-05-01: :class:`VirtualHubsOperations` + * 2020-06-01: :class:`VirtualHubsOperations` + * 2020-07-01: :class:`VirtualHubsOperations` + * 2020-08-01: :class:`VirtualHubsOperations` + * 2020-11-01: :class:`VirtualHubsOperations` + * 2021-02-01: :class:`VirtualHubsOperations` + * 2021-03-01: :class:`VirtualHubsOperations` + """ + api_version = self._get_api_version('virtual_hubs') + if api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VirtualHubsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_hubs'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_network_gateway_connections(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2016-09-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2016-12-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2017-03-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2017-06-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2017-09-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2017-10-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2017-11-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-01-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-02-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-04-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-06-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-07-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-08-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-10-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-11-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-12-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-02-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-04-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-06-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-07-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-08-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-09-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-11-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-12-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-03-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-04-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-05-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-06-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-07-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-08-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-11-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2021-02-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2021-03-01: :class:`VirtualNetworkGatewayConnectionsOperations` + """ + api_version = self._get_api_version('virtual_network_gateway_connections') + if api_version == '2015-06-15': + from .v2015_06_15.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_network_gateway_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_network_gateway_nat_rules(self): + """Instance depends on the API version: + + * 2021-02-01: :class:`VirtualNetworkGatewayNatRulesOperations` + * 2021-03-01: :class:`VirtualNetworkGatewayNatRulesOperations` + """ + api_version = self._get_api_version('virtual_network_gateway_nat_rules') + if api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualNetworkGatewayNatRulesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VirtualNetworkGatewayNatRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_network_gateway_nat_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_network_gateways(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`VirtualNetworkGatewaysOperations` + * 2016-09-01: :class:`VirtualNetworkGatewaysOperations` + * 2016-12-01: :class:`VirtualNetworkGatewaysOperations` + * 2017-03-01: :class:`VirtualNetworkGatewaysOperations` + * 2017-06-01: :class:`VirtualNetworkGatewaysOperations` + * 2017-09-01: :class:`VirtualNetworkGatewaysOperations` + * 2017-10-01: :class:`VirtualNetworkGatewaysOperations` + * 2017-11-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-01-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-02-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-04-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-06-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-07-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-08-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-10-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-11-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-12-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-02-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-04-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-06-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-07-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-08-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-09-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-11-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-12-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-03-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-04-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-05-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-06-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-07-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-08-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-11-01: :class:`VirtualNetworkGatewaysOperations` + * 2021-02-01: :class:`VirtualNetworkGatewaysOperations` + * 2021-03-01: :class:`VirtualNetworkGatewaysOperations` + """ + api_version = self._get_api_version('virtual_network_gateways') + if api_version == '2015-06-15': + from .v2015_06_15.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VirtualNetworkGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_network_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_network_peerings(self): + """Instance depends on the API version: + + * 2016-09-01: :class:`VirtualNetworkPeeringsOperations` + * 2016-12-01: :class:`VirtualNetworkPeeringsOperations` + * 2017-03-01: :class:`VirtualNetworkPeeringsOperations` + * 2017-06-01: :class:`VirtualNetworkPeeringsOperations` + * 2017-09-01: :class:`VirtualNetworkPeeringsOperations` + * 2017-10-01: :class:`VirtualNetworkPeeringsOperations` + * 2017-11-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-01-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-02-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-04-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-06-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-07-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-08-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-10-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-11-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-12-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-02-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-04-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-06-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-07-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-08-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-09-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-11-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-12-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-03-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-04-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-05-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-06-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-07-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-08-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-11-01: :class:`VirtualNetworkPeeringsOperations` + * 2021-02-01: :class:`VirtualNetworkPeeringsOperations` + * 2021-03-01: :class:`VirtualNetworkPeeringsOperations` + """ + api_version = self._get_api_version('virtual_network_peerings') + if api_version == '2016-09-01': + from .v2016_09_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VirtualNetworkPeeringsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_network_peerings'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_network_taps(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`VirtualNetworkTapsOperations` + * 2018-10-01: :class:`VirtualNetworkTapsOperations` + * 2018-11-01: :class:`VirtualNetworkTapsOperations` + * 2018-12-01: :class:`VirtualNetworkTapsOperations` + * 2019-02-01: :class:`VirtualNetworkTapsOperations` + * 2019-04-01: :class:`VirtualNetworkTapsOperations` + * 2019-06-01: :class:`VirtualNetworkTapsOperations` + * 2019-07-01: :class:`VirtualNetworkTapsOperations` + * 2019-08-01: :class:`VirtualNetworkTapsOperations` + * 2019-09-01: :class:`VirtualNetworkTapsOperations` + * 2019-11-01: :class:`VirtualNetworkTapsOperations` + * 2019-12-01: :class:`VirtualNetworkTapsOperations` + * 2020-03-01: :class:`VirtualNetworkTapsOperations` + * 2020-04-01: :class:`VirtualNetworkTapsOperations` + * 2020-05-01: :class:`VirtualNetworkTapsOperations` + * 2020-06-01: :class:`VirtualNetworkTapsOperations` + * 2020-07-01: :class:`VirtualNetworkTapsOperations` + * 2020-08-01: :class:`VirtualNetworkTapsOperations` + * 2020-11-01: :class:`VirtualNetworkTapsOperations` + * 2021-02-01: :class:`VirtualNetworkTapsOperations` + * 2021-03-01: :class:`VirtualNetworkTapsOperations` + """ + api_version = self._get_api_version('virtual_network_taps') + if api_version == '2018-08-01': + from .v2018_08_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VirtualNetworkTapsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_network_taps'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_networks(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`VirtualNetworksOperations` + * 2016-09-01: :class:`VirtualNetworksOperations` + * 2016-12-01: :class:`VirtualNetworksOperations` + * 2017-03-01: :class:`VirtualNetworksOperations` + * 2017-06-01: :class:`VirtualNetworksOperations` + * 2017-09-01: :class:`VirtualNetworksOperations` + * 2017-10-01: :class:`VirtualNetworksOperations` + * 2017-11-01: :class:`VirtualNetworksOperations` + * 2018-01-01: :class:`VirtualNetworksOperations` + * 2018-02-01: :class:`VirtualNetworksOperations` + * 2018-04-01: :class:`VirtualNetworksOperations` + * 2018-06-01: :class:`VirtualNetworksOperations` + * 2018-07-01: :class:`VirtualNetworksOperations` + * 2018-08-01: :class:`VirtualNetworksOperations` + * 2018-10-01: :class:`VirtualNetworksOperations` + * 2018-11-01: :class:`VirtualNetworksOperations` + * 2018-12-01: :class:`VirtualNetworksOperations` + * 2019-02-01: :class:`VirtualNetworksOperations` + * 2019-04-01: :class:`VirtualNetworksOperations` + * 2019-06-01: :class:`VirtualNetworksOperations` + * 2019-07-01: :class:`VirtualNetworksOperations` + * 2019-08-01: :class:`VirtualNetworksOperations` + * 2019-09-01: :class:`VirtualNetworksOperations` + * 2019-11-01: :class:`VirtualNetworksOperations` + * 2019-12-01: :class:`VirtualNetworksOperations` + * 2020-03-01: :class:`VirtualNetworksOperations` + * 2020-04-01: :class:`VirtualNetworksOperations` + * 2020-05-01: :class:`VirtualNetworksOperations` + * 2020-06-01: :class:`VirtualNetworksOperations` + * 2020-07-01: :class:`VirtualNetworksOperations` + * 2020-08-01: :class:`VirtualNetworksOperations` + * 2020-11-01: :class:`VirtualNetworksOperations` + * 2021-02-01: :class:`VirtualNetworksOperations` + * 2021-03-01: :class:`VirtualNetworksOperations` + """ + api_version = self._get_api_version('virtual_networks') + if api_version == '2015-06-15': + from .v2015_06_15.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2017-11-01': + from .v2017_11_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VirtualNetworksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_networks'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_router_peerings(self): + """Instance depends on the API version: + + * 2019-07-01: :class:`VirtualRouterPeeringsOperations` + * 2019-08-01: :class:`VirtualRouterPeeringsOperations` + * 2019-09-01: :class:`VirtualRouterPeeringsOperations` + * 2019-11-01: :class:`VirtualRouterPeeringsOperations` + * 2019-12-01: :class:`VirtualRouterPeeringsOperations` + * 2020-03-01: :class:`VirtualRouterPeeringsOperations` + * 2020-04-01: :class:`VirtualRouterPeeringsOperations` + * 2020-05-01: :class:`VirtualRouterPeeringsOperations` + * 2020-06-01: :class:`VirtualRouterPeeringsOperations` + * 2020-07-01: :class:`VirtualRouterPeeringsOperations` + * 2020-08-01: :class:`VirtualRouterPeeringsOperations` + * 2020-11-01: :class:`VirtualRouterPeeringsOperations` + * 2021-02-01: :class:`VirtualRouterPeeringsOperations` + * 2021-03-01: :class:`VirtualRouterPeeringsOperations` + """ + api_version = self._get_api_version('virtual_router_peerings') + if api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VirtualRouterPeeringsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_router_peerings'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_routers(self): + """Instance depends on the API version: + + * 2019-07-01: :class:`VirtualRoutersOperations` + * 2019-08-01: :class:`VirtualRoutersOperations` + * 2019-09-01: :class:`VirtualRoutersOperations` + * 2019-11-01: :class:`VirtualRoutersOperations` + * 2019-12-01: :class:`VirtualRoutersOperations` + * 2020-03-01: :class:`VirtualRoutersOperations` + * 2020-04-01: :class:`VirtualRoutersOperations` + * 2020-05-01: :class:`VirtualRoutersOperations` + * 2020-06-01: :class:`VirtualRoutersOperations` + * 2020-07-01: :class:`VirtualRoutersOperations` + * 2020-08-01: :class:`VirtualRoutersOperations` + * 2020-11-01: :class:`VirtualRoutersOperations` + * 2021-02-01: :class:`VirtualRoutersOperations` + * 2021-03-01: :class:`VirtualRoutersOperations` + """ + api_version = self._get_api_version('virtual_routers') + if api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VirtualRoutersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_routers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_wans(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`VirtualWANsOperations` + * 2018-06-01: :class:`VirtualWANsOperations` + * 2018-07-01: :class:`VirtualWANsOperations` + * 2018-08-01: :class:`VirtualWansOperations` + * 2018-10-01: :class:`VirtualWansOperations` + * 2018-11-01: :class:`VirtualWansOperations` + * 2018-12-01: :class:`VirtualWansOperations` + * 2019-02-01: :class:`VirtualWansOperations` + * 2019-04-01: :class:`VirtualWansOperations` + * 2019-06-01: :class:`VirtualWansOperations` + * 2019-07-01: :class:`VirtualWansOperations` + * 2019-08-01: :class:`VirtualWansOperations` + * 2019-09-01: :class:`VirtualWansOperations` + * 2019-11-01: :class:`VirtualWansOperations` + * 2019-12-01: :class:`VirtualWansOperations` + * 2020-03-01: :class:`VirtualWansOperations` + * 2020-04-01: :class:`VirtualWansOperations` + * 2020-05-01: :class:`VirtualWansOperations` + * 2020-06-01: :class:`VirtualWansOperations` + * 2020-07-01: :class:`VirtualWansOperations` + * 2020-08-01: :class:`VirtualWansOperations` + * 2020-11-01: :class:`VirtualWansOperations` + * 2021-02-01: :class:`VirtualWansOperations` + * 2021-03-01: :class:`VirtualWansOperations` + """ + api_version = self._get_api_version('virtual_wans') + if api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualWANsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualWANsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import VirtualWANsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VirtualWansOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_wans'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_connections(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`VpnConnectionsOperations` + * 2018-06-01: :class:`VpnConnectionsOperations` + * 2018-07-01: :class:`VpnConnectionsOperations` + * 2018-08-01: :class:`VpnConnectionsOperations` + * 2018-10-01: :class:`VpnConnectionsOperations` + * 2018-11-01: :class:`VpnConnectionsOperations` + * 2018-12-01: :class:`VpnConnectionsOperations` + * 2019-02-01: :class:`VpnConnectionsOperations` + * 2019-04-01: :class:`VpnConnectionsOperations` + * 2019-06-01: :class:`VpnConnectionsOperations` + * 2019-07-01: :class:`VpnConnectionsOperations` + * 2019-08-01: :class:`VpnConnectionsOperations` + * 2019-09-01: :class:`VpnConnectionsOperations` + * 2019-11-01: :class:`VpnConnectionsOperations` + * 2019-12-01: :class:`VpnConnectionsOperations` + * 2020-03-01: :class:`VpnConnectionsOperations` + * 2020-04-01: :class:`VpnConnectionsOperations` + * 2020-05-01: :class:`VpnConnectionsOperations` + * 2020-06-01: :class:`VpnConnectionsOperations` + * 2020-07-01: :class:`VpnConnectionsOperations` + * 2020-08-01: :class:`VpnConnectionsOperations` + * 2020-11-01: :class:`VpnConnectionsOperations` + * 2021-02-01: :class:`VpnConnectionsOperations` + * 2021-03-01: :class:`VpnConnectionsOperations` + """ + api_version = self._get_api_version('vpn_connections') + if api_version == '2018-04-01': + from .v2018_04_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VpnConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_gateways(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`VpnGatewaysOperations` + * 2018-06-01: :class:`VpnGatewaysOperations` + * 2018-07-01: :class:`VpnGatewaysOperations` + * 2018-08-01: :class:`VpnGatewaysOperations` + * 2018-10-01: :class:`VpnGatewaysOperations` + * 2018-11-01: :class:`VpnGatewaysOperations` + * 2018-12-01: :class:`VpnGatewaysOperations` + * 2019-02-01: :class:`VpnGatewaysOperations` + * 2019-04-01: :class:`VpnGatewaysOperations` + * 2019-06-01: :class:`VpnGatewaysOperations` + * 2019-07-01: :class:`VpnGatewaysOperations` + * 2019-08-01: :class:`VpnGatewaysOperations` + * 2019-09-01: :class:`VpnGatewaysOperations` + * 2019-11-01: :class:`VpnGatewaysOperations` + * 2019-12-01: :class:`VpnGatewaysOperations` + * 2020-03-01: :class:`VpnGatewaysOperations` + * 2020-04-01: :class:`VpnGatewaysOperations` + * 2020-05-01: :class:`VpnGatewaysOperations` + * 2020-06-01: :class:`VpnGatewaysOperations` + * 2020-07-01: :class:`VpnGatewaysOperations` + * 2020-08-01: :class:`VpnGatewaysOperations` + * 2020-11-01: :class:`VpnGatewaysOperations` + * 2021-02-01: :class:`VpnGatewaysOperations` + * 2021-03-01: :class:`VpnGatewaysOperations` + """ + api_version = self._get_api_version('vpn_gateways') + if api_version == '2018-04-01': + from .v2018_04_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VpnGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_link_connections(self): + """Instance depends on the API version: + + * 2019-06-01: :class:`VpnLinkConnectionsOperations` + * 2019-07-01: :class:`VpnLinkConnectionsOperations` + * 2019-08-01: :class:`VpnLinkConnectionsOperations` + * 2019-09-01: :class:`VpnLinkConnectionsOperations` + * 2019-11-01: :class:`VpnLinkConnectionsOperations` + * 2019-12-01: :class:`VpnLinkConnectionsOperations` + * 2020-03-01: :class:`VpnLinkConnectionsOperations` + * 2020-04-01: :class:`VpnLinkConnectionsOperations` + * 2020-05-01: :class:`VpnLinkConnectionsOperations` + * 2020-06-01: :class:`VpnLinkConnectionsOperations` + * 2020-07-01: :class:`VpnLinkConnectionsOperations` + * 2020-08-01: :class:`VpnLinkConnectionsOperations` + * 2020-11-01: :class:`VpnLinkConnectionsOperations` + * 2021-02-01: :class:`VpnLinkConnectionsOperations` + * 2021-03-01: :class:`VpnLinkConnectionsOperations` + """ + api_version = self._get_api_version('vpn_link_connections') + if api_version == '2019-06-01': + from .v2019_06_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VpnLinkConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_link_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_server_configurations(self): + """Instance depends on the API version: + + * 2019-08-01: :class:`VpnServerConfigurationsOperations` + * 2019-09-01: :class:`VpnServerConfigurationsOperations` + * 2019-11-01: :class:`VpnServerConfigurationsOperations` + * 2019-12-01: :class:`VpnServerConfigurationsOperations` + * 2020-03-01: :class:`VpnServerConfigurationsOperations` + * 2020-04-01: :class:`VpnServerConfigurationsOperations` + * 2020-05-01: :class:`VpnServerConfigurationsOperations` + * 2020-06-01: :class:`VpnServerConfigurationsOperations` + * 2020-07-01: :class:`VpnServerConfigurationsOperations` + * 2020-08-01: :class:`VpnServerConfigurationsOperations` + * 2020-11-01: :class:`VpnServerConfigurationsOperations` + * 2021-02-01: :class:`VpnServerConfigurationsOperations` + * 2021-03-01: :class:`VpnServerConfigurationsOperations` + """ + api_version = self._get_api_version('vpn_server_configurations') + if api_version == '2019-08-01': + from .v2019_08_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VpnServerConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_server_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_server_configurations_associated_with_virtual_wan(self): + """Instance depends on the API version: + + * 2019-08-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2019-09-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2019-11-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2019-12-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-03-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-04-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-05-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-06-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-07-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-08-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-11-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2021-02-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2021-03-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + """ + api_version = self._get_api_version('vpn_server_configurations_associated_with_virtual_wan') + if api_version == '2019-08-01': + from .v2019_08_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_server_configurations_associated_with_virtual_wan'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_site_link_connections(self): + """Instance depends on the API version: + + * 2019-06-01: :class:`VpnSiteLinkConnectionsOperations` + * 2019-07-01: :class:`VpnSiteLinkConnectionsOperations` + * 2019-08-01: :class:`VpnSiteLinkConnectionsOperations` + * 2019-09-01: :class:`VpnSiteLinkConnectionsOperations` + * 2019-11-01: :class:`VpnSiteLinkConnectionsOperations` + * 2019-12-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-03-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-04-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-05-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-06-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-07-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-08-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-11-01: :class:`VpnSiteLinkConnectionsOperations` + * 2021-02-01: :class:`VpnSiteLinkConnectionsOperations` + * 2021-03-01: :class:`VpnSiteLinkConnectionsOperations` + """ + api_version = self._get_api_version('vpn_site_link_connections') + if api_version == '2019-06-01': + from .v2019_06_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_site_link_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_site_links(self): + """Instance depends on the API version: + + * 2019-06-01: :class:`VpnSiteLinksOperations` + * 2019-07-01: :class:`VpnSiteLinksOperations` + * 2019-08-01: :class:`VpnSiteLinksOperations` + * 2019-09-01: :class:`VpnSiteLinksOperations` + * 2019-11-01: :class:`VpnSiteLinksOperations` + * 2019-12-01: :class:`VpnSiteLinksOperations` + * 2020-03-01: :class:`VpnSiteLinksOperations` + * 2020-04-01: :class:`VpnSiteLinksOperations` + * 2020-05-01: :class:`VpnSiteLinksOperations` + * 2020-06-01: :class:`VpnSiteLinksOperations` + * 2020-07-01: :class:`VpnSiteLinksOperations` + * 2020-08-01: :class:`VpnSiteLinksOperations` + * 2020-11-01: :class:`VpnSiteLinksOperations` + * 2021-02-01: :class:`VpnSiteLinksOperations` + * 2021-03-01: :class:`VpnSiteLinksOperations` + """ + api_version = self._get_api_version('vpn_site_links') + if api_version == '2019-06-01': + from .v2019_06_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VpnSiteLinksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_site_links'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_sites(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`VpnSitesOperations` + * 2018-06-01: :class:`VpnSitesOperations` + * 2018-07-01: :class:`VpnSitesOperations` + * 2018-08-01: :class:`VpnSitesOperations` + * 2018-10-01: :class:`VpnSitesOperations` + * 2018-11-01: :class:`VpnSitesOperations` + * 2018-12-01: :class:`VpnSitesOperations` + * 2019-02-01: :class:`VpnSitesOperations` + * 2019-04-01: :class:`VpnSitesOperations` + * 2019-06-01: :class:`VpnSitesOperations` + * 2019-07-01: :class:`VpnSitesOperations` + * 2019-08-01: :class:`VpnSitesOperations` + * 2019-09-01: :class:`VpnSitesOperations` + * 2019-11-01: :class:`VpnSitesOperations` + * 2019-12-01: :class:`VpnSitesOperations` + * 2020-03-01: :class:`VpnSitesOperations` + * 2020-04-01: :class:`VpnSitesOperations` + * 2020-05-01: :class:`VpnSitesOperations` + * 2020-06-01: :class:`VpnSitesOperations` + * 2020-07-01: :class:`VpnSitesOperations` + * 2020-08-01: :class:`VpnSitesOperations` + * 2020-11-01: :class:`VpnSitesOperations` + * 2021-02-01: :class:`VpnSitesOperations` + * 2021-03-01: :class:`VpnSitesOperations` + """ + api_version = self._get_api_version('vpn_sites') + if api_version == '2018-04-01': + from .v2018_04_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VpnSitesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_sites'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_sites_configuration(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`VpnSitesConfigurationOperations` + * 2018-06-01: :class:`VpnSitesConfigurationOperations` + * 2018-07-01: :class:`VpnSitesConfigurationOperations` + * 2018-08-01: :class:`VpnSitesConfigurationOperations` + * 2018-10-01: :class:`VpnSitesConfigurationOperations` + * 2018-11-01: :class:`VpnSitesConfigurationOperations` + * 2018-12-01: :class:`VpnSitesConfigurationOperations` + * 2019-02-01: :class:`VpnSitesConfigurationOperations` + * 2019-04-01: :class:`VpnSitesConfigurationOperations` + * 2019-06-01: :class:`VpnSitesConfigurationOperations` + * 2019-07-01: :class:`VpnSitesConfigurationOperations` + * 2019-08-01: :class:`VpnSitesConfigurationOperations` + * 2019-09-01: :class:`VpnSitesConfigurationOperations` + * 2019-11-01: :class:`VpnSitesConfigurationOperations` + * 2019-12-01: :class:`VpnSitesConfigurationOperations` + * 2020-03-01: :class:`VpnSitesConfigurationOperations` + * 2020-04-01: :class:`VpnSitesConfigurationOperations` + * 2020-05-01: :class:`VpnSitesConfigurationOperations` + * 2020-06-01: :class:`VpnSitesConfigurationOperations` + * 2020-07-01: :class:`VpnSitesConfigurationOperations` + * 2020-08-01: :class:`VpnSitesConfigurationOperations` + * 2020-11-01: :class:`VpnSitesConfigurationOperations` + * 2021-02-01: :class:`VpnSitesConfigurationOperations` + * 2021-03-01: :class:`VpnSitesConfigurationOperations` + """ + api_version = self._get_api_version('vpn_sites_configuration') + if api_version == '2018-04-01': + from .v2018_04_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import VpnSitesConfigurationOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_sites_configuration'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def web_application_firewall_policies(self): + """Instance depends on the API version: + + * 2018-12-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-02-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-04-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-06-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-07-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-08-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-09-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-11-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-12-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-03-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-04-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-05-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-06-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-07-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-08-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-11-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2021-02-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2021-03-01: :class:`WebApplicationFirewallPoliciesOperations` + """ + api_version = self._get_api_version('web_application_firewall_policies') + if api_version == '2018-12-01': + from .v2018_12_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'web_application_firewall_policies'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def web_categories(self): + """Instance depends on the API version: + + * 2020-07-01: :class:`WebCategoriesOperations` + * 2020-08-01: :class:`WebCategoriesOperations` + * 2020-11-01: :class:`WebCategoriesOperations` + * 2021-02-01: :class:`WebCategoriesOperations` + * 2021-03-01: :class:`WebCategoriesOperations` + """ + api_version = self._get_api_version('web_categories') + if api_version == '2020-07-01': + from .v2020_07_01.operations import WebCategoriesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import WebCategoriesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import WebCategoriesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import WebCategoriesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import WebCategoriesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'web_categories'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + def close(self): + self._client.close() + def __enter__(self): + self._client.__enter__() + return self + def __exit__(self, *exc_details): + self._client.__exit__(*exc_details) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/_operations_mixin.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/_operations_mixin.py index cff05a5678cb..5d466765abda 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/_operations_mixin.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/_operations_mixin.py @@ -298,8 +298,6 @@ def check_dns_name_availability( from .v2017_03_01.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2017-09-01': from .v2017_09_01.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2017-10-01': diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_network_management_client.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_network_management_client.py index 319067fc4511..7afb967bbd04 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_network_management_client.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_network_management_client.py @@ -60,9 +60,28 @@ class NetworkManagementClient(NetworkManagementClientOperationsMixin, MultiApiCl LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { None: DEFAULT_API_VERSION, + 'active_connectivity_configurations': '2021-02-01-preview', + 'active_security_admin_rules': '2021-02-01-preview', + 'active_security_user_rules': '2021-02-01-preview', + 'admin_rule_collections': '2021-02-01-preview', + 'admin_rules': '2021-02-01-preview', + 'connectivity_configurations': '2021-02-01-preview', + 'effective_connectivity_configurations': '2021-02-01-preview', + 'effective_virtual_networks': '2021-02-01-preview', 'firewall_policy_rule_groups': '2020-04-01', 'interface_endpoints': '2019-02-01', + 'network_groups': '2021-02-01-preview', + 'network_manager_commits': '2021-02-01-preview', + 'network_manager_deployment_status': '2021-02-01-preview', + 'network_manager_effective_security_admin_rules': '2021-02-01-preview', + 'network_managers': '2021-02-01-preview', + 'network_security_perimeters': '2021-02-01-preview', 'p2_svpn_server_configurations': '2019-07-01', + 'perimeter_associable_resource_types': '2021-02-01-preview', + 'security_admin_configurations': '2021-02-01-preview', + 'security_user_configurations': '2021-02-01-preview', + 'user_rule_collections': '2021-02-01-preview', + 'user_rules': '2021-02-01-preview', }}, _PROFILE_TAG + " latest" ) @@ -98,7 +117,6 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2016-12-01: :mod:`v2016_12_01.models` * 2017-03-01: :mod:`v2017_03_01.models` * 2017-06-01: :mod:`v2017_06_01.models` - * 2017-08-01: :mod:`v2017_08_01.models` * 2017-09-01: :mod:`v2017_09_01.models` * 2017-10-01: :mod:`v2017_10_01.models` * 2017-11-01: :mod:`v2017_11_01.models` @@ -127,6 +145,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2020-08-01: :mod:`v2020_08_01.models` * 2020-11-01: :mod:`v2020_11_01.models` * 2021-02-01: :mod:`v2021_02_01.models` + * 2021-02-01-preview: :mod:`v2021_02_01_preview.models` * 2021-03-01: :mod:`v2021_03_01.models` """ if api_version == '2015-06-15': @@ -144,9 +163,6 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2017-06-01': from ..v2017_06_01 import models return models - elif api_version == '2017-08-01': - from ..v2017_08_01 import models - return models elif api_version == '2017-09-01': from ..v2017_09_01 import models return models @@ -231,11 +247,79 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2021-02-01': from ..v2021_02_01 import models return models + elif api_version == '2021-02-01-preview': + from ..v2021_02_01_preview import models + return models elif api_version == '2021-03-01': from ..v2021_03_01 import models return models raise ValueError("API version {} is not available".format(api_version)) + @property + def active_connectivity_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ActiveConnectivityConfigurationsOperations` + """ + api_version = self._get_api_version('active_connectivity_configurations') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import ActiveConnectivityConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'active_connectivity_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def active_security_admin_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ActiveSecurityAdminRulesOperations` + """ + api_version = self._get_api_version('active_security_admin_rules') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import ActiveSecurityAdminRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'active_security_admin_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def active_security_user_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ActiveSecurityUserRulesOperations` + """ + api_version = self._get_api_version('active_security_user_rules') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import ActiveSecurityUserRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'active_security_user_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def admin_rule_collections(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`AdminRuleCollectionsOperations` + """ + api_version = self._get_api_version('admin_rule_collections') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import AdminRuleCollectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'admin_rule_collections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def admin_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`AdminRulesOperations` + """ + api_version = self._get_api_version('admin_rules') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import AdminRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'admin_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def application_gateway_private_endpoint_connections(self): """Instance depends on the API version: @@ -307,7 +391,6 @@ def application_gateways(self): * 2016-12-01: :class:`ApplicationGatewaysOperations` * 2017-03-01: :class:`ApplicationGatewaysOperations` * 2017-06-01: :class:`ApplicationGatewaysOperations` - * 2017-08-01: :class:`ApplicationGatewaysOperations` * 2017-09-01: :class:`ApplicationGatewaysOperations` * 2017-10-01: :class:`ApplicationGatewaysOperations` * 2017-11-01: :class:`ApplicationGatewaysOperations` @@ -349,8 +432,6 @@ def application_gateways(self): from ..v2017_03_01.aio.operations import ApplicationGatewaysOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import ApplicationGatewaysOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import ApplicationGatewaysOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import ApplicationGatewaysOperations as OperationClass elif api_version == '2017-10-01': @@ -588,7 +669,6 @@ def available_endpoint_services(self): """Instance depends on the API version: * 2017-06-01: :class:`AvailableEndpointServicesOperations` - * 2017-08-01: :class:`AvailableEndpointServicesOperations` * 2017-09-01: :class:`AvailableEndpointServicesOperations` * 2017-10-01: :class:`AvailableEndpointServicesOperations` * 2017-11-01: :class:`AvailableEndpointServicesOperations` @@ -622,8 +702,6 @@ def available_endpoint_services(self): api_version = self._get_api_version('available_endpoint_services') if api_version == '2017-06-01': from ..v2017_06_01.aio.operations import AvailableEndpointServicesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import AvailableEndpointServicesOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import AvailableEndpointServicesOperations as OperationClass elif api_version == '2017-10-01': @@ -1086,7 +1164,6 @@ def bgp_service_communities(self): * 2016-12-01: :class:`BgpServiceCommunitiesOperations` * 2017-03-01: :class:`BgpServiceCommunitiesOperations` * 2017-06-01: :class:`BgpServiceCommunitiesOperations` - * 2017-08-01: :class:`BgpServiceCommunitiesOperations` * 2017-09-01: :class:`BgpServiceCommunitiesOperations` * 2017-10-01: :class:`BgpServiceCommunitiesOperations` * 2017-11-01: :class:`BgpServiceCommunitiesOperations` @@ -1124,8 +1201,6 @@ def bgp_service_communities(self): from ..v2017_03_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass elif api_version == '2017-10-01': @@ -1282,6 +1357,19 @@ def connection_monitors(self): raise ValueError("API version {} does not have operation group 'connection_monitors'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def connectivity_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ConnectivityConfigurationsOperations` + """ + api_version = self._get_api_version('connectivity_configurations') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import ConnectivityConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'connectivity_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def custom_ip_prefixes(self): """Instance depends on the API version: @@ -1467,7 +1555,6 @@ def default_security_rules(self): """Instance depends on the API version: * 2017-06-01: :class:`DefaultSecurityRulesOperations` - * 2017-08-01: :class:`DefaultSecurityRulesOperations` * 2017-09-01: :class:`DefaultSecurityRulesOperations` * 2017-10-01: :class:`DefaultSecurityRulesOperations` * 2017-11-01: :class:`DefaultSecurityRulesOperations` @@ -1501,8 +1588,6 @@ def default_security_rules(self): api_version = self._get_api_version('default_security_rules') if api_version == '2017-06-01': from ..v2017_06_01.aio.operations import DefaultSecurityRulesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import DefaultSecurityRulesOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import DefaultSecurityRulesOperations as OperationClass elif api_version == '2017-10-01': @@ -1593,6 +1678,32 @@ def dscp_configuration(self): raise ValueError("API version {} does not have operation group 'dscp_configuration'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def effective_connectivity_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`EffectiveConnectivityConfigurationsOperations` + """ + api_version = self._get_api_version('effective_connectivity_configurations') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import EffectiveConnectivityConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'effective_connectivity_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def effective_virtual_networks(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`EffectiveVirtualNetworksOperations` + """ + api_version = self._get_api_version('effective_virtual_networks') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import EffectiveVirtualNetworksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'effective_virtual_networks'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def express_route_circuit_authorizations(self): """Instance depends on the API version: @@ -1602,7 +1713,6 @@ def express_route_circuit_authorizations(self): * 2016-12-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2017-03-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2017-06-01: :class:`ExpressRouteCircuitAuthorizationsOperations` - * 2017-08-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2017-09-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2017-10-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2017-11-01: :class:`ExpressRouteCircuitAuthorizationsOperations` @@ -1644,8 +1754,6 @@ def express_route_circuit_authorizations(self): from ..v2017_03_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass elif api_version == '2017-10-01': @@ -1802,7 +1910,6 @@ def express_route_circuit_peerings(self): * 2016-12-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2017-03-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2017-06-01: :class:`ExpressRouteCircuitPeeringsOperations` - * 2017-08-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2017-09-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2017-10-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2017-11-01: :class:`ExpressRouteCircuitPeeringsOperations` @@ -1844,8 +1951,6 @@ def express_route_circuit_peerings(self): from ..v2017_03_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass elif api_version == '2017-10-01': @@ -1917,7 +2022,6 @@ def express_route_circuits(self): * 2016-12-01: :class:`ExpressRouteCircuitsOperations` * 2017-03-01: :class:`ExpressRouteCircuitsOperations` * 2017-06-01: :class:`ExpressRouteCircuitsOperations` - * 2017-08-01: :class:`ExpressRouteCircuitsOperations` * 2017-09-01: :class:`ExpressRouteCircuitsOperations` * 2017-10-01: :class:`ExpressRouteCircuitsOperations` * 2017-11-01: :class:`ExpressRouteCircuitsOperations` @@ -1959,8 +2063,6 @@ def express_route_circuits(self): from ..v2017_03_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass elif api_version == '2017-10-01': @@ -2567,7 +2669,6 @@ def express_route_service_providers(self): * 2016-12-01: :class:`ExpressRouteServiceProvidersOperations` * 2017-03-01: :class:`ExpressRouteServiceProvidersOperations` * 2017-06-01: :class:`ExpressRouteServiceProvidersOperations` - * 2017-08-01: :class:`ExpressRouteServiceProvidersOperations` * 2017-09-01: :class:`ExpressRouteServiceProvidersOperations` * 2017-10-01: :class:`ExpressRouteServiceProvidersOperations` * 2017-11-01: :class:`ExpressRouteServiceProvidersOperations` @@ -2609,8 +2710,6 @@ def express_route_service_providers(self): from ..v2017_03_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass elif api_version == '2017-10-01': @@ -2957,7 +3056,6 @@ def inbound_nat_rules(self): """Instance depends on the API version: * 2017-06-01: :class:`InboundNatRulesOperations` - * 2017-08-01: :class:`InboundNatRulesOperations` * 2017-09-01: :class:`InboundNatRulesOperations` * 2017-10-01: :class:`InboundNatRulesOperations` * 2017-11-01: :class:`InboundNatRulesOperations` @@ -2991,8 +3089,6 @@ def inbound_nat_rules(self): api_version = self._get_api_version('inbound_nat_rules') if api_version == '2017-06-01': from ..v2017_06_01.aio.operations import InboundNatRulesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import InboundNatRulesOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import InboundNatRulesOperations as OperationClass elif api_version == '2017-10-01': @@ -3196,7 +3292,6 @@ def load_balancer_backend_address_pools(self): """Instance depends on the API version: * 2017-06-01: :class:`LoadBalancerBackendAddressPoolsOperations` - * 2017-08-01: :class:`LoadBalancerBackendAddressPoolsOperations` * 2017-09-01: :class:`LoadBalancerBackendAddressPoolsOperations` * 2017-10-01: :class:`LoadBalancerBackendAddressPoolsOperations` * 2017-11-01: :class:`LoadBalancerBackendAddressPoolsOperations` @@ -3230,8 +3325,6 @@ def load_balancer_backend_address_pools(self): api_version = self._get_api_version('load_balancer_backend_address_pools') if api_version == '2017-06-01': from ..v2017_06_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass elif api_version == '2017-10-01': @@ -3299,7 +3392,6 @@ def load_balancer_frontend_ip_configurations(self): """Instance depends on the API version: * 2017-06-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` - * 2017-08-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` * 2017-09-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` * 2017-10-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` * 2017-11-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` @@ -3333,8 +3425,6 @@ def load_balancer_frontend_ip_configurations(self): api_version = self._get_api_version('load_balancer_frontend_ip_configurations') if api_version == '2017-06-01': from ..v2017_06_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass elif api_version == '2017-10-01': @@ -3402,7 +3492,6 @@ def load_balancer_load_balancing_rules(self): """Instance depends on the API version: * 2017-06-01: :class:`LoadBalancerLoadBalancingRulesOperations` - * 2017-08-01: :class:`LoadBalancerLoadBalancingRulesOperations` * 2017-09-01: :class:`LoadBalancerLoadBalancingRulesOperations` * 2017-10-01: :class:`LoadBalancerLoadBalancingRulesOperations` * 2017-11-01: :class:`LoadBalancerLoadBalancingRulesOperations` @@ -3436,8 +3525,6 @@ def load_balancer_load_balancing_rules(self): api_version = self._get_api_version('load_balancer_load_balancing_rules') if api_version == '2017-06-01': from ..v2017_06_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass elif api_version == '2017-10-01': @@ -3505,7 +3592,6 @@ def load_balancer_network_interfaces(self): """Instance depends on the API version: * 2017-06-01: :class:`LoadBalancerNetworkInterfacesOperations` - * 2017-08-01: :class:`LoadBalancerNetworkInterfacesOperations` * 2017-09-01: :class:`LoadBalancerNetworkInterfacesOperations` * 2017-10-01: :class:`LoadBalancerNetworkInterfacesOperations` * 2017-11-01: :class:`LoadBalancerNetworkInterfacesOperations` @@ -3539,8 +3625,6 @@ def load_balancer_network_interfaces(self): api_version = self._get_api_version('load_balancer_network_interfaces') if api_version == '2017-06-01': from ..v2017_06_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass elif api_version == '2017-10-01': @@ -3681,7 +3765,6 @@ def load_balancer_probes(self): """Instance depends on the API version: * 2017-06-01: :class:`LoadBalancerProbesOperations` - * 2017-08-01: :class:`LoadBalancerProbesOperations` * 2017-09-01: :class:`LoadBalancerProbesOperations` * 2017-10-01: :class:`LoadBalancerProbesOperations` * 2017-11-01: :class:`LoadBalancerProbesOperations` @@ -3715,8 +3798,6 @@ def load_balancer_probes(self): api_version = self._get_api_version('load_balancer_probes') if api_version == '2017-06-01': from ..v2017_06_01.aio.operations import LoadBalancerProbesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import LoadBalancerProbesOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import LoadBalancerProbesOperations as OperationClass elif api_version == '2017-10-01': @@ -3788,7 +3869,6 @@ def load_balancers(self): * 2016-12-01: :class:`LoadBalancersOperations` * 2017-03-01: :class:`LoadBalancersOperations` * 2017-06-01: :class:`LoadBalancersOperations` - * 2017-08-01: :class:`LoadBalancersOperations` * 2017-09-01: :class:`LoadBalancersOperations` * 2017-10-01: :class:`LoadBalancersOperations` * 2017-11-01: :class:`LoadBalancersOperations` @@ -3830,8 +3910,6 @@ def load_balancers(self): from ..v2017_03_01.aio.operations import LoadBalancersOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import LoadBalancersOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import LoadBalancersOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import LoadBalancersOperations as OperationClass elif api_version == '2017-10-01': @@ -3903,7 +3981,6 @@ def local_network_gateways(self): * 2016-12-01: :class:`LocalNetworkGatewaysOperations` * 2017-03-01: :class:`LocalNetworkGatewaysOperations` * 2017-06-01: :class:`LocalNetworkGatewaysOperations` - * 2017-08-01: :class:`LocalNetworkGatewaysOperations` * 2017-09-01: :class:`LocalNetworkGatewaysOperations` * 2017-10-01: :class:`LocalNetworkGatewaysOperations` * 2017-11-01: :class:`LocalNetworkGatewaysOperations` @@ -3945,8 +4022,6 @@ def local_network_gateways(self): from ..v2017_03_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass elif api_version == '2017-10-01': @@ -4092,12 +4167,24 @@ def nat_rules(self): raise ValueError("API version {} does not have operation group 'nat_rules'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def network_groups(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkGroupsOperations` + """ + api_version = self._get_api_version('network_groups') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NetworkGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def network_interface_ip_configurations(self): """Instance depends on the API version: * 2017-06-01: :class:`NetworkInterfaceIPConfigurationsOperations` - * 2017-08-01: :class:`NetworkInterfaceIPConfigurationsOperations` * 2017-09-01: :class:`NetworkInterfaceIPConfigurationsOperations` * 2017-10-01: :class:`NetworkInterfaceIPConfigurationsOperations` * 2017-11-01: :class:`NetworkInterfaceIPConfigurationsOperations` @@ -4131,8 +4218,6 @@ def network_interface_ip_configurations(self): api_version = self._get_api_version('network_interface_ip_configurations') if api_version == '2017-06-01': from ..v2017_06_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass elif api_version == '2017-10-01': @@ -4200,7 +4285,6 @@ def network_interface_load_balancers(self): """Instance depends on the API version: * 2017-06-01: :class:`NetworkInterfaceLoadBalancersOperations` - * 2017-08-01: :class:`NetworkInterfaceLoadBalancersOperations` * 2017-09-01: :class:`NetworkInterfaceLoadBalancersOperations` * 2017-10-01: :class:`NetworkInterfaceLoadBalancersOperations` * 2017-11-01: :class:`NetworkInterfaceLoadBalancersOperations` @@ -4234,8 +4318,6 @@ def network_interface_load_balancers(self): api_version = self._get_api_version('network_interface_load_balancers') if api_version == '2017-06-01': from ..v2017_06_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass elif api_version == '2017-10-01': @@ -4380,7 +4462,6 @@ def network_interfaces(self): * 2016-12-01: :class:`NetworkInterfacesOperations` * 2017-03-01: :class:`NetworkInterfacesOperations` * 2017-06-01: :class:`NetworkInterfacesOperations` - * 2017-08-01: :class:`NetworkInterfacesOperations` * 2017-09-01: :class:`NetworkInterfacesOperations` * 2017-10-01: :class:`NetworkInterfacesOperations` * 2017-11-01: :class:`NetworkInterfacesOperations` @@ -4422,8 +4503,6 @@ def network_interfaces(self): from ..v2017_03_01.aio.operations import NetworkInterfacesOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import NetworkInterfacesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import NetworkInterfacesOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import NetworkInterfacesOperations as OperationClass elif api_version == '2017-10-01': @@ -4486,6 +4565,58 @@ def network_interfaces(self): raise ValueError("API version {} does not have operation group 'network_interfaces'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def network_manager_commits(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagerCommitsOperations` + """ + api_version = self._get_api_version('network_manager_commits') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NetworkManagerCommitsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_manager_commits'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_manager_deployment_status(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagerDeploymentStatusOperations` + """ + api_version = self._get_api_version('network_manager_deployment_status') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NetworkManagerDeploymentStatusOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_manager_deployment_status'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_manager_effective_security_admin_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagerEffectiveSecurityAdminRulesOperations` + """ + api_version = self._get_api_version('network_manager_effective_security_admin_rules') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NetworkManagerEffectiveSecurityAdminRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_manager_effective_security_admin_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_managers(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagersOperations` + """ + api_version = self._get_api_version('network_managers') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NetworkManagersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_managers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def network_profiles(self): """Instance depends on the API version: @@ -4568,7 +4699,6 @@ def network_security_groups(self): * 2016-12-01: :class:`NetworkSecurityGroupsOperations` * 2017-03-01: :class:`NetworkSecurityGroupsOperations` * 2017-06-01: :class:`NetworkSecurityGroupsOperations` - * 2017-08-01: :class:`NetworkSecurityGroupsOperations` * 2017-09-01: :class:`NetworkSecurityGroupsOperations` * 2017-10-01: :class:`NetworkSecurityGroupsOperations` * 2017-11-01: :class:`NetworkSecurityGroupsOperations` @@ -4610,8 +4740,6 @@ def network_security_groups(self): from ..v2017_03_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass elif api_version == '2017-10-01': @@ -4674,6 +4802,19 @@ def network_security_groups(self): raise ValueError("API version {} does not have operation group 'network_security_groups'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def network_security_perimeters(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkSecurityPerimetersOperations` + """ + api_version = self._get_api_version('network_security_perimeters') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NetworkSecurityPerimetersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_security_perimeters'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def network_virtual_appliances(self): """Instance depends on the API version: @@ -4722,7 +4863,6 @@ def network_watchers(self): * 2016-12-01: :class:`NetworkWatchersOperations` * 2017-03-01: :class:`NetworkWatchersOperations` * 2017-06-01: :class:`NetworkWatchersOperations` - * 2017-08-01: :class:`NetworkWatchersOperations` * 2017-09-01: :class:`NetworkWatchersOperations` * 2017-10-01: :class:`NetworkWatchersOperations` * 2017-11-01: :class:`NetworkWatchersOperations` @@ -4762,8 +4902,6 @@ def network_watchers(self): from ..v2017_03_01.aio.operations import NetworkWatchersOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import NetworkWatchersOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import NetworkWatchersOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import NetworkWatchersOperations as OperationClass elif api_version == '2017-10-01': @@ -5038,7 +5176,6 @@ def packet_captures(self): * 2016-12-01: :class:`PacketCapturesOperations` * 2017-03-01: :class:`PacketCapturesOperations` * 2017-06-01: :class:`PacketCapturesOperations` - * 2017-08-01: :class:`PacketCapturesOperations` * 2017-09-01: :class:`PacketCapturesOperations` * 2017-10-01: :class:`PacketCapturesOperations` * 2017-11-01: :class:`PacketCapturesOperations` @@ -5078,8 +5215,6 @@ def packet_captures(self): from ..v2017_03_01.aio.operations import PacketCapturesOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import PacketCapturesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import PacketCapturesOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import PacketCapturesOperations as OperationClass elif api_version == '2017-10-01': @@ -5206,6 +5341,19 @@ def peer_express_route_circuit_connections(self): raise ValueError("API version {} does not have operation group 'peer_express_route_circuit_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def perimeter_associable_resource_types(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`PerimeterAssociableResourceTypesOperations` + """ + api_version = self._get_api_version('perimeter_associable_resource_types') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import PerimeterAssociableResourceTypesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'perimeter_associable_resource_types'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def private_dns_zone_groups(self): """Instance depends on the API version: @@ -5368,7 +5516,6 @@ def public_ip_addresses(self): * 2016-12-01: :class:`PublicIPAddressesOperations` * 2017-03-01: :class:`PublicIPAddressesOperations` * 2017-06-01: :class:`PublicIPAddressesOperations` - * 2017-08-01: :class:`PublicIPAddressesOperations` * 2017-09-01: :class:`PublicIPAddressesOperations` * 2017-10-01: :class:`PublicIPAddressesOperations` * 2017-11-01: :class:`PublicIPAddressesOperations` @@ -5410,8 +5557,6 @@ def public_ip_addresses(self): from ..v2017_03_01.aio.operations import PublicIPAddressesOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import PublicIPAddressesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import PublicIPAddressesOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import PublicIPAddressesOperations as OperationClass elif api_version == '2017-10-01': @@ -5618,7 +5763,6 @@ def route_filter_rules(self): * 2016-12-01: :class:`RouteFilterRulesOperations` * 2017-03-01: :class:`RouteFilterRulesOperations` * 2017-06-01: :class:`RouteFilterRulesOperations` - * 2017-08-01: :class:`RouteFilterRulesOperations` * 2017-09-01: :class:`RouteFilterRulesOperations` * 2017-10-01: :class:`RouteFilterRulesOperations` * 2017-11-01: :class:`RouteFilterRulesOperations` @@ -5656,8 +5800,6 @@ def route_filter_rules(self): from ..v2017_03_01.aio.operations import RouteFilterRulesOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import RouteFilterRulesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import RouteFilterRulesOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import RouteFilterRulesOperations as OperationClass elif api_version == '2017-10-01': @@ -5727,7 +5869,6 @@ def route_filters(self): * 2016-12-01: :class:`RouteFiltersOperations` * 2017-03-01: :class:`RouteFiltersOperations` * 2017-06-01: :class:`RouteFiltersOperations` - * 2017-08-01: :class:`RouteFiltersOperations` * 2017-09-01: :class:`RouteFiltersOperations` * 2017-10-01: :class:`RouteFiltersOperations` * 2017-11-01: :class:`RouteFiltersOperations` @@ -5765,8 +5906,6 @@ def route_filters(self): from ..v2017_03_01.aio.operations import RouteFiltersOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import RouteFiltersOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import RouteFiltersOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import RouteFiltersOperations as OperationClass elif api_version == '2017-10-01': @@ -5838,7 +5977,6 @@ def route_tables(self): * 2016-12-01: :class:`RouteTablesOperations` * 2017-03-01: :class:`RouteTablesOperations` * 2017-06-01: :class:`RouteTablesOperations` - * 2017-08-01: :class:`RouteTablesOperations` * 2017-09-01: :class:`RouteTablesOperations` * 2017-10-01: :class:`RouteTablesOperations` * 2017-11-01: :class:`RouteTablesOperations` @@ -5880,8 +6018,6 @@ def route_tables(self): from ..v2017_03_01.aio.operations import RouteTablesOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import RouteTablesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import RouteTablesOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import RouteTablesOperations as OperationClass elif api_version == '2017-10-01': @@ -5953,7 +6089,6 @@ def routes(self): * 2016-12-01: :class:`RoutesOperations` * 2017-03-01: :class:`RoutesOperations` * 2017-06-01: :class:`RoutesOperations` - * 2017-08-01: :class:`RoutesOperations` * 2017-09-01: :class:`RoutesOperations` * 2017-10-01: :class:`RoutesOperations` * 2017-11-01: :class:`RoutesOperations` @@ -5995,8 +6130,6 @@ def routes(self): from ..v2017_03_01.aio.operations import RoutesOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import RoutesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import RoutesOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import RoutesOperations as OperationClass elif api_version == '2017-10-01': @@ -6059,6 +6192,19 @@ def routes(self): raise ValueError("API version {} does not have operation group 'routes'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def security_admin_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`SecurityAdminConfigurationsOperations` + """ + api_version = self._get_api_version('security_admin_configurations') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import SecurityAdminConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'security_admin_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def security_partner_providers(self): """Instance depends on the API version: @@ -6105,7 +6251,6 @@ def security_rules(self): * 2016-12-01: :class:`SecurityRulesOperations` * 2017-03-01: :class:`SecurityRulesOperations` * 2017-06-01: :class:`SecurityRulesOperations` - * 2017-08-01: :class:`SecurityRulesOperations` * 2017-09-01: :class:`SecurityRulesOperations` * 2017-10-01: :class:`SecurityRulesOperations` * 2017-11-01: :class:`SecurityRulesOperations` @@ -6147,8 +6292,6 @@ def security_rules(self): from ..v2017_03_01.aio.operations import SecurityRulesOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import SecurityRulesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import SecurityRulesOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import SecurityRulesOperations as OperationClass elif api_version == '2017-10-01': @@ -6211,6 +6354,19 @@ def security_rules(self): raise ValueError("API version {} does not have operation group 'security_rules'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def security_user_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`SecurityUserConfigurationsOperations` + """ + api_version = self._get_api_version('security_user_configurations') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import SecurityUserConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'security_user_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def service_association_links(self): """Instance depends on the API version: @@ -6504,7 +6660,6 @@ def subnets(self): * 2016-12-01: :class:`SubnetsOperations` * 2017-03-01: :class:`SubnetsOperations` * 2017-06-01: :class:`SubnetsOperations` - * 2017-08-01: :class:`SubnetsOperations` * 2017-09-01: :class:`SubnetsOperations` * 2017-10-01: :class:`SubnetsOperations` * 2017-11-01: :class:`SubnetsOperations` @@ -6546,8 +6701,6 @@ def subnets(self): from ..v2017_03_01.aio.operations import SubnetsOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import SubnetsOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import SubnetsOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import SubnetsOperations as OperationClass elif api_version == '2017-10-01': @@ -6619,7 +6772,6 @@ def usages(self): * 2016-12-01: :class:`UsagesOperations` * 2017-03-01: :class:`UsagesOperations` * 2017-06-01: :class:`UsagesOperations` - * 2017-08-01: :class:`UsagesOperations` * 2017-09-01: :class:`UsagesOperations` * 2017-10-01: :class:`UsagesOperations` * 2017-11-01: :class:`UsagesOperations` @@ -6661,8 +6813,6 @@ def usages(self): from ..v2017_03_01.aio.operations import UsagesOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import UsagesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import UsagesOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import UsagesOperations as OperationClass elif api_version == '2017-10-01': @@ -6725,6 +6875,32 @@ def usages(self): raise ValueError("API version {} does not have operation group 'usages'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def user_rule_collections(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`UserRuleCollectionsOperations` + """ + api_version = self._get_api_version('user_rule_collections') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import UserRuleCollectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'user_rule_collections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def user_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`UserRulesOperations` + """ + api_version = self._get_api_version('user_rules') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import UserRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'user_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def virtual_appliance_sites(self): """Instance depends on the API version: @@ -7017,7 +7193,6 @@ def virtual_network_gateway_connections(self): * 2016-12-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2017-03-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2017-06-01: :class:`VirtualNetworkGatewayConnectionsOperations` - * 2017-08-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2017-09-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2017-10-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2017-11-01: :class:`VirtualNetworkGatewayConnectionsOperations` @@ -7059,8 +7234,6 @@ def virtual_network_gateway_connections(self): from ..v2017_03_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass elif api_version == '2017-10-01': @@ -7148,7 +7321,6 @@ def virtual_network_gateways(self): * 2016-12-01: :class:`VirtualNetworkGatewaysOperations` * 2017-03-01: :class:`VirtualNetworkGatewaysOperations` * 2017-06-01: :class:`VirtualNetworkGatewaysOperations` - * 2017-08-01: :class:`VirtualNetworkGatewaysOperations` * 2017-09-01: :class:`VirtualNetworkGatewaysOperations` * 2017-10-01: :class:`VirtualNetworkGatewaysOperations` * 2017-11-01: :class:`VirtualNetworkGatewaysOperations` @@ -7190,8 +7362,6 @@ def virtual_network_gateways(self): from ..v2017_03_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass elif api_version == '2017-10-01': @@ -7262,7 +7432,6 @@ def virtual_network_peerings(self): * 2016-12-01: :class:`VirtualNetworkPeeringsOperations` * 2017-03-01: :class:`VirtualNetworkPeeringsOperations` * 2017-06-01: :class:`VirtualNetworkPeeringsOperations` - * 2017-08-01: :class:`VirtualNetworkPeeringsOperations` * 2017-09-01: :class:`VirtualNetworkPeeringsOperations` * 2017-10-01: :class:`VirtualNetworkPeeringsOperations` * 2017-11-01: :class:`VirtualNetworkPeeringsOperations` @@ -7302,8 +7471,6 @@ def virtual_network_peerings(self): from ..v2017_03_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass elif api_version == '2017-10-01': @@ -7448,7 +7615,6 @@ def virtual_networks(self): * 2016-12-01: :class:`VirtualNetworksOperations` * 2017-03-01: :class:`VirtualNetworksOperations` * 2017-06-01: :class:`VirtualNetworksOperations` - * 2017-08-01: :class:`VirtualNetworksOperations` * 2017-09-01: :class:`VirtualNetworksOperations` * 2017-10-01: :class:`VirtualNetworksOperations` * 2017-11-01: :class:`VirtualNetworksOperations` @@ -7490,8 +7656,6 @@ def virtual_networks(self): from ..v2017_03_01.aio.operations import VirtualNetworksOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import VirtualNetworksOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import VirtualNetworksOperations as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import VirtualNetworksOperations as OperationClass elif api_version == '2017-10-01': diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_operations_mixin.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_operations_mixin.py index a68cd8b5dbbe..bd8f905b707b 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_operations_mixin.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_operations_mixin.py @@ -294,8 +294,6 @@ async def check_dns_name_availability( from ..v2017_03_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2017-09-01': from ..v2017_09_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2017-10-01': diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/models.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/models.py index 3b23b973bea6..3da0b51151ce 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/models.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/models.py @@ -7,4 +7,5 @@ from .v2019_02_01.models import * from .v2019_07_01.models import * from .v2020_04_01.models import * +from .v2021_02_01_preview.models import * from .v2021_03_01.models import * diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2015_06_15/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2015_06_15/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2015_06_15/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2015_06_15/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_09_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_09_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_09_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_12_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_12_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_12_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_03_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_03_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_03_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_06_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_06_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_06_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_10_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_10_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_10_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_01_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_01_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_01_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_01_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_02_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_02_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_02_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_02_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_04_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_04_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_04_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_06_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_06_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_06_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_07_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_07_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_07_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_08_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_08_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_08_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_08_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_11_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_11_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_11_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_02_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_02_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_02_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_02_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_05_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_05_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_05_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_08_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_08_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_08_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_08_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_11_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_11_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_11_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/__init__.py new file mode 100644 index 000000000000..cbe2d6051b9f --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._network_management_client import NetworkManagementClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['NetworkManagementClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_configuration.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_configuration.py new file mode 100644 index 000000000000..d3ec9ffb0ec0 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class NetworkManagementClientConfiguration(Configuration): + """Configuration for NetworkManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(NetworkManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-02-01-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-network/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_metadata.json b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_metadata.json new file mode 100644 index 000000000000..3b8e77f02a25 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_metadata.json @@ -0,0 +1,121 @@ +{ + "chosen_version": "2021-02-01-preview", + "total_api_version_list": ["2021-02-01-preview"], + "client": { + "name": "NetworkManagementClient", + "filename": "_network_management_client", + "description": "Network Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": false, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"NetworkManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"NetworkManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "network_managers": "NetworkManagersOperations", + "network_manager_commits": "NetworkManagerCommitsOperations", + "network_manager_deployment_status": "NetworkManagerDeploymentStatusOperations", + "effective_virtual_networks": "EffectiveVirtualNetworksOperations", + "active_connectivity_configurations": "ActiveConnectivityConfigurationsOperations", + "active_security_admin_rules": "ActiveSecurityAdminRulesOperations", + "active_security_user_rules": "ActiveSecurityUserRulesOperations", + "connectivity_configurations": "ConnectivityConfigurationsOperations", + "effective_connectivity_configurations": "EffectiveConnectivityConfigurationsOperations", + "network_manager_effective_security_admin_rules": "NetworkManagerEffectiveSecurityAdminRulesOperations", + "network_groups": "NetworkGroupsOperations", + "security_user_configurations": "SecurityUserConfigurationsOperations", + "user_rule_collections": "UserRuleCollectionsOperations", + "user_rules": "UserRulesOperations", + "security_admin_configurations": "SecurityAdminConfigurationsOperations", + "admin_rule_collections": "AdminRuleCollectionsOperations", + "admin_rules": "AdminRulesOperations", + "network_security_perimeters": "NetworkSecurityPerimetersOperations", + "perimeter_associable_resource_types": "PerimeterAssociableResourceTypesOperations" + } +} \ No newline at end of file diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_network_management_client.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_network_management_client.py new file mode 100644 index 000000000000..7ff3d3761744 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_network_management_client.py @@ -0,0 +1,178 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import NetworkManagementClientConfiguration +from .operations import NetworkManagersOperations +from .operations import NetworkManagerCommitsOperations +from .operations import NetworkManagerDeploymentStatusOperations +from .operations import EffectiveVirtualNetworksOperations +from .operations import ActiveConnectivityConfigurationsOperations +from .operations import ActiveSecurityAdminRulesOperations +from .operations import ActiveSecurityUserRulesOperations +from .operations import ConnectivityConfigurationsOperations +from .operations import EffectiveConnectivityConfigurationsOperations +from .operations import NetworkManagerEffectiveSecurityAdminRulesOperations +from .operations import NetworkGroupsOperations +from .operations import SecurityUserConfigurationsOperations +from .operations import UserRuleCollectionsOperations +from .operations import UserRulesOperations +from .operations import SecurityAdminConfigurationsOperations +from .operations import AdminRuleCollectionsOperations +from .operations import AdminRulesOperations +from .operations import NetworkSecurityPerimetersOperations +from .operations import PerimeterAssociableResourceTypesOperations +from . import models + + +class NetworkManagementClient(object): + """Network Client. + + :ivar network_managers: NetworkManagersOperations operations + :vartype network_managers: azure.mgmt.network.v2021_02_01_preview.operations.NetworkManagersOperations + :ivar network_manager_commits: NetworkManagerCommitsOperations operations + :vartype network_manager_commits: azure.mgmt.network.v2021_02_01_preview.operations.NetworkManagerCommitsOperations + :ivar network_manager_deployment_status: NetworkManagerDeploymentStatusOperations operations + :vartype network_manager_deployment_status: azure.mgmt.network.v2021_02_01_preview.operations.NetworkManagerDeploymentStatusOperations + :ivar effective_virtual_networks: EffectiveVirtualNetworksOperations operations + :vartype effective_virtual_networks: azure.mgmt.network.v2021_02_01_preview.operations.EffectiveVirtualNetworksOperations + :ivar active_connectivity_configurations: ActiveConnectivityConfigurationsOperations operations + :vartype active_connectivity_configurations: azure.mgmt.network.v2021_02_01_preview.operations.ActiveConnectivityConfigurationsOperations + :ivar active_security_admin_rules: ActiveSecurityAdminRulesOperations operations + :vartype active_security_admin_rules: azure.mgmt.network.v2021_02_01_preview.operations.ActiveSecurityAdminRulesOperations + :ivar active_security_user_rules: ActiveSecurityUserRulesOperations operations + :vartype active_security_user_rules: azure.mgmt.network.v2021_02_01_preview.operations.ActiveSecurityUserRulesOperations + :ivar connectivity_configurations: ConnectivityConfigurationsOperations operations + :vartype connectivity_configurations: azure.mgmt.network.v2021_02_01_preview.operations.ConnectivityConfigurationsOperations + :ivar effective_connectivity_configurations: EffectiveConnectivityConfigurationsOperations operations + :vartype effective_connectivity_configurations: azure.mgmt.network.v2021_02_01_preview.operations.EffectiveConnectivityConfigurationsOperations + :ivar network_manager_effective_security_admin_rules: NetworkManagerEffectiveSecurityAdminRulesOperations operations + :vartype network_manager_effective_security_admin_rules: azure.mgmt.network.v2021_02_01_preview.operations.NetworkManagerEffectiveSecurityAdminRulesOperations + :ivar network_groups: NetworkGroupsOperations operations + :vartype network_groups: azure.mgmt.network.v2021_02_01_preview.operations.NetworkGroupsOperations + :ivar security_user_configurations: SecurityUserConfigurationsOperations operations + :vartype security_user_configurations: azure.mgmt.network.v2021_02_01_preview.operations.SecurityUserConfigurationsOperations + :ivar user_rule_collections: UserRuleCollectionsOperations operations + :vartype user_rule_collections: azure.mgmt.network.v2021_02_01_preview.operations.UserRuleCollectionsOperations + :ivar user_rules: UserRulesOperations operations + :vartype user_rules: azure.mgmt.network.v2021_02_01_preview.operations.UserRulesOperations + :ivar security_admin_configurations: SecurityAdminConfigurationsOperations operations + :vartype security_admin_configurations: azure.mgmt.network.v2021_02_01_preview.operations.SecurityAdminConfigurationsOperations + :ivar admin_rule_collections: AdminRuleCollectionsOperations operations + :vartype admin_rule_collections: azure.mgmt.network.v2021_02_01_preview.operations.AdminRuleCollectionsOperations + :ivar admin_rules: AdminRulesOperations operations + :vartype admin_rules: azure.mgmt.network.v2021_02_01_preview.operations.AdminRulesOperations + :ivar network_security_perimeters: NetworkSecurityPerimetersOperations operations + :vartype network_security_perimeters: azure.mgmt.network.v2021_02_01_preview.operations.NetworkSecurityPerimetersOperations + :ivar perimeter_associable_resource_types: PerimeterAssociableResourceTypesOperations operations + :vartype perimeter_associable_resource_types: azure.mgmt.network.v2021_02_01_preview.operations.PerimeterAssociableResourceTypesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = NetworkManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.network_managers = NetworkManagersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_manager_commits = NetworkManagerCommitsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_manager_deployment_status = NetworkManagerDeploymentStatusOperations( + self._client, self._config, self._serialize, self._deserialize) + self.effective_virtual_networks = EffectiveVirtualNetworksOperations( + self._client, self._config, self._serialize, self._deserialize) + self.active_connectivity_configurations = ActiveConnectivityConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.active_security_admin_rules = ActiveSecurityAdminRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.active_security_user_rules = ActiveSecurityUserRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.connectivity_configurations = ConnectivityConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.effective_connectivity_configurations = EffectiveConnectivityConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_manager_effective_security_admin_rules = NetworkManagerEffectiveSecurityAdminRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_groups = NetworkGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.security_user_configurations = SecurityUserConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.user_rule_collections = UserRuleCollectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.user_rules = UserRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.security_admin_configurations = SecurityAdminConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.admin_rule_collections = AdminRuleCollectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.admin_rules = AdminRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_security_perimeters = NetworkSecurityPerimetersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.perimeter_associable_resource_types = PerimeterAssociableResourceTypesOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> NetworkManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_version.py new file mode 100644 index 000000000000..e5754a47ce68 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/__init__.py new file mode 100644 index 000000000000..1c78defcf225 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._network_management_client import NetworkManagementClient +__all__ = ['NetworkManagementClient'] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/_configuration.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/_configuration.py new file mode 100644 index 000000000000..05295a7364a2 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class NetworkManagementClientConfiguration(Configuration): + """Configuration for NetworkManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(NetworkManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-02-01-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-network/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/_network_management_client.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/_network_management_client.py new file mode 100644 index 000000000000..9de340f52e36 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/_network_management_client.py @@ -0,0 +1,171 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import NetworkManagementClientConfiguration +from .operations import NetworkManagersOperations +from .operations import NetworkManagerCommitsOperations +from .operations import NetworkManagerDeploymentStatusOperations +from .operations import EffectiveVirtualNetworksOperations +from .operations import ActiveConnectivityConfigurationsOperations +from .operations import ActiveSecurityAdminRulesOperations +from .operations import ActiveSecurityUserRulesOperations +from .operations import ConnectivityConfigurationsOperations +from .operations import EffectiveConnectivityConfigurationsOperations +from .operations import NetworkManagerEffectiveSecurityAdminRulesOperations +from .operations import NetworkGroupsOperations +from .operations import SecurityUserConfigurationsOperations +from .operations import UserRuleCollectionsOperations +from .operations import UserRulesOperations +from .operations import SecurityAdminConfigurationsOperations +from .operations import AdminRuleCollectionsOperations +from .operations import AdminRulesOperations +from .operations import NetworkSecurityPerimetersOperations +from .operations import PerimeterAssociableResourceTypesOperations +from .. import models + + +class NetworkManagementClient(object): + """Network Client. + + :ivar network_managers: NetworkManagersOperations operations + :vartype network_managers: azure.mgmt.network.v2021_02_01_preview.aio.operations.NetworkManagersOperations + :ivar network_manager_commits: NetworkManagerCommitsOperations operations + :vartype network_manager_commits: azure.mgmt.network.v2021_02_01_preview.aio.operations.NetworkManagerCommitsOperations + :ivar network_manager_deployment_status: NetworkManagerDeploymentStatusOperations operations + :vartype network_manager_deployment_status: azure.mgmt.network.v2021_02_01_preview.aio.operations.NetworkManagerDeploymentStatusOperations + :ivar effective_virtual_networks: EffectiveVirtualNetworksOperations operations + :vartype effective_virtual_networks: azure.mgmt.network.v2021_02_01_preview.aio.operations.EffectiveVirtualNetworksOperations + :ivar active_connectivity_configurations: ActiveConnectivityConfigurationsOperations operations + :vartype active_connectivity_configurations: azure.mgmt.network.v2021_02_01_preview.aio.operations.ActiveConnectivityConfigurationsOperations + :ivar active_security_admin_rules: ActiveSecurityAdminRulesOperations operations + :vartype active_security_admin_rules: azure.mgmt.network.v2021_02_01_preview.aio.operations.ActiveSecurityAdminRulesOperations + :ivar active_security_user_rules: ActiveSecurityUserRulesOperations operations + :vartype active_security_user_rules: azure.mgmt.network.v2021_02_01_preview.aio.operations.ActiveSecurityUserRulesOperations + :ivar connectivity_configurations: ConnectivityConfigurationsOperations operations + :vartype connectivity_configurations: azure.mgmt.network.v2021_02_01_preview.aio.operations.ConnectivityConfigurationsOperations + :ivar effective_connectivity_configurations: EffectiveConnectivityConfigurationsOperations operations + :vartype effective_connectivity_configurations: azure.mgmt.network.v2021_02_01_preview.aio.operations.EffectiveConnectivityConfigurationsOperations + :ivar network_manager_effective_security_admin_rules: NetworkManagerEffectiveSecurityAdminRulesOperations operations + :vartype network_manager_effective_security_admin_rules: azure.mgmt.network.v2021_02_01_preview.aio.operations.NetworkManagerEffectiveSecurityAdminRulesOperations + :ivar network_groups: NetworkGroupsOperations operations + :vartype network_groups: azure.mgmt.network.v2021_02_01_preview.aio.operations.NetworkGroupsOperations + :ivar security_user_configurations: SecurityUserConfigurationsOperations operations + :vartype security_user_configurations: azure.mgmt.network.v2021_02_01_preview.aio.operations.SecurityUserConfigurationsOperations + :ivar user_rule_collections: UserRuleCollectionsOperations operations + :vartype user_rule_collections: azure.mgmt.network.v2021_02_01_preview.aio.operations.UserRuleCollectionsOperations + :ivar user_rules: UserRulesOperations operations + :vartype user_rules: azure.mgmt.network.v2021_02_01_preview.aio.operations.UserRulesOperations + :ivar security_admin_configurations: SecurityAdminConfigurationsOperations operations + :vartype security_admin_configurations: azure.mgmt.network.v2021_02_01_preview.aio.operations.SecurityAdminConfigurationsOperations + :ivar admin_rule_collections: AdminRuleCollectionsOperations operations + :vartype admin_rule_collections: azure.mgmt.network.v2021_02_01_preview.aio.operations.AdminRuleCollectionsOperations + :ivar admin_rules: AdminRulesOperations operations + :vartype admin_rules: azure.mgmt.network.v2021_02_01_preview.aio.operations.AdminRulesOperations + :ivar network_security_perimeters: NetworkSecurityPerimetersOperations operations + :vartype network_security_perimeters: azure.mgmt.network.v2021_02_01_preview.aio.operations.NetworkSecurityPerimetersOperations + :ivar perimeter_associable_resource_types: PerimeterAssociableResourceTypesOperations operations + :vartype perimeter_associable_resource_types: azure.mgmt.network.v2021_02_01_preview.aio.operations.PerimeterAssociableResourceTypesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = NetworkManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.network_managers = NetworkManagersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_manager_commits = NetworkManagerCommitsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_manager_deployment_status = NetworkManagerDeploymentStatusOperations( + self._client, self._config, self._serialize, self._deserialize) + self.effective_virtual_networks = EffectiveVirtualNetworksOperations( + self._client, self._config, self._serialize, self._deserialize) + self.active_connectivity_configurations = ActiveConnectivityConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.active_security_admin_rules = ActiveSecurityAdminRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.active_security_user_rules = ActiveSecurityUserRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.connectivity_configurations = ConnectivityConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.effective_connectivity_configurations = EffectiveConnectivityConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_manager_effective_security_admin_rules = NetworkManagerEffectiveSecurityAdminRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_groups = NetworkGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.security_user_configurations = SecurityUserConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.user_rule_collections = UserRuleCollectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.user_rules = UserRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.security_admin_configurations = SecurityAdminConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.admin_rule_collections = AdminRuleCollectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.admin_rules = AdminRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_security_perimeters = NetworkSecurityPerimetersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.perimeter_associable_resource_types = PerimeterAssociableResourceTypesOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "NetworkManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/__init__.py new file mode 100644 index 000000000000..e3ab4d13aca9 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/__init__.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._network_managers_operations import NetworkManagersOperations +from ._network_manager_commits_operations import NetworkManagerCommitsOperations +from ._network_manager_deployment_status_operations import NetworkManagerDeploymentStatusOperations +from ._effective_virtual_networks_operations import EffectiveVirtualNetworksOperations +from ._active_connectivity_configurations_operations import ActiveConnectivityConfigurationsOperations +from ._active_security_admin_rules_operations import ActiveSecurityAdminRulesOperations +from ._active_security_user_rules_operations import ActiveSecurityUserRulesOperations +from ._connectivity_configurations_operations import ConnectivityConfigurationsOperations +from ._effective_connectivity_configurations_operations import EffectiveConnectivityConfigurationsOperations +from ._network_manager_effective_security_admin_rules_operations import NetworkManagerEffectiveSecurityAdminRulesOperations +from ._network_groups_operations import NetworkGroupsOperations +from ._security_user_configurations_operations import SecurityUserConfigurationsOperations +from ._user_rule_collections_operations import UserRuleCollectionsOperations +from ._user_rules_operations import UserRulesOperations +from ._security_admin_configurations_operations import SecurityAdminConfigurationsOperations +from ._admin_rule_collections_operations import AdminRuleCollectionsOperations +from ._admin_rules_operations import AdminRulesOperations +from ._network_security_perimeters_operations import NetworkSecurityPerimetersOperations +from ._perimeter_associable_resource_types_operations import PerimeterAssociableResourceTypesOperations + +__all__ = [ + 'NetworkManagersOperations', + 'NetworkManagerCommitsOperations', + 'NetworkManagerDeploymentStatusOperations', + 'EffectiveVirtualNetworksOperations', + 'ActiveConnectivityConfigurationsOperations', + 'ActiveSecurityAdminRulesOperations', + 'ActiveSecurityUserRulesOperations', + 'ConnectivityConfigurationsOperations', + 'EffectiveConnectivityConfigurationsOperations', + 'NetworkManagerEffectiveSecurityAdminRulesOperations', + 'NetworkGroupsOperations', + 'SecurityUserConfigurationsOperations', + 'UserRuleCollectionsOperations', + 'UserRulesOperations', + 'SecurityAdminConfigurationsOperations', + 'AdminRuleCollectionsOperations', + 'AdminRulesOperations', + 'NetworkSecurityPerimetersOperations', + 'PerimeterAssociableResourceTypesOperations', +] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_connectivity_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_connectivity_configurations_operations.py new file mode 100644 index 000000000000..3abf2e351531 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_connectivity_configurations_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ActiveConnectivityConfigurationsOperations: + """ActiveConnectivityConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + network_manager_name: str, + parameters: "_models.ActiveConfigurationParameter", + **kwargs: Any + ) -> "_models.ActiveConnectivityConfigurationsListResult": + """Lists active connectivity configurations in a network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Active Configuration Parameter. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveConfigurationParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActiveConnectivityConfigurationsListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveConnectivityConfigurationsListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActiveConnectivityConfigurationsListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ActiveConfigurationParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ActiveConnectivityConfigurationsListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listActiveConnectivityConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_security_admin_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_security_admin_rules_operations.py new file mode 100644 index 000000000000..23e9a9b4987e --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_security_admin_rules_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ActiveSecurityAdminRulesOperations: + """ActiveSecurityAdminRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + network_manager_name: str, + parameters: "_models.ActiveConfigurationParameter", + **kwargs: Any + ) -> "_models.ActiveSecurityAdminRulesListResult": + """Lists active security admin rules in a network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Active Configuration Parameter. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveConfigurationParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActiveSecurityAdminRulesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveSecurityAdminRulesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActiveSecurityAdminRulesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ActiveConfigurationParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ActiveSecurityAdminRulesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listActiveSecurityAdminRules'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_security_user_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_security_user_rules_operations.py new file mode 100644 index 000000000000..8cef3bdce40a --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_security_user_rules_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ActiveSecurityUserRulesOperations: + """ActiveSecurityUserRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + network_manager_name: str, + parameters: "_models.ActiveConfigurationParameter", + **kwargs: Any + ) -> "_models.ActiveSecurityUserRulesListResult": + """Lists Active Security User Rules in a network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Active Configuration Parameter. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveConfigurationParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActiveSecurityUserRulesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveSecurityUserRulesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActiveSecurityUserRulesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ActiveConfigurationParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ActiveSecurityUserRulesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listActiveSecurityUserRules'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_admin_rule_collections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_admin_rule_collections_operations.py new file mode 100644 index 000000000000..eca2c67749c3 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_admin_rule_collections_operations.py @@ -0,0 +1,343 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AdminRuleCollectionsOperations: + """AdminRuleCollectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.RuleCollectionListResult"]: + """Lists all the rule collections in a security admin configuration, in a paginated format. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RuleCollectionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.RuleCollectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('RuleCollectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections'} # type: ignore + + async def get( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + **kwargs: Any + ) -> "_models.RuleCollection": + """Gets a network manager security admin configuration rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RuleCollection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_collection: "_models.RuleCollection", + **kwargs: Any + ) -> "_models.RuleCollection": + """Creates or updates an admin rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_collection: The Rule Collection to create or update. + :type rule_collection: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RuleCollection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(rule_collection, 'RuleCollection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + **kwargs: Any + ) -> None: + """Deletes an admin rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_admin_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_admin_rules_operations.py new file mode 100644 index 000000000000..4d41ba8a9b60 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_admin_rules_operations.py @@ -0,0 +1,360 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AdminRulesOperations: + """AdminRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.AdminRuleListResult"]: + """List all network manager security configuration admin rules. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AdminRuleListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.AdminRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AdminRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AdminRuleListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules'} # type: ignore + + async def get( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + **kwargs: Any + ) -> "_models.BaseAdminRule": + """Gets a network manager security configuration admin rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseAdminRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.BaseAdminRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseAdminRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BaseAdminRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + admin_rule: "_models.BaseAdminRule", + **kwargs: Any + ) -> "_models.BaseAdminRule": + """Creates or updates an admin rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param admin_rule: The admin rule to create or update. + :type admin_rule: ~azure.mgmt.network.v2021_02_01_preview.models.BaseAdminRule + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseAdminRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.BaseAdminRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseAdminRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(admin_rule, 'BaseAdminRule') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BaseAdminRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BaseAdminRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + **kwargs: Any + ) -> None: + """Deletes an admin rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_connectivity_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_connectivity_configurations_operations.py new file mode 100644 index 000000000000..7aaf0f0a2c51 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_connectivity_configurations_operations.py @@ -0,0 +1,327 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ConnectivityConfigurationsOperations: + """ConnectivityConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + **kwargs: Any + ) -> "_models.ConnectivityConfiguration": + """Gets a Network Connectivity Configuration, specified by the resource group, network manager + name, and connectivity Configuration name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager connectivity configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectivityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectivityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + connectivity_configuration: "_models.ConnectivityConfiguration", + **kwargs: Any + ) -> "_models.ConnectivityConfiguration": + """Creates/Updates a new network manager connectivity configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager connectivity configuration. + :type configuration_name: str + :param connectivity_configuration: Parameters supplied to create/update a network manager + connectivity configuration. + :type connectivity_configuration: ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectivityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connectivity_configuration, 'ConnectivityConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConnectivityConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ConnectivityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + **kwargs: Any + ) -> None: + """Deletes a network manager connectivity configuration, specified by the resource group, network + manager name, and connectivity configuration name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager connectivity configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}'} # type: ignore + + def list( + self, + resource_group_name: str, + network_manager_name: str, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ConnectivityConfigurationListResult"]: + """Lists all the network manager connectivity configuration in a specified network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ConnectivityConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ConnectivityConfigurationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_effective_connectivity_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_effective_connectivity_configurations_operations.py new file mode 100644 index 000000000000..a25307a90642 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_effective_connectivity_configurations_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class EffectiveConnectivityConfigurationsOperations: + """EffectiveConnectivityConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + virtual_network_name: str, + parameters: "_models.QueryRequestOptions", + **kwargs: Any + ) -> "_models.NetworkManagerEffectiveConnectivityConfigurationListResult": + """List all effective connectivity configurations applied on a virtual network. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param parameters: Parameters supplied to list correct page. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.QueryRequestOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManagerEffectiveConnectivityConfigurationListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerEffectiveConnectivityConfigurationListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerEffectiveConnectivityConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'QueryRequestOptions') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManagerEffectiveConnectivityConfigurationListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listNetworkManagerEffectiveConnectivityConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_effective_virtual_networks_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_effective_virtual_networks_operations.py new file mode 100644 index 000000000000..7f424f19c79e --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_effective_virtual_networks_operations.py @@ -0,0 +1,190 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class EffectiveVirtualNetworksOperations: + """EffectiveVirtualNetworksOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list_by_network_manager( + self, + resource_group_name: str, + network_manager_name: str, + parameters: "_models.EffectiveVirtualNetworksParameter", + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> "_models.EffectiveVirtualNetworksListResult": + """List effective virtual networks in a network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Effective Virtual Networks Parameter. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveVirtualNetworksParameter + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EffectiveVirtualNetworksListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveVirtualNetworksListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EffectiveVirtualNetworksListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list_by_network_manager.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'EffectiveVirtualNetworksParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EffectiveVirtualNetworksListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_network_manager.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listEffectiveVirtualNetworks'} # type: ignore + + async def list_by_network_group( + self, + resource_group_name: str, + network_manager_name: str, + network_group_name: str, + parameters: "_models.QueryRequestOptions", + **kwargs: Any + ) -> "_models.EffectiveVirtualNetworksListResult": + """Lists all effective virtual networks by specified network group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param network_group_name: The name of the network group to get. + :type network_group_name: str + :param parameters: Parameters supplied to list correct page. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.QueryRequestOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EffectiveVirtualNetworksListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveVirtualNetworksListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EffectiveVirtualNetworksListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list_by_network_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'networkGroupName': self._serialize.url("network_group_name", network_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'QueryRequestOptions') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EffectiveVirtualNetworksListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_network_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/listEffectiveVirtualNetworks'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_groups_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_groups_operations.py new file mode 100644 index 000000000000..5393f2574ab9 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_groups_operations.py @@ -0,0 +1,334 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NetworkGroupsOperations: + """NetworkGroupsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + network_manager_name: str, + network_group_name: str, + **kwargs: Any + ) -> "_models.NetworkGroup": + """Gets the specified network group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param network_group_name: The name of the network group to get. + :type network_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'networkGroupName': self._serialize.url("network_group_name", network_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + network_group_name: str, + parameters: "_models.NetworkGroup", + if_match: Optional[str] = None, + **kwargs: Any + ) -> "_models.NetworkGroup": + """Creates or updates a network group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param network_group_name: The name of the network group to get. + :type network_group_name: str + :param parameters: Parameters supplied to the specify which network group need to create. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkGroup + :param if_match: The ETag of the transformation. Omit this value to always overwrite the + current resource. Specify the last-seen ETag value to prevent accidentally overwriting + concurrent changes. + :type if_match: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'networkGroupName': self._serialize.url("network_group_name", network_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkGroup') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) + deserialized = self._deserialize('NetworkGroup', pipeline_response) + + if response.status_code == 201: + response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) + deserialized = self._deserialize('NetworkGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + network_manager_name: str, + network_group_name: str, + **kwargs: Any + ) -> None: + """Deletes a network group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param network_group_name: The name of the network group to get. + :type network_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'networkGroupName': self._serialize.url("network_group_name", network_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}'} # type: ignore + + def list( + self, + resource_group_name: str, + network_manager_name: str, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkGroupListResult"]: + """Lists the specified network group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkGroupListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.NetworkGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkGroupListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_commits_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_commits_operations.py new file mode 100644 index 000000000000..edb5e278cd4b --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_commits_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NetworkManagerCommitsOperations: + """NetworkManagerCommitsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def post( + self, + resource_group_name: str, + network_manager_name: str, + parameters: "_models.NetworkManagerCommit", + **kwargs: Any + ) -> "_models.NetworkManagerCommit": + """Post a Network Manager Commit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Parameters supplied to specify which Managed Network commit is. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerCommit + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManagerCommit, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerCommit + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerCommit"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.post.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkManagerCommit') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManagerCommit', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/commit'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_deployment_status_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_deployment_status_operations.py new file mode 100644 index 000000000000..217199348e4a --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_deployment_status_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NetworkManagerDeploymentStatusOperations: + """NetworkManagerDeploymentStatusOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + network_manager_name: str, + parameters: "_models.NetworkManagerDeploymentStatusParameter", + **kwargs: Any + ) -> "_models.NetworkManagerDeploymentStatusListResult": + """Post to List of Network Manager Deployment Status. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Parameters supplied to specify which Managed Network deployment status is. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerDeploymentStatusParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManagerDeploymentStatusListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerDeploymentStatusListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerDeploymentStatusListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkManagerDeploymentStatusParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManagerDeploymentStatusListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listDeploymentStatus'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_effective_security_admin_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_effective_security_admin_rules_operations.py new file mode 100644 index 000000000000..0d2ea7723710 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_effective_security_admin_rules_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NetworkManagerEffectiveSecurityAdminRulesOperations: + """NetworkManagerEffectiveSecurityAdminRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + virtual_network_name: str, + parameters: "_models.QueryRequestOptions", + **kwargs: Any + ) -> "_models.NetworkManagerEffectiveSecurityAdminRulesListResult": + """List all effective security admin rules applied on a virtual network. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param parameters: Parameters supplied to list correct page. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.QueryRequestOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManagerEffectiveSecurityAdminRulesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerEffectiveSecurityAdminRulesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerEffectiveSecurityAdminRulesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'QueryRequestOptions') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManagerEffectiveSecurityAdminRulesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listNetworkManagerEffectiveSecurityAdminRules'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_managers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_managers_operations.py new file mode 100644 index 000000000000..922ec5fdb525 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_managers_operations.py @@ -0,0 +1,453 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NetworkManagersOperations: + """NetworkManagersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + network_manager_name: str, + **kwargs: Any + ) -> "_models.NetworkManager": + """Gets the specified Network Manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManager, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManager + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManager"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManager', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + parameters: "_models.NetworkManager", + **kwargs: Any + ) -> "_models.NetworkManager": + """Creates or updates a Network Manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Parameters supplied to specify which network manager is. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManager + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManager, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManager + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManager"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkManager') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkManager', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkManager', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + network_manager_name: str, + **kwargs: Any + ) -> None: + """Deletes a network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}'} # type: ignore + + async def patch_tags( + self, + resource_group_name: str, + network_manager_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.NetworkManager": + """Patch a NetworkManager Tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Parameters supplied to update network manager tags. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManager, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManager + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManager"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.patch_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManager', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + patch_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}'} # type: ignore + + def list_by_subscription( + self, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkManagerListResult"]: + """List all network managers in a subscription. + + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkManagerListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkManagerListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagers'} # type: ignore + + def list( + self, + resource_group_name: str, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkManagerListResult"]: + """List network managers in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkManagerListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkManagerListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_security_perimeters_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_security_perimeters_operations.py new file mode 100644 index 000000000000..e848ca499c6b --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_security_perimeters_operations.py @@ -0,0 +1,387 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NetworkSecurityPerimetersOperations: + """NetworkSecurityPerimetersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + network_security_perimeter_name: str, + **kwargs: Any + ) -> "_models.NetworkSecurityPerimeter": + """Gets the specified network security perimeter by the name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_perimeter_name: The name of the network security perimeter. + :type network_security_perimeter_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkSecurityPerimeter, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeter + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityPerimeter"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkSecurityPerimeterName': self._serialize.url("network_security_perimeter_name", network_security_perimeter_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkSecurityPerimeter', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_security_perimeter_name: str, + parameters: "_models.NetworkSecurityPerimeter", + **kwargs: Any + ) -> "_models.NetworkSecurityPerimeter": + """Creates or updates a Network Security Perimeter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_perimeter_name: The name of the network security perimeter. + :type network_security_perimeter_name: str + :param parameters: Parameter supplied to create or update the network security perimeter. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkSecurityPerimeter, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeter + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityPerimeter"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkSecurityPerimeterName': self._serialize.url("network_security_perimeter_name", network_security_perimeter_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkSecurityPerimeter') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkSecurityPerimeter', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkSecurityPerimeter', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + network_security_perimeter_name: str, + **kwargs: Any + ) -> None: + """Deletes a network security perimeter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_perimeter_name: The name of the network security perimeter. + :type network_security_perimeter_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkSecurityPerimeterName': self._serialize.url("network_security_perimeter_name", network_security_perimeter_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}'} # type: ignore + + def list_by_subscription( + self, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkSecurityPerimeterListResult"]: + """List all network security perimeters in a subscription. + + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkSecurityPerimeterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityPerimeterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkSecurityPerimeterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityPerimeters'} # type: ignore + + def list( + self, + resource_group_name: str, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkSecurityPerimeterListResult"]: + """List network security perimeters in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkSecurityPerimeterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityPerimeterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkSecurityPerimeterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_perimeter_associable_resource_types_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_perimeter_associable_resource_types_operations.py new file mode 100644 index 000000000000..7052642970c2 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_perimeter_associable_resource_types_operations.py @@ -0,0 +1,96 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PerimeterAssociableResourceTypesOperations: + """PerimeterAssociableResourceTypesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + location: str, + **kwargs: Any + ) -> "_models.PerimeterAssociableResourcesListResult": + """Gets the list of resources that are onboarded with NSP. These resources can be associated with + a network security perimeter. + + :param location: The location of the where the association is present. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PerimeterAssociableResourcesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.PerimeterAssociableResourcesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerimeterAssociableResourcesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PerimeterAssociableResourcesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/perimeterAssociableResourceTypes'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_security_admin_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_security_admin_configurations_operations.py new file mode 100644 index 000000000000..1376e034b69e --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_security_admin_configurations_operations.py @@ -0,0 +1,325 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class SecurityAdminConfigurationsOperations: + """SecurityAdminConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + network_manager_name: str, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.SecurityConfigurationListResult"]: + """Lists all the network manager security admin configurations in a network manager, in a + paginated format. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SecurityConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SecurityConfigurationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations'} # type: ignore + + async def get( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + **kwargs: Any + ) -> "_models.SecurityConfiguration": + """Retrieves a network manager security admin configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + security_admin_configuration: "_models.SecurityConfiguration", + **kwargs: Any + ) -> "_models.SecurityConfiguration": + """Creates or updates a network manager security admin configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param security_admin_configuration: The security admin configuration to create or update. + :type security_admin_configuration: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(security_admin_configuration, 'SecurityConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + **kwargs: Any + ) -> None: + """Deletes a network manager security admin configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_security_user_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_security_user_configurations_operations.py new file mode 100644 index 000000000000..90c23233f465 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_security_user_configurations_operations.py @@ -0,0 +1,325 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class SecurityUserConfigurationsOperations: + """SecurityUserConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + network_manager_name: str, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.SecurityConfigurationListResult"]: + """Lists all the network manager security user configurations in a network manager, in a paginated + format. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SecurityConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SecurityConfigurationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations'} # type: ignore + + async def get( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + **kwargs: Any + ) -> "_models.SecurityConfiguration": + """Retrieves a network manager security user configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + security_user_configuration: "_models.SecurityConfiguration", + **kwargs: Any + ) -> "_models.SecurityConfiguration": + """Creates or updates a network manager security user configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param security_user_configuration: The security user configuration to create or update. + :type security_user_configuration: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(security_user_configuration, 'SecurityConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + **kwargs: Any + ) -> None: + """Deletes a network manager security user configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_user_rule_collections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_user_rule_collections_operations.py new file mode 100644 index 000000000000..ef488639df0a --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_user_rule_collections_operations.py @@ -0,0 +1,343 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class UserRuleCollectionsOperations: + """UserRuleCollectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.RuleCollectionListResult"]: + """Lists all the user rule collections in a security configuration, in a paginated format. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RuleCollectionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.RuleCollectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('RuleCollectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections'} # type: ignore + + async def get( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + **kwargs: Any + ) -> "_models.RuleCollection": + """Gets a network manager security user configuration rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RuleCollection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + user_rule_collection: "_models.RuleCollection", + **kwargs: Any + ) -> "_models.RuleCollection": + """Creates or updates a user rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param user_rule_collection: The User Rule Collection to create or update. + :type user_rule_collection: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RuleCollection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(user_rule_collection, 'RuleCollection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + **kwargs: Any + ) -> None: + """Deletes a user rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_user_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_user_rules_operations.py new file mode 100644 index 000000000000..895b099aca7b --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_user_rules_operations.py @@ -0,0 +1,360 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class UserRulesOperations: + """UserRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.UserRuleListResult"]: + """Lists all user rules in a rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UserRuleListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.UserRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UserRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('UserRuleListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules'} # type: ignore + + async def get( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + **kwargs: Any + ) -> "_models.BaseUserRule": + """Gets a user rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseUserRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.BaseUserRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseUserRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BaseUserRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + user_rule: "_models.BaseUserRule", + **kwargs: Any + ) -> "_models.BaseUserRule": + """Creates or updates a user rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param user_rule: The user rule to create or update. + :type user_rule: ~azure.mgmt.network.v2021_02_01_preview.models.BaseUserRule + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseUserRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.BaseUserRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseUserRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(user_rule, 'BaseUserRule') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BaseUserRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BaseUserRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + **kwargs: Any + ) -> None: + """Deletes a user rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/__init__.py new file mode 100644 index 000000000000..a0e46b4c3056 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/__init__.py @@ -0,0 +1,233 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import ActiveBaseSecurityAdminRule + from ._models_py3 import ActiveBaseSecurityUserRule + from ._models_py3 import ActiveConfigurationParameter + from ._models_py3 import ActiveConnectivityConfiguration + from ._models_py3 import ActiveConnectivityConfigurationsListResult + from ._models_py3 import ActiveDefaultSecurityAdminRule + from ._models_py3 import ActiveDefaultSecurityUserRule + from ._models_py3 import ActiveSecurityAdminRule + from ._models_py3 import ActiveSecurityAdminRulesListResult + from ._models_py3 import ActiveSecurityUserRule + from ._models_py3 import ActiveSecurityUserRulesListResult + from ._models_py3 import AddressPrefixItem + from ._models_py3 import AdminRule + from ._models_py3 import AdminRuleListResult + from ._models_py3 import BaseAdminRule + from ._models_py3 import BaseUserRule + from ._models_py3 import CloudErrorBody + from ._models_py3 import ConfigurationGroup + from ._models_py3 import ConnectivityConfiguration + from ._models_py3 import ConnectivityConfigurationListResult + from ._models_py3 import ConnectivityGroupItem + from ._models_py3 import DefaultAdminRule + from ._models_py3 import DefaultUserRule + from ._models_py3 import EffectiveBaseSecurityAdminRule + from ._models_py3 import EffectiveConnectivityConfiguration + from ._models_py3 import EffectiveDefaultSecurityAdminRule + from ._models_py3 import EffectiveSecurityAdminRule + from ._models_py3 import EffectiveVirtualNetwork + from ._models_py3 import EffectiveVirtualNetworksListResult + from ._models_py3 import EffectiveVirtualNetworksParameter + from ._models_py3 import GroupMembersItem + from ._models_py3 import Hub + from ._models_py3 import NetworkGroup + from ._models_py3 import NetworkGroupListResult + from ._models_py3 import NetworkManager + from ._models_py3 import NetworkManagerCommit + from ._models_py3 import NetworkManagerDeploymentStatus + from ._models_py3 import NetworkManagerDeploymentStatusListResult + from ._models_py3 import NetworkManagerDeploymentStatusParameter + from ._models_py3 import NetworkManagerEffectiveConnectivityConfigurationListResult + from ._models_py3 import NetworkManagerEffectiveSecurityAdminRulesListResult + from ._models_py3 import NetworkManagerListResult + from ._models_py3 import NetworkManagerPropertiesNetworkManagerScopes + from ._models_py3 import NetworkManagerSecurityGroupItem + from ._models_py3 import NetworkSecurityPerimeter + from ._models_py3 import NetworkSecurityPerimeterListResult + from ._models_py3 import PerimeterAssociableResource + from ._models_py3 import PerimeterAssociableResourcesListResult + from ._models_py3 import ProxyResource + from ._models_py3 import QueryRequestOptions + from ._models_py3 import Resource + from ._models_py3 import RuleCollection + from ._models_py3 import RuleCollectionListResult + from ._models_py3 import SecurityConfiguration + from ._models_py3 import SecurityConfigurationListResult + from ._models_py3 import SystemData + from ._models_py3 import TagsObject + from ._models_py3 import UserRule + from ._models_py3 import UserRuleListResult +except (SyntaxError, ImportError): + from ._models import ActiveBaseSecurityAdminRule # type: ignore + from ._models import ActiveBaseSecurityUserRule # type: ignore + from ._models import ActiveConfigurationParameter # type: ignore + from ._models import ActiveConnectivityConfiguration # type: ignore + from ._models import ActiveConnectivityConfigurationsListResult # type: ignore + from ._models import ActiveDefaultSecurityAdminRule # type: ignore + from ._models import ActiveDefaultSecurityUserRule # type: ignore + from ._models import ActiveSecurityAdminRule # type: ignore + from ._models import ActiveSecurityAdminRulesListResult # type: ignore + from ._models import ActiveSecurityUserRule # type: ignore + from ._models import ActiveSecurityUserRulesListResult # type: ignore + from ._models import AddressPrefixItem # type: ignore + from ._models import AdminRule # type: ignore + from ._models import AdminRuleListResult # type: ignore + from ._models import BaseAdminRule # type: ignore + from ._models import BaseUserRule # type: ignore + from ._models import CloudErrorBody # type: ignore + from ._models import ConfigurationGroup # type: ignore + from ._models import ConnectivityConfiguration # type: ignore + from ._models import ConnectivityConfigurationListResult # type: ignore + from ._models import ConnectivityGroupItem # type: ignore + from ._models import DefaultAdminRule # type: ignore + from ._models import DefaultUserRule # type: ignore + from ._models import EffectiveBaseSecurityAdminRule # type: ignore + from ._models import EffectiveConnectivityConfiguration # type: ignore + from ._models import EffectiveDefaultSecurityAdminRule # type: ignore + from ._models import EffectiveSecurityAdminRule # type: ignore + from ._models import EffectiveVirtualNetwork # type: ignore + from ._models import EffectiveVirtualNetworksListResult # type: ignore + from ._models import EffectiveVirtualNetworksParameter # type: ignore + from ._models import GroupMembersItem # type: ignore + from ._models import Hub # type: ignore + from ._models import NetworkGroup # type: ignore + from ._models import NetworkGroupListResult # type: ignore + from ._models import NetworkManager # type: ignore + from ._models import NetworkManagerCommit # type: ignore + from ._models import NetworkManagerDeploymentStatus # type: ignore + from ._models import NetworkManagerDeploymentStatusListResult # type: ignore + from ._models import NetworkManagerDeploymentStatusParameter # type: ignore + from ._models import NetworkManagerEffectiveConnectivityConfigurationListResult # type: ignore + from ._models import NetworkManagerEffectiveSecurityAdminRulesListResult # type: ignore + from ._models import NetworkManagerListResult # type: ignore + from ._models import NetworkManagerPropertiesNetworkManagerScopes # type: ignore + from ._models import NetworkManagerSecurityGroupItem # type: ignore + from ._models import NetworkSecurityPerimeter # type: ignore + from ._models import NetworkSecurityPerimeterListResult # type: ignore + from ._models import PerimeterAssociableResource # type: ignore + from ._models import PerimeterAssociableResourcesListResult # type: ignore + from ._models import ProxyResource # type: ignore + from ._models import QueryRequestOptions # type: ignore + from ._models import Resource # type: ignore + from ._models import RuleCollection # type: ignore + from ._models import RuleCollectionListResult # type: ignore + from ._models import SecurityConfiguration # type: ignore + from ._models import SecurityConfigurationListResult # type: ignore + from ._models import SystemData # type: ignore + from ._models import TagsObject # type: ignore + from ._models import UserRule # type: ignore + from ._models import UserRuleListResult # type: ignore + +from ._network_management_client_enums import ( + AddressPrefixType, + AdminRuleKind, + ConfigurationType, + ConnectivityTopology, + CreatedByType, + DeleteExistingNSGs, + DeleteExistingPeering, + DeploymentStatus, + EffectiveAdminRuleKind, + EffectiveUserRuleKind, + GroupConnectivity, + IsGlobal, + MembershipType, + ProvisioningState, + SecurityConfigurationRuleAccess, + SecurityConfigurationRuleDirection, + SecurityConfigurationRuleProtocol, + SecurityType, + UseHubGateway, + UserRuleKind, +) + +__all__ = [ + 'ActiveBaseSecurityAdminRule', + 'ActiveBaseSecurityUserRule', + 'ActiveConfigurationParameter', + 'ActiveConnectivityConfiguration', + 'ActiveConnectivityConfigurationsListResult', + 'ActiveDefaultSecurityAdminRule', + 'ActiveDefaultSecurityUserRule', + 'ActiveSecurityAdminRule', + 'ActiveSecurityAdminRulesListResult', + 'ActiveSecurityUserRule', + 'ActiveSecurityUserRulesListResult', + 'AddressPrefixItem', + 'AdminRule', + 'AdminRuleListResult', + 'BaseAdminRule', + 'BaseUserRule', + 'CloudErrorBody', + 'ConfigurationGroup', + 'ConnectivityConfiguration', + 'ConnectivityConfigurationListResult', + 'ConnectivityGroupItem', + 'DefaultAdminRule', + 'DefaultUserRule', + 'EffectiveBaseSecurityAdminRule', + 'EffectiveConnectivityConfiguration', + 'EffectiveDefaultSecurityAdminRule', + 'EffectiveSecurityAdminRule', + 'EffectiveVirtualNetwork', + 'EffectiveVirtualNetworksListResult', + 'EffectiveVirtualNetworksParameter', + 'GroupMembersItem', + 'Hub', + 'NetworkGroup', + 'NetworkGroupListResult', + 'NetworkManager', + 'NetworkManagerCommit', + 'NetworkManagerDeploymentStatus', + 'NetworkManagerDeploymentStatusListResult', + 'NetworkManagerDeploymentStatusParameter', + 'NetworkManagerEffectiveConnectivityConfigurationListResult', + 'NetworkManagerEffectiveSecurityAdminRulesListResult', + 'NetworkManagerListResult', + 'NetworkManagerPropertiesNetworkManagerScopes', + 'NetworkManagerSecurityGroupItem', + 'NetworkSecurityPerimeter', + 'NetworkSecurityPerimeterListResult', + 'PerimeterAssociableResource', + 'PerimeterAssociableResourcesListResult', + 'ProxyResource', + 'QueryRequestOptions', + 'Resource', + 'RuleCollection', + 'RuleCollectionListResult', + 'SecurityConfiguration', + 'SecurityConfigurationListResult', + 'SystemData', + 'TagsObject', + 'UserRule', + 'UserRuleListResult', + 'AddressPrefixType', + 'AdminRuleKind', + 'ConfigurationType', + 'ConnectivityTopology', + 'CreatedByType', + 'DeleteExistingNSGs', + 'DeleteExistingPeering', + 'DeploymentStatus', + 'EffectiveAdminRuleKind', + 'EffectiveUserRuleKind', + 'GroupConnectivity', + 'IsGlobal', + 'MembershipType', + 'ProvisioningState', + 'SecurityConfigurationRuleAccess', + 'SecurityConfigurationRuleDirection', + 'SecurityConfigurationRuleProtocol', + 'SecurityType', + 'UseHubGateway', + 'UserRuleKind', +] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_models.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_models.py new file mode 100644 index 000000000000..c84460c52695 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_models.py @@ -0,0 +1,2956 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import msrest.serialization + + +class ActiveBaseSecurityAdminRule(msrest.serialization.Model): + """Network base admin rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ActiveSecurityAdminRule, ActiveDefaultSecurityAdminRule. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Custom': 'ActiveSecurityAdminRule', 'Default': 'ActiveDefaultSecurityAdminRule'} + } + + def __init__( + self, + **kwargs + ): + super(ActiveBaseSecurityAdminRule, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.commit_time = kwargs.get('commit_time', None) + self.region = kwargs.get('region', None) + self.configuration_display_name = kwargs.get('configuration_display_name', None) + self.configuration_description = kwargs.get('configuration_description', None) + self.rule_collection_display_name = kwargs.get('rule_collection_display_name', None) + self.rule_collection_description = kwargs.get('rule_collection_description', None) + self.rule_collection_applies_to_groups = kwargs.get('rule_collection_applies_to_groups', None) + self.rule_groups = kwargs.get('rule_groups', None) + self.kind = None # type: Optional[str] + + +class ActiveBaseSecurityUserRule(msrest.serialization.Model): + """Network base rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ActiveSecurityUserRule, ActiveDefaultSecurityUserRule. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security user configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security user configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveUserRuleKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Custom': 'ActiveSecurityUserRule', 'Default': 'ActiveDefaultSecurityUserRule'} + } + + def __init__( + self, + **kwargs + ): + super(ActiveBaseSecurityUserRule, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.commit_time = kwargs.get('commit_time', None) + self.region = kwargs.get('region', None) + self.configuration_display_name = kwargs.get('configuration_display_name', None) + self.configuration_description = kwargs.get('configuration_description', None) + self.rule_collection_display_name = kwargs.get('rule_collection_display_name', None) + self.rule_collection_description = kwargs.get('rule_collection_description', None) + self.rule_collection_applies_to_groups = kwargs.get('rule_collection_applies_to_groups', None) + self.rule_groups = kwargs.get('rule_groups', None) + self.kind = None # type: Optional[str] + + +class ActiveConfigurationParameter(msrest.serialization.Model): + """Effective Virtual Networks Parameter. + + :param regions: List of regions. + :type regions: list[str] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'regions': {'key': 'regions', 'type': '[str]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActiveConfigurationParameter, self).__init__(**kwargs) + self.regions = kwargs.get('regions', None) + self.skip_token = kwargs.get('skip_token', None) + + +class EffectiveConnectivityConfiguration(msrest.serialization.Model): + """The network manager effective connectivity configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param configuration_groups: Effective configuration groups. + :type configuration_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param display_name: A friendly name for the resource. + :type display_name: str + :param description: A description of the connectivity configuration. + :type description: str + :param connectivity_topology: Connectivity topology type. Possible values include: + "HubAndSpoke", "Mesh". + :type connectivity_topology: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityTopology + :param hubs: List of hubItems. + :type hubs: list[~azure.mgmt.network.v2021_02_01_preview.models.Hub] + :param is_global: Flag if global mesh is supported. Possible values include: "False", "True". + :type is_global: str or ~azure.mgmt.network.v2021_02_01_preview.models.IsGlobal + :param applies_to_groups: Groups for configuration. + :type applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityGroupItem] + :ivar provisioning_state: The provisioning state of the connectivity configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + :param delete_existing_peering: Flag if need to remove current existing peerings. Possible + values include: "False", "True". + :type delete_existing_peering: str or + ~azure.mgmt.network.v2021_02_01_preview.models.DeleteExistingPeering + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'configuration_groups': {'key': 'configurationGroups', 'type': '[ConfigurationGroup]'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connectivity_topology': {'key': 'properties.connectivityTopology', 'type': 'str'}, + 'hubs': {'key': 'properties.hubs', 'type': '[Hub]'}, + 'is_global': {'key': 'properties.isGlobal', 'type': 'str'}, + 'applies_to_groups': {'key': 'properties.appliesToGroups', 'type': '[ConnectivityGroupItem]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'delete_existing_peering': {'key': 'properties.deleteExistingPeering', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EffectiveConnectivityConfiguration, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.configuration_groups = kwargs.get('configuration_groups', None) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.connectivity_topology = kwargs.get('connectivity_topology', None) + self.hubs = kwargs.get('hubs', None) + self.is_global = kwargs.get('is_global', None) + self.applies_to_groups = kwargs.get('applies_to_groups', None) + self.provisioning_state = None + self.delete_existing_peering = kwargs.get('delete_existing_peering', None) + + +class ActiveConnectivityConfiguration(EffectiveConnectivityConfiguration): + """Active connectivity configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param configuration_groups: Effective configuration groups. + :type configuration_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param display_name: A friendly name for the resource. + :type display_name: str + :param description: A description of the connectivity configuration. + :type description: str + :param connectivity_topology: Connectivity topology type. Possible values include: + "HubAndSpoke", "Mesh". + :type connectivity_topology: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityTopology + :param hubs: List of hubItems. + :type hubs: list[~azure.mgmt.network.v2021_02_01_preview.models.Hub] + :param is_global: Flag if global mesh is supported. Possible values include: "False", "True". + :type is_global: str or ~azure.mgmt.network.v2021_02_01_preview.models.IsGlobal + :param applies_to_groups: Groups for configuration. + :type applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityGroupItem] + :ivar provisioning_state: The provisioning state of the connectivity configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + :param delete_existing_peering: Flag if need to remove current existing peerings. Possible + values include: "False", "True". + :type delete_existing_peering: str or + ~azure.mgmt.network.v2021_02_01_preview.models.DeleteExistingPeering + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'configuration_groups': {'key': 'configurationGroups', 'type': '[ConfigurationGroup]'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connectivity_topology': {'key': 'properties.connectivityTopology', 'type': 'str'}, + 'hubs': {'key': 'properties.hubs', 'type': '[Hub]'}, + 'is_global': {'key': 'properties.isGlobal', 'type': 'str'}, + 'applies_to_groups': {'key': 'properties.appliesToGroups', 'type': '[ConnectivityGroupItem]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'delete_existing_peering': {'key': 'properties.deleteExistingPeering', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActiveConnectivityConfiguration, self).__init__(**kwargs) + self.commit_time = kwargs.get('commit_time', None) + self.region = kwargs.get('region', None) + + +class ActiveConnectivityConfigurationsListResult(msrest.serialization.Model): + """Result of the request to list active connectivity configurations. It contains a list of active connectivity configurations and a skiptoken to get the next set of results. + + :param value: Gets a page of active connectivity configurations. + :type value: + list[~azure.mgmt.network.v2021_02_01_preview.models.ActiveConnectivityConfiguration] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ActiveConnectivityConfiguration]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActiveConnectivityConfigurationsListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.skip_token = kwargs.get('skip_token', None) + + +class ActiveDefaultSecurityAdminRule(ActiveBaseSecurityAdminRule): + """Network default admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + :ivar display_name: A friendly name for the rule. + :vartype display_name: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :param flag: Default rule flag. + :type flag: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :vartype protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :ivar sources: The CIDR or source IP ranges. + :vartype sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar destinations: The destination address prefixes. CIDR or destination IP ranges. + :vartype destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :vartype access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :ivar priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :vartype priority: int + :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :vartype direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'protocol': {'readonly': True}, + 'sources': {'readonly': True}, + 'destinations': {'readonly': True}, + 'source_port_ranges': {'readonly': True}, + 'destination_port_ranges': {'readonly': True}, + 'access': {'readonly': True}, + 'priority': {'readonly': True}, + 'direction': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'flag': {'key': 'properties.flag', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActiveDefaultSecurityAdminRule, self).__init__(**kwargs) + self.kind = 'Default' # type: str + self.display_name = None + self.description = None + self.flag = kwargs.get('flag', None) + self.protocol = None + self.sources = None + self.destinations = None + self.source_port_ranges = None + self.destination_port_ranges = None + self.access = None + self.priority = None + self.direction = None + self.provisioning_state = None + + +class ActiveDefaultSecurityUserRule(ActiveBaseSecurityUserRule): + """Network security default user rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security user configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security user configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveUserRuleKind + :ivar display_name: A friendly name for the rule. + :vartype display_name: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :param flag: Default rule flag. + :type flag: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :vartype protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :ivar sources: The CIDR or source IP ranges. + :vartype sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar destinations: The destination address prefixes. CIDR or destination IP ranges. + :vartype destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :vartype direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the security configuration user rule + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'protocol': {'readonly': True}, + 'sources': {'readonly': True}, + 'destinations': {'readonly': True}, + 'source_port_ranges': {'readonly': True}, + 'destination_port_ranges': {'readonly': True}, + 'direction': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'flag': {'key': 'properties.flag', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActiveDefaultSecurityUserRule, self).__init__(**kwargs) + self.kind = 'Default' # type: str + self.display_name = None + self.description = None + self.flag = kwargs.get('flag', None) + self.protocol = None + self.sources = None + self.destinations = None + self.source_port_ranges = None + self.destination_port_ranges = None + self.direction = None + self.provisioning_state = None + + +class ActiveSecurityAdminRule(ActiveBaseSecurityAdminRule): + """Network admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + :param display_name: A friendly name for the rule. + :type display_name: str + :param description: A description for this rule. Restricted to 140 chars. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :type protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :param sources: The CIDR or source IP ranges. + :type sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param destinations: The destination address prefixes. CIDR or destination IP ranges. + :type destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :type access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :param priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :type priority: int + :param direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :type direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'priority': {'maximum': 4096, 'minimum': 1}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActiveSecurityAdminRule, self).__init__(**kwargs) + self.kind = 'Custom' # type: str + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.protocol = kwargs.get('protocol', None) + self.sources = kwargs.get('sources', None) + self.destinations = kwargs.get('destinations', None) + self.source_port_ranges = kwargs.get('source_port_ranges', None) + self.destination_port_ranges = kwargs.get('destination_port_ranges', None) + self.access = kwargs.get('access', None) + self.priority = kwargs.get('priority', None) + self.direction = kwargs.get('direction', None) + self.provisioning_state = None + + +class ActiveSecurityAdminRulesListResult(msrest.serialization.Model): + """Result of the request to list active security admin rules. It contains a list of active security admin rules and a skiptoken to get the next set of results. + + :param value: Gets a page of active security admin rules. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.ActiveBaseSecurityAdminRule] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ActiveBaseSecurityAdminRule]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActiveSecurityAdminRulesListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.skip_token = kwargs.get('skip_token', None) + + +class ActiveSecurityUserRule(ActiveBaseSecurityUserRule): + """Network security user rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security user configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security user configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveUserRuleKind + :param display_name: A friendly name for the rule. + :type display_name: str + :param description: A description for this rule. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :type protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :param sources: The CIDR or source IP ranges. + :type sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param destinations: The destination address prefixes. CIDR or destination IP ranges. + :type destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :type direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the security configuration user rule + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActiveSecurityUserRule, self).__init__(**kwargs) + self.kind = 'Custom' # type: str + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.protocol = kwargs.get('protocol', None) + self.sources = kwargs.get('sources', None) + self.destinations = kwargs.get('destinations', None) + self.source_port_ranges = kwargs.get('source_port_ranges', None) + self.destination_port_ranges = kwargs.get('destination_port_ranges', None) + self.direction = kwargs.get('direction', None) + self.provisioning_state = None + + +class ActiveSecurityUserRulesListResult(msrest.serialization.Model): + """Result of the request to list active security user rules. It contains a list of active security user rules and a skiptoken to get the next set of results. + + :param value: Gets a page of active security user rules. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.ActiveBaseSecurityUserRule] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ActiveBaseSecurityUserRule]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActiveSecurityUserRulesListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.skip_token = kwargs.get('skip_token', None) + + +class AddressPrefixItem(msrest.serialization.Model): + """Address prefix item. + + :param address_prefix: Address prefix. + :type address_prefix: str + :param address_prefix_type: Address prefix type. Possible values include: "IPPrefix", + "ServiceTag". + :type address_prefix_type: str or + ~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixType + """ + + _attribute_map = { + 'address_prefix': {'key': 'addressPrefix', 'type': 'str'}, + 'address_prefix_type': {'key': 'addressPrefixType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AddressPrefixItem, self).__init__(**kwargs) + self.address_prefix = kwargs.get('address_prefix', None) + self.address_prefix_type = kwargs.get('address_prefix_type', None) + + +class ProxyResource(msrest.serialization.Model): + """Proxy resource representation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.etag = None + + +class BaseAdminRule(ProxyResource): + """Network base admin rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AdminRule, DefaultAdminRule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.AdminRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + _subtype_map = { + 'kind': {'Custom': 'AdminRule', 'Default': 'DefaultAdminRule'} + } + + def __init__( + self, + **kwargs + ): + super(BaseAdminRule, self).__init__(**kwargs) + self.kind = 'BaseAdminRule' # type: str + self.system_data = None + + +class AdminRule(BaseAdminRule): + """Network admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.AdminRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A friendly name for the rule. + :type display_name: str + :param description: A description for this rule. Restricted to 140 chars. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :type protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :param sources: The CIDR or source IP ranges. + :type sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param destinations: The destination address prefixes. CIDR or destination IP ranges. + :type destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :type access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :param priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :type priority: int + :param direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :type direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + 'priority': {'maximum': 4096, 'minimum': 1}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AdminRule, self).__init__(**kwargs) + self.kind = 'Custom' # type: str + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.protocol = kwargs.get('protocol', None) + self.sources = kwargs.get('sources', None) + self.destinations = kwargs.get('destinations', None) + self.source_port_ranges = kwargs.get('source_port_ranges', None) + self.destination_port_ranges = kwargs.get('destination_port_ranges', None) + self.access = kwargs.get('access', None) + self.priority = kwargs.get('priority', None) + self.direction = kwargs.get('direction', None) + self.provisioning_state = None + + +class AdminRuleListResult(msrest.serialization.Model): + """security configuration admin rule list result. + + :param value: A list of admin rules. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.BaseAdminRule] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BaseAdminRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AdminRuleListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class BaseUserRule(ProxyResource): + """Network base rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: UserRule, DefaultUserRule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.UserRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + _subtype_map = { + 'kind': {'Custom': 'UserRule', 'Default': 'DefaultUserRule'} + } + + def __init__( + self, + **kwargs + ): + super(BaseUserRule, self).__init__(**kwargs) + self.kind = 'BaseUserRule' # type: str + self.system_data = None + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.network.v2021_02_01_preview.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class ConfigurationGroup(msrest.serialization.Model): + """The network configuration group resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param display_name: A friendly name for the network group. + :type display_name: str + :param description: A description of the network group. + :type description: str + :param member_type: Group member type. + :type member_type: str + :param group_members: Group members of network group. + :type group_members: list[~azure.mgmt.network.v2021_02_01_preview.models.GroupMembersItem] + :param conditional_membership: Network group conditional filter. + :type conditional_membership: str + :ivar provisioning_state: The provisioning state of the scope assignment resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'member_type': {'key': 'properties.memberType', 'type': 'str'}, + 'group_members': {'key': 'properties.groupMembers', 'type': '[GroupMembersItem]'}, + 'conditional_membership': {'key': 'properties.conditionalMembership', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConfigurationGroup, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.member_type = kwargs.get('member_type', None) + self.group_members = kwargs.get('group_members', None) + self.conditional_membership = kwargs.get('conditional_membership', None) + self.provisioning_state = None + + +class ConnectivityConfiguration(ProxyResource): + """The network manager connectivity configuration resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A friendly name for the resource. + :type display_name: str + :param description: A description of the connectivity configuration. + :type description: str + :param connectivity_topology: Connectivity topology type. Possible values include: + "HubAndSpoke", "Mesh". + :type connectivity_topology: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityTopology + :param hubs: List of hubItems. + :type hubs: list[~azure.mgmt.network.v2021_02_01_preview.models.Hub] + :param is_global: Flag if global mesh is supported. Possible values include: "False", "True". + :type is_global: str or ~azure.mgmt.network.v2021_02_01_preview.models.IsGlobal + :param applies_to_groups: Groups for configuration. + :type applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityGroupItem] + :ivar provisioning_state: The provisioning state of the connectivity configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + :param delete_existing_peering: Flag if need to remove current existing peerings. Possible + values include: "False", "True". + :type delete_existing_peering: str or + ~azure.mgmt.network.v2021_02_01_preview.models.DeleteExistingPeering + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connectivity_topology': {'key': 'properties.connectivityTopology', 'type': 'str'}, + 'hubs': {'key': 'properties.hubs', 'type': '[Hub]'}, + 'is_global': {'key': 'properties.isGlobal', 'type': 'str'}, + 'applies_to_groups': {'key': 'properties.appliesToGroups', 'type': '[ConnectivityGroupItem]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'delete_existing_peering': {'key': 'properties.deleteExistingPeering', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityConfiguration, self).__init__(**kwargs) + self.system_data = None + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.connectivity_topology = kwargs.get('connectivity_topology', None) + self.hubs = kwargs.get('hubs', None) + self.is_global = kwargs.get('is_global', None) + self.applies_to_groups = kwargs.get('applies_to_groups', None) + self.provisioning_state = None + self.delete_existing_peering = kwargs.get('delete_existing_peering', None) + + +class ConnectivityConfigurationListResult(msrest.serialization.Model): + """Result of the request to list network manager connectivity configurations. It contains a list of configurations and a link to get the next set of results. + + :param value: Gets a page of Connectivity Configurations. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityConfiguration] + :param next_link: Gets the URL to get the next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ConnectivityConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityConfigurationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ConnectivityGroupItem(msrest.serialization.Model): + """ConnectivityGroupItem. + + :param network_group_id: Network group Id. + :type network_group_id: str + :param use_hub_gateway: Flag if need to use hub gateway. Possible values include: "False", + "True". + :type use_hub_gateway: str or ~azure.mgmt.network.v2021_02_01_preview.models.UseHubGateway + :param is_global: Flag if global is supported. Possible values include: "False", "True". + :type is_global: str or ~azure.mgmt.network.v2021_02_01_preview.models.IsGlobal + :param group_connectivity: Group connectivity type. Possible values include: "None", + "DirectlyConnected". + :type group_connectivity: str or + ~azure.mgmt.network.v2021_02_01_preview.models.GroupConnectivity + """ + + _attribute_map = { + 'network_group_id': {'key': 'networkGroupId', 'type': 'str'}, + 'use_hub_gateway': {'key': 'useHubGateway', 'type': 'str'}, + 'is_global': {'key': 'isGlobal', 'type': 'str'}, + 'group_connectivity': {'key': 'groupConnectivity', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityGroupItem, self).__init__(**kwargs) + self.network_group_id = kwargs.get('network_group_id', None) + self.use_hub_gateway = kwargs.get('use_hub_gateway', None) + self.is_global = kwargs.get('is_global', None) + self.group_connectivity = kwargs.get('group_connectivity', None) + + +class DefaultAdminRule(BaseAdminRule): + """Network default admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.AdminRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :ivar display_name: A friendly name for the rule. + :vartype display_name: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :param flag: Default rule flag. + :type flag: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :vartype protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :ivar sources: The CIDR or source IP ranges. + :vartype sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar destinations: The destination address prefixes. CIDR or destination IP ranges. + :vartype destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :vartype access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :ivar priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :vartype priority: int + :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :vartype direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'protocol': {'readonly': True}, + 'sources': {'readonly': True}, + 'destinations': {'readonly': True}, + 'source_port_ranges': {'readonly': True}, + 'destination_port_ranges': {'readonly': True}, + 'access': {'readonly': True}, + 'priority': {'readonly': True}, + 'direction': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'flag': {'key': 'properties.flag', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DefaultAdminRule, self).__init__(**kwargs) + self.kind = 'Default' # type: str + self.display_name = None + self.description = None + self.flag = kwargs.get('flag', None) + self.protocol = None + self.sources = None + self.destinations = None + self.source_port_ranges = None + self.destination_port_ranges = None + self.access = None + self.priority = None + self.direction = None + self.provisioning_state = None + + +class DefaultUserRule(BaseUserRule): + """Network security default user rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.UserRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :ivar display_name: A friendly name for the rule. + :vartype display_name: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :param flag: Default rule flag. + :type flag: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :vartype protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :ivar sources: The CIDR or source IP ranges. + :vartype sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar destinations: The destination address prefixes. CIDR or destination IP ranges. + :vartype destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :vartype direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the security configuration user rule + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'protocol': {'readonly': True}, + 'sources': {'readonly': True}, + 'destinations': {'readonly': True}, + 'source_port_ranges': {'readonly': True}, + 'destination_port_ranges': {'readonly': True}, + 'direction': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'flag': {'key': 'properties.flag', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DefaultUserRule, self).__init__(**kwargs) + self.kind = 'Default' # type: str + self.display_name = None + self.description = None + self.flag = kwargs.get('flag', None) + self.protocol = None + self.sources = None + self.destinations = None + self.source_port_ranges = None + self.destination_port_ranges = None + self.direction = None + self.provisioning_state = None + + +class EffectiveBaseSecurityAdminRule(msrest.serialization.Model): + """Network base admin rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: EffectiveSecurityAdminRule, EffectiveDefaultSecurityAdminRule. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Custom': 'EffectiveSecurityAdminRule', 'Default': 'EffectiveDefaultSecurityAdminRule'} + } + + def __init__( + self, + **kwargs + ): + super(EffectiveBaseSecurityAdminRule, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.configuration_display_name = kwargs.get('configuration_display_name', None) + self.configuration_description = kwargs.get('configuration_description', None) + self.rule_collection_display_name = kwargs.get('rule_collection_display_name', None) + self.rule_collection_description = kwargs.get('rule_collection_description', None) + self.rule_collection_applies_to_groups = kwargs.get('rule_collection_applies_to_groups', None) + self.rule_groups = kwargs.get('rule_groups', None) + self.kind = None # type: Optional[str] + + +class EffectiveDefaultSecurityAdminRule(EffectiveBaseSecurityAdminRule): + """Network default admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + :ivar display_name: A friendly name for the rule. + :vartype display_name: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :param flag: Default rule flag. + :type flag: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :vartype protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :ivar sources: The CIDR or source IP ranges. + :vartype sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar destinations: The destination address prefixes. CIDR or destination IP ranges. + :vartype destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :vartype access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :ivar priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :vartype priority: int + :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :vartype direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'protocol': {'readonly': True}, + 'sources': {'readonly': True}, + 'destinations': {'readonly': True}, + 'source_port_ranges': {'readonly': True}, + 'destination_port_ranges': {'readonly': True}, + 'access': {'readonly': True}, + 'priority': {'readonly': True}, + 'direction': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'flag': {'key': 'properties.flag', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EffectiveDefaultSecurityAdminRule, self).__init__(**kwargs) + self.kind = 'Default' # type: str + self.display_name = None + self.description = None + self.flag = kwargs.get('flag', None) + self.protocol = None + self.sources = None + self.destinations = None + self.source_port_ranges = None + self.destination_port_ranges = None + self.access = None + self.priority = None + self.direction = None + self.provisioning_state = None + + +class EffectiveSecurityAdminRule(EffectiveBaseSecurityAdminRule): + """Network admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + :param display_name: A friendly name for the rule. + :type display_name: str + :param description: A description for this rule. Restricted to 140 chars. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :type protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :param sources: The CIDR or source IP ranges. + :type sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param destinations: The destination address prefixes. CIDR or destination IP ranges. + :type destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :type access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :param priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :type priority: int + :param direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :type direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'priority': {'maximum': 4096, 'minimum': 1}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EffectiveSecurityAdminRule, self).__init__(**kwargs) + self.kind = 'Custom' # type: str + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.protocol = kwargs.get('protocol', None) + self.sources = kwargs.get('sources', None) + self.destinations = kwargs.get('destinations', None) + self.source_port_ranges = kwargs.get('source_port_ranges', None) + self.destination_port_ranges = kwargs.get('destination_port_ranges', None) + self.access = kwargs.get('access', None) + self.priority = kwargs.get('priority', None) + self.direction = kwargs.get('direction', None) + self.provisioning_state = None + + +class EffectiveVirtualNetwork(msrest.serialization.Model): + """Effective Virtual Network. + + :param id: Effective vnet Id. + :type id: str + :param location: Location of vnet. + :type location: str + :param membership_type: Membership Type. Possible values include: "Static", "Dynamic". + :type membership_type: str or ~azure.mgmt.network.v2021_02_01_preview.models.MembershipType + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'membership_type': {'key': 'membershipType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EffectiveVirtualNetwork, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.location = kwargs.get('location', None) + self.membership_type = kwargs.get('membership_type', None) + + +class EffectiveVirtualNetworksListResult(msrest.serialization.Model): + """Result of the request to list Effective Virtual Network. It contains a list of groups and a URL link to get the next set of results. + + :param value: Gets a page of EffectiveVirtualNetwork. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.EffectiveVirtualNetwork] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EffectiveVirtualNetwork]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EffectiveVirtualNetworksListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.skip_token = kwargs.get('skip_token', None) + + +class EffectiveVirtualNetworksParameter(msrest.serialization.Model): + """Effective Virtual Networks Parameter. + + :param conditional_members: Conditional Members. + :type conditional_members: str + :param skip_token: Continuation token for pagination, capturing the next page size and offset, + as well as the context of the query. + :type skip_token: str + """ + + _attribute_map = { + 'conditional_members': {'key': 'conditionalMembers', 'type': 'str'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EffectiveVirtualNetworksParameter, self).__init__(**kwargs) + self.conditional_members = kwargs.get('conditional_members', None) + self.skip_token = kwargs.get('skip_token', None) + + +class GroupMembersItem(msrest.serialization.Model): + """GroupMembers Item. + + :param resource_id: Resource Id. + :type resource_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(GroupMembersItem, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + + +class Hub(msrest.serialization.Model): + """Hub Item. + + :param resource_id: Resource Id. + :type resource_id: str + :param resource_type: Resource Type. + :type resource_type: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Hub, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.resource_type = kwargs.get('resource_type', None) + + +class NetworkGroup(ProxyResource): + """The network group resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A friendly name for the network group. + :type display_name: str + :param description: A description of the network group. + :type description: str + :param member_type: Group member type. + :type member_type: str + :param group_members: Group members of network group. + :type group_members: list[~azure.mgmt.network.v2021_02_01_preview.models.GroupMembersItem] + :param conditional_membership: Network group conditional filter. + :type conditional_membership: str + :ivar provisioning_state: The provisioning state of the scope assignment resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'member_type': {'key': 'properties.memberType', 'type': 'str'}, + 'group_members': {'key': 'properties.groupMembers', 'type': '[GroupMembersItem]'}, + 'conditional_membership': {'key': 'properties.conditionalMembership', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkGroup, self).__init__(**kwargs) + self.system_data = None + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.member_type = kwargs.get('member_type', None) + self.group_members = kwargs.get('group_members', None) + self.conditional_membership = kwargs.get('conditional_membership', None) + self.provisioning_state = None + + +class NetworkGroupListResult(msrest.serialization.Model): + """Result of the request to list NetworkGroup. It contains a list of groups and a URL link to get the next set of results. + + :param value: Gets a page of NetworkGroup. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkGroup] + :param next_link: Gets the URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkGroupListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class Resource(msrest.serialization.Model): + """Common resource representation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class NetworkManager(Resource): + """The Managed Network resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A friendly name for the network manager. + :type display_name: str + :param description: A description of the network manager. + :type description: str + :param network_manager_scopes: Scope of Network Manager. + :type network_manager_scopes: + ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerPropertiesNetworkManagerScopes + :param network_manager_scope_accesses: Scope Access. + :type network_manager_scope_accesses: list[str or + ~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationType] + :ivar provisioning_state: The provisioning state of the scope assignment resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'network_manager_scopes': {'key': 'properties.networkManagerScopes', 'type': 'NetworkManagerPropertiesNetworkManagerScopes'}, + 'network_manager_scope_accesses': {'key': 'properties.networkManagerScopeAccesses', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkManager, self).__init__(**kwargs) + self.etag = None + self.system_data = None + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.network_manager_scopes = kwargs.get('network_manager_scopes', None) + self.network_manager_scope_accesses = kwargs.get('network_manager_scope_accesses', None) + self.provisioning_state = None + + +class NetworkManagerCommit(msrest.serialization.Model): + """Network Manager Commit. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar commit_id: Commit Id. + :vartype commit_id: str + :param target_locations: List of target locations. + :type target_locations: list[str] + :param configuration_ids: List of configuration ids. + :type configuration_ids: list[str] + :param commit_type: Commit Type. Possible values include: "SecurityAdmin", "SecurityUser", + "Connectivity". + :type commit_type: str or ~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationType + """ + + _validation = { + 'commit_id': {'readonly': True}, + } + + _attribute_map = { + 'commit_id': {'key': 'commitId', 'type': 'str'}, + 'target_locations': {'key': 'targetLocations', 'type': '[str]'}, + 'configuration_ids': {'key': 'configurationIds', 'type': '[str]'}, + 'commit_type': {'key': 'commitType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkManagerCommit, self).__init__(**kwargs) + self.commit_id = None + self.target_locations = kwargs.get('target_locations', None) + self.configuration_ids = kwargs.get('configuration_ids', None) + self.commit_type = kwargs.get('commit_type', None) + + +class NetworkManagerDeploymentStatus(msrest.serialization.Model): + """Network Manager Deployment Status. + + :param commit_time: Commit Time. + :type commit_time: ~datetime.datetime + :param region: Region Name. + :type region: str + :param deployment_status: Deployment Status. Possible values include: "NotStarted", + "Deploying", "Deployed", "Failed". + :type deployment_status: str or ~azure.mgmt.network.v2021_02_01_preview.models.DeploymentStatus + :param configuration_ids: List of configuration ids. + :type configuration_ids: list[str] + :param deployment_type: Configuration Deployment Type. Possible values include: + "SecurityAdmin", "SecurityUser", "Connectivity". + :type deployment_type: str or ~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationType + :param error_message: Error Message. + :type error_message: str + """ + + _attribute_map = { + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'configuration_ids': {'key': 'configurationIds', 'type': '[str]'}, + 'deployment_type': {'key': 'deploymentType', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkManagerDeploymentStatus, self).__init__(**kwargs) + self.commit_time = kwargs.get('commit_time', None) + self.region = kwargs.get('region', None) + self.deployment_status = kwargs.get('deployment_status', None) + self.configuration_ids = kwargs.get('configuration_ids', None) + self.deployment_type = kwargs.get('deployment_type', None) + self.error_message = kwargs.get('error_message', None) + + +class NetworkManagerDeploymentStatusListResult(msrest.serialization.Model): + """A list of Network Manager Deployment Status. + + :param value: Gets a page of Network Manager Deployment Status. + :type value: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerDeploymentStatus] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkManagerDeploymentStatus]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkManagerDeploymentStatusListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.skip_token = kwargs.get('skip_token', None) + + +class NetworkManagerDeploymentStatusParameter(msrest.serialization.Model): + """Network Manager Deployment Status Parameter. + + :param regions: List of locations. + :type regions: list[str] + :param deployment_types: List of deployment types. + :type deployment_types: list[str or + ~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationType] + :param skip_token: Continuation token for pagination, capturing the next page size and offset, + as well as the context of the query. + :type skip_token: str + """ + + _attribute_map = { + 'regions': {'key': 'regions', 'type': '[str]'}, + 'deployment_types': {'key': 'deploymentTypes', 'type': '[str]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkManagerDeploymentStatusParameter, self).__init__(**kwargs) + self.regions = kwargs.get('regions', None) + self.deployment_types = kwargs.get('deployment_types', None) + self.skip_token = kwargs.get('skip_token', None) + + +class NetworkManagerEffectiveConnectivityConfigurationListResult(msrest.serialization.Model): + """Result of the request to list networkManagerEffectiveConnectivityConfiguration. It contains a list of groups and a skiptoken to get the next set of results. + + :param value: Gets a page of NetworkManagerEffectiveConnectivityConfiguration. + :type value: + list[~azure.mgmt.network.v2021_02_01_preview.models.EffectiveConnectivityConfiguration] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EffectiveConnectivityConfiguration]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkManagerEffectiveConnectivityConfigurationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.skip_token = kwargs.get('skip_token', None) + + +class NetworkManagerEffectiveSecurityAdminRulesListResult(msrest.serialization.Model): + """Result of the request to list networkManagerEffectiveSecurityAdminRules. It contains a list of groups and a skiptoken to get the next set of results. + + :param value: Gets a page of NetworkManagerEffectiveSecurityAdminRules. + :type value: + list[~azure.mgmt.network.v2021_02_01_preview.models.EffectiveBaseSecurityAdminRule] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EffectiveBaseSecurityAdminRule]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkManagerEffectiveSecurityAdminRulesListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.skip_token = kwargs.get('skip_token', None) + + +class NetworkManagerListResult(msrest.serialization.Model): + """Result of the request to list NetworkManager. It contains a list of network managers and a URL link to get the next set of results. + + :param value: Gets a page of NetworkManager. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManager] + :param next_link: Gets the URL to get the next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkManager]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkManagerListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class NetworkManagerPropertiesNetworkManagerScopes(msrest.serialization.Model): + """Scope of Network Manager. + + :param management_groups: List of management groups. + :type management_groups: list[str] + :param subscriptions: List of subscriptions. + :type subscriptions: list[str] + """ + + _attribute_map = { + 'management_groups': {'key': 'managementGroups', 'type': '[str]'}, + 'subscriptions': {'key': 'subscriptions', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkManagerPropertiesNetworkManagerScopes, self).__init__(**kwargs) + self.management_groups = kwargs.get('management_groups', None) + self.subscriptions = kwargs.get('subscriptions', None) + + +class NetworkManagerSecurityGroupItem(msrest.serialization.Model): + """Network manager security group item. + + :param network_group_id: Network manager group Id. + :type network_group_id: str + """ + + _attribute_map = { + 'network_group_id': {'key': 'networkGroupId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkManagerSecurityGroupItem, self).__init__(**kwargs) + self.network_group_id = kwargs.get('network_group_id', None) + + +class NetworkSecurityPerimeter(Resource): + """The Network Security Perimeter resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param display_name: A friendly name for the network security perimeter. + :type display_name: str + :param description: A description of the network security perimeter. + :type description: str + :ivar provisioning_state: The provisioning state of the scope assignment resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkSecurityPerimeter, self).__init__(**kwargs) + self.etag = None + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.provisioning_state = None + + +class NetworkSecurityPerimeterListResult(msrest.serialization.Model): + """Result of the request to list NetworkSecurityPerimeter. It contains a list of network security perimeters and a URL link to get the next set of results. + + :param value: Gets a page of NetworkSecurityPerimeter. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeter] + :param next_link: Gets the URL to get the next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkSecurityPerimeter]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkSecurityPerimeterListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class PerimeterAssociableResource(Resource): + """Resource that is onboarded to use network security perimeter. Also referred as perimeter associable resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar display_name: A friendly name for the properties of perimeter associable resources. + :vartype display_name: str + :ivar resource_type: Resource type/provider name. + :vartype resource_type: str + :ivar public_dns_zones: Public DNS zone names of the resources. + :vartype public_dns_zones: list[str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'public_dns_zones': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'resource_type': {'key': 'properties.resourceType', 'type': 'str'}, + 'public_dns_zones': {'key': 'properties.publicDnsZones', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PerimeterAssociableResource, self).__init__(**kwargs) + self.display_name = None + self.resource_type = None + self.public_dns_zones = None + + +class PerimeterAssociableResourcesListResult(msrest.serialization.Model): + """Paged list of perimeter associable resources. + + :param value: Gets paged list of perimeter associable resources. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.PerimeterAssociableResource] + :param next_link: Gets the URL to get the next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PerimeterAssociableResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PerimeterAssociableResourcesListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class QueryRequestOptions(msrest.serialization.Model): + """Query Request Options. + + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(QueryRequestOptions, self).__init__(**kwargs) + self.skip_token = kwargs.get('skip_token', None) + + +class RuleCollection(ProxyResource): + """Defines the rule collection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A display name of the rule collection. + :type display_name: str + :param description: A description of the rule collection. + :type description: str + :param applies_to_groups: Groups for configuration. + :type applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'applies_to_groups': {'key': 'properties.appliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RuleCollection, self).__init__(**kwargs) + self.system_data = None + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.applies_to_groups = kwargs.get('applies_to_groups', None) + self.provisioning_state = None + + +class RuleCollectionListResult(msrest.serialization.Model): + """Security configuration rule collection list result. + + :param value: A list of network manager security configuration rule collections. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection] + :param next_link: Gets the URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RuleCollection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RuleCollectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class SecurityConfiguration(ProxyResource): + """Defines the security configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A display name of the security configuration. + :type display_name: str + :param description: A description of the security configuration. + :type description: str + :param security_type: Security Type. Possible values include: "AdminPolicy", "UserPolicy". + :type security_type: str or ~azure.mgmt.network.v2021_02_01_preview.models.SecurityType + :param delete_existing_ns_gs: Flag if need to delete existing network security groups. Possible + values include: "False", "True". + :type delete_existing_ns_gs: str or + ~azure.mgmt.network.v2021_02_01_preview.models.DeleteExistingNSGs + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'security_type': {'key': 'properties.securityType', 'type': 'str'}, + 'delete_existing_ns_gs': {'key': 'properties.deleteExistingNSGs', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityConfiguration, self).__init__(**kwargs) + self.system_data = None + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.security_type = kwargs.get('security_type', None) + self.delete_existing_ns_gs = kwargs.get('delete_existing_ns_gs', None) + self.provisioning_state = None + + +class SecurityConfigurationListResult(msrest.serialization.Model): + """A list of network manager security configurations. + + :param value: Gets a page of security configurations. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration] + :param next_link: Gets the URL to get the next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecurityConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityConfigurationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.network.v2021_02_01_preview.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or + ~azure.mgmt.network.v2021_02_01_preview.models.CreatedByType + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + +class TagsObject(msrest.serialization.Model): + """Tags object for patch operations. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(TagsObject, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class UserRule(BaseUserRule): + """Network security user rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.UserRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A friendly name for the rule. + :type display_name: str + :param description: A description for this rule. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :type protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :param sources: The CIDR or source IP ranges. + :type sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param destinations: The destination address prefixes. CIDR or destination IP ranges. + :type destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :type direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the security configuration user rule + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserRule, self).__init__(**kwargs) + self.kind = 'Custom' # type: str + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.protocol = kwargs.get('protocol', None) + self.sources = kwargs.get('sources', None) + self.destinations = kwargs.get('destinations', None) + self.source_port_ranges = kwargs.get('source_port_ranges', None) + self.destination_port_ranges = kwargs.get('destination_port_ranges', None) + self.direction = kwargs.get('direction', None) + self.provisioning_state = None + + +class UserRuleListResult(msrest.serialization.Model): + """security user rule list result. + + :param value: A list of user rules. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.BaseUserRule] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BaseUserRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserRuleListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_models_py3.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_models_py3.py new file mode 100644 index 000000000000..b9f1489bf650 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_models_py3.py @@ -0,0 +1,3281 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import datetime +from typing import Dict, List, Optional, Union + +import msrest.serialization + +from ._network_management_client_enums import * + + +class ActiveBaseSecurityAdminRule(msrest.serialization.Model): + """Network base admin rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ActiveSecurityAdminRule, ActiveDefaultSecurityAdminRule. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Custom': 'ActiveSecurityAdminRule', 'Default': 'ActiveDefaultSecurityAdminRule'} + } + + def __init__( + self, + *, + id: Optional[str] = None, + commit_time: Optional[datetime.datetime] = None, + region: Optional[str] = None, + configuration_display_name: Optional[str] = None, + configuration_description: Optional[str] = None, + rule_collection_display_name: Optional[str] = None, + rule_collection_description: Optional[str] = None, + rule_collection_applies_to_groups: Optional[List["NetworkManagerSecurityGroupItem"]] = None, + rule_groups: Optional[List["ConfigurationGroup"]] = None, + **kwargs + ): + super(ActiveBaseSecurityAdminRule, self).__init__(**kwargs) + self.id = id + self.commit_time = commit_time + self.region = region + self.configuration_display_name = configuration_display_name + self.configuration_description = configuration_description + self.rule_collection_display_name = rule_collection_display_name + self.rule_collection_description = rule_collection_description + self.rule_collection_applies_to_groups = rule_collection_applies_to_groups + self.rule_groups = rule_groups + self.kind = None # type: Optional[str] + + +class ActiveBaseSecurityUserRule(msrest.serialization.Model): + """Network base rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ActiveSecurityUserRule, ActiveDefaultSecurityUserRule. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security user configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security user configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveUserRuleKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Custom': 'ActiveSecurityUserRule', 'Default': 'ActiveDefaultSecurityUserRule'} + } + + def __init__( + self, + *, + id: Optional[str] = None, + commit_time: Optional[datetime.datetime] = None, + region: Optional[str] = None, + configuration_display_name: Optional[str] = None, + configuration_description: Optional[str] = None, + rule_collection_display_name: Optional[str] = None, + rule_collection_description: Optional[str] = None, + rule_collection_applies_to_groups: Optional[List["NetworkManagerSecurityGroupItem"]] = None, + rule_groups: Optional[List["ConfigurationGroup"]] = None, + **kwargs + ): + super(ActiveBaseSecurityUserRule, self).__init__(**kwargs) + self.id = id + self.commit_time = commit_time + self.region = region + self.configuration_display_name = configuration_display_name + self.configuration_description = configuration_description + self.rule_collection_display_name = rule_collection_display_name + self.rule_collection_description = rule_collection_description + self.rule_collection_applies_to_groups = rule_collection_applies_to_groups + self.rule_groups = rule_groups + self.kind = None # type: Optional[str] + + +class ActiveConfigurationParameter(msrest.serialization.Model): + """Effective Virtual Networks Parameter. + + :param regions: List of regions. + :type regions: list[str] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'regions': {'key': 'regions', 'type': '[str]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + regions: Optional[List[str]] = None, + skip_token: Optional[str] = None, + **kwargs + ): + super(ActiveConfigurationParameter, self).__init__(**kwargs) + self.regions = regions + self.skip_token = skip_token + + +class EffectiveConnectivityConfiguration(msrest.serialization.Model): + """The network manager effective connectivity configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param configuration_groups: Effective configuration groups. + :type configuration_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param display_name: A friendly name for the resource. + :type display_name: str + :param description: A description of the connectivity configuration. + :type description: str + :param connectivity_topology: Connectivity topology type. Possible values include: + "HubAndSpoke", "Mesh". + :type connectivity_topology: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityTopology + :param hubs: List of hubItems. + :type hubs: list[~azure.mgmt.network.v2021_02_01_preview.models.Hub] + :param is_global: Flag if global mesh is supported. Possible values include: "False", "True". + :type is_global: str or ~azure.mgmt.network.v2021_02_01_preview.models.IsGlobal + :param applies_to_groups: Groups for configuration. + :type applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityGroupItem] + :ivar provisioning_state: The provisioning state of the connectivity configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + :param delete_existing_peering: Flag if need to remove current existing peerings. Possible + values include: "False", "True". + :type delete_existing_peering: str or + ~azure.mgmt.network.v2021_02_01_preview.models.DeleteExistingPeering + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'configuration_groups': {'key': 'configurationGroups', 'type': '[ConfigurationGroup]'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connectivity_topology': {'key': 'properties.connectivityTopology', 'type': 'str'}, + 'hubs': {'key': 'properties.hubs', 'type': '[Hub]'}, + 'is_global': {'key': 'properties.isGlobal', 'type': 'str'}, + 'applies_to_groups': {'key': 'properties.appliesToGroups', 'type': '[ConnectivityGroupItem]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'delete_existing_peering': {'key': 'properties.deleteExistingPeering', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + configuration_groups: Optional[List["ConfigurationGroup"]] = None, + display_name: Optional[str] = None, + description: Optional[str] = None, + connectivity_topology: Optional[Union[str, "ConnectivityTopology"]] = None, + hubs: Optional[List["Hub"]] = None, + is_global: Optional[Union[str, "IsGlobal"]] = None, + applies_to_groups: Optional[List["ConnectivityGroupItem"]] = None, + delete_existing_peering: Optional[Union[str, "DeleteExistingPeering"]] = None, + **kwargs + ): + super(EffectiveConnectivityConfiguration, self).__init__(**kwargs) + self.id = id + self.configuration_groups = configuration_groups + self.display_name = display_name + self.description = description + self.connectivity_topology = connectivity_topology + self.hubs = hubs + self.is_global = is_global + self.applies_to_groups = applies_to_groups + self.provisioning_state = None + self.delete_existing_peering = delete_existing_peering + + +class ActiveConnectivityConfiguration(EffectiveConnectivityConfiguration): + """Active connectivity configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param configuration_groups: Effective configuration groups. + :type configuration_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param display_name: A friendly name for the resource. + :type display_name: str + :param description: A description of the connectivity configuration. + :type description: str + :param connectivity_topology: Connectivity topology type. Possible values include: + "HubAndSpoke", "Mesh". + :type connectivity_topology: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityTopology + :param hubs: List of hubItems. + :type hubs: list[~azure.mgmt.network.v2021_02_01_preview.models.Hub] + :param is_global: Flag if global mesh is supported. Possible values include: "False", "True". + :type is_global: str or ~azure.mgmt.network.v2021_02_01_preview.models.IsGlobal + :param applies_to_groups: Groups for configuration. + :type applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityGroupItem] + :ivar provisioning_state: The provisioning state of the connectivity configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + :param delete_existing_peering: Flag if need to remove current existing peerings. Possible + values include: "False", "True". + :type delete_existing_peering: str or + ~azure.mgmt.network.v2021_02_01_preview.models.DeleteExistingPeering + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'configuration_groups': {'key': 'configurationGroups', 'type': '[ConfigurationGroup]'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connectivity_topology': {'key': 'properties.connectivityTopology', 'type': 'str'}, + 'hubs': {'key': 'properties.hubs', 'type': '[Hub]'}, + 'is_global': {'key': 'properties.isGlobal', 'type': 'str'}, + 'applies_to_groups': {'key': 'properties.appliesToGroups', 'type': '[ConnectivityGroupItem]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'delete_existing_peering': {'key': 'properties.deleteExistingPeering', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + configuration_groups: Optional[List["ConfigurationGroup"]] = None, + display_name: Optional[str] = None, + description: Optional[str] = None, + connectivity_topology: Optional[Union[str, "ConnectivityTopology"]] = None, + hubs: Optional[List["Hub"]] = None, + is_global: Optional[Union[str, "IsGlobal"]] = None, + applies_to_groups: Optional[List["ConnectivityGroupItem"]] = None, + delete_existing_peering: Optional[Union[str, "DeleteExistingPeering"]] = None, + commit_time: Optional[datetime.datetime] = None, + region: Optional[str] = None, + **kwargs + ): + super(ActiveConnectivityConfiguration, self).__init__(id=id, configuration_groups=configuration_groups, display_name=display_name, description=description, connectivity_topology=connectivity_topology, hubs=hubs, is_global=is_global, applies_to_groups=applies_to_groups, delete_existing_peering=delete_existing_peering, **kwargs) + self.commit_time = commit_time + self.region = region + + +class ActiveConnectivityConfigurationsListResult(msrest.serialization.Model): + """Result of the request to list active connectivity configurations. It contains a list of active connectivity configurations and a skiptoken to get the next set of results. + + :param value: Gets a page of active connectivity configurations. + :type value: + list[~azure.mgmt.network.v2021_02_01_preview.models.ActiveConnectivityConfiguration] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ActiveConnectivityConfiguration]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ActiveConnectivityConfiguration"]] = None, + skip_token: Optional[str] = None, + **kwargs + ): + super(ActiveConnectivityConfigurationsListResult, self).__init__(**kwargs) + self.value = value + self.skip_token = skip_token + + +class ActiveDefaultSecurityAdminRule(ActiveBaseSecurityAdminRule): + """Network default admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + :ivar display_name: A friendly name for the rule. + :vartype display_name: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :param flag: Default rule flag. + :type flag: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :vartype protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :ivar sources: The CIDR or source IP ranges. + :vartype sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar destinations: The destination address prefixes. CIDR or destination IP ranges. + :vartype destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :vartype access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :ivar priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :vartype priority: int + :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :vartype direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'protocol': {'readonly': True}, + 'sources': {'readonly': True}, + 'destinations': {'readonly': True}, + 'source_port_ranges': {'readonly': True}, + 'destination_port_ranges': {'readonly': True}, + 'access': {'readonly': True}, + 'priority': {'readonly': True}, + 'direction': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'flag': {'key': 'properties.flag', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + commit_time: Optional[datetime.datetime] = None, + region: Optional[str] = None, + configuration_display_name: Optional[str] = None, + configuration_description: Optional[str] = None, + rule_collection_display_name: Optional[str] = None, + rule_collection_description: Optional[str] = None, + rule_collection_applies_to_groups: Optional[List["NetworkManagerSecurityGroupItem"]] = None, + rule_groups: Optional[List["ConfigurationGroup"]] = None, + flag: Optional[str] = None, + **kwargs + ): + super(ActiveDefaultSecurityAdminRule, self).__init__(id=id, commit_time=commit_time, region=region, configuration_display_name=configuration_display_name, configuration_description=configuration_description, rule_collection_display_name=rule_collection_display_name, rule_collection_description=rule_collection_description, rule_collection_applies_to_groups=rule_collection_applies_to_groups, rule_groups=rule_groups, **kwargs) + self.kind = 'Default' # type: str + self.display_name = None + self.description = None + self.flag = flag + self.protocol = None + self.sources = None + self.destinations = None + self.source_port_ranges = None + self.destination_port_ranges = None + self.access = None + self.priority = None + self.direction = None + self.provisioning_state = None + + +class ActiveDefaultSecurityUserRule(ActiveBaseSecurityUserRule): + """Network security default user rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security user configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security user configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveUserRuleKind + :ivar display_name: A friendly name for the rule. + :vartype display_name: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :param flag: Default rule flag. + :type flag: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :vartype protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :ivar sources: The CIDR or source IP ranges. + :vartype sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar destinations: The destination address prefixes. CIDR or destination IP ranges. + :vartype destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :vartype direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the security configuration user rule + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'protocol': {'readonly': True}, + 'sources': {'readonly': True}, + 'destinations': {'readonly': True}, + 'source_port_ranges': {'readonly': True}, + 'destination_port_ranges': {'readonly': True}, + 'direction': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'flag': {'key': 'properties.flag', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + commit_time: Optional[datetime.datetime] = None, + region: Optional[str] = None, + configuration_display_name: Optional[str] = None, + configuration_description: Optional[str] = None, + rule_collection_display_name: Optional[str] = None, + rule_collection_description: Optional[str] = None, + rule_collection_applies_to_groups: Optional[List["NetworkManagerSecurityGroupItem"]] = None, + rule_groups: Optional[List["ConfigurationGroup"]] = None, + flag: Optional[str] = None, + **kwargs + ): + super(ActiveDefaultSecurityUserRule, self).__init__(id=id, commit_time=commit_time, region=region, configuration_display_name=configuration_display_name, configuration_description=configuration_description, rule_collection_display_name=rule_collection_display_name, rule_collection_description=rule_collection_description, rule_collection_applies_to_groups=rule_collection_applies_to_groups, rule_groups=rule_groups, **kwargs) + self.kind = 'Default' # type: str + self.display_name = None + self.description = None + self.flag = flag + self.protocol = None + self.sources = None + self.destinations = None + self.source_port_ranges = None + self.destination_port_ranges = None + self.direction = None + self.provisioning_state = None + + +class ActiveSecurityAdminRule(ActiveBaseSecurityAdminRule): + """Network admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + :param display_name: A friendly name for the rule. + :type display_name: str + :param description: A description for this rule. Restricted to 140 chars. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :type protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :param sources: The CIDR or source IP ranges. + :type sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param destinations: The destination address prefixes. CIDR or destination IP ranges. + :type destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :type access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :param priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :type priority: int + :param direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :type direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'priority': {'maximum': 4096, 'minimum': 1}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + commit_time: Optional[datetime.datetime] = None, + region: Optional[str] = None, + configuration_display_name: Optional[str] = None, + configuration_description: Optional[str] = None, + rule_collection_display_name: Optional[str] = None, + rule_collection_description: Optional[str] = None, + rule_collection_applies_to_groups: Optional[List["NetworkManagerSecurityGroupItem"]] = None, + rule_groups: Optional[List["ConfigurationGroup"]] = None, + display_name: Optional[str] = None, + description: Optional[str] = None, + protocol: Optional[Union[str, "SecurityConfigurationRuleProtocol"]] = None, + sources: Optional[List["AddressPrefixItem"]] = None, + destinations: Optional[List["AddressPrefixItem"]] = None, + source_port_ranges: Optional[List[str]] = None, + destination_port_ranges: Optional[List[str]] = None, + access: Optional[Union[str, "SecurityConfigurationRuleAccess"]] = None, + priority: Optional[int] = None, + direction: Optional[Union[str, "SecurityConfigurationRuleDirection"]] = None, + **kwargs + ): + super(ActiveSecurityAdminRule, self).__init__(id=id, commit_time=commit_time, region=region, configuration_display_name=configuration_display_name, configuration_description=configuration_description, rule_collection_display_name=rule_collection_display_name, rule_collection_description=rule_collection_description, rule_collection_applies_to_groups=rule_collection_applies_to_groups, rule_groups=rule_groups, **kwargs) + self.kind = 'Custom' # type: str + self.display_name = display_name + self.description = description + self.protocol = protocol + self.sources = sources + self.destinations = destinations + self.source_port_ranges = source_port_ranges + self.destination_port_ranges = destination_port_ranges + self.access = access + self.priority = priority + self.direction = direction + self.provisioning_state = None + + +class ActiveSecurityAdminRulesListResult(msrest.serialization.Model): + """Result of the request to list active security admin rules. It contains a list of active security admin rules and a skiptoken to get the next set of results. + + :param value: Gets a page of active security admin rules. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.ActiveBaseSecurityAdminRule] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ActiveBaseSecurityAdminRule]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ActiveBaseSecurityAdminRule"]] = None, + skip_token: Optional[str] = None, + **kwargs + ): + super(ActiveSecurityAdminRulesListResult, self).__init__(**kwargs) + self.value = value + self.skip_token = skip_token + + +class ActiveSecurityUserRule(ActiveBaseSecurityUserRule): + """Network security user rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security user configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security user configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveUserRuleKind + :param display_name: A friendly name for the rule. + :type display_name: str + :param description: A description for this rule. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :type protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :param sources: The CIDR or source IP ranges. + :type sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param destinations: The destination address prefixes. CIDR or destination IP ranges. + :type destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :type direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the security configuration user rule + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + commit_time: Optional[datetime.datetime] = None, + region: Optional[str] = None, + configuration_display_name: Optional[str] = None, + configuration_description: Optional[str] = None, + rule_collection_display_name: Optional[str] = None, + rule_collection_description: Optional[str] = None, + rule_collection_applies_to_groups: Optional[List["NetworkManagerSecurityGroupItem"]] = None, + rule_groups: Optional[List["ConfigurationGroup"]] = None, + display_name: Optional[str] = None, + description: Optional[str] = None, + protocol: Optional[Union[str, "SecurityConfigurationRuleProtocol"]] = None, + sources: Optional[List["AddressPrefixItem"]] = None, + destinations: Optional[List["AddressPrefixItem"]] = None, + source_port_ranges: Optional[List[str]] = None, + destination_port_ranges: Optional[List[str]] = None, + direction: Optional[Union[str, "SecurityConfigurationRuleDirection"]] = None, + **kwargs + ): + super(ActiveSecurityUserRule, self).__init__(id=id, commit_time=commit_time, region=region, configuration_display_name=configuration_display_name, configuration_description=configuration_description, rule_collection_display_name=rule_collection_display_name, rule_collection_description=rule_collection_description, rule_collection_applies_to_groups=rule_collection_applies_to_groups, rule_groups=rule_groups, **kwargs) + self.kind = 'Custom' # type: str + self.display_name = display_name + self.description = description + self.protocol = protocol + self.sources = sources + self.destinations = destinations + self.source_port_ranges = source_port_ranges + self.destination_port_ranges = destination_port_ranges + self.direction = direction + self.provisioning_state = None + + +class ActiveSecurityUserRulesListResult(msrest.serialization.Model): + """Result of the request to list active security user rules. It contains a list of active security user rules and a skiptoken to get the next set of results. + + :param value: Gets a page of active security user rules. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.ActiveBaseSecurityUserRule] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ActiveBaseSecurityUserRule]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ActiveBaseSecurityUserRule"]] = None, + skip_token: Optional[str] = None, + **kwargs + ): + super(ActiveSecurityUserRulesListResult, self).__init__(**kwargs) + self.value = value + self.skip_token = skip_token + + +class AddressPrefixItem(msrest.serialization.Model): + """Address prefix item. + + :param address_prefix: Address prefix. + :type address_prefix: str + :param address_prefix_type: Address prefix type. Possible values include: "IPPrefix", + "ServiceTag". + :type address_prefix_type: str or + ~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixType + """ + + _attribute_map = { + 'address_prefix': {'key': 'addressPrefix', 'type': 'str'}, + 'address_prefix_type': {'key': 'addressPrefixType', 'type': 'str'}, + } + + def __init__( + self, + *, + address_prefix: Optional[str] = None, + address_prefix_type: Optional[Union[str, "AddressPrefixType"]] = None, + **kwargs + ): + super(AddressPrefixItem, self).__init__(**kwargs) + self.address_prefix = address_prefix + self.address_prefix_type = address_prefix_type + + +class ProxyResource(msrest.serialization.Model): + """Proxy resource representation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.etag = None + + +class BaseAdminRule(ProxyResource): + """Network base admin rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AdminRule, DefaultAdminRule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.AdminRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + _subtype_map = { + 'kind': {'Custom': 'AdminRule', 'Default': 'DefaultAdminRule'} + } + + def __init__( + self, + **kwargs + ): + super(BaseAdminRule, self).__init__(**kwargs) + self.kind = 'BaseAdminRule' # type: str + self.system_data = None + + +class AdminRule(BaseAdminRule): + """Network admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.AdminRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A friendly name for the rule. + :type display_name: str + :param description: A description for this rule. Restricted to 140 chars. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :type protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :param sources: The CIDR or source IP ranges. + :type sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param destinations: The destination address prefixes. CIDR or destination IP ranges. + :type destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :type access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :param priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :type priority: int + :param direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :type direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + 'priority': {'maximum': 4096, 'minimum': 1}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + display_name: Optional[str] = None, + description: Optional[str] = None, + protocol: Optional[Union[str, "SecurityConfigurationRuleProtocol"]] = None, + sources: Optional[List["AddressPrefixItem"]] = None, + destinations: Optional[List["AddressPrefixItem"]] = None, + source_port_ranges: Optional[List[str]] = None, + destination_port_ranges: Optional[List[str]] = None, + access: Optional[Union[str, "SecurityConfigurationRuleAccess"]] = None, + priority: Optional[int] = None, + direction: Optional[Union[str, "SecurityConfigurationRuleDirection"]] = None, + **kwargs + ): + super(AdminRule, self).__init__(**kwargs) + self.kind = 'Custom' # type: str + self.display_name = display_name + self.description = description + self.protocol = protocol + self.sources = sources + self.destinations = destinations + self.source_port_ranges = source_port_ranges + self.destination_port_ranges = destination_port_ranges + self.access = access + self.priority = priority + self.direction = direction + self.provisioning_state = None + + +class AdminRuleListResult(msrest.serialization.Model): + """security configuration admin rule list result. + + :param value: A list of admin rules. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.BaseAdminRule] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BaseAdminRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["BaseAdminRule"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(AdminRuleListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class BaseUserRule(ProxyResource): + """Network base rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: UserRule, DefaultUserRule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.UserRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + _subtype_map = { + 'kind': {'Custom': 'UserRule', 'Default': 'DefaultUserRule'} + } + + def __init__( + self, + **kwargs + ): + super(BaseUserRule, self).__init__(**kwargs) + self.kind = 'BaseUserRule' # type: str + self.system_data = None + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.network.v2021_02_01_preview.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["CloudErrorBody"]] = None, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class ConfigurationGroup(msrest.serialization.Model): + """The network configuration group resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param display_name: A friendly name for the network group. + :type display_name: str + :param description: A description of the network group. + :type description: str + :param member_type: Group member type. + :type member_type: str + :param group_members: Group members of network group. + :type group_members: list[~azure.mgmt.network.v2021_02_01_preview.models.GroupMembersItem] + :param conditional_membership: Network group conditional filter. + :type conditional_membership: str + :ivar provisioning_state: The provisioning state of the scope assignment resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'member_type': {'key': 'properties.memberType', 'type': 'str'}, + 'group_members': {'key': 'properties.groupMembers', 'type': '[GroupMembersItem]'}, + 'conditional_membership': {'key': 'properties.conditionalMembership', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + display_name: Optional[str] = None, + description: Optional[str] = None, + member_type: Optional[str] = None, + group_members: Optional[List["GroupMembersItem"]] = None, + conditional_membership: Optional[str] = None, + **kwargs + ): + super(ConfigurationGroup, self).__init__(**kwargs) + self.id = id + self.display_name = display_name + self.description = description + self.member_type = member_type + self.group_members = group_members + self.conditional_membership = conditional_membership + self.provisioning_state = None + + +class ConnectivityConfiguration(ProxyResource): + """The network manager connectivity configuration resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A friendly name for the resource. + :type display_name: str + :param description: A description of the connectivity configuration. + :type description: str + :param connectivity_topology: Connectivity topology type. Possible values include: + "HubAndSpoke", "Mesh". + :type connectivity_topology: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityTopology + :param hubs: List of hubItems. + :type hubs: list[~azure.mgmt.network.v2021_02_01_preview.models.Hub] + :param is_global: Flag if global mesh is supported. Possible values include: "False", "True". + :type is_global: str or ~azure.mgmt.network.v2021_02_01_preview.models.IsGlobal + :param applies_to_groups: Groups for configuration. + :type applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityGroupItem] + :ivar provisioning_state: The provisioning state of the connectivity configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + :param delete_existing_peering: Flag if need to remove current existing peerings. Possible + values include: "False", "True". + :type delete_existing_peering: str or + ~azure.mgmt.network.v2021_02_01_preview.models.DeleteExistingPeering + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connectivity_topology': {'key': 'properties.connectivityTopology', 'type': 'str'}, + 'hubs': {'key': 'properties.hubs', 'type': '[Hub]'}, + 'is_global': {'key': 'properties.isGlobal', 'type': 'str'}, + 'applies_to_groups': {'key': 'properties.appliesToGroups', 'type': '[ConnectivityGroupItem]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'delete_existing_peering': {'key': 'properties.deleteExistingPeering', 'type': 'str'}, + } + + def __init__( + self, + *, + display_name: Optional[str] = None, + description: Optional[str] = None, + connectivity_topology: Optional[Union[str, "ConnectivityTopology"]] = None, + hubs: Optional[List["Hub"]] = None, + is_global: Optional[Union[str, "IsGlobal"]] = None, + applies_to_groups: Optional[List["ConnectivityGroupItem"]] = None, + delete_existing_peering: Optional[Union[str, "DeleteExistingPeering"]] = None, + **kwargs + ): + super(ConnectivityConfiguration, self).__init__(**kwargs) + self.system_data = None + self.display_name = display_name + self.description = description + self.connectivity_topology = connectivity_topology + self.hubs = hubs + self.is_global = is_global + self.applies_to_groups = applies_to_groups + self.provisioning_state = None + self.delete_existing_peering = delete_existing_peering + + +class ConnectivityConfigurationListResult(msrest.serialization.Model): + """Result of the request to list network manager connectivity configurations. It contains a list of configurations and a link to get the next set of results. + + :param value: Gets a page of Connectivity Configurations. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityConfiguration] + :param next_link: Gets the URL to get the next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ConnectivityConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ConnectivityConfiguration"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ConnectivityConfigurationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ConnectivityGroupItem(msrest.serialization.Model): + """ConnectivityGroupItem. + + :param network_group_id: Network group Id. + :type network_group_id: str + :param use_hub_gateway: Flag if need to use hub gateway. Possible values include: "False", + "True". + :type use_hub_gateway: str or ~azure.mgmt.network.v2021_02_01_preview.models.UseHubGateway + :param is_global: Flag if global is supported. Possible values include: "False", "True". + :type is_global: str or ~azure.mgmt.network.v2021_02_01_preview.models.IsGlobal + :param group_connectivity: Group connectivity type. Possible values include: "None", + "DirectlyConnected". + :type group_connectivity: str or + ~azure.mgmt.network.v2021_02_01_preview.models.GroupConnectivity + """ + + _attribute_map = { + 'network_group_id': {'key': 'networkGroupId', 'type': 'str'}, + 'use_hub_gateway': {'key': 'useHubGateway', 'type': 'str'}, + 'is_global': {'key': 'isGlobal', 'type': 'str'}, + 'group_connectivity': {'key': 'groupConnectivity', 'type': 'str'}, + } + + def __init__( + self, + *, + network_group_id: Optional[str] = None, + use_hub_gateway: Optional[Union[str, "UseHubGateway"]] = None, + is_global: Optional[Union[str, "IsGlobal"]] = None, + group_connectivity: Optional[Union[str, "GroupConnectivity"]] = None, + **kwargs + ): + super(ConnectivityGroupItem, self).__init__(**kwargs) + self.network_group_id = network_group_id + self.use_hub_gateway = use_hub_gateway + self.is_global = is_global + self.group_connectivity = group_connectivity + + +class DefaultAdminRule(BaseAdminRule): + """Network default admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.AdminRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :ivar display_name: A friendly name for the rule. + :vartype display_name: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :param flag: Default rule flag. + :type flag: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :vartype protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :ivar sources: The CIDR or source IP ranges. + :vartype sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar destinations: The destination address prefixes. CIDR or destination IP ranges. + :vartype destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :vartype access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :ivar priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :vartype priority: int + :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :vartype direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'protocol': {'readonly': True}, + 'sources': {'readonly': True}, + 'destinations': {'readonly': True}, + 'source_port_ranges': {'readonly': True}, + 'destination_port_ranges': {'readonly': True}, + 'access': {'readonly': True}, + 'priority': {'readonly': True}, + 'direction': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'flag': {'key': 'properties.flag', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + flag: Optional[str] = None, + **kwargs + ): + super(DefaultAdminRule, self).__init__(**kwargs) + self.kind = 'Default' # type: str + self.display_name = None + self.description = None + self.flag = flag + self.protocol = None + self.sources = None + self.destinations = None + self.source_port_ranges = None + self.destination_port_ranges = None + self.access = None + self.priority = None + self.direction = None + self.provisioning_state = None + + +class DefaultUserRule(BaseUserRule): + """Network security default user rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.UserRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :ivar display_name: A friendly name for the rule. + :vartype display_name: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :param flag: Default rule flag. + :type flag: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :vartype protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :ivar sources: The CIDR or source IP ranges. + :vartype sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar destinations: The destination address prefixes. CIDR or destination IP ranges. + :vartype destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :vartype direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the security configuration user rule + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'protocol': {'readonly': True}, + 'sources': {'readonly': True}, + 'destinations': {'readonly': True}, + 'source_port_ranges': {'readonly': True}, + 'destination_port_ranges': {'readonly': True}, + 'direction': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'flag': {'key': 'properties.flag', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + flag: Optional[str] = None, + **kwargs + ): + super(DefaultUserRule, self).__init__(**kwargs) + self.kind = 'Default' # type: str + self.display_name = None + self.description = None + self.flag = flag + self.protocol = None + self.sources = None + self.destinations = None + self.source_port_ranges = None + self.destination_port_ranges = None + self.direction = None + self.provisioning_state = None + + +class EffectiveBaseSecurityAdminRule(msrest.serialization.Model): + """Network base admin rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: EffectiveSecurityAdminRule, EffectiveDefaultSecurityAdminRule. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Custom': 'EffectiveSecurityAdminRule', 'Default': 'EffectiveDefaultSecurityAdminRule'} + } + + def __init__( + self, + *, + id: Optional[str] = None, + configuration_display_name: Optional[str] = None, + configuration_description: Optional[str] = None, + rule_collection_display_name: Optional[str] = None, + rule_collection_description: Optional[str] = None, + rule_collection_applies_to_groups: Optional[List["NetworkManagerSecurityGroupItem"]] = None, + rule_groups: Optional[List["ConfigurationGroup"]] = None, + **kwargs + ): + super(EffectiveBaseSecurityAdminRule, self).__init__(**kwargs) + self.id = id + self.configuration_display_name = configuration_display_name + self.configuration_description = configuration_description + self.rule_collection_display_name = rule_collection_display_name + self.rule_collection_description = rule_collection_description + self.rule_collection_applies_to_groups = rule_collection_applies_to_groups + self.rule_groups = rule_groups + self.kind = None # type: Optional[str] + + +class EffectiveDefaultSecurityAdminRule(EffectiveBaseSecurityAdminRule): + """Network default admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + :ivar display_name: A friendly name for the rule. + :vartype display_name: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :param flag: Default rule flag. + :type flag: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :vartype protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :ivar sources: The CIDR or source IP ranges. + :vartype sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar destinations: The destination address prefixes. CIDR or destination IP ranges. + :vartype destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :vartype access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :ivar priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :vartype priority: int + :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :vartype direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'protocol': {'readonly': True}, + 'sources': {'readonly': True}, + 'destinations': {'readonly': True}, + 'source_port_ranges': {'readonly': True}, + 'destination_port_ranges': {'readonly': True}, + 'access': {'readonly': True}, + 'priority': {'readonly': True}, + 'direction': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'flag': {'key': 'properties.flag', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + configuration_display_name: Optional[str] = None, + configuration_description: Optional[str] = None, + rule_collection_display_name: Optional[str] = None, + rule_collection_description: Optional[str] = None, + rule_collection_applies_to_groups: Optional[List["NetworkManagerSecurityGroupItem"]] = None, + rule_groups: Optional[List["ConfigurationGroup"]] = None, + flag: Optional[str] = None, + **kwargs + ): + super(EffectiveDefaultSecurityAdminRule, self).__init__(id=id, configuration_display_name=configuration_display_name, configuration_description=configuration_description, rule_collection_display_name=rule_collection_display_name, rule_collection_description=rule_collection_description, rule_collection_applies_to_groups=rule_collection_applies_to_groups, rule_groups=rule_groups, **kwargs) + self.kind = 'Default' # type: str + self.display_name = None + self.description = None + self.flag = flag + self.protocol = None + self.sources = None + self.destinations = None + self.source_port_ranges = None + self.destination_port_ranges = None + self.access = None + self.priority = None + self.direction = None + self.provisioning_state = None + + +class EffectiveSecurityAdminRule(EffectiveBaseSecurityAdminRule): + """Network admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + :param display_name: A friendly name for the rule. + :type display_name: str + :param description: A description for this rule. Restricted to 140 chars. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :type protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :param sources: The CIDR or source IP ranges. + :type sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param destinations: The destination address prefixes. CIDR or destination IP ranges. + :type destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :type access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :param priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :type priority: int + :param direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :type direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'priority': {'maximum': 4096, 'minimum': 1}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + configuration_display_name: Optional[str] = None, + configuration_description: Optional[str] = None, + rule_collection_display_name: Optional[str] = None, + rule_collection_description: Optional[str] = None, + rule_collection_applies_to_groups: Optional[List["NetworkManagerSecurityGroupItem"]] = None, + rule_groups: Optional[List["ConfigurationGroup"]] = None, + display_name: Optional[str] = None, + description: Optional[str] = None, + protocol: Optional[Union[str, "SecurityConfigurationRuleProtocol"]] = None, + sources: Optional[List["AddressPrefixItem"]] = None, + destinations: Optional[List["AddressPrefixItem"]] = None, + source_port_ranges: Optional[List[str]] = None, + destination_port_ranges: Optional[List[str]] = None, + access: Optional[Union[str, "SecurityConfigurationRuleAccess"]] = None, + priority: Optional[int] = None, + direction: Optional[Union[str, "SecurityConfigurationRuleDirection"]] = None, + **kwargs + ): + super(EffectiveSecurityAdminRule, self).__init__(id=id, configuration_display_name=configuration_display_name, configuration_description=configuration_description, rule_collection_display_name=rule_collection_display_name, rule_collection_description=rule_collection_description, rule_collection_applies_to_groups=rule_collection_applies_to_groups, rule_groups=rule_groups, **kwargs) + self.kind = 'Custom' # type: str + self.display_name = display_name + self.description = description + self.protocol = protocol + self.sources = sources + self.destinations = destinations + self.source_port_ranges = source_port_ranges + self.destination_port_ranges = destination_port_ranges + self.access = access + self.priority = priority + self.direction = direction + self.provisioning_state = None + + +class EffectiveVirtualNetwork(msrest.serialization.Model): + """Effective Virtual Network. + + :param id: Effective vnet Id. + :type id: str + :param location: Location of vnet. + :type location: str + :param membership_type: Membership Type. Possible values include: "Static", "Dynamic". + :type membership_type: str or ~azure.mgmt.network.v2021_02_01_preview.models.MembershipType + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'membership_type': {'key': 'membershipType', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + membership_type: Optional[Union[str, "MembershipType"]] = None, + **kwargs + ): + super(EffectiveVirtualNetwork, self).__init__(**kwargs) + self.id = id + self.location = location + self.membership_type = membership_type + + +class EffectiveVirtualNetworksListResult(msrest.serialization.Model): + """Result of the request to list Effective Virtual Network. It contains a list of groups and a URL link to get the next set of results. + + :param value: Gets a page of EffectiveVirtualNetwork. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.EffectiveVirtualNetwork] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EffectiveVirtualNetwork]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["EffectiveVirtualNetwork"]] = None, + skip_token: Optional[str] = None, + **kwargs + ): + super(EffectiveVirtualNetworksListResult, self).__init__(**kwargs) + self.value = value + self.skip_token = skip_token + + +class EffectiveVirtualNetworksParameter(msrest.serialization.Model): + """Effective Virtual Networks Parameter. + + :param conditional_members: Conditional Members. + :type conditional_members: str + :param skip_token: Continuation token for pagination, capturing the next page size and offset, + as well as the context of the query. + :type skip_token: str + """ + + _attribute_map = { + 'conditional_members': {'key': 'conditionalMembers', 'type': 'str'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + conditional_members: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs + ): + super(EffectiveVirtualNetworksParameter, self).__init__(**kwargs) + self.conditional_members = conditional_members + self.skip_token = skip_token + + +class GroupMembersItem(msrest.serialization.Model): + """GroupMembers Item. + + :param resource_id: Resource Id. + :type resource_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + **kwargs + ): + super(GroupMembersItem, self).__init__(**kwargs) + self.resource_id = resource_id + + +class Hub(msrest.serialization.Model): + """Hub Item. + + :param resource_id: Resource Id. + :type resource_id: str + :param resource_type: Resource Type. + :type resource_type: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + resource_type: Optional[str] = None, + **kwargs + ): + super(Hub, self).__init__(**kwargs) + self.resource_id = resource_id + self.resource_type = resource_type + + +class NetworkGroup(ProxyResource): + """The network group resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A friendly name for the network group. + :type display_name: str + :param description: A description of the network group. + :type description: str + :param member_type: Group member type. + :type member_type: str + :param group_members: Group members of network group. + :type group_members: list[~azure.mgmt.network.v2021_02_01_preview.models.GroupMembersItem] + :param conditional_membership: Network group conditional filter. + :type conditional_membership: str + :ivar provisioning_state: The provisioning state of the scope assignment resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'member_type': {'key': 'properties.memberType', 'type': 'str'}, + 'group_members': {'key': 'properties.groupMembers', 'type': '[GroupMembersItem]'}, + 'conditional_membership': {'key': 'properties.conditionalMembership', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + display_name: Optional[str] = None, + description: Optional[str] = None, + member_type: Optional[str] = None, + group_members: Optional[List["GroupMembersItem"]] = None, + conditional_membership: Optional[str] = None, + **kwargs + ): + super(NetworkGroup, self).__init__(**kwargs) + self.system_data = None + self.display_name = display_name + self.description = description + self.member_type = member_type + self.group_members = group_members + self.conditional_membership = conditional_membership + self.provisioning_state = None + + +class NetworkGroupListResult(msrest.serialization.Model): + """Result of the request to list NetworkGroup. It contains a list of groups and a URL link to get the next set of results. + + :param value: Gets a page of NetworkGroup. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkGroup] + :param next_link: Gets the URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkGroup"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(NetworkGroupListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class Resource(msrest.serialization.Model): + """Common resource representation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class NetworkManager(Resource): + """The Managed Network resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A friendly name for the network manager. + :type display_name: str + :param description: A description of the network manager. + :type description: str + :param network_manager_scopes: Scope of Network Manager. + :type network_manager_scopes: + ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerPropertiesNetworkManagerScopes + :param network_manager_scope_accesses: Scope Access. + :type network_manager_scope_accesses: list[str or + ~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationType] + :ivar provisioning_state: The provisioning state of the scope assignment resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'network_manager_scopes': {'key': 'properties.networkManagerScopes', 'type': 'NetworkManagerPropertiesNetworkManagerScopes'}, + 'network_manager_scope_accesses': {'key': 'properties.networkManagerScopeAccesses', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + display_name: Optional[str] = None, + description: Optional[str] = None, + network_manager_scopes: Optional["NetworkManagerPropertiesNetworkManagerScopes"] = None, + network_manager_scope_accesses: Optional[List[Union[str, "ConfigurationType"]]] = None, + **kwargs + ): + super(NetworkManager, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.system_data = None + self.display_name = display_name + self.description = description + self.network_manager_scopes = network_manager_scopes + self.network_manager_scope_accesses = network_manager_scope_accesses + self.provisioning_state = None + + +class NetworkManagerCommit(msrest.serialization.Model): + """Network Manager Commit. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar commit_id: Commit Id. + :vartype commit_id: str + :param target_locations: List of target locations. + :type target_locations: list[str] + :param configuration_ids: List of configuration ids. + :type configuration_ids: list[str] + :param commit_type: Commit Type. Possible values include: "SecurityAdmin", "SecurityUser", + "Connectivity". + :type commit_type: str or ~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationType + """ + + _validation = { + 'commit_id': {'readonly': True}, + } + + _attribute_map = { + 'commit_id': {'key': 'commitId', 'type': 'str'}, + 'target_locations': {'key': 'targetLocations', 'type': '[str]'}, + 'configuration_ids': {'key': 'configurationIds', 'type': '[str]'}, + 'commit_type': {'key': 'commitType', 'type': 'str'}, + } + + def __init__( + self, + *, + target_locations: Optional[List[str]] = None, + configuration_ids: Optional[List[str]] = None, + commit_type: Optional[Union[str, "ConfigurationType"]] = None, + **kwargs + ): + super(NetworkManagerCommit, self).__init__(**kwargs) + self.commit_id = None + self.target_locations = target_locations + self.configuration_ids = configuration_ids + self.commit_type = commit_type + + +class NetworkManagerDeploymentStatus(msrest.serialization.Model): + """Network Manager Deployment Status. + + :param commit_time: Commit Time. + :type commit_time: ~datetime.datetime + :param region: Region Name. + :type region: str + :param deployment_status: Deployment Status. Possible values include: "NotStarted", + "Deploying", "Deployed", "Failed". + :type deployment_status: str or ~azure.mgmt.network.v2021_02_01_preview.models.DeploymentStatus + :param configuration_ids: List of configuration ids. + :type configuration_ids: list[str] + :param deployment_type: Configuration Deployment Type. Possible values include: + "SecurityAdmin", "SecurityUser", "Connectivity". + :type deployment_type: str or ~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationType + :param error_message: Error Message. + :type error_message: str + """ + + _attribute_map = { + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'configuration_ids': {'key': 'configurationIds', 'type': '[str]'}, + 'deployment_type': {'key': 'deploymentType', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + } + + def __init__( + self, + *, + commit_time: Optional[datetime.datetime] = None, + region: Optional[str] = None, + deployment_status: Optional[Union[str, "DeploymentStatus"]] = None, + configuration_ids: Optional[List[str]] = None, + deployment_type: Optional[Union[str, "ConfigurationType"]] = None, + error_message: Optional[str] = None, + **kwargs + ): + super(NetworkManagerDeploymentStatus, self).__init__(**kwargs) + self.commit_time = commit_time + self.region = region + self.deployment_status = deployment_status + self.configuration_ids = configuration_ids + self.deployment_type = deployment_type + self.error_message = error_message + + +class NetworkManagerDeploymentStatusListResult(msrest.serialization.Model): + """A list of Network Manager Deployment Status. + + :param value: Gets a page of Network Manager Deployment Status. + :type value: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerDeploymentStatus] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkManagerDeploymentStatus]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkManagerDeploymentStatus"]] = None, + skip_token: Optional[str] = None, + **kwargs + ): + super(NetworkManagerDeploymentStatusListResult, self).__init__(**kwargs) + self.value = value + self.skip_token = skip_token + + +class NetworkManagerDeploymentStatusParameter(msrest.serialization.Model): + """Network Manager Deployment Status Parameter. + + :param regions: List of locations. + :type regions: list[str] + :param deployment_types: List of deployment types. + :type deployment_types: list[str or + ~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationType] + :param skip_token: Continuation token for pagination, capturing the next page size and offset, + as well as the context of the query. + :type skip_token: str + """ + + _attribute_map = { + 'regions': {'key': 'regions', 'type': '[str]'}, + 'deployment_types': {'key': 'deploymentTypes', 'type': '[str]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + regions: Optional[List[str]] = None, + deployment_types: Optional[List[Union[str, "ConfigurationType"]]] = None, + skip_token: Optional[str] = None, + **kwargs + ): + super(NetworkManagerDeploymentStatusParameter, self).__init__(**kwargs) + self.regions = regions + self.deployment_types = deployment_types + self.skip_token = skip_token + + +class NetworkManagerEffectiveConnectivityConfigurationListResult(msrest.serialization.Model): + """Result of the request to list networkManagerEffectiveConnectivityConfiguration. It contains a list of groups and a skiptoken to get the next set of results. + + :param value: Gets a page of NetworkManagerEffectiveConnectivityConfiguration. + :type value: + list[~azure.mgmt.network.v2021_02_01_preview.models.EffectiveConnectivityConfiguration] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EffectiveConnectivityConfiguration]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["EffectiveConnectivityConfiguration"]] = None, + skip_token: Optional[str] = None, + **kwargs + ): + super(NetworkManagerEffectiveConnectivityConfigurationListResult, self).__init__(**kwargs) + self.value = value + self.skip_token = skip_token + + +class NetworkManagerEffectiveSecurityAdminRulesListResult(msrest.serialization.Model): + """Result of the request to list networkManagerEffectiveSecurityAdminRules. It contains a list of groups and a skiptoken to get the next set of results. + + :param value: Gets a page of NetworkManagerEffectiveSecurityAdminRules. + :type value: + list[~azure.mgmt.network.v2021_02_01_preview.models.EffectiveBaseSecurityAdminRule] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EffectiveBaseSecurityAdminRule]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["EffectiveBaseSecurityAdminRule"]] = None, + skip_token: Optional[str] = None, + **kwargs + ): + super(NetworkManagerEffectiveSecurityAdminRulesListResult, self).__init__(**kwargs) + self.value = value + self.skip_token = skip_token + + +class NetworkManagerListResult(msrest.serialization.Model): + """Result of the request to list NetworkManager. It contains a list of network managers and a URL link to get the next set of results. + + :param value: Gets a page of NetworkManager. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManager] + :param next_link: Gets the URL to get the next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkManager]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkManager"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(NetworkManagerListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class NetworkManagerPropertiesNetworkManagerScopes(msrest.serialization.Model): + """Scope of Network Manager. + + :param management_groups: List of management groups. + :type management_groups: list[str] + :param subscriptions: List of subscriptions. + :type subscriptions: list[str] + """ + + _attribute_map = { + 'management_groups': {'key': 'managementGroups', 'type': '[str]'}, + 'subscriptions': {'key': 'subscriptions', 'type': '[str]'}, + } + + def __init__( + self, + *, + management_groups: Optional[List[str]] = None, + subscriptions: Optional[List[str]] = None, + **kwargs + ): + super(NetworkManagerPropertiesNetworkManagerScopes, self).__init__(**kwargs) + self.management_groups = management_groups + self.subscriptions = subscriptions + + +class NetworkManagerSecurityGroupItem(msrest.serialization.Model): + """Network manager security group item. + + :param network_group_id: Network manager group Id. + :type network_group_id: str + """ + + _attribute_map = { + 'network_group_id': {'key': 'networkGroupId', 'type': 'str'}, + } + + def __init__( + self, + *, + network_group_id: Optional[str] = None, + **kwargs + ): + super(NetworkManagerSecurityGroupItem, self).__init__(**kwargs) + self.network_group_id = network_group_id + + +class NetworkSecurityPerimeter(Resource): + """The Network Security Perimeter resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param display_name: A friendly name for the network security perimeter. + :type display_name: str + :param description: A description of the network security perimeter. + :type description: str + :ivar provisioning_state: The provisioning state of the scope assignment resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + display_name: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(NetworkSecurityPerimeter, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.display_name = display_name + self.description = description + self.provisioning_state = None + + +class NetworkSecurityPerimeterListResult(msrest.serialization.Model): + """Result of the request to list NetworkSecurityPerimeter. It contains a list of network security perimeters and a URL link to get the next set of results. + + :param value: Gets a page of NetworkSecurityPerimeter. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeter] + :param next_link: Gets the URL to get the next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkSecurityPerimeter]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkSecurityPerimeter"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(NetworkSecurityPerimeterListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PerimeterAssociableResource(Resource): + """Resource that is onboarded to use network security perimeter. Also referred as perimeter associable resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar display_name: A friendly name for the properties of perimeter associable resources. + :vartype display_name: str + :ivar resource_type: Resource type/provider name. + :vartype resource_type: str + :ivar public_dns_zones: Public DNS zone names of the resources. + :vartype public_dns_zones: list[str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'public_dns_zones': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'resource_type': {'key': 'properties.resourceType', 'type': 'str'}, + 'public_dns_zones': {'key': 'properties.publicDnsZones', 'type': '[str]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(PerimeterAssociableResource, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.display_name = None + self.resource_type = None + self.public_dns_zones = None + + +class PerimeterAssociableResourcesListResult(msrest.serialization.Model): + """Paged list of perimeter associable resources. + + :param value: Gets paged list of perimeter associable resources. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.PerimeterAssociableResource] + :param next_link: Gets the URL to get the next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PerimeterAssociableResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PerimeterAssociableResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(PerimeterAssociableResourcesListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class QueryRequestOptions(msrest.serialization.Model): + """Query Request Options. + + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + skip_token: Optional[str] = None, + **kwargs + ): + super(QueryRequestOptions, self).__init__(**kwargs) + self.skip_token = skip_token + + +class RuleCollection(ProxyResource): + """Defines the rule collection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A display name of the rule collection. + :type display_name: str + :param description: A description of the rule collection. + :type description: str + :param applies_to_groups: Groups for configuration. + :type applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'applies_to_groups': {'key': 'properties.appliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + display_name: Optional[str] = None, + description: Optional[str] = None, + applies_to_groups: Optional[List["NetworkManagerSecurityGroupItem"]] = None, + **kwargs + ): + super(RuleCollection, self).__init__(**kwargs) + self.system_data = None + self.display_name = display_name + self.description = description + self.applies_to_groups = applies_to_groups + self.provisioning_state = None + + +class RuleCollectionListResult(msrest.serialization.Model): + """Security configuration rule collection list result. + + :param value: A list of network manager security configuration rule collections. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection] + :param next_link: Gets the URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RuleCollection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["RuleCollection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(RuleCollectionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class SecurityConfiguration(ProxyResource): + """Defines the security configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A display name of the security configuration. + :type display_name: str + :param description: A description of the security configuration. + :type description: str + :param security_type: Security Type. Possible values include: "AdminPolicy", "UserPolicy". + :type security_type: str or ~azure.mgmt.network.v2021_02_01_preview.models.SecurityType + :param delete_existing_ns_gs: Flag if need to delete existing network security groups. Possible + values include: "False", "True". + :type delete_existing_ns_gs: str or + ~azure.mgmt.network.v2021_02_01_preview.models.DeleteExistingNSGs + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'security_type': {'key': 'properties.securityType', 'type': 'str'}, + 'delete_existing_ns_gs': {'key': 'properties.deleteExistingNSGs', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + display_name: Optional[str] = None, + description: Optional[str] = None, + security_type: Optional[Union[str, "SecurityType"]] = None, + delete_existing_ns_gs: Optional[Union[str, "DeleteExistingNSGs"]] = None, + **kwargs + ): + super(SecurityConfiguration, self).__init__(**kwargs) + self.system_data = None + self.display_name = display_name + self.description = description + self.security_type = security_type + self.delete_existing_ns_gs = delete_existing_ns_gs + self.provisioning_state = None + + +class SecurityConfigurationListResult(msrest.serialization.Model): + """A list of network manager security configurations. + + :param value: Gets a page of security configurations. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration] + :param next_link: Gets the URL to get the next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecurityConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["SecurityConfiguration"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(SecurityConfigurationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.network.v2021_02_01_preview.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or + ~azure.mgmt.network.v2021_02_01_preview.models.CreatedByType + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + +class TagsObject(msrest.serialization.Model): + """Tags object for patch operations. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(TagsObject, self).__init__(**kwargs) + self.tags = tags + + +class UserRule(BaseUserRule): + """Network security user rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.UserRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A friendly name for the rule. + :type display_name: str + :param description: A description for this rule. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :type protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :param sources: The CIDR or source IP ranges. + :type sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param destinations: The destination address prefixes. CIDR or destination IP ranges. + :type destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :type direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the security configuration user rule + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + display_name: Optional[str] = None, + description: Optional[str] = None, + protocol: Optional[Union[str, "SecurityConfigurationRuleProtocol"]] = None, + sources: Optional[List["AddressPrefixItem"]] = None, + destinations: Optional[List["AddressPrefixItem"]] = None, + source_port_ranges: Optional[List[str]] = None, + destination_port_ranges: Optional[List[str]] = None, + direction: Optional[Union[str, "SecurityConfigurationRuleDirection"]] = None, + **kwargs + ): + super(UserRule, self).__init__(**kwargs) + self.kind = 'Custom' # type: str + self.display_name = display_name + self.description = description + self.protocol = protocol + self.sources = sources + self.destinations = destinations + self.source_port_ranges = source_port_ranges + self.destination_port_ranges = destination_port_ranges + self.direction = direction + self.provisioning_state = None + + +class UserRuleListResult(msrest.serialization.Model): + """security user rule list result. + + :param value: A list of user rules. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.BaseUserRule] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BaseUserRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["BaseUserRule"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(UserRuleListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_network_management_client_enums.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_network_management_client_enums.py new file mode 100644 index 000000000000..b0161e3803da --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_network_management_client_enums.py @@ -0,0 +1,180 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AddressPrefixType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Address prefix type. + """ + + IP_PREFIX = "IPPrefix" + SERVICE_TAG = "ServiceTag" + +class AdminRuleKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether the rule is custom or default. + """ + + CUSTOM = "Custom" + DEFAULT = "Default" + +class ConfigurationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Configuration Deployment Type. + """ + + SECURITY_ADMIN = "SecurityAdmin" + SECURITY_USER = "SecurityUser" + CONNECTIVITY = "Connectivity" + +class ConnectivityTopology(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Connectivity topology type. + """ + + HUB_AND_SPOKE = "HubAndSpoke" + MESH = "Mesh" + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class DeleteExistingNSGs(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Flag if need to delete existing network security groups. + """ + + FALSE = "False" + TRUE = "True" + +class DeleteExistingPeering(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Flag if need to remove current existing peerings. + """ + + FALSE = "False" + TRUE = "True" + +class DeploymentStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Deployment Status. + """ + + NOT_STARTED = "NotStarted" + DEPLOYING = "Deploying" + DEPLOYED = "Deployed" + FAILED = "Failed" + +class EffectiveAdminRuleKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether the rule is custom or default. + """ + + CUSTOM = "Custom" + DEFAULT = "Default" + +class EffectiveUserRuleKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether the rule is custom or default. + """ + + CUSTOM = "Custom" + DEFAULT = "Default" + +class GroupConnectivity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Group connectivity type. + """ + + NONE = "None" + DIRECTLY_CONNECTED = "DirectlyConnected" + +class IsGlobal(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Flag if global mesh is supported. + """ + + FALSE = "False" + TRUE = "True" + +class MembershipType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Membership Type. + """ + + STATIC = "Static" + DYNAMIC = "Dynamic" + +class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state. + """ + + SUCCEEDED = "Succeeded" + UPDATING = "Updating" + DELETING = "Deleting" + FAILED = "Failed" + +class SecurityConfigurationRuleAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether network traffic is allowed or denied. + """ + + ALLOW = "Allow" + DENY = "Deny" + ALWAYS_ALLOW = "AlwaysAllow" + +class SecurityConfigurationRuleDirection(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The direction of the rule. The direction specifies if the rule will be evaluated on incoming or + outgoing traffic. + """ + + INBOUND = "Inbound" + OUTBOUND = "Outbound" + +class SecurityConfigurationRuleProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network protocol this rule applies to. + """ + + TCP = "Tcp" + UDP = "Udp" + ICMP = "Icmp" + ESP = "Esp" + ANY = "Any" + AH = "Ah" + +class SecurityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Security Type. + """ + + ADMIN_POLICY = "AdminPolicy" + USER_POLICY = "UserPolicy" + +class UseHubGateway(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Flag if need to use hub gateway. + """ + + FALSE = "False" + TRUE = "True" + +class UserRuleKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether the rule is custom or default. + """ + + CUSTOM = "Custom" + DEFAULT = "Default" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/__init__.py new file mode 100644 index 000000000000..e3ab4d13aca9 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/__init__.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._network_managers_operations import NetworkManagersOperations +from ._network_manager_commits_operations import NetworkManagerCommitsOperations +from ._network_manager_deployment_status_operations import NetworkManagerDeploymentStatusOperations +from ._effective_virtual_networks_operations import EffectiveVirtualNetworksOperations +from ._active_connectivity_configurations_operations import ActiveConnectivityConfigurationsOperations +from ._active_security_admin_rules_operations import ActiveSecurityAdminRulesOperations +from ._active_security_user_rules_operations import ActiveSecurityUserRulesOperations +from ._connectivity_configurations_operations import ConnectivityConfigurationsOperations +from ._effective_connectivity_configurations_operations import EffectiveConnectivityConfigurationsOperations +from ._network_manager_effective_security_admin_rules_operations import NetworkManagerEffectiveSecurityAdminRulesOperations +from ._network_groups_operations import NetworkGroupsOperations +from ._security_user_configurations_operations import SecurityUserConfigurationsOperations +from ._user_rule_collections_operations import UserRuleCollectionsOperations +from ._user_rules_operations import UserRulesOperations +from ._security_admin_configurations_operations import SecurityAdminConfigurationsOperations +from ._admin_rule_collections_operations import AdminRuleCollectionsOperations +from ._admin_rules_operations import AdminRulesOperations +from ._network_security_perimeters_operations import NetworkSecurityPerimetersOperations +from ._perimeter_associable_resource_types_operations import PerimeterAssociableResourceTypesOperations + +__all__ = [ + 'NetworkManagersOperations', + 'NetworkManagerCommitsOperations', + 'NetworkManagerDeploymentStatusOperations', + 'EffectiveVirtualNetworksOperations', + 'ActiveConnectivityConfigurationsOperations', + 'ActiveSecurityAdminRulesOperations', + 'ActiveSecurityUserRulesOperations', + 'ConnectivityConfigurationsOperations', + 'EffectiveConnectivityConfigurationsOperations', + 'NetworkManagerEffectiveSecurityAdminRulesOperations', + 'NetworkGroupsOperations', + 'SecurityUserConfigurationsOperations', + 'UserRuleCollectionsOperations', + 'UserRulesOperations', + 'SecurityAdminConfigurationsOperations', + 'AdminRuleCollectionsOperations', + 'AdminRulesOperations', + 'NetworkSecurityPerimetersOperations', + 'PerimeterAssociableResourceTypesOperations', +] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_connectivity_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_connectivity_configurations_operations.py new file mode 100644 index 000000000000..b3cccd8ae216 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_connectivity_configurations_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ActiveConnectivityConfigurationsOperations(object): + """ActiveConnectivityConfigurationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + parameters, # type: "_models.ActiveConfigurationParameter" + **kwargs # type: Any + ): + # type: (...) -> "_models.ActiveConnectivityConfigurationsListResult" + """Lists active connectivity configurations in a network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Active Configuration Parameter. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveConfigurationParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActiveConnectivityConfigurationsListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveConnectivityConfigurationsListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActiveConnectivityConfigurationsListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ActiveConfigurationParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ActiveConnectivityConfigurationsListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listActiveConnectivityConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_security_admin_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_security_admin_rules_operations.py new file mode 100644 index 000000000000..cfc78b9b64f6 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_security_admin_rules_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ActiveSecurityAdminRulesOperations(object): + """ActiveSecurityAdminRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + parameters, # type: "_models.ActiveConfigurationParameter" + **kwargs # type: Any + ): + # type: (...) -> "_models.ActiveSecurityAdminRulesListResult" + """Lists active security admin rules in a network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Active Configuration Parameter. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveConfigurationParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActiveSecurityAdminRulesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveSecurityAdminRulesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActiveSecurityAdminRulesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ActiveConfigurationParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ActiveSecurityAdminRulesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listActiveSecurityAdminRules'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_security_user_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_security_user_rules_operations.py new file mode 100644 index 000000000000..c50c995dd9f2 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_security_user_rules_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ActiveSecurityUserRulesOperations(object): + """ActiveSecurityUserRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + parameters, # type: "_models.ActiveConfigurationParameter" + **kwargs # type: Any + ): + # type: (...) -> "_models.ActiveSecurityUserRulesListResult" + """Lists Active Security User Rules in a network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Active Configuration Parameter. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveConfigurationParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActiveSecurityUserRulesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveSecurityUserRulesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActiveSecurityUserRulesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ActiveConfigurationParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ActiveSecurityUserRulesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listActiveSecurityUserRules'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_admin_rule_collections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_admin_rule_collections_operations.py new file mode 100644 index 000000000000..752c53b39f4e --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_admin_rule_collections_operations.py @@ -0,0 +1,351 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class AdminRuleCollectionsOperations(object): + """AdminRuleCollectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.RuleCollectionListResult"] + """Lists all the rule collections in a security admin configuration, in a paginated format. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RuleCollectionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.RuleCollectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('RuleCollectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections'} # type: ignore + + def get( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RuleCollection" + """Gets a network manager security admin configuration rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RuleCollection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + rule_collection, # type: "_models.RuleCollection" + **kwargs # type: Any + ): + # type: (...) -> "_models.RuleCollection" + """Creates or updates an admin rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_collection: The Rule Collection to create or update. + :type rule_collection: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RuleCollection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(rule_collection, 'RuleCollection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes an admin rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_admin_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_admin_rules_operations.py new file mode 100644 index 000000000000..a0d26b49613c --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_admin_rules_operations.py @@ -0,0 +1,368 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class AdminRulesOperations(object): + """AdminRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AdminRuleListResult"] + """List all network manager security configuration admin rules. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AdminRuleListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.AdminRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AdminRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AdminRuleListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules'} # type: ignore + + def get( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.BaseAdminRule" + """Gets a network manager security configuration admin rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseAdminRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.BaseAdminRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseAdminRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BaseAdminRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + rule_name, # type: str + admin_rule, # type: "_models.BaseAdminRule" + **kwargs # type: Any + ): + # type: (...) -> "_models.BaseAdminRule" + """Creates or updates an admin rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param admin_rule: The admin rule to create or update. + :type admin_rule: ~azure.mgmt.network.v2021_02_01_preview.models.BaseAdminRule + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseAdminRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.BaseAdminRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseAdminRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(admin_rule, 'BaseAdminRule') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BaseAdminRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BaseAdminRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes an admin rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_connectivity_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_connectivity_configurations_operations.py new file mode 100644 index 000000000000..64f3fec527a3 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_connectivity_configurations_operations.py @@ -0,0 +1,335 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ConnectivityConfigurationsOperations(object): + """ConnectivityConfigurationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ConnectivityConfiguration" + """Gets a Network Connectivity Configuration, specified by the resource group, network manager + name, and connectivity Configuration name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager connectivity configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectivityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectivityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + connectivity_configuration, # type: "_models.ConnectivityConfiguration" + **kwargs # type: Any + ): + # type: (...) -> "_models.ConnectivityConfiguration" + """Creates/Updates a new network manager connectivity configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager connectivity configuration. + :type configuration_name: str + :param connectivity_configuration: Parameters supplied to create/update a network manager + connectivity configuration. + :type connectivity_configuration: ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectivityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connectivity_configuration, 'ConnectivityConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConnectivityConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ConnectivityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a network manager connectivity configuration, specified by the resource group, network + manager name, and connectivity configuration name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager connectivity configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ConnectivityConfigurationListResult"] + """Lists all the network manager connectivity configuration in a specified network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ConnectivityConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ConnectivityConfigurationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_effective_connectivity_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_effective_connectivity_configurations_operations.py new file mode 100644 index 000000000000..df94773153e0 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_effective_connectivity_configurations_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class EffectiveConnectivityConfigurationsOperations(object): + """EffectiveConnectivityConfigurationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + virtual_network_name, # type: str + parameters, # type: "_models.QueryRequestOptions" + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkManagerEffectiveConnectivityConfigurationListResult" + """List all effective connectivity configurations applied on a virtual network. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param parameters: Parameters supplied to list correct page. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.QueryRequestOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManagerEffectiveConnectivityConfigurationListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerEffectiveConnectivityConfigurationListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerEffectiveConnectivityConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'QueryRequestOptions') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManagerEffectiveConnectivityConfigurationListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listNetworkManagerEffectiveConnectivityConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_effective_virtual_networks_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_effective_virtual_networks_operations.py new file mode 100644 index 000000000000..6d438d765388 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_effective_virtual_networks_operations.py @@ -0,0 +1,196 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class EffectiveVirtualNetworksOperations(object): + """EffectiveVirtualNetworksOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_network_manager( + self, + resource_group_name, # type: str + network_manager_name, # type: str + parameters, # type: "_models.EffectiveVirtualNetworksParameter" + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.EffectiveVirtualNetworksListResult" + """List effective virtual networks in a network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Effective Virtual Networks Parameter. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveVirtualNetworksParameter + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EffectiveVirtualNetworksListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveVirtualNetworksListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EffectiveVirtualNetworksListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list_by_network_manager.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'EffectiveVirtualNetworksParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EffectiveVirtualNetworksListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_network_manager.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listEffectiveVirtualNetworks'} # type: ignore + + def list_by_network_group( + self, + resource_group_name, # type: str + network_manager_name, # type: str + network_group_name, # type: str + parameters, # type: "_models.QueryRequestOptions" + **kwargs # type: Any + ): + # type: (...) -> "_models.EffectiveVirtualNetworksListResult" + """Lists all effective virtual networks by specified network group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param network_group_name: The name of the network group to get. + :type network_group_name: str + :param parameters: Parameters supplied to list correct page. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.QueryRequestOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EffectiveVirtualNetworksListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveVirtualNetworksListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EffectiveVirtualNetworksListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list_by_network_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'networkGroupName': self._serialize.url("network_group_name", network_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'QueryRequestOptions') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EffectiveVirtualNetworksListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_network_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/listEffectiveVirtualNetworks'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_groups_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_groups_operations.py new file mode 100644 index 000000000000..7a079d7d3a60 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_groups_operations.py @@ -0,0 +1,342 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class NetworkGroupsOperations(object): + """NetworkGroupsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + network_manager_name, # type: str + network_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkGroup" + """Gets the specified network group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param network_group_name: The name of the network group to get. + :type network_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'networkGroupName': self._serialize.url("network_group_name", network_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_manager_name, # type: str + network_group_name, # type: str + parameters, # type: "_models.NetworkGroup" + if_match=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkGroup" + """Creates or updates a network group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param network_group_name: The name of the network group to get. + :type network_group_name: str + :param parameters: Parameters supplied to the specify which network group need to create. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkGroup + :param if_match: The ETag of the transformation. Omit this value to always overwrite the + current resource. Specify the last-seen ETag value to prevent accidentally overwriting + concurrent changes. + :type if_match: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'networkGroupName': self._serialize.url("network_group_name", network_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkGroup') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) + deserialized = self._deserialize('NetworkGroup', pipeline_response) + + if response.status_code == 201: + response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) + deserialized = self._deserialize('NetworkGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + network_manager_name, # type: str + network_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a network group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param network_group_name: The name of the network group to get. + :type network_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'networkGroupName': self._serialize.url("network_group_name", network_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NetworkGroupListResult"] + """Lists the specified network group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkGroupListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.NetworkGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkGroupListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_commits_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_commits_operations.py new file mode 100644 index 000000000000..1c68982adfe4 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_commits_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class NetworkManagerCommitsOperations(object): + """NetworkManagerCommitsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def post( + self, + resource_group_name, # type: str + network_manager_name, # type: str + parameters, # type: "_models.NetworkManagerCommit" + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkManagerCommit" + """Post a Network Manager Commit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Parameters supplied to specify which Managed Network commit is. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerCommit + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManagerCommit, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerCommit + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerCommit"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.post.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkManagerCommit') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManagerCommit', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/commit'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_deployment_status_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_deployment_status_operations.py new file mode 100644 index 000000000000..76556a8b989d --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_deployment_status_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class NetworkManagerDeploymentStatusOperations(object): + """NetworkManagerDeploymentStatusOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + parameters, # type: "_models.NetworkManagerDeploymentStatusParameter" + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkManagerDeploymentStatusListResult" + """Post to List of Network Manager Deployment Status. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Parameters supplied to specify which Managed Network deployment status is. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerDeploymentStatusParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManagerDeploymentStatusListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerDeploymentStatusListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerDeploymentStatusListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkManagerDeploymentStatusParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManagerDeploymentStatusListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listDeploymentStatus'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_effective_security_admin_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_effective_security_admin_rules_operations.py new file mode 100644 index 000000000000..4305b69c894c --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_effective_security_admin_rules_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class NetworkManagerEffectiveSecurityAdminRulesOperations(object): + """NetworkManagerEffectiveSecurityAdminRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + virtual_network_name, # type: str + parameters, # type: "_models.QueryRequestOptions" + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkManagerEffectiveSecurityAdminRulesListResult" + """List all effective security admin rules applied on a virtual network. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param parameters: Parameters supplied to list correct page. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.QueryRequestOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManagerEffectiveSecurityAdminRulesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerEffectiveSecurityAdminRulesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerEffectiveSecurityAdminRulesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'QueryRequestOptions') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManagerEffectiveSecurityAdminRulesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listNetworkManagerEffectiveSecurityAdminRules'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_managers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_managers_operations.py new file mode 100644 index 000000000000..0174d552e5f6 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_managers_operations.py @@ -0,0 +1,463 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class NetworkManagersOperations(object): + """NetworkManagersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + network_manager_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkManager" + """Gets the specified Network Manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManager, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManager + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManager"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManager', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_manager_name, # type: str + parameters, # type: "_models.NetworkManager" + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkManager" + """Creates or updates a Network Manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Parameters supplied to specify which network manager is. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManager + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManager, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManager + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManager"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkManager') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkManager', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkManager', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + network_manager_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}'} # type: ignore + + def patch_tags( + self, + resource_group_name, # type: str + network_manager_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkManager" + """Patch a NetworkManager Tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Parameters supplied to update network manager tags. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManager, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManager + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManager"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.patch_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManager', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + patch_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}'} # type: ignore + + def list_by_subscription( + self, + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NetworkManagerListResult"] + """List all network managers in a subscription. + + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkManagerListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkManagerListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagers'} # type: ignore + + def list( + self, + resource_group_name, # type: str + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NetworkManagerListResult"] + """List network managers in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkManagerListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkManagerListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_security_perimeters_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_security_perimeters_operations.py new file mode 100644 index 000000000000..5a3be1c8dea9 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_security_perimeters_operations.py @@ -0,0 +1,396 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class NetworkSecurityPerimetersOperations(object): + """NetworkSecurityPerimetersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + network_security_perimeter_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkSecurityPerimeter" + """Gets the specified network security perimeter by the name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_perimeter_name: The name of the network security perimeter. + :type network_security_perimeter_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkSecurityPerimeter, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeter + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityPerimeter"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkSecurityPerimeterName': self._serialize.url("network_security_perimeter_name", network_security_perimeter_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkSecurityPerimeter', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_security_perimeter_name, # type: str + parameters, # type: "_models.NetworkSecurityPerimeter" + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkSecurityPerimeter" + """Creates or updates a Network Security Perimeter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_perimeter_name: The name of the network security perimeter. + :type network_security_perimeter_name: str + :param parameters: Parameter supplied to create or update the network security perimeter. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkSecurityPerimeter, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeter + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityPerimeter"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkSecurityPerimeterName': self._serialize.url("network_security_perimeter_name", network_security_perimeter_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkSecurityPerimeter') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkSecurityPerimeter', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkSecurityPerimeter', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + network_security_perimeter_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a network security perimeter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_perimeter_name: The name of the network security perimeter. + :type network_security_perimeter_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkSecurityPerimeterName': self._serialize.url("network_security_perimeter_name", network_security_perimeter_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}'} # type: ignore + + def list_by_subscription( + self, + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NetworkSecurityPerimeterListResult"] + """List all network security perimeters in a subscription. + + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkSecurityPerimeterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityPerimeterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkSecurityPerimeterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityPerimeters'} # type: ignore + + def list( + self, + resource_group_name, # type: str + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NetworkSecurityPerimeterListResult"] + """List network security perimeters in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkSecurityPerimeterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityPerimeterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkSecurityPerimeterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_perimeter_associable_resource_types_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_perimeter_associable_resource_types_operations.py new file mode 100644 index 000000000000..80c30a1f6355 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_perimeter_associable_resource_types_operations.py @@ -0,0 +1,101 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PerimeterAssociableResourceTypesOperations(object): + """PerimeterAssociableResourceTypesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PerimeterAssociableResourcesListResult" + """Gets the list of resources that are onboarded with NSP. These resources can be associated with + a network security perimeter. + + :param location: The location of the where the association is present. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PerimeterAssociableResourcesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.PerimeterAssociableResourcesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerimeterAssociableResourcesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PerimeterAssociableResourcesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/perimeterAssociableResourceTypes'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_security_admin_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_security_admin_configurations_operations.py new file mode 100644 index 000000000000..ba11d9a55e7e --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_security_admin_configurations_operations.py @@ -0,0 +1,333 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class SecurityAdminConfigurationsOperations(object): + """SecurityAdminConfigurationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SecurityConfigurationListResult"] + """Lists all the network manager security admin configurations in a network manager, in a + paginated format. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SecurityConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SecurityConfigurationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations'} # type: ignore + + def get( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SecurityConfiguration" + """Retrieves a network manager security admin configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + security_admin_configuration, # type: "_models.SecurityConfiguration" + **kwargs # type: Any + ): + # type: (...) -> "_models.SecurityConfiguration" + """Creates or updates a network manager security admin configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param security_admin_configuration: The security admin configuration to create or update. + :type security_admin_configuration: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(security_admin_configuration, 'SecurityConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a network manager security admin configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_security_user_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_security_user_configurations_operations.py new file mode 100644 index 000000000000..b3befcb62c6c --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_security_user_configurations_operations.py @@ -0,0 +1,333 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class SecurityUserConfigurationsOperations(object): + """SecurityUserConfigurationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SecurityConfigurationListResult"] + """Lists all the network manager security user configurations in a network manager, in a paginated + format. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SecurityConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SecurityConfigurationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations'} # type: ignore + + def get( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SecurityConfiguration" + """Retrieves a network manager security user configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + security_user_configuration, # type: "_models.SecurityConfiguration" + **kwargs # type: Any + ): + # type: (...) -> "_models.SecurityConfiguration" + """Creates or updates a network manager security user configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param security_user_configuration: The security user configuration to create or update. + :type security_user_configuration: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(security_user_configuration, 'SecurityConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a network manager security user configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_user_rule_collections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_user_rule_collections_operations.py new file mode 100644 index 000000000000..a0b0d83a4855 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_user_rule_collections_operations.py @@ -0,0 +1,351 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class UserRuleCollectionsOperations(object): + """UserRuleCollectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.RuleCollectionListResult"] + """Lists all the user rule collections in a security configuration, in a paginated format. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RuleCollectionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.RuleCollectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('RuleCollectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections'} # type: ignore + + def get( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RuleCollection" + """Gets a network manager security user configuration rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RuleCollection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + user_rule_collection, # type: "_models.RuleCollection" + **kwargs # type: Any + ): + # type: (...) -> "_models.RuleCollection" + """Creates or updates a user rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param user_rule_collection: The User Rule Collection to create or update. + :type user_rule_collection: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RuleCollection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(user_rule_collection, 'RuleCollection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a user rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_user_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_user_rules_operations.py new file mode 100644 index 000000000000..8d787a37c8e1 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_user_rules_operations.py @@ -0,0 +1,368 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class UserRulesOperations(object): + """UserRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.UserRuleListResult"] + """Lists all user rules in a rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UserRuleListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.UserRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UserRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('UserRuleListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules'} # type: ignore + + def get( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.BaseUserRule" + """Gets a user rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseUserRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.BaseUserRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseUserRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BaseUserRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + rule_name, # type: str + user_rule, # type: "_models.BaseUserRule" + **kwargs # type: Any + ): + # type: (...) -> "_models.BaseUserRule" + """Creates or updates a user rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param user_rule: The user rule to create or update. + :type user_rule: ~azure.mgmt.network.v2021_02_01_preview.models.BaseUserRule + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseUserRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.BaseUserRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseUserRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(user_rule, 'BaseUserRule') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BaseUserRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BaseUserRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a user rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/py.typed b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_03_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_03_01/_version.py index 5bd246a15fc6..e5754a47ce68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_03_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "1.0.0b1"