예제 #1
0
    def create_or_update(self,
                         body,
                         resource_group_name,
                         account_name,
                         pool_name,
                         volume_name,
                         custom_headers=None,
                         raw=False,
                         polling=True,
                         **operation_config):
        """Create or update a volume.

        :param body: Volume object supplied in the body of the operation.
        :type body: ~azure.mgmt.netapp.models.Volume
        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param account_name: The name of the NetApp account
        :type account_name: str
        :param pool_name: The name of the capacity pool
        :type pool_name: str
        :param volume_name: The name of the volume
        :type volume_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 Volume or
         ClientRawResponse<Volume> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.netapp.models.Volume]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.netapp.models.Volume]]
        :raises:
         :class:`ErrorException<azure.mgmt.netapp.models.ErrorException>`
        """
        raw_result = self._create_or_update_initial(
            body=body,
            resource_group_name=resource_group_name,
            account_name=account_name,
            pool_name=pool_name,
            volume_name=volume_name,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('Volume', 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)
    def create_or_update(self,
                         resource_group_name,
                         service_name,
                         parameters,
                         custom_headers=None,
                         raw=False,
                         polling=True,
                         **operation_config):
        """Creates or updates an private link service in the specified resource
        group.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param service_name: The name of the private link service.
        :type service_name: str
        :param parameters: Parameters supplied to the create or update private
         link service operation
        :type parameters:
         ~azure.mgmt.network.v2019_04_01.models.PrivateLinkService
        :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 PrivateLinkService or
         ClientRawResponse<PrivateLinkService> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2019_04_01.models.PrivateLinkService]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_04_01.models.PrivateLinkService]]
        :raises:
         :class:`ErrorException<azure.mgmt.network.v2019_04_01.models.ErrorException>`
        """
        raw_result = self._create_or_update_initial(
            resource_group_name=resource_group_name,
            service_name=service_name,
            parameters=parameters,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('PrivateLinkService', 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)
    def resume(self,
               resource_group_name,
               workspace_name,
               sql_pool_name,
               custom_headers=None,
               raw=False,
               polling=True,
               **operation_config):
        """Resume SQL pool.

        Resume a SQL pool.

        :param resource_group_name: The name of the resource group. The name
         is case insensitive.
        :type resource_group_name: str
        :param workspace_name: The name of the workspace
        :type workspace_name: str
        :param sql_pool_name: SQL pool name
        :type sql_pool_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 object or
         ClientRawResponse<object> if raw==True
        :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._resume_initial(
            resource_group_name=resource_group_name,
            workspace_name=workspace_name,
            sql_pool_name=sql_pool_name,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('object', 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,
                lro_options={'final-state-via': 'location'},
                **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)
    def update(self,
               resource_group_name,
               sql_virtual_machine_group_name,
               tags=None,
               custom_headers=None,
               raw=False,
               polling=True,
               **operation_config):
        """Updates SQL virtual machine group tags.

        :param resource_group_name: Name of the resource group that contains
         the resource. You can obtain this value from the Azure Resource
         Manager API or the portal.
        :type resource_group_name: str
        :param sql_virtual_machine_group_name: Name of the SQL virtual machine
         group.
        :type sql_virtual_machine_group_name: str
        :param tags: Resource tags.
        :type tags: dict[str, 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 SqlVirtualMachineGroup
         or ClientRawResponse<SqlVirtualMachineGroup> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachineGroup]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachineGroup]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._update_initial(
            resource_group_name=resource_group_name,
            sql_virtual_machine_group_name=sql_virtual_machine_group_name,
            tags=tags,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('SqlVirtualMachineGroup',
                                             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)
예제 #5
0
    def test(self,
             resource_group_name,
             job_name,
             output_name,
             output=None,
             custom_headers=None,
             raw=False,
             polling=True,
             **operation_config):
        """Tests whether an output’s datasource is reachable and usable by the
        Azure Stream Analytics service.

        :param resource_group_name: The name of the resource group that
         contains the resource. You can obtain this value from the Azure
         Resource Manager API or the portal.
        :type resource_group_name: str
        :param job_name: The name of the streaming job.
        :type job_name: str
        :param output_name: The name of the output.
        :type output_name: str
        :param output: If the output specified does not already exist, this
         parameter must contain the full output definition intended to be
         tested. If the output specified already exists, this parameter can be
         left null to test the existing output as is or if specified, the
         properties specified will overwrite the corresponding properties in
         the existing output (exactly like a PATCH operation) and the resulting
         output will be tested.
        :type output: ~azure.mgmt.streamanalytics.models.Output
        :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 ResourceTestStatus or
         ClientRawResponse<ResourceTestStatus> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.streamanalytics.models.ResourceTestStatus]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.streamanalytics.models.ResourceTestStatus]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._test_initial(
            resource_group_name=resource_group_name,
            job_name=job_name,
            output_name=output_name,
            output=output,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('ResourceTestStatus', 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)
예제 #6
0
    def get_status(self,
                   resource_group_name,
                   network_watcher_name,
                   packet_capture_name,
                   custom_headers=None,
                   raw=False,
                   polling=True,
                   **operation_config):
        """Query the status of a running packet capture session.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param network_watcher_name: The name of the Network Watcher resource.
        :type network_watcher_name: str
        :param packet_capture_name: The name given to the packet capture
         session.
        :type packet_capture_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
         PacketCaptureQueryStatusResult or
         ClientRawResponse<PacketCaptureQueryStatusResult> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_06_01.models.PacketCaptureQueryStatusResult]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_06_01.models.PacketCaptureQueryStatusResult]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._get_status_initial(
            resource_group_name=resource_group_name,
            network_watcher_name=network_watcher_name,
            packet_capture_name=packet_capture_name,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('PacketCaptureQueryStatusResult',
                                             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,
                lro_options={'final-state-via': 'location'},
                **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)
예제 #7
0
    def update(self,
               resource_group_name,
               registry_name,
               agent_pool_name,
               count=None,
               tags=None,
               custom_headers=None,
               raw=False,
               polling=True,
               **operation_config):
        """Updates an agent pool with the specified parameters.

        :param resource_group_name: The name of the resource group to which
         the container registry belongs.
        :type resource_group_name: str
        :param registry_name: The name of the container registry.
        :type registry_name: str
        :param agent_pool_name: The name of the agent pool.
        :type agent_pool_name: str
        :param count: The count of agent machine
        :type count: int
        :param tags: The ARM resource tags.
        :type tags: dict[str, 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 AgentPool or
         ClientRawResponse<AgentPool> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerregistry.v2019_12_01_preview.models.AgentPool]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerregistry.v2019_12_01_preview.models.AgentPool]]
        :raises:
         :class:`ErrorResponseException<azure.mgmt.containerregistry.v2019_12_01_preview.models.ErrorResponseException>`
        """
        raw_result = self._update_initial(
            resource_group_name=resource_group_name,
            registry_name=registry_name,
            agent_pool_name=agent_pool_name,
            count=count,
            tags=tags,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('AgentPool', 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)
    def list_routes_table(self,
                          resource_group_name,
                          cross_connection_name,
                          peering_name,
                          device_path,
                          custom_headers=None,
                          raw=False,
                          polling=True,
                          **operation_config):
        """Gets the currently advertised routes table associated with the express
        route cross connection in a resource group.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cross_connection_name: The name of the
         ExpressRouteCrossConnection.
        :type cross_connection_name: str
        :param peering_name: The name of the peering.
        :type peering_name: str
        :param device_path: The path of the device.
        :type device_path: 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
         ExpressRouteCircuitsRoutesTableListResult or
         ClientRawResponse<ExpressRouteCircuitsRoutesTableListResult> if
         raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2019_02_01.models.ExpressRouteCircuitsRoutesTableListResult]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_02_01.models.ExpressRouteCircuitsRoutesTableListResult]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._list_routes_table_initial(
            resource_group_name=resource_group_name,
            cross_connection_name=cross_connection_name,
            peering_name=peering_name,
            device_path=device_path,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize(
                'ExpressRouteCircuitsRoutesTableListResult', 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,
                lro_options={'final-state-via': 'location'},
                **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)
예제 #9
0
    def create(self,
               resource_group_name,
               cluster_name,
               connected_cluster,
               custom_headers=None,
               raw=False,
               polling=True,
               **operation_config):
        """Register a new Kubernetes cluster with Azure Resource Manager.

        API to register a new Kubernetes cluster and create a tracked resource
        in Azure Resource Manager (ARM).

        :param resource_group_name: The name of the resource group. The name
         is case insensitive.
        :type resource_group_name: str
        :param cluster_name: The name of the Kubernetes cluster on which get
         is called.
        :type cluster_name: str
        :param connected_cluster: Parameters supplied to Create a Connected
         Cluster.
        :type connected_cluster:
         ~azure.mgmt.hybridkubernetes.models.ConnectedCluster
        :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 ConnectedCluster or
         ClientRawResponse<ConnectedCluster> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.hybridkubernetes.models.ConnectedCluster]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.hybridkubernetes.models.ConnectedCluster]]
        :raises:
         :class:`ErrorResponseException<azure.mgmt.hybridkubernetes.models.ErrorResponseException>`
        """
        raw_result = self._create_initial(
            resource_group_name=resource_group_name,
            cluster_name=cluster_name,
            connected_cluster=connected_cluster,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('ConnectedCluster', 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)
예제 #10
0
    def update(self,
               resource_group_name,
               cluster_name,
               application_name,
               parameters,
               custom_headers=None,
               raw=False,
               polling=True,
               **operation_config):
        """Updates a Service Fabric application resource.

        Update a Service Fabric application resource with the specified name.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster resource.
        :type cluster_name: str
        :param application_name: The name of the application resource.
        :type application_name: str
        :param parameters: The application resource for patch operations.
        :type parameters:
         ~azure.mgmt.servicefabric.models.ApplicationResourceUpdate
        :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 ApplicationResource or
         ClientRawResponse<ApplicationResource> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servicefabric.models.ApplicationResource]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servicefabric.models.ApplicationResource]]
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`
        """
        raw_result = self._update_initial(
            resource_group_name=resource_group_name,
            cluster_name=cluster_name,
            application_name=application_name,
            parameters=parameters,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('ApplicationResource', 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)
예제 #11
0
    def create_or_update(self,
                         resource_group_name,
                         server_name,
                         virtual_network_rule_name,
                         virtual_network_subnet_id,
                         ignore_missing_vnet_service_endpoint=None,
                         custom_headers=None,
                         raw=False,
                         polling=True,
                         **operation_config):
        """Creates or updates an existing virtual network rule.

        :param resource_group_name: The name of the resource group. The name
         is case insensitive.
        :type resource_group_name: str
        :param server_name: The name of the server.
        :type server_name: str
        :param virtual_network_rule_name: The name of the virtual network
         rule.
        :type virtual_network_rule_name: str
        :param virtual_network_subnet_id: The ARM resource id of the virtual
         network subnet.
        :type virtual_network_subnet_id: str
        :param ignore_missing_vnet_service_endpoint: Create firewall rule
         before the virtual network has vnet service endpoint enabled.
        :type ignore_missing_vnet_service_endpoint: bool
        :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 VirtualNetworkRule or
         ClientRawResponse<VirtualNetworkRule> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._create_or_update_initial(
            resource_group_name=resource_group_name,
            server_name=server_name,
            virtual_network_rule_name=virtual_network_rule_name,
            virtual_network_subnet_id=virtual_network_subnet_id,
            ignore_missing_vnet_service_endpoint=
            ignore_missing_vnet_service_endpoint,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('VirtualNetworkRule', 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)
예제 #12
0
    def create_or_update(self,
                         resource_group_name,
                         vm_scale_set_name,
                         vmss_extension_name,
                         extension_parameters,
                         custom_headers=None,
                         raw=False,
                         polling=True,
                         **operation_config):
        """The operation to create or update an extension.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param vm_scale_set_name: The name of the VM scale set where the
         extension should be create or updated.
        :type vm_scale_set_name: str
        :param vmss_extension_name: The name of the VM scale set extension.
        :type vmss_extension_name: str
        :param extension_parameters: Parameters supplied to the Create VM
         scale set Extension operation.
        :type extension_parameters:
         ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension
        :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
         VirtualMachineScaleSetExtension or
         ClientRawResponse<VirtualMachineScaleSetExtension> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._create_or_update_initial(
            resource_group_name=resource_group_name,
            vm_scale_set_name=vm_scale_set_name,
            vmss_extension_name=vmss_extension_name,
            extension_parameters=extension_parameters,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('VirtualMachineScaleSetExtension',
                                             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)
예제 #13
0
    def create_or_update(self,
                         resource_group_name,
                         scope_name,
                         private_endpoint_connection_name,
                         private_endpoint=None,
                         private_link_service_connection_state=None,
                         custom_headers=None,
                         raw=False,
                         polling=True,
                         **operation_config):
        """Approve or reject a private endpoint connection with a given name.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param scope_name: The name of the Azure Monitor PrivateLinkScope
         resource.
        :type scope_name: str
        :param private_endpoint_connection_name: The name of the private
         endpoint connection.
        :type private_endpoint_connection_name: str
        :param private_endpoint: Private endpoint which the connection belongs
         to.
        :type private_endpoint:
         ~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointProperty
        :param private_link_service_connection_state: Connection state of the
         private endpoint connection.
        :type private_link_service_connection_state:
         ~azure.mgmt.monitor.v2019_10_17.models.PrivateLinkServiceConnectionStateProperty
        :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
         PrivateEndpointConnection or
         ClientRawResponse<PrivateEndpointConnection> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointConnection]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointConnection]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._create_or_update_initial(
            resource_group_name=resource_group_name,
            scope_name=scope_name,
            private_endpoint_connection_name=private_endpoint_connection_name,
            private_endpoint=private_endpoint,
            private_link_service_connection_state=
            private_link_service_connection_state,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('PrivateEndpointConnection',
                                             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)
    def reset_password(self,
                       resource_group_name,
                       lab_account_name,
                       lab_name,
                       environment_setting_name,
                       environment_name,
                       reset_password_payload,
                       custom_headers=None,
                       raw=False,
                       polling=True,
                       **operation_config):
        """Resets the user password on an environment This operation can take a
        while to complete.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param lab_account_name: The name of the lab Account.
        :type lab_account_name: str
        :param lab_name: The name of the lab.
        :type lab_name: str
        :param environment_setting_name: The name of the environment Setting.
        :type environment_setting_name: str
        :param environment_name: The name of the environment.
        :type environment_name: str
        :param reset_password_payload: Represents the payload for resetting
         passwords.
        :type reset_password_payload:
         ~azure.mgmt.labservices.models.ResetPasswordPayload
        :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 None or
         ClientRawResponse<None> if raw==True
        :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._reset_password_initial(
            resource_group_name=resource_group_name,
            lab_account_name=lab_account_name,
            lab_name=lab_name,
            environment_setting_name=environment_setting_name,
            environment_name=environment_name,
            reset_password_payload=reset_password_payload,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            if raw:
                client_raw_response = ClientRawResponse(None, response)
                return client_raw_response

        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)
예제 #15
0
    def query(self,
              resource_group_name,
              network_watcher_name,
              connection_monitor_name,
              custom_headers=None,
              raw=False,
              polling=True,
              **operation_config):
        """Query a snapshot of the most recent connection states.

        :param resource_group_name: The name of the resource group containing
         Network Watcher.
        :type resource_group_name: str
        :param network_watcher_name: The name of the Network Watcher resource.
        :type network_watcher_name: str
        :param connection_monitor_name: The name given to the connection
         monitor.
        :type connection_monitor_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
         ConnectionMonitorQueryResult or
         ClientRawResponse<ConnectionMonitorQueryResult> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorQueryResult]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorQueryResult]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._query_initial(
            resource_group_name=resource_group_name,
            network_watcher_name=network_watcher_name,
            connection_monitor_name=connection_monitor_name,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('ConnectionMonitorQueryResult',
                                             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)
    def create_or_update(self,
                         resource_group_name,
                         resource_name,
                         agent_pool_name,
                         parameters,
                         custom_headers=None,
                         raw=False,
                         polling=True,
                         **operation_config):
        """Creates or updates an agent pool.

        Creates or updates an agent pool in the specified managed cluster.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param resource_name: The name of the managed cluster resource.
        :type resource_name: str
        :param agent_pool_name: The name of the agent pool.
        :type agent_pool_name: str
        :param parameters: Parameters supplied to the Create or Update an
         agent pool operation.
        :type parameters:
         ~azure.mgmt.containerservice.v2020_11_01.models.AgentPool
        :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 AgentPool or
         ClientRawResponse<AgentPool> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_11_01.models.AgentPool]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_11_01.models.AgentPool]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._create_or_update_initial(
            resource_group_name=resource_group_name,
            resource_name=resource_name,
            agent_pool_name=agent_pool_name,
            parameters=parameters,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('AgentPool', 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)
예제 #17
0
    def create_or_update(self,
                         resource_group_name,
                         gateway_name,
                         vpn_gateway_parameters,
                         custom_headers=None,
                         raw=False,
                         polling=True,
                         **operation_config):
        """Creates a virtual wan vpn gateway if it doesn't exist else updates the
        existing gateway.

        :param resource_group_name: The resource group name of the VpnGateway.
        :type resource_group_name: str
        :param gateway_name: The name of the gateway.
        :type gateway_name: str
        :param vpn_gateway_parameters: Parameters supplied to create or Update
         a virtual wan vpn gateway.
        :type vpn_gateway_parameters:
         ~azure.mgmt.network.v2018_10_01.models.VpnGateway
        :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 VpnGateway or
         ClientRawResponse<VpnGateway> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_10_01.models.VpnGateway]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_10_01.models.VpnGateway]]
        :raises:
         :class:`ErrorException<azure.mgmt.network.v2018_10_01.models.ErrorException>`
        """
        raw_result = self._create_or_update_initial(
            resource_group_name=resource_group_name,
            gateway_name=gateway_name,
            vpn_gateway_parameters=vpn_gateway_parameters,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('VpnGateway', 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)
예제 #18
0
    def create_or_update(self,
                         device_name,
                         name,
                         role,
                         resource_group_name,
                         custom_headers=None,
                         raw=False,
                         polling=True,
                         **operation_config):
        """Create or update a role.

        :param device_name: The device name.
        :type device_name: str
        :param name: The role name.
        :type name: str
        :param role: The role properties.
        :type role: ~azure.mgmt.databoxedge.models.Role
        :param resource_group_name: The resource group name.
        :type resource_group_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 Role or
         ClientRawResponse<Role> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.Role]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.Role]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._create_or_update_initial(
            device_name=device_name,
            name=name,
            role=role,
            resource_group_name=resource_group_name,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('Role', 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)
예제 #19
0
    def create_or_update(self,
                         resource_group_name,
                         load_balancer_name,
                         inbound_nat_rule_name,
                         inbound_nat_rule_parameters,
                         custom_headers=None,
                         raw=False,
                         polling=True,
                         **operation_config):
        """Creates or updates a load balancer inbound nat rule.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param load_balancer_name: The name of the load balancer.
        :type load_balancer_name: str
        :param inbound_nat_rule_name: The name of the inbound nat rule.
        :type inbound_nat_rule_name: str
        :param inbound_nat_rule_parameters: Parameters supplied to the create
         or update inbound nat rule operation.
        :type inbound_nat_rule_parameters:
         ~azure.mgmt.network.v2018_06_01.models.InboundNatRule
        :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 InboundNatRule or
         ClientRawResponse<InboundNatRule> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_06_01.models.InboundNatRule]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_06_01.models.InboundNatRule]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._create_or_update_initial(
            resource_group_name=resource_group_name,
            load_balancer_name=load_balancer_name,
            inbound_nat_rule_name=inbound_nat_rule_name,
            inbound_nat_rule_parameters=inbound_nat_rule_parameters,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('InboundNatRule', 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)
예제 #20
0
    def create_or_update(self,
                         resource_group_name,
                         server_name,
                         configuration_name,
                         value=None,
                         source=None,
                         custom_headers=None,
                         raw=False,
                         polling=True,
                         **operation_config):
        """Updates a configuration of a server.

        :param resource_group_name: The name of the resource group. The name
         is case insensitive.
        :type resource_group_name: str
        :param server_name: The name of the server.
        :type server_name: str
        :param configuration_name: The name of the server configuration.
        :type configuration_name: str
        :param value: Value of the configuration.
        :type value: str
        :param source: Source of the configuration.
        :type source: 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 Configuration or
         ClientRawResponse<Configuration> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.Configuration]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.Configuration]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._create_or_update_initial(
            resource_group_name=resource_group_name,
            server_name=server_name,
            configuration_name=configuration_name,
            value=value,
            source=source,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('Configuration', 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)
    def create_or_update(self,
                         resource_group_name,
                         gallery_name,
                         gallery_application_name,
                         gallery_application_version_name,
                         gallery_application_version,
                         custom_headers=None,
                         raw=False,
                         polling=True,
                         **operation_config):
        """Create or update a gallery Application Version.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param gallery_name: The name of the Shared Application Gallery in
         which the Application Definition resides.
        :type gallery_name: str
        :param gallery_application_name: The name of the gallery Application
         Definition in which the Application Version is to be created.
        :type gallery_application_name: str
        :param gallery_application_version_name: The name of the gallery
         Application Version to be created. Needs to follow semantic version
         name pattern: The allowed characters are digit and period. Digits must
         be within the range of a 32-bit integer. Format:
         <MajorVersion>.<MinorVersion>.<Patch>
        :type gallery_application_version_name: str
        :param gallery_application_version: Parameters supplied to the create
         or update gallery Application Version operation.
        :type gallery_application_version:
         ~azure.mgmt.compute.v2019_03_01.models.GalleryApplicationVersion
        :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
         GalleryApplicationVersion or
         ClientRawResponse<GalleryApplicationVersion> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.GalleryApplicationVersion]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.GalleryApplicationVersion]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._create_or_update_initial(
            resource_group_name=resource_group_name,
            gallery_name=gallery_name,
            gallery_application_name=gallery_application_name,
            gallery_application_version_name=gallery_application_version_name,
            gallery_application_version=gallery_application_version,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('GalleryApplicationVersion',
                                             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)
예제 #22
0
    def create(self,
               resource_group_name,
               registry_name,
               webhook_name,
               webhook_create_parameters,
               custom_headers=None,
               raw=False,
               polling=True,
               **operation_config):
        """Creates a webhook for a container registry with the specified
        parameters.

        :param resource_group_name: The name of the resource group to which
         the container registry belongs.
        :type resource_group_name: str
        :param registry_name: The name of the container registry.
        :type registry_name: str
        :param webhook_name: The name of the webhook.
        :type webhook_name: str
        :param webhook_create_parameters: The parameters for creating a
         webhook.
        :type webhook_create_parameters:
         ~azure.mgmt.containerregistry.v2018_09_01.models.WebhookCreateParameters
        :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 Webhook or
         ClientRawResponse<Webhook> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerregistry.v2018_09_01.models.Webhook]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerregistry.v2018_09_01.models.Webhook]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._create_initial(
            resource_group_name=resource_group_name,
            registry_name=registry_name,
            webhook_name=webhook_name,
            webhook_create_parameters=webhook_create_parameters,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('Webhook', 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)
예제 #23
0
    def backend_health(self,
                       resource_group_name,
                       application_gateway_name,
                       expand=None,
                       custom_headers=None,
                       raw=False,
                       polling=True,
                       **operation_config):
        """Gets the backend health of the specified application gateway in a
        resource group.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param application_gateway_name: The name of the application gateway.
        :type application_gateway_name: str
        :param expand: Expands BackendAddressPool and BackendHttpSettings
         referenced in backend health.
        :type expand: 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
         ApplicationGatewayBackendHealth or
         ClientRawResponse<ApplicationGatewayBackendHealth> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2017_03_01.models.ApplicationGatewayBackendHealth]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2017_03_01.models.ApplicationGatewayBackendHealth]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._backend_health_initial(
            resource_group_name=resource_group_name,
            application_gateway_name=application_gateway_name,
            expand=expand,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('ApplicationGatewayBackendHealth',
                                             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)
    def update_tags(self,
                    resource_group_name,
                    virtual_network_gateway_connection_name,
                    tags=None,
                    custom_headers=None,
                    raw=False,
                    polling=True,
                    **operation_config):
        """Updates a virtual network gateway connection tags.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param virtual_network_gateway_connection_name: The name of the
         virtual network gateway connection.
        :type virtual_network_gateway_connection_name: str
        :param tags: Resource tags.
        :type tags: dict[str, 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
         VirtualNetworkGatewayConnectionListEntity or
         ClientRawResponse<VirtualNetworkGatewayConnectionListEntity> if
         raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_01_01.models.VirtualNetworkGatewayConnectionListEntity]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_01_01.models.VirtualNetworkGatewayConnectionListEntity]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._update_tags_initial(
            resource_group_name=resource_group_name,
            virtual_network_gateway_connection_name=
            virtual_network_gateway_connection_name,
            tags=tags,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize(
                'VirtualNetworkGatewayConnectionListEntity', 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)
예제 #25
0
    def update(self,
               resource_group_name,
               registry_name,
               task_run_name,
               update_parameters,
               custom_headers=None,
               raw=False,
               polling=True,
               **operation_config):
        """Updates a task run with the specified parameters.

        :param resource_group_name: The name of the resource group to which
         the container registry belongs.
        :type resource_group_name: str
        :param registry_name: The name of the container registry.
        :type registry_name: str
        :param task_run_name: The name of the task run.
        :type task_run_name: str
        :param update_parameters: The parameters for updating a task run.
        :type update_parameters:
         ~azure.mgmt.containerregistry.v2019_06_01_preview.models.TaskRunUpdateParameters
        :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 TaskRun or
         ClientRawResponse<TaskRun> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerregistry.v2019_06_01_preview.models.TaskRun]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerregistry.v2019_06_01_preview.models.TaskRun]]
        :raises:
         :class:`ErrorResponseException<azure.mgmt.containerregistry.v2019_06_01_preview.models.ErrorResponseException>`
        """
        raw_result = self._update_initial(
            resource_group_name=resource_group_name,
            registry_name=registry_name,
            task_run_name=task_run_name,
            update_parameters=update_parameters,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('TaskRun', 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)
    def reset_shared_key(self,
                         resource_group_name,
                         virtual_network_gateway_connection_name,
                         key_length,
                         custom_headers=None,
                         raw=False,
                         polling=True,
                         **operation_config):
        """The VirtualNetworkGatewayConnectionResetSharedKey operation resets the
        virtual network gateway connection shared key for passed virtual
        network gateway connection 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_connection_name: The virtual network
         gateway connection reset shared key Name.
        :type virtual_network_gateway_connection_name: str
        :param key_length: The virtual network connection reset shared key
         length, should between 1 and 128.
        :type key_length: int
        :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
         ConnectionResetSharedKey or
         ClientRawResponse<ConnectionResetSharedKey> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_01_01.models.ConnectionResetSharedKey]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_01_01.models.ConnectionResetSharedKey]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._reset_shared_key_initial(
            resource_group_name=resource_group_name,
            virtual_network_gateway_connection_name=
            virtual_network_gateway_connection_name,
            key_length=key_length,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('ConnectionResetSharedKey',
                                             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)
    def create(self,
               resource_group_name,
               workspace_name,
               sql_pool_name,
               sql_pool_info,
               custom_headers=None,
               raw=False,
               polling=True,
               **operation_config):
        """Create SQL pool.

        Create a SQL pool.

        :param resource_group_name: The name of the resource group. The name
         is case insensitive.
        :type resource_group_name: str
        :param workspace_name: The name of the workspace
        :type workspace_name: str
        :param sql_pool_name: SQL pool name
        :type sql_pool_name: str
        :param sql_pool_info: The SQL pool to create
        :type sql_pool_info: ~azure.mgmt.synapse.models.SqlPool
        :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 SqlPool or
         ClientRawResponse<SqlPool> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.synapse.models.SqlPool]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.SqlPool]]
        :raises:
         :class:`ErrorContractException<azure.mgmt.synapse.models.ErrorContractException>`
        """
        raw_result = self._create_initial(
            resource_group_name=resource_group_name,
            workspace_name=workspace_name,
            sql_pool_name=sql_pool_name,
            sql_pool_info=sql_pool_info,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('SqlPool', 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)
예제 #28
0
    def update_table_throughput(self,
                                resource_group_name,
                                account_name,
                                table_name,
                                update_throughput_parameters,
                                custom_headers=None,
                                raw=False,
                                polling=True,
                                **operation_config):
        """Update RUs per second of an Azure Cosmos DB Table.

        :param resource_group_name: The name of the resource group. The name
         is case insensitive.
        :type resource_group_name: str
        :param account_name: Cosmos DB database account name.
        :type account_name: str
        :param table_name: Cosmos DB table name.
        :type table_name: str
        :param update_throughput_parameters: The parameters to provide for the
         RUs per second of the current Table.
        :type update_throughput_parameters:
         ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters
        :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
         ThroughputSettingsGetResults or
         ClientRawResponse<ThroughputSettingsGetResults> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._update_table_throughput_initial(
            resource_group_name=resource_group_name,
            account_name=account_name,
            table_name=table_name,
            update_throughput_parameters=update_throughput_parameters,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('ThroughputSettingsGetResults',
                                             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)
예제 #29
0
    def create_or_update(self,
                         resource_group_name,
                         circuit_name,
                         peering_name,
                         peering_parameters,
                         custom_headers=None,
                         raw=False,
                         polling=True,
                         **operation_config):
        """Creates or updates a peering in the specified express route circuits.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param circuit_name: The name of the express route circuit.
        :type circuit_name: str
        :param peering_name: The name of the peering.
        :type peering_name: str
        :param peering_parameters: Parameters supplied to the create or update
         express route circuit peering operation.
        :type peering_parameters:
         ~azure.mgmt.network.v2018_12_01.models.ExpressRouteCircuitPeering
        :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
         ExpressRouteCircuitPeering or
         ClientRawResponse<ExpressRouteCircuitPeering> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_12_01.models.ExpressRouteCircuitPeering]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_12_01.models.ExpressRouteCircuitPeering]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._create_or_update_initial(
            resource_group_name=resource_group_name,
            circuit_name=circuit_name,
            peering_name=peering_name,
            peering_parameters=peering_parameters,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('ExpressRouteCircuitPeering',
                                             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)
    def create_or_update(self,
                         resource_group_name,
                         service_name,
                         certificate_name,
                         properties=None,
                         custom_headers=None,
                         raw=False,
                         polling=True,
                         **operation_config):
        """Create or update certificate resource.

        :param resource_group_name: The name of the resource group that
         contains the resource. You can obtain this value from the Azure
         Resource Manager API or the portal.
        :type resource_group_name: str
        :param service_name: The name of the Service resource.
        :type service_name: str
        :param certificate_name: The name of the certificate resource.
        :type certificate_name: str
        :param properties: Properties of the certificate resource payload.
        :type properties:
         ~azure.mgmt.appplatform.v2021_06_01_preview.models.CertificateProperties
        :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 CertificateResource or
         ClientRawResponse<CertificateResource> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2021_06_01_preview.models.CertificateResource]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2021_06_01_preview.models.CertificateResource]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        raw_result = self._create_or_update_initial(
            resource_group_name=resource_group_name,
            service_name=service_name,
            certificate_name=certificate_name,
            properties=properties,
            custom_headers=custom_headers,
            raw=True,
            **operation_config)

        def get_long_running_output(response):
            deserialized = self._deserialize('CertificateResource', 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)