From b04b672b45ca682dda8f0bbb22fa4f620c3b7107 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 6 Apr 2018 23:18:58 +0000 Subject: [PATCH 1/2] Generated from a9c23699751feeec69e262eca9d20c7b3954b1bc Add Local and Virtual Gateway Examples --- .../network/v2018_02_01/models/__init__.py | 29 ++- .../v2018_02_01/models/ipsec_policy.py | 10 +- .../v2018_02_01/models/ipsec_policy_py3.py | 10 +- .../models/network_management_client_enums.py | 80 ++++--- .../models/vpn_client_configuration.py | 6 - .../models/vpn_client_configuration_py3.py | 8 +- .../models/vpn_client_ipsec_parameters.py | 87 -------- .../models/vpn_client_ipsec_parameters_py3.py | 87 -------- .../virtual_network_gateways_operations.py | 203 ------------------ 9 files changed, 59 insertions(+), 461 deletions(-) delete mode 100644 azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_ipsec_parameters.py delete mode 100644 azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_ipsec_parameters_py3.py diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/__init__.py b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/__init__.py index ff1a5ebc2576..685b671dec1b 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/__init__.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/__init__.py @@ -184,7 +184,6 @@ from .virtual_network_gateway_sku_py3 import VirtualNetworkGatewaySku from .vpn_client_root_certificate_py3 import VpnClientRootCertificate from .vpn_client_revoked_certificate_py3 import VpnClientRevokedCertificate - from .ipsec_policy_py3 import IpsecPolicy from .vpn_client_configuration_py3 import VpnClientConfiguration from .bgp_settings_py3 import BgpSettings from .bgp_peer_status_py3 import BgpPeerStatus @@ -195,10 +194,10 @@ from .gateway_route_list_result_py3 import GatewayRouteListResult from .tunnel_connection_health_py3 import TunnelConnectionHealth from .local_network_gateway_py3 import LocalNetworkGateway + from .ipsec_policy_py3 import IpsecPolicy from .virtual_network_gateway_connection_py3 import VirtualNetworkGatewayConnection from .connection_reset_shared_key_py3 import ConnectionResetSharedKey from .connection_shared_key_py3 import ConnectionSharedKey - from .vpn_client_ipsec_parameters_py3 import VpnClientIPsecParameters from .virtual_network_connection_gateway_reference_py3 import VirtualNetworkConnectionGatewayReference from .virtual_network_gateway_connection_list_entity_py3 import VirtualNetworkGatewayConnectionListEntity from .vpn_device_script_parameters_py3 import VpnDeviceScriptParameters @@ -377,7 +376,6 @@ from .virtual_network_gateway_sku import VirtualNetworkGatewaySku from .vpn_client_root_certificate import VpnClientRootCertificate from .vpn_client_revoked_certificate import VpnClientRevokedCertificate - from .ipsec_policy import IpsecPolicy from .vpn_client_configuration import VpnClientConfiguration from .bgp_settings import BgpSettings from .bgp_peer_status import BgpPeerStatus @@ -388,10 +386,10 @@ from .gateway_route_list_result import GatewayRouteListResult from .tunnel_connection_health import TunnelConnectionHealth from .local_network_gateway import LocalNetworkGateway + from .ipsec_policy import IpsecPolicy from .virtual_network_gateway_connection import VirtualNetworkGatewayConnection from .connection_reset_shared_key import ConnectionResetSharedKey from .connection_shared_key import ConnectionSharedKey - from .vpn_client_ipsec_parameters import VpnClientIPsecParameters from .virtual_network_connection_gateway_reference import VirtualNetworkConnectionGatewayReference from .virtual_network_gateway_connection_list_entity import VirtualNetworkGatewayConnectionListEntity from .vpn_device_script_parameters import VpnDeviceScriptParameters @@ -497,17 +495,17 @@ VirtualNetworkGatewaySkuName, VirtualNetworkGatewaySkuTier, VpnClientProtocol, + BgpPeerState, + ProcessorArchitecture, + AuthenticationMethod, + VirtualNetworkGatewayConnectionStatus, + VirtualNetworkGatewayConnectionType, IpsecEncryption, IpsecIntegrity, IkeEncryption, IkeIntegrity, DhGroup, PfsGroup, - BgpPeerState, - ProcessorArchitecture, - AuthenticationMethod, - VirtualNetworkGatewayConnectionStatus, - VirtualNetworkGatewayConnectionType, ) __all__ = [ @@ -685,7 +683,6 @@ 'VirtualNetworkGatewaySku', 'VpnClientRootCertificate', 'VpnClientRevokedCertificate', - 'IpsecPolicy', 'VpnClientConfiguration', 'BgpSettings', 'BgpPeerStatus', @@ -696,10 +693,10 @@ 'GatewayRouteListResult', 'TunnelConnectionHealth', 'LocalNetworkGateway', + 'IpsecPolicy', 'VirtualNetworkGatewayConnection', 'ConnectionResetSharedKey', 'ConnectionSharedKey', - 'VpnClientIPsecParameters', 'VirtualNetworkConnectionGatewayReference', 'VirtualNetworkGatewayConnectionListEntity', 'VpnDeviceScriptParameters', @@ -804,15 +801,15 @@ 'VirtualNetworkGatewaySkuName', 'VirtualNetworkGatewaySkuTier', 'VpnClientProtocol', + 'BgpPeerState', + 'ProcessorArchitecture', + 'AuthenticationMethod', + 'VirtualNetworkGatewayConnectionStatus', + 'VirtualNetworkGatewayConnectionType', 'IpsecEncryption', 'IpsecIntegrity', 'IkeEncryption', 'IkeIntegrity', 'DhGroup', 'PfsGroup', - 'BgpPeerState', - 'ProcessorArchitecture', - 'AuthenticationMethod', - 'VirtualNetworkGatewayConnectionStatus', - 'VirtualNetworkGatewayConnectionType', ] diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/ipsec_policy.py b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/ipsec_policy.py index 501fe5494918..4a43edf62496 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/ipsec_policy.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/ipsec_policy.py @@ -36,22 +36,20 @@ class IpsecPolicy(Model): :type ipsec_integrity: str or ~azure.mgmt.network.v2018_02_01.models.IpsecIntegrity :param ike_encryption: Required. The IKE encryption algorithm (IKE phase - 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', - 'GCMAES256', 'GCMAES128' + 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256' :type ike_encryption: str or ~azure.mgmt.network.v2018_02_01.models.IkeEncryption :param ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). - Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', - 'GCMAES128' + Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384' :type ike_integrity: str or ~azure.mgmt.network.v2018_02_01.models.IkeIntegrity :param dh_group: Required. The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' :type dh_group: str or ~azure.mgmt.network.v2018_02_01.models.DhGroup - :param pfs_group: Required. The Pfs Groups used in IKE Phase 2 for new + :param pfs_group: Required. The DH Groups used in IKE Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', - 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM' + 'ECP256', 'ECP384', 'PFS24' :type pfs_group: str or ~azure.mgmt.network.v2018_02_01.models.PfsGroup """ diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/ipsec_policy_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/ipsec_policy_py3.py index a20af51677e6..affcb6280ac1 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/ipsec_policy_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/ipsec_policy_py3.py @@ -36,22 +36,20 @@ class IpsecPolicy(Model): :type ipsec_integrity: str or ~azure.mgmt.network.v2018_02_01.models.IpsecIntegrity :param ike_encryption: Required. The IKE encryption algorithm (IKE phase - 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', - 'GCMAES256', 'GCMAES128' + 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256' :type ike_encryption: str or ~azure.mgmt.network.v2018_02_01.models.IkeEncryption :param ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). - Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', - 'GCMAES128' + Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384' :type ike_integrity: str or ~azure.mgmt.network.v2018_02_01.models.IkeIntegrity :param dh_group: Required. The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' :type dh_group: str or ~azure.mgmt.network.v2018_02_01.models.DhGroup - :param pfs_group: Required. The Pfs Groups used in IKE Phase 2 for new + :param pfs_group: Required. The DH Groups used in IKE Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', - 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM' + 'ECP256', 'ECP384', 'PFS24' :type pfs_group: str or ~azure.mgmt.network.v2018_02_01.models.PfsGroup """ diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/network_management_client_enums.py b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/network_management_client_enums.py index 0e20d24072aa..6d25cdc6121d 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/network_management_client_enums.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/network_management_client_enums.py @@ -467,6 +467,43 @@ class VpnClientProtocol(str, Enum): sstp = "SSTP" +class BgpPeerState(str, Enum): + + unknown = "Unknown" + stopped = "Stopped" + idle = "Idle" + connecting = "Connecting" + connected = "Connected" + + +class ProcessorArchitecture(str, Enum): + + amd64 = "Amd64" + x86 = "X86" + + +class AuthenticationMethod(str, Enum): + + eaptls = "EAPTLS" + eapmscha_pv2 = "EAPMSCHAPv2" + + +class VirtualNetworkGatewayConnectionStatus(str, Enum): + + unknown = "Unknown" + connecting = "Connecting" + connected = "Connected" + not_connected = "NotConnected" + + +class VirtualNetworkGatewayConnectionType(str, Enum): + + ipsec = "IPsec" + vnet2_vnet = "Vnet2Vnet" + express_route = "ExpressRoute" + vpn_client = "VPNClient" + + class IpsecEncryption(str, Enum): none = "None" @@ -497,8 +534,6 @@ class IkeEncryption(str, Enum): aes128 = "AES128" aes192 = "AES192" aes256 = "AES256" - gcmaes256 = "GCMAES256" - gcmaes128 = "GCMAES128" class IkeIntegrity(str, Enum): @@ -507,8 +542,6 @@ class IkeIntegrity(str, Enum): sha1 = "SHA1" sha256 = "SHA256" sha384 = "SHA384" - gcmaes256 = "GCMAES256" - gcmaes128 = "GCMAES128" class DhGroup(str, Enum): @@ -532,42 +565,3 @@ class PfsGroup(str, Enum): ecp256 = "ECP256" ecp384 = "ECP384" pfs24 = "PFS24" - pfs14 = "PFS14" - pfsmm = "PFSMM" - - -class BgpPeerState(str, Enum): - - unknown = "Unknown" - stopped = "Stopped" - idle = "Idle" - connecting = "Connecting" - connected = "Connected" - - -class ProcessorArchitecture(str, Enum): - - amd64 = "Amd64" - x86 = "X86" - - -class AuthenticationMethod(str, Enum): - - eaptls = "EAPTLS" - eapmscha_pv2 = "EAPMSCHAPv2" - - -class VirtualNetworkGatewayConnectionStatus(str, Enum): - - unknown = "Unknown" - connecting = "Connecting" - connected = "Connected" - not_connected = "NotConnected" - - -class VirtualNetworkGatewayConnectionType(str, Enum): - - ipsec = "IPsec" - vnet2_vnet = "Vnet2Vnet" - express_route = "ExpressRoute" - vpn_client = "VPNClient" diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_configuration.py b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_configuration.py index 4f174e544330..79c66e855270 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_configuration.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_configuration.py @@ -31,10 +31,6 @@ class VpnClientConfiguration(Model): gateway. :type vpn_client_protocols: list[str or ~azure.mgmt.network.v2018_02_01.models.VpnClientProtocol] - :param vpn_client_ipsec_policies: VpnClientIpsecPolicies for virtual - network gateway P2S client. - :type vpn_client_ipsec_policies: - list[~azure.mgmt.network.v2018_02_01.models.IpsecPolicy] :param radius_server_address: The radius server address property of the VirtualNetworkGateway resource for vpn client connection. :type radius_server_address: str @@ -48,7 +44,6 @@ class VpnClientConfiguration(Model): 'vpn_client_root_certificates': {'key': 'vpnClientRootCertificates', 'type': '[VpnClientRootCertificate]'}, 'vpn_client_revoked_certificates': {'key': 'vpnClientRevokedCertificates', 'type': '[VpnClientRevokedCertificate]'}, 'vpn_client_protocols': {'key': 'vpnClientProtocols', 'type': '[str]'}, - 'vpn_client_ipsec_policies': {'key': 'vpnClientIpsecPolicies', 'type': '[IpsecPolicy]'}, 'radius_server_address': {'key': 'radiusServerAddress', 'type': 'str'}, 'radius_server_secret': {'key': 'radiusServerSecret', 'type': 'str'}, } @@ -59,6 +54,5 @@ def __init__(self, **kwargs): self.vpn_client_root_certificates = kwargs.get('vpn_client_root_certificates', None) self.vpn_client_revoked_certificates = kwargs.get('vpn_client_revoked_certificates', None) self.vpn_client_protocols = kwargs.get('vpn_client_protocols', None) - self.vpn_client_ipsec_policies = kwargs.get('vpn_client_ipsec_policies', None) self.radius_server_address = kwargs.get('radius_server_address', None) self.radius_server_secret = kwargs.get('radius_server_secret', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_configuration_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_configuration_py3.py index 2d605a54a657..4428e35ba848 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_configuration_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_configuration_py3.py @@ -31,10 +31,6 @@ class VpnClientConfiguration(Model): gateway. :type vpn_client_protocols: list[str or ~azure.mgmt.network.v2018_02_01.models.VpnClientProtocol] - :param vpn_client_ipsec_policies: VpnClientIpsecPolicies for virtual - network gateway P2S client. - :type vpn_client_ipsec_policies: - list[~azure.mgmt.network.v2018_02_01.models.IpsecPolicy] :param radius_server_address: The radius server address property of the VirtualNetworkGateway resource for vpn client connection. :type radius_server_address: str @@ -48,17 +44,15 @@ class VpnClientConfiguration(Model): 'vpn_client_root_certificates': {'key': 'vpnClientRootCertificates', 'type': '[VpnClientRootCertificate]'}, 'vpn_client_revoked_certificates': {'key': 'vpnClientRevokedCertificates', 'type': '[VpnClientRevokedCertificate]'}, 'vpn_client_protocols': {'key': 'vpnClientProtocols', 'type': '[str]'}, - 'vpn_client_ipsec_policies': {'key': 'vpnClientIpsecPolicies', 'type': '[IpsecPolicy]'}, 'radius_server_address': {'key': 'radiusServerAddress', 'type': 'str'}, 'radius_server_secret': {'key': 'radiusServerSecret', 'type': 'str'}, } - def __init__(self, *, vpn_client_address_pool=None, vpn_client_root_certificates=None, vpn_client_revoked_certificates=None, vpn_client_protocols=None, vpn_client_ipsec_policies=None, radius_server_address: str=None, radius_server_secret: str=None, **kwargs) -> None: + def __init__(self, *, vpn_client_address_pool=None, vpn_client_root_certificates=None, vpn_client_revoked_certificates=None, vpn_client_protocols=None, radius_server_address: str=None, radius_server_secret: str=None, **kwargs) -> None: super(VpnClientConfiguration, self).__init__(**kwargs) self.vpn_client_address_pool = vpn_client_address_pool self.vpn_client_root_certificates = vpn_client_root_certificates self.vpn_client_revoked_certificates = vpn_client_revoked_certificates self.vpn_client_protocols = vpn_client_protocols - self.vpn_client_ipsec_policies = vpn_client_ipsec_policies self.radius_server_address = radius_server_address self.radius_server_secret = radius_server_secret diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_ipsec_parameters.py b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_ipsec_parameters.py deleted file mode 100644 index c12b4454a2c8..000000000000 --- a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_ipsec_parameters.py +++ /dev/null @@ -1,87 +0,0 @@ -# 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 msrest.serialization import Model - - -class VpnClientIPsecParameters(Model): - """An IPSec parameters for a virtual network gateway P2S connection. - - All required parameters must be populated in order to send to Azure. - - :param sa_life_time_seconds: Required. The IPSec Security Association - (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. - :type sa_life_time_seconds: int - :param sa_data_size_kilobytes: Required. The IPSec Security Association - (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. - :type sa_data_size_kilobytes: int - :param ipsec_encryption: Required. The IPSec encryption algorithm (IKE - phase 1). Possible values include: 'None', 'DES', 'DES3', 'AES128', - 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256' - :type ipsec_encryption: str or - ~azure.mgmt.network.v2018_02_01.models.IpsecEncryption - :param ipsec_integrity: Required. The IPSec integrity algorithm (IKE phase - 1). Possible values include: 'MD5', 'SHA1', 'SHA256', 'GCMAES128', - 'GCMAES192', 'GCMAES256' - :type ipsec_integrity: str or - ~azure.mgmt.network.v2018_02_01.models.IpsecIntegrity - :param ike_encryption: Required. The IKE encryption algorithm (IKE phase - 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', - 'GCMAES256', 'GCMAES128' - :type ike_encryption: str or - ~azure.mgmt.network.v2018_02_01.models.IkeEncryption - :param ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). - Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', - 'GCMAES128' - :type ike_integrity: str or - ~azure.mgmt.network.v2018_02_01.models.IkeIntegrity - :param dh_group: Required. The DH Groups used in IKE Phase 1 for initial - SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', - 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' - :type dh_group: str or ~azure.mgmt.network.v2018_02_01.models.DhGroup - :param pfs_group: Required. The Pfs Groups used in IKE Phase 2 for new - child SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', - 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM' - :type pfs_group: str or ~azure.mgmt.network.v2018_02_01.models.PfsGroup - """ - - _validation = { - 'sa_life_time_seconds': {'required': True}, - 'sa_data_size_kilobytes': {'required': True}, - 'ipsec_encryption': {'required': True}, - 'ipsec_integrity': {'required': True}, - 'ike_encryption': {'required': True}, - 'ike_integrity': {'required': True}, - 'dh_group': {'required': True}, - 'pfs_group': {'required': True}, - } - - _attribute_map = { - 'sa_life_time_seconds': {'key': 'saLifeTimeSeconds', 'type': 'int'}, - 'sa_data_size_kilobytes': {'key': 'saDataSizeKilobytes', 'type': 'int'}, - 'ipsec_encryption': {'key': 'ipsecEncryption', 'type': 'str'}, - 'ipsec_integrity': {'key': 'ipsecIntegrity', 'type': 'str'}, - 'ike_encryption': {'key': 'ikeEncryption', 'type': 'str'}, - 'ike_integrity': {'key': 'ikeIntegrity', 'type': 'str'}, - 'dh_group': {'key': 'dhGroup', 'type': 'str'}, - 'pfs_group': {'key': 'pfsGroup', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VpnClientIPsecParameters, self).__init__(**kwargs) - self.sa_life_time_seconds = kwargs.get('sa_life_time_seconds', None) - self.sa_data_size_kilobytes = kwargs.get('sa_data_size_kilobytes', None) - self.ipsec_encryption = kwargs.get('ipsec_encryption', None) - self.ipsec_integrity = kwargs.get('ipsec_integrity', None) - self.ike_encryption = kwargs.get('ike_encryption', None) - self.ike_integrity = kwargs.get('ike_integrity', None) - self.dh_group = kwargs.get('dh_group', None) - self.pfs_group = kwargs.get('pfs_group', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_ipsec_parameters_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_ipsec_parameters_py3.py deleted file mode 100644 index 723248b37de6..000000000000 --- a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_ipsec_parameters_py3.py +++ /dev/null @@ -1,87 +0,0 @@ -# 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 msrest.serialization import Model - - -class VpnClientIPsecParameters(Model): - """An IPSec parameters for a virtual network gateway P2S connection. - - All required parameters must be populated in order to send to Azure. - - :param sa_life_time_seconds: Required. The IPSec Security Association - (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. - :type sa_life_time_seconds: int - :param sa_data_size_kilobytes: Required. The IPSec Security Association - (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. - :type sa_data_size_kilobytes: int - :param ipsec_encryption: Required. The IPSec encryption algorithm (IKE - phase 1). Possible values include: 'None', 'DES', 'DES3', 'AES128', - 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256' - :type ipsec_encryption: str or - ~azure.mgmt.network.v2018_02_01.models.IpsecEncryption - :param ipsec_integrity: Required. The IPSec integrity algorithm (IKE phase - 1). Possible values include: 'MD5', 'SHA1', 'SHA256', 'GCMAES128', - 'GCMAES192', 'GCMAES256' - :type ipsec_integrity: str or - ~azure.mgmt.network.v2018_02_01.models.IpsecIntegrity - :param ike_encryption: Required. The IKE encryption algorithm (IKE phase - 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', - 'GCMAES256', 'GCMAES128' - :type ike_encryption: str or - ~azure.mgmt.network.v2018_02_01.models.IkeEncryption - :param ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). - Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', - 'GCMAES128' - :type ike_integrity: str or - ~azure.mgmt.network.v2018_02_01.models.IkeIntegrity - :param dh_group: Required. The DH Groups used in IKE Phase 1 for initial - SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', - 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' - :type dh_group: str or ~azure.mgmt.network.v2018_02_01.models.DhGroup - :param pfs_group: Required. The Pfs Groups used in IKE Phase 2 for new - child SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', - 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM' - :type pfs_group: str or ~azure.mgmt.network.v2018_02_01.models.PfsGroup - """ - - _validation = { - 'sa_life_time_seconds': {'required': True}, - 'sa_data_size_kilobytes': {'required': True}, - 'ipsec_encryption': {'required': True}, - 'ipsec_integrity': {'required': True}, - 'ike_encryption': {'required': True}, - 'ike_integrity': {'required': True}, - 'dh_group': {'required': True}, - 'pfs_group': {'required': True}, - } - - _attribute_map = { - 'sa_life_time_seconds': {'key': 'saLifeTimeSeconds', 'type': 'int'}, - 'sa_data_size_kilobytes': {'key': 'saDataSizeKilobytes', 'type': 'int'}, - 'ipsec_encryption': {'key': 'ipsecEncryption', 'type': 'str'}, - 'ipsec_integrity': {'key': 'ipsecIntegrity', 'type': 'str'}, - 'ike_encryption': {'key': 'ikeEncryption', 'type': 'str'}, - 'ike_integrity': {'key': 'ikeIntegrity', 'type': 'str'}, - 'dh_group': {'key': 'dhGroup', 'type': 'str'}, - 'pfs_group': {'key': 'pfsGroup', 'type': 'str'}, - } - - def __init__(self, *, sa_life_time_seconds: int, sa_data_size_kilobytes: int, ipsec_encryption, ipsec_integrity, ike_encryption, ike_integrity, dh_group, pfs_group, **kwargs) -> None: - super(VpnClientIPsecParameters, self).__init__(**kwargs) - self.sa_life_time_seconds = sa_life_time_seconds - self.sa_data_size_kilobytes = sa_data_size_kilobytes - self.ipsec_encryption = ipsec_encryption - self.ipsec_integrity = ipsec_integrity - self.ike_encryption = ike_encryption - self.ike_integrity = ike_integrity - self.dh_group = dh_group - self.pfs_group = pfs_group diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/operations/virtual_network_gateways_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/operations/virtual_network_gateways_operations.py index a43f209fc670..94863ea1f36c 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/operations/virtual_network_gateways_operations.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/operations/virtual_network_gateways_operations.py @@ -1288,209 +1288,6 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) get_advertised_routes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes'} - - def _set_vpnclient_ipsec_parameters_initial( - self, resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.set_vpnclient_ipsec_parameters.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - '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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vpnclient_ipsec_params, 'VpnClientIPsecParameters') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VpnClientIPsecParameters', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def set_vpnclient_ipsec_parameters( - self, resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers=None, raw=False, polling=True, **operation_config): - """The Set VpnclientIpsecParameters operation sets the vpnclient ipsec - policy for P2S client of virtual network gateway in the specified - resource group through Network resource provider. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network - gateway. - :type virtual_network_gateway_name: str - :param vpnclient_ipsec_params: Parameters supplied to the Begin Set - vpnclient ipsec parameters of Virtual Network Gateway P2S client - operation through Network resource provider. - :type vpnclient_ipsec_params: - ~azure.mgmt.network.v2018_02_01.models.VpnClientIPsecParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VpnClientIPsecParameters or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_02_01.models.VpnClientIPsecParameters] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_02_01.models.VpnClientIPsecParameters]] - :raises: :class:`CloudError` - """ - raw_result = self._set_vpnclient_ipsec_parameters_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - vpnclient_ipsec_params=vpnclient_ipsec_params, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VpnClientIPsecParameters', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - set_vpnclient_ipsec_parameters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters'} - - - def _get_vpnclient_ipsec_parameters_initial( - self, resource_group_name, virtual_network_gateway_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.get_vpnclient_ipsec_parameters.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - '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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VpnClientIPsecParameters', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def get_vpnclient_ipsec_parameters( - self, resource_group_name, virtual_network_gateway_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The Get VpnclientIpsecParameters operation retrieves information about - the vpnclient ipsec policy for P2S client of virtual network gateway in - the specified resource group through Network resource provider. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The virtual network gateway name. - :type virtual_network_gateway_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VpnClientIPsecParameters or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_02_01.models.VpnClientIPsecParameters] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_02_01.models.VpnClientIPsecParameters]] - :raises: :class:`CloudError` - """ - raw_result = self._get_vpnclient_ipsec_parameters_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VpnClientIPsecParameters', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - get_vpnclient_ipsec_parameters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters'} - def vpn_device_configuration_script( self, resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers=None, raw=False, **operation_config): """Gets a xml format representation for vpn device configuration script. From 159e6043923247a2c061ce843abd7bfc89708bb2 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 9 Apr 2018 23:19:31 +0000 Subject: [PATCH 2/2] Generated from 52569aaeeb6240d2e4597da6afc5faa2ce0c92df Added missing lines from 2018-02-01 to virtualNetworkGateway --- .../network/v2018_02_01/models/__init__.py | 29 +-- .../v2018_02_01/models/ipsec_policy.py | 10 +- .../v2018_02_01/models/ipsec_policy_py3.py | 10 +- .../models/network_management_client_enums.py | 80 +++---- .../models/vpn_client_configuration.py | 6 + .../models/vpn_client_configuration_py3.py | 8 +- .../models/vpn_client_ipsec_parameters.py | 87 ++++++++ .../models/vpn_client_ipsec_parameters_py3.py | 87 ++++++++ .../virtual_network_gateways_operations.py | 203 ++++++++++++++++++ 9 files changed, 461 insertions(+), 59 deletions(-) create mode 100644 azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_ipsec_parameters.py create mode 100644 azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_ipsec_parameters_py3.py diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/__init__.py b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/__init__.py index 685b671dec1b..ff1a5ebc2576 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/__init__.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/__init__.py @@ -184,6 +184,7 @@ from .virtual_network_gateway_sku_py3 import VirtualNetworkGatewaySku from .vpn_client_root_certificate_py3 import VpnClientRootCertificate from .vpn_client_revoked_certificate_py3 import VpnClientRevokedCertificate + from .ipsec_policy_py3 import IpsecPolicy from .vpn_client_configuration_py3 import VpnClientConfiguration from .bgp_settings_py3 import BgpSettings from .bgp_peer_status_py3 import BgpPeerStatus @@ -194,10 +195,10 @@ from .gateway_route_list_result_py3 import GatewayRouteListResult from .tunnel_connection_health_py3 import TunnelConnectionHealth from .local_network_gateway_py3 import LocalNetworkGateway - from .ipsec_policy_py3 import IpsecPolicy from .virtual_network_gateway_connection_py3 import VirtualNetworkGatewayConnection from .connection_reset_shared_key_py3 import ConnectionResetSharedKey from .connection_shared_key_py3 import ConnectionSharedKey + from .vpn_client_ipsec_parameters_py3 import VpnClientIPsecParameters from .virtual_network_connection_gateway_reference_py3 import VirtualNetworkConnectionGatewayReference from .virtual_network_gateway_connection_list_entity_py3 import VirtualNetworkGatewayConnectionListEntity from .vpn_device_script_parameters_py3 import VpnDeviceScriptParameters @@ -376,6 +377,7 @@ from .virtual_network_gateway_sku import VirtualNetworkGatewaySku from .vpn_client_root_certificate import VpnClientRootCertificate from .vpn_client_revoked_certificate import VpnClientRevokedCertificate + from .ipsec_policy import IpsecPolicy from .vpn_client_configuration import VpnClientConfiguration from .bgp_settings import BgpSettings from .bgp_peer_status import BgpPeerStatus @@ -386,10 +388,10 @@ from .gateway_route_list_result import GatewayRouteListResult from .tunnel_connection_health import TunnelConnectionHealth from .local_network_gateway import LocalNetworkGateway - from .ipsec_policy import IpsecPolicy from .virtual_network_gateway_connection import VirtualNetworkGatewayConnection from .connection_reset_shared_key import ConnectionResetSharedKey from .connection_shared_key import ConnectionSharedKey + from .vpn_client_ipsec_parameters import VpnClientIPsecParameters from .virtual_network_connection_gateway_reference import VirtualNetworkConnectionGatewayReference from .virtual_network_gateway_connection_list_entity import VirtualNetworkGatewayConnectionListEntity from .vpn_device_script_parameters import VpnDeviceScriptParameters @@ -495,17 +497,17 @@ VirtualNetworkGatewaySkuName, VirtualNetworkGatewaySkuTier, VpnClientProtocol, - BgpPeerState, - ProcessorArchitecture, - AuthenticationMethod, - VirtualNetworkGatewayConnectionStatus, - VirtualNetworkGatewayConnectionType, IpsecEncryption, IpsecIntegrity, IkeEncryption, IkeIntegrity, DhGroup, PfsGroup, + BgpPeerState, + ProcessorArchitecture, + AuthenticationMethod, + VirtualNetworkGatewayConnectionStatus, + VirtualNetworkGatewayConnectionType, ) __all__ = [ @@ -683,6 +685,7 @@ 'VirtualNetworkGatewaySku', 'VpnClientRootCertificate', 'VpnClientRevokedCertificate', + 'IpsecPolicy', 'VpnClientConfiguration', 'BgpSettings', 'BgpPeerStatus', @@ -693,10 +696,10 @@ 'GatewayRouteListResult', 'TunnelConnectionHealth', 'LocalNetworkGateway', - 'IpsecPolicy', 'VirtualNetworkGatewayConnection', 'ConnectionResetSharedKey', 'ConnectionSharedKey', + 'VpnClientIPsecParameters', 'VirtualNetworkConnectionGatewayReference', 'VirtualNetworkGatewayConnectionListEntity', 'VpnDeviceScriptParameters', @@ -801,15 +804,15 @@ 'VirtualNetworkGatewaySkuName', 'VirtualNetworkGatewaySkuTier', 'VpnClientProtocol', - 'BgpPeerState', - 'ProcessorArchitecture', - 'AuthenticationMethod', - 'VirtualNetworkGatewayConnectionStatus', - 'VirtualNetworkGatewayConnectionType', 'IpsecEncryption', 'IpsecIntegrity', 'IkeEncryption', 'IkeIntegrity', 'DhGroup', 'PfsGroup', + 'BgpPeerState', + 'ProcessorArchitecture', + 'AuthenticationMethod', + 'VirtualNetworkGatewayConnectionStatus', + 'VirtualNetworkGatewayConnectionType', ] diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/ipsec_policy.py b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/ipsec_policy.py index 4a43edf62496..501fe5494918 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/ipsec_policy.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/ipsec_policy.py @@ -36,20 +36,22 @@ class IpsecPolicy(Model): :type ipsec_integrity: str or ~azure.mgmt.network.v2018_02_01.models.IpsecIntegrity :param ike_encryption: Required. The IKE encryption algorithm (IKE phase - 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256' + 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', + 'GCMAES256', 'GCMAES128' :type ike_encryption: str or ~azure.mgmt.network.v2018_02_01.models.IkeEncryption :param ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). - Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384' + Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', + 'GCMAES128' :type ike_integrity: str or ~azure.mgmt.network.v2018_02_01.models.IkeIntegrity :param dh_group: Required. The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' :type dh_group: str or ~azure.mgmt.network.v2018_02_01.models.DhGroup - :param pfs_group: Required. The DH Groups used in IKE Phase 2 for new + :param pfs_group: Required. The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', - 'ECP256', 'ECP384', 'PFS24' + 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM' :type pfs_group: str or ~azure.mgmt.network.v2018_02_01.models.PfsGroup """ diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/ipsec_policy_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/ipsec_policy_py3.py index affcb6280ac1..a20af51677e6 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/ipsec_policy_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/ipsec_policy_py3.py @@ -36,20 +36,22 @@ class IpsecPolicy(Model): :type ipsec_integrity: str or ~azure.mgmt.network.v2018_02_01.models.IpsecIntegrity :param ike_encryption: Required. The IKE encryption algorithm (IKE phase - 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256' + 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', + 'GCMAES256', 'GCMAES128' :type ike_encryption: str or ~azure.mgmt.network.v2018_02_01.models.IkeEncryption :param ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). - Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384' + Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', + 'GCMAES128' :type ike_integrity: str or ~azure.mgmt.network.v2018_02_01.models.IkeIntegrity :param dh_group: Required. The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' :type dh_group: str or ~azure.mgmt.network.v2018_02_01.models.DhGroup - :param pfs_group: Required. The DH Groups used in IKE Phase 2 for new + :param pfs_group: Required. The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', - 'ECP256', 'ECP384', 'PFS24' + 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM' :type pfs_group: str or ~azure.mgmt.network.v2018_02_01.models.PfsGroup """ diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/network_management_client_enums.py b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/network_management_client_enums.py index 6d25cdc6121d..0e20d24072aa 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/network_management_client_enums.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/network_management_client_enums.py @@ -467,43 +467,6 @@ class VpnClientProtocol(str, Enum): sstp = "SSTP" -class BgpPeerState(str, Enum): - - unknown = "Unknown" - stopped = "Stopped" - idle = "Idle" - connecting = "Connecting" - connected = "Connected" - - -class ProcessorArchitecture(str, Enum): - - amd64 = "Amd64" - x86 = "X86" - - -class AuthenticationMethod(str, Enum): - - eaptls = "EAPTLS" - eapmscha_pv2 = "EAPMSCHAPv2" - - -class VirtualNetworkGatewayConnectionStatus(str, Enum): - - unknown = "Unknown" - connecting = "Connecting" - connected = "Connected" - not_connected = "NotConnected" - - -class VirtualNetworkGatewayConnectionType(str, Enum): - - ipsec = "IPsec" - vnet2_vnet = "Vnet2Vnet" - express_route = "ExpressRoute" - vpn_client = "VPNClient" - - class IpsecEncryption(str, Enum): none = "None" @@ -534,6 +497,8 @@ class IkeEncryption(str, Enum): aes128 = "AES128" aes192 = "AES192" aes256 = "AES256" + gcmaes256 = "GCMAES256" + gcmaes128 = "GCMAES128" class IkeIntegrity(str, Enum): @@ -542,6 +507,8 @@ class IkeIntegrity(str, Enum): sha1 = "SHA1" sha256 = "SHA256" sha384 = "SHA384" + gcmaes256 = "GCMAES256" + gcmaes128 = "GCMAES128" class DhGroup(str, Enum): @@ -565,3 +532,42 @@ class PfsGroup(str, Enum): ecp256 = "ECP256" ecp384 = "ECP384" pfs24 = "PFS24" + pfs14 = "PFS14" + pfsmm = "PFSMM" + + +class BgpPeerState(str, Enum): + + unknown = "Unknown" + stopped = "Stopped" + idle = "Idle" + connecting = "Connecting" + connected = "Connected" + + +class ProcessorArchitecture(str, Enum): + + amd64 = "Amd64" + x86 = "X86" + + +class AuthenticationMethod(str, Enum): + + eaptls = "EAPTLS" + eapmscha_pv2 = "EAPMSCHAPv2" + + +class VirtualNetworkGatewayConnectionStatus(str, Enum): + + unknown = "Unknown" + connecting = "Connecting" + connected = "Connected" + not_connected = "NotConnected" + + +class VirtualNetworkGatewayConnectionType(str, Enum): + + ipsec = "IPsec" + vnet2_vnet = "Vnet2Vnet" + express_route = "ExpressRoute" + vpn_client = "VPNClient" diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_configuration.py b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_configuration.py index 79c66e855270..4f174e544330 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_configuration.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_configuration.py @@ -31,6 +31,10 @@ class VpnClientConfiguration(Model): gateway. :type vpn_client_protocols: list[str or ~azure.mgmt.network.v2018_02_01.models.VpnClientProtocol] + :param vpn_client_ipsec_policies: VpnClientIpsecPolicies for virtual + network gateway P2S client. + :type vpn_client_ipsec_policies: + list[~azure.mgmt.network.v2018_02_01.models.IpsecPolicy] :param radius_server_address: The radius server address property of the VirtualNetworkGateway resource for vpn client connection. :type radius_server_address: str @@ -44,6 +48,7 @@ class VpnClientConfiguration(Model): 'vpn_client_root_certificates': {'key': 'vpnClientRootCertificates', 'type': '[VpnClientRootCertificate]'}, 'vpn_client_revoked_certificates': {'key': 'vpnClientRevokedCertificates', 'type': '[VpnClientRevokedCertificate]'}, 'vpn_client_protocols': {'key': 'vpnClientProtocols', 'type': '[str]'}, + 'vpn_client_ipsec_policies': {'key': 'vpnClientIpsecPolicies', 'type': '[IpsecPolicy]'}, 'radius_server_address': {'key': 'radiusServerAddress', 'type': 'str'}, 'radius_server_secret': {'key': 'radiusServerSecret', 'type': 'str'}, } @@ -54,5 +59,6 @@ def __init__(self, **kwargs): self.vpn_client_root_certificates = kwargs.get('vpn_client_root_certificates', None) self.vpn_client_revoked_certificates = kwargs.get('vpn_client_revoked_certificates', None) self.vpn_client_protocols = kwargs.get('vpn_client_protocols', None) + self.vpn_client_ipsec_policies = kwargs.get('vpn_client_ipsec_policies', None) self.radius_server_address = kwargs.get('radius_server_address', None) self.radius_server_secret = kwargs.get('radius_server_secret', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_configuration_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_configuration_py3.py index 4428e35ba848..2d605a54a657 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_configuration_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_configuration_py3.py @@ -31,6 +31,10 @@ class VpnClientConfiguration(Model): gateway. :type vpn_client_protocols: list[str or ~azure.mgmt.network.v2018_02_01.models.VpnClientProtocol] + :param vpn_client_ipsec_policies: VpnClientIpsecPolicies for virtual + network gateway P2S client. + :type vpn_client_ipsec_policies: + list[~azure.mgmt.network.v2018_02_01.models.IpsecPolicy] :param radius_server_address: The radius server address property of the VirtualNetworkGateway resource for vpn client connection. :type radius_server_address: str @@ -44,15 +48,17 @@ class VpnClientConfiguration(Model): 'vpn_client_root_certificates': {'key': 'vpnClientRootCertificates', 'type': '[VpnClientRootCertificate]'}, 'vpn_client_revoked_certificates': {'key': 'vpnClientRevokedCertificates', 'type': '[VpnClientRevokedCertificate]'}, 'vpn_client_protocols': {'key': 'vpnClientProtocols', 'type': '[str]'}, + 'vpn_client_ipsec_policies': {'key': 'vpnClientIpsecPolicies', 'type': '[IpsecPolicy]'}, 'radius_server_address': {'key': 'radiusServerAddress', 'type': 'str'}, 'radius_server_secret': {'key': 'radiusServerSecret', 'type': 'str'}, } - def __init__(self, *, vpn_client_address_pool=None, vpn_client_root_certificates=None, vpn_client_revoked_certificates=None, vpn_client_protocols=None, radius_server_address: str=None, radius_server_secret: str=None, **kwargs) -> None: + def __init__(self, *, vpn_client_address_pool=None, vpn_client_root_certificates=None, vpn_client_revoked_certificates=None, vpn_client_protocols=None, vpn_client_ipsec_policies=None, radius_server_address: str=None, radius_server_secret: str=None, **kwargs) -> None: super(VpnClientConfiguration, self).__init__(**kwargs) self.vpn_client_address_pool = vpn_client_address_pool self.vpn_client_root_certificates = vpn_client_root_certificates self.vpn_client_revoked_certificates = vpn_client_revoked_certificates self.vpn_client_protocols = vpn_client_protocols + self.vpn_client_ipsec_policies = vpn_client_ipsec_policies self.radius_server_address = radius_server_address self.radius_server_secret = radius_server_secret diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_ipsec_parameters.py b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_ipsec_parameters.py new file mode 100644 index 000000000000..c12b4454a2c8 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_ipsec_parameters.py @@ -0,0 +1,87 @@ +# 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 msrest.serialization import Model + + +class VpnClientIPsecParameters(Model): + """An IPSec parameters for a virtual network gateway P2S connection. + + All required parameters must be populated in order to send to Azure. + + :param sa_life_time_seconds: Required. The IPSec Security Association + (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. + :type sa_life_time_seconds: int + :param sa_data_size_kilobytes: Required. The IPSec Security Association + (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. + :type sa_data_size_kilobytes: int + :param ipsec_encryption: Required. The IPSec encryption algorithm (IKE + phase 1). Possible values include: 'None', 'DES', 'DES3', 'AES128', + 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256' + :type ipsec_encryption: str or + ~azure.mgmt.network.v2018_02_01.models.IpsecEncryption + :param ipsec_integrity: Required. The IPSec integrity algorithm (IKE phase + 1). Possible values include: 'MD5', 'SHA1', 'SHA256', 'GCMAES128', + 'GCMAES192', 'GCMAES256' + :type ipsec_integrity: str or + ~azure.mgmt.network.v2018_02_01.models.IpsecIntegrity + :param ike_encryption: Required. The IKE encryption algorithm (IKE phase + 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', + 'GCMAES256', 'GCMAES128' + :type ike_encryption: str or + ~azure.mgmt.network.v2018_02_01.models.IkeEncryption + :param ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). + Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', + 'GCMAES128' + :type ike_integrity: str or + ~azure.mgmt.network.v2018_02_01.models.IkeIntegrity + :param dh_group: Required. The DH Groups used in IKE Phase 1 for initial + SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', + 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + :type dh_group: str or ~azure.mgmt.network.v2018_02_01.models.DhGroup + :param pfs_group: Required. The Pfs Groups used in IKE Phase 2 for new + child SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', + 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM' + :type pfs_group: str or ~azure.mgmt.network.v2018_02_01.models.PfsGroup + """ + + _validation = { + 'sa_life_time_seconds': {'required': True}, + 'sa_data_size_kilobytes': {'required': True}, + 'ipsec_encryption': {'required': True}, + 'ipsec_integrity': {'required': True}, + 'ike_encryption': {'required': True}, + 'ike_integrity': {'required': True}, + 'dh_group': {'required': True}, + 'pfs_group': {'required': True}, + } + + _attribute_map = { + 'sa_life_time_seconds': {'key': 'saLifeTimeSeconds', 'type': 'int'}, + 'sa_data_size_kilobytes': {'key': 'saDataSizeKilobytes', 'type': 'int'}, + 'ipsec_encryption': {'key': 'ipsecEncryption', 'type': 'str'}, + 'ipsec_integrity': {'key': 'ipsecIntegrity', 'type': 'str'}, + 'ike_encryption': {'key': 'ikeEncryption', 'type': 'str'}, + 'ike_integrity': {'key': 'ikeIntegrity', 'type': 'str'}, + 'dh_group': {'key': 'dhGroup', 'type': 'str'}, + 'pfs_group': {'key': 'pfsGroup', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VpnClientIPsecParameters, self).__init__(**kwargs) + self.sa_life_time_seconds = kwargs.get('sa_life_time_seconds', None) + self.sa_data_size_kilobytes = kwargs.get('sa_data_size_kilobytes', None) + self.ipsec_encryption = kwargs.get('ipsec_encryption', None) + self.ipsec_integrity = kwargs.get('ipsec_integrity', None) + self.ike_encryption = kwargs.get('ike_encryption', None) + self.ike_integrity = kwargs.get('ike_integrity', None) + self.dh_group = kwargs.get('dh_group', None) + self.pfs_group = kwargs.get('pfs_group', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_ipsec_parameters_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_ipsec_parameters_py3.py new file mode 100644 index 000000000000..723248b37de6 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/vpn_client_ipsec_parameters_py3.py @@ -0,0 +1,87 @@ +# 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 msrest.serialization import Model + + +class VpnClientIPsecParameters(Model): + """An IPSec parameters for a virtual network gateway P2S connection. + + All required parameters must be populated in order to send to Azure. + + :param sa_life_time_seconds: Required. The IPSec Security Association + (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. + :type sa_life_time_seconds: int + :param sa_data_size_kilobytes: Required. The IPSec Security Association + (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. + :type sa_data_size_kilobytes: int + :param ipsec_encryption: Required. The IPSec encryption algorithm (IKE + phase 1). Possible values include: 'None', 'DES', 'DES3', 'AES128', + 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256' + :type ipsec_encryption: str or + ~azure.mgmt.network.v2018_02_01.models.IpsecEncryption + :param ipsec_integrity: Required. The IPSec integrity algorithm (IKE phase + 1). Possible values include: 'MD5', 'SHA1', 'SHA256', 'GCMAES128', + 'GCMAES192', 'GCMAES256' + :type ipsec_integrity: str or + ~azure.mgmt.network.v2018_02_01.models.IpsecIntegrity + :param ike_encryption: Required. The IKE encryption algorithm (IKE phase + 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', + 'GCMAES256', 'GCMAES128' + :type ike_encryption: str or + ~azure.mgmt.network.v2018_02_01.models.IkeEncryption + :param ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). + Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', + 'GCMAES128' + :type ike_integrity: str or + ~azure.mgmt.network.v2018_02_01.models.IkeIntegrity + :param dh_group: Required. The DH Groups used in IKE Phase 1 for initial + SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', + 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + :type dh_group: str or ~azure.mgmt.network.v2018_02_01.models.DhGroup + :param pfs_group: Required. The Pfs Groups used in IKE Phase 2 for new + child SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', + 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM' + :type pfs_group: str or ~azure.mgmt.network.v2018_02_01.models.PfsGroup + """ + + _validation = { + 'sa_life_time_seconds': {'required': True}, + 'sa_data_size_kilobytes': {'required': True}, + 'ipsec_encryption': {'required': True}, + 'ipsec_integrity': {'required': True}, + 'ike_encryption': {'required': True}, + 'ike_integrity': {'required': True}, + 'dh_group': {'required': True}, + 'pfs_group': {'required': True}, + } + + _attribute_map = { + 'sa_life_time_seconds': {'key': 'saLifeTimeSeconds', 'type': 'int'}, + 'sa_data_size_kilobytes': {'key': 'saDataSizeKilobytes', 'type': 'int'}, + 'ipsec_encryption': {'key': 'ipsecEncryption', 'type': 'str'}, + 'ipsec_integrity': {'key': 'ipsecIntegrity', 'type': 'str'}, + 'ike_encryption': {'key': 'ikeEncryption', 'type': 'str'}, + 'ike_integrity': {'key': 'ikeIntegrity', 'type': 'str'}, + 'dh_group': {'key': 'dhGroup', 'type': 'str'}, + 'pfs_group': {'key': 'pfsGroup', 'type': 'str'}, + } + + def __init__(self, *, sa_life_time_seconds: int, sa_data_size_kilobytes: int, ipsec_encryption, ipsec_integrity, ike_encryption, ike_integrity, dh_group, pfs_group, **kwargs) -> None: + super(VpnClientIPsecParameters, self).__init__(**kwargs) + self.sa_life_time_seconds = sa_life_time_seconds + self.sa_data_size_kilobytes = sa_data_size_kilobytes + self.ipsec_encryption = ipsec_encryption + self.ipsec_integrity = ipsec_integrity + self.ike_encryption = ike_encryption + self.ike_integrity = ike_integrity + self.dh_group = dh_group + self.pfs_group = pfs_group diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/operations/virtual_network_gateways_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/operations/virtual_network_gateways_operations.py index 94863ea1f36c..a43f209fc670 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_02_01/operations/virtual_network_gateways_operations.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_02_01/operations/virtual_network_gateways_operations.py @@ -1288,6 +1288,209 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) get_advertised_routes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes'} + + def _set_vpnclient_ipsec_parameters_initial( + self, resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.set_vpnclient_ipsec_parameters.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + '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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vpnclient_ipsec_params, 'VpnClientIPsecParameters') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VpnClientIPsecParameters', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def set_vpnclient_ipsec_parameters( + self, resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers=None, raw=False, polling=True, **operation_config): + """The Set VpnclientIpsecParameters operation sets the vpnclient ipsec + policy for P2S client of virtual network gateway in the specified + resource group through Network resource provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network + gateway. + :type virtual_network_gateway_name: str + :param vpnclient_ipsec_params: Parameters supplied to the Begin Set + vpnclient ipsec parameters of Virtual Network Gateway P2S client + operation through Network resource provider. + :type vpnclient_ipsec_params: + ~azure.mgmt.network.v2018_02_01.models.VpnClientIPsecParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VpnClientIPsecParameters or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_02_01.models.VpnClientIPsecParameters] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_02_01.models.VpnClientIPsecParameters]] + :raises: :class:`CloudError` + """ + raw_result = self._set_vpnclient_ipsec_parameters_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + vpnclient_ipsec_params=vpnclient_ipsec_params, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VpnClientIPsecParameters', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + set_vpnclient_ipsec_parameters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters'} + + + def _get_vpnclient_ipsec_parameters_initial( + self, resource_group_name, virtual_network_gateway_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.get_vpnclient_ipsec_parameters.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + '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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VpnClientIPsecParameters', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def get_vpnclient_ipsec_parameters( + self, resource_group_name, virtual_network_gateway_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The Get VpnclientIpsecParameters operation retrieves information about + the vpnclient ipsec policy for P2S client of virtual network gateway in + the specified resource group through Network resource provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The virtual network gateway name. + :type virtual_network_gateway_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VpnClientIPsecParameters or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_02_01.models.VpnClientIPsecParameters] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_02_01.models.VpnClientIPsecParameters]] + :raises: :class:`CloudError` + """ + raw_result = self._get_vpnclient_ipsec_parameters_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VpnClientIPsecParameters', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + get_vpnclient_ipsec_parameters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters'} + def vpn_device_configuration_script( self, resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers=None, raw=False, **operation_config): """Gets a xml format representation for vpn device configuration script.