@@ -632,6 +632,87 @@ def get_long_running_output(response):
632
632
reset .metadata = {'url' : '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset' }
633
633
634
634
635
+ def _reset_vpn_client_shared_key_initial (
636
+ self , resource_group_name , virtual_network_gateway_name , custom_headers = None , raw = False , ** operation_config ):
637
+ # Construct URL
638
+ url = self .reset_vpn_client_shared_key .metadata ['url' ]
639
+ path_format_arguments = {
640
+ 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' ),
641
+ 'virtualNetworkGatewayName' : self ._serialize .url ("virtual_network_gateway_name" , virtual_network_gateway_name , 'str' ),
642
+ 'subscriptionId' : self ._serialize .url ("self.config.subscription_id" , self .config .subscription_id , 'str' )
643
+ }
644
+ url = self ._client .format_url (url , ** path_format_arguments )
645
+
646
+ # Construct parameters
647
+ query_parameters = {}
648
+ query_parameters ['api-version' ] = self ._serialize .query ("self.api_version" , self .api_version , 'str' )
649
+
650
+ # Construct headers
651
+ header_parameters = {}
652
+ if self .config .generate_client_request_id :
653
+ header_parameters ['x-ms-client-request-id' ] = str (uuid .uuid1 ())
654
+ if custom_headers :
655
+ header_parameters .update (custom_headers )
656
+ if self .config .accept_language is not None :
657
+ header_parameters ['accept-language' ] = self ._serialize .header ("self.config.accept_language" , self .config .accept_language , 'str' )
658
+
659
+ # Construct and send request
660
+ request = self ._client .post (url , query_parameters , header_parameters )
661
+ response = self ._client .send (request , stream = False , ** operation_config )
662
+
663
+ if response .status_code not in [200 , 202 ]:
664
+ exp = CloudError (response )
665
+ exp .request_id = response .headers .get ('x-ms-request-id' )
666
+ raise exp
667
+
668
+ if raw :
669
+ client_raw_response = ClientRawResponse (None , response )
670
+ return client_raw_response
671
+
672
+ def reset_vpn_client_shared_key (
673
+ self , resource_group_name , virtual_network_gateway_name , custom_headers = None , raw = False , polling = True , ** operation_config ):
674
+ """Resets the VPN client shared key of the virtual network gateway in the
675
+ specified resource group.
676
+
677
+ :param resource_group_name: The name of the resource group.
678
+ :type resource_group_name: str
679
+ :param virtual_network_gateway_name: The name of the virtual network
680
+ gateway.
681
+ :type virtual_network_gateway_name: str
682
+ :param dict custom_headers: headers that will be added to the request
683
+ :param bool raw: The poller return type is ClientRawResponse, the
684
+ direct response alongside the deserialized response
685
+ :param polling: True for ARMPolling, False for no polling, or a
686
+ polling object for personal polling strategy
687
+ :return: An instance of LROPoller that returns None or
688
+ ClientRawResponse<None> if raw==True
689
+ :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
690
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
691
+ :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
692
+ """
693
+ raw_result = self ._reset_vpn_client_shared_key_initial (
694
+ resource_group_name = resource_group_name ,
695
+ virtual_network_gateway_name = virtual_network_gateway_name ,
696
+ custom_headers = custom_headers ,
697
+ raw = True ,
698
+ ** operation_config
699
+ )
700
+
701
+ def get_long_running_output (response ):
702
+ if raw :
703
+ client_raw_response = ClientRawResponse (None , response )
704
+ return client_raw_response
705
+
706
+ lro_delay = operation_config .get (
707
+ 'long_running_operation_timeout' ,
708
+ self .config .long_running_operation_timeout )
709
+ if polling is True : polling_method = ARMPolling (lro_delay , ** operation_config )
710
+ elif polling is False : polling_method = NoPolling ()
711
+ else : polling_method = polling
712
+ return LROPoller (self ._client , raw_result , get_long_running_output , polling_method )
713
+ reset_vpn_client_shared_key .metadata = {'url' : '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey' }
714
+
715
+
635
716
def _generatevpnclientpackage_initial (
636
717
self , resource_group_name , virtual_network_gateway_name , parameters , custom_headers = None , raw = False , ** operation_config ):
637
718
# Construct URL
0 commit comments