def create_or_update(self, resource_group_name, ddos_protection_plan_name, location=None, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a DDoS protection plan. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param ddos_protection_plan_name: The name of the DDoS protection plan. :type ddos_protection_plan_name: str :param location: Resource location. :type location: 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 DdosProtectionPlan or ClientRawResponse<DdosProtectionPlan> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_08_01.models.DdosProtectionPlan] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_08_01.models.DdosProtectionPlan]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, ddos_protection_plan_name=ddos_protection_plan_name, location=location, tags=tags, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('DdosProtectionPlan', 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, 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.v2016_09_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.v2016_09_01.models.ExpressRouteCircuitPeering] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2016_09_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, device_name, name, storage_account_credential, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates the storage account credential. :param device_name: The device name. :type device_name: str :param name: The storage account credential name. :type name: str :param storage_account_credential: The storage account credential. :type storage_account_credential: ~azure.mgmt.databoxedge.models.StorageAccountCredential :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 StorageAccountCredential or ClientRawResponse<StorageAccountCredential> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.StorageAccountCredential] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.StorageAccountCredential]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._create_or_update_initial( device_name=device_name, name=name, storage_account_credential=storage_account_credential, resource_group_name=resource_group_name, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('StorageAccountCredential', 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.v2017_08_01.models.ConnectionResetSharedKey] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2017_08_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, 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, resource_name, app_patch, custom_headers=None, raw=False, polling=True, **operation_config): """Update the metadata of an IoT Central application. :param resource_group_name: The name of the resource group that contains the IoT Central application. :type resource_group_name: str :param resource_name: The ARM resource name of the IoT Central application. :type resource_name: str :param app_patch: The IoT Central application metadata and security metadata. :type app_patch: ~azure.mgmt.iotcentral.models.AppPatch :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 App or ClientRawResponse<App> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.iotcentral.models.App] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.iotcentral.models.App]] :raises: :class:`ErrorDetailsException<azure.mgmt.iotcentral.models.ErrorDetailsException>` """ raw_result = self._update_initial( resource_group_name=resource_group_name, resource_name=resource_name, app_patch=app_patch, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('App', 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(self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. :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 server_name: The name of the server. :type server_name: str :param parameters: The required parameters for updating a server. :type parameters: ~azure.mgmt.rdbms.mysql.models.ServerUpdateParameters :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 Server or ClientRawResponse<Server> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.Server] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.Server]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._update_initial( resource_group_name=resource_group_name, server_name=server_name, parameters=parameters, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('Server', 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 delete(self, resource_group_name, zone_name, if_match=None, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param zone_name: The name of the DNS zone (without a terminating dot). :type zone_name: str :param if_match: The etag of the DNS zone. Omit this value to always delete the current zone. Specify the last-seen etag value to prevent accidentally deleting any concurrent changes. :type if_match: 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 ZoneDeleteResult or ClientRawResponse<ZoneDeleteResult> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.dns.v2016_04_01.models.ZoneDeleteResult] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.dns.v2016_04_01.models.ZoneDeleteResult]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, zone_name=zone_name, if_match=if_match, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('ZoneDeleteResult', 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 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.v2018_01_01.models.ConnectionMonitorQueryResult] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_01_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 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_07_01.models.ExpressRouteCircuitsRoutesTableListResult] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_07_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)
def update(self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, gallery_image_version, custom_headers=None, raw=False, polling=True, **operation_config): """Update a gallery Image Version. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param gallery_name: The name of the Shared Image Gallery in which the Image Definition resides. :type gallery_name: str :param gallery_image_name: The name of the gallery Image Definition in which the Image Version is to be updated. :type gallery_image_name: str :param gallery_image_version_name: The name of the gallery Image Version to be updated. 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_image_version_name: str :param gallery_image_version: Parameters supplied to the update gallery Image Version operation. :type gallery_image_version: ~azure.mgmt.compute.v2019_12_01.models.GalleryImageVersionUpdate :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 GalleryImageVersion or ClientRawResponse<GalleryImageVersion> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_12_01.models.GalleryImageVersion] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_12_01.models.GalleryImageVersion]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._update_initial( resource_group_name=resource_group_name, gallery_name=gallery_name, gallery_image_name=gallery_image_name, gallery_image_version_name=gallery_image_version_name, gallery_image_version=gallery_image_version, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('GalleryImageVersion', 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, config_name, time_in_week=None, not_allowed_time=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a maintenance configurations. Creates or updates a maintenance configuration 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 config_name: The name of the maintenance configuration. :type config_name: str :param time_in_week: Weekday time slots allowed to upgrade. :type time_in_week: list[~azure.mgmt.containerservice.v2021_03_01.models.TimeInWeek] :param not_allowed_time: Time slots on which upgrade is not allowed. :type not_allowed_time: list[~azure.mgmt.containerservice.v2021_03_01.models.TimeSpan] :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 MaintenanceConfiguration or ClientRawResponse<MaintenanceConfiguration> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_03_01.models.MaintenanceConfiguration] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_03_01.models.MaintenanceConfiguration]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, resource_name=resource_name, config_name=config_name, time_in_week=time_in_week, not_allowed_time=not_allowed_time, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('MaintenanceConfiguration', 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, server_name, job_agent_name, job_name, job_execution_id, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a job execution. :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 server_name: The name of the server. :type server_name: str :param job_agent_name: The name of the job agent. :type job_agent_name: str :param job_name: The name of the job to get. :type job_name: str :param job_execution_id: The job execution id to create the job execution under. :type job_execution_id: 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 JobExecution or ClientRawResponse<JobExecution> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.JobExecution] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.JobExecution]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, server_name=server_name, job_agent_name=job_agent_name, job_name=job_name, job_execution_id=job_execution_id, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('JobExecution', 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, 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_10_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_10_01.models.VirtualMachineScaleSetExtension] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_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)
def create(self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. :param resource_group_name: The name of the resource group within the user's subscription. The name is case insensitive. :type resource_group_name: str :param account_name: The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. :type account_name: str :param parameters: The parameters to provide for the created account. :type parameters: ~azure.mgmt.storage.v2018_02_01.models.StorageAccountCreateParameters :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 StorageAccount or ClientRawResponse<StorageAccount> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.storage.v2018_02_01.models.StorageAccount] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.storage.v2018_02_01.models.StorageAccount]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._create_initial( resource_group_name=resource_group_name, account_name=account_name, parameters=parameters, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('StorageAccount', 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(self, resource_group_name, host_group_name, host_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Update an dedicated host . :param resource_group_name: The name of the resource group. :type resource_group_name: str :param host_group_name: The name of the dedicated host group. :type host_group_name: str :param host_name: The name of the dedicated host . :type host_name: str :param parameters: Parameters supplied to the Update Dedicated Host operation. :type parameters: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostUpdate :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 DedicatedHost or ClientRawResponse<DedicatedHost> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.DedicatedHost] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.DedicatedHost]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._update_initial( resource_group_name=resource_group_name, host_group_name=host_group_name, host_name=host_name, parameters=parameters, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('DedicatedHost', 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, resource_pool_name, body=None, custom_headers=None, raw=False, polling=True, **operation_config): """Implements resourcePool PUT method. Create Or Update resourcePool. :param resource_group_name: The Resource Group Name. :type resource_group_name: str :param resource_pool_name: Name of the resourcePool. :type resource_pool_name: str :param body: Request payload. :type body: ~azure.mgmt.vmware.v2020_10_01_preview.models.ResourcePool :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 ResourcePool or ClientRawResponse<ResourcePool> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.vmware.v2020_10_01_preview.models.ResourcePool] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.vmware.v2020_10_01_preview.models.ResourcePool]] :raises: :class:`ErrorResponseException<azure.mgmt.vmware.v2020_10_01_preview.models.ErrorResponseException>` """ raw_result = self._create_initial( resource_group_name=resource_group_name, resource_pool_name=resource_pool_name, body=body, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): header_dict = { 'Azure-AsyncOperation': 'str', } deserialized = self._deserialize('ResourcePool', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) client_raw_response.add_headers(header_dict) 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, virtual_wan_name, wan_parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. :param resource_group_name: The resource group name of the VirtualWan. :type resource_group_name: str :param virtual_wan_name: The name of the VirtualWAN being created or updated. :type virtual_wan_name: str :param wan_parameters: Parameters supplied to create or update VirtualWAN. :type wan_parameters: ~azure.mgmt.network.v2018_07_01.models.VirtualWAN :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 VirtualWAN or ClientRawResponse<VirtualWAN> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_07_01.models.VirtualWAN] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_07_01.models.VirtualWAN]] :raises: :class:`ErrorException<azure.mgmt.network.v2018_07_01.models.ErrorException>` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, virtual_wan_name=virtual_wan_name, wan_parameters=wan_parameters, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('VirtualWAN', 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 download(self, resource_group_name, virtual_wan_name, output_blob_sas_url, vpn_sites=None, custom_headers=None, raw=False, polling=True, **operation_config): """Gives the sas-url to download the configurations for vpn-sites in a resource group. :param resource_group_name: The resource group name. :type resource_group_name: str :param virtual_wan_name: The name of the VirtualWAN for which configuration of all vpn-sites is needed. :type virtual_wan_name: str :param output_blob_sas_url: The sas-url to download the configurations for vpn-sites. :type output_blob_sas_url: str :param vpn_sites: List of resource-ids of the vpn-sites for which config is to be downloaded. :type vpn_sites: list[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 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._download_initial( resource_group_name=resource_group_name, virtual_wan_name=virtual_wan_name, output_blob_sas_url=output_blob_sas_url, vpn_sites=vpn_sites, 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, 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 create_or_update(self, resource_group_name, domain_name, domain_info, custom_headers=None, raw=False, polling=True, **operation_config): """Create or update a domain. Asynchronously creates or updates a new domain with the specified parameters. :param resource_group_name: The name of the resource group within the user's subscription. :type resource_group_name: str :param domain_name: Name of the domain. :type domain_name: str :param domain_info: Domain information. :type domain_info: ~azure.mgmt.eventgrid.models.Domain :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 Domain or ClientRawResponse<Domain> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.Domain] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.Domain]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, domain_name=domain_name, domain_info=domain_info, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('Domain', 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(self, resource_group_name, account_name, private_endpoint_connection_name, if_match=None, private_endpoint=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config): """Updates the properties of an existing private endpoint connection. :param resource_group_name: The name of the resource group that contains the Batch account. :type resource_group_name: str :param account_name: The name of the Batch account. :type account_name: str :param private_endpoint_connection_name: The private endpoint connection name. This must be unique within the account. :type private_endpoint_connection_name: str :param if_match: The state (ETag) version of the private endpoint connection to update. This value can be omitted or set to "*" to apply the operation unconditionally. :type if_match: str :param private_endpoint: The ARM resource identifier of the private endpoint. :type private_endpoint: ~azure.mgmt.batch.models.PrivateEndpoint :param private_link_service_connection_state: The private link service connection state of the private endpoint connection. :type private_link_service_connection_state: ~azure.mgmt.batch.models.PrivateLinkServiceConnectionState :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.batch.models.PrivateEndpointConnection] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.batch.models.PrivateEndpointConnection]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._update_initial( resource_group_name=resource_group_name, account_name=account_name, private_endpoint_connection_name=private_endpoint_connection_name, if_match=if_match, 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): header_dict = { 'Location': 'str', 'Retry-After': 'int', } deserialized = self._deserialize('PrivateEndpointConnection', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) client_raw_response.add_headers(header_dict) 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, 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.v2017_08_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.v2017_08_01.models.InboundNatRule] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2017_08_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)
def create_or_update(self, resource_group_name, network_interface_name, tap_configuration_name, tap_configuration_parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a Tap configuration in the specified NetworkInterface. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param network_interface_name: The name of the network interface. :type network_interface_name: str :param tap_configuration_name: The name of the tap configuration. :type tap_configuration_name: str :param tap_configuration_parameters: Parameters supplied to the create or update tap configuration operation. :type tap_configuration_parameters: ~azure.mgmt.network.v2020_03_01.models.NetworkInterfaceTapConfiguration :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 NetworkInterfaceTapConfiguration or ClientRawResponse<NetworkInterfaceTapConfiguration> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2020_03_01.models.NetworkInterfaceTapConfiguration] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2020_03_01.models.NetworkInterfaceTapConfiguration]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, network_interface_name=network_interface_name, tap_configuration_name=tap_configuration_name, tap_configuration_parameters=tap_configuration_parameters, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize( 'NetworkInterfaceTapConfiguration', 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, managed_instance_name, database_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Sets a managed database's long term retention policy. :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 managed_instance_name: The name of the managed instance. :type managed_instance_name: str :param database_name: The name of the database. :type database_name: str :param parameters: The long term retention policy info. :type parameters: ~azure.mgmt.sql.models.ManagedInstanceLongTermRetentionPolicy :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 ManagedInstanceLongTermRetentionPolicy or ClientRawResponse<ManagedInstanceLongTermRetentionPolicy> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ManagedInstanceLongTermRetentionPolicy] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ManagedInstanceLongTermRetentionPolicy]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, managed_instance_name=managed_instance_name, database_name=database_name, parameters=parameters, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize( 'ManagedInstanceLongTermRetentionPolicy', 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(self, resource_group_name, cluster_name, application_name, service_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Updates a Service Fabric service resource. Update a Service Fabric service 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 service_name: The name of the service resource in the format of {applicationName}~{serviceName}. :type service_name: str :param parameters: The service resource for patch operations. :type parameters: ~azure.mgmt.servicefabric.models.ServiceResourceUpdate :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 ServiceResource or ClientRawResponse<ServiceResource> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servicefabric.models.ServiceResource] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servicefabric.models.ServiceResource]] :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, service_name=service_name, parameters=parameters, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('ServiceResource', 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(self, resource_group_name, registry_name, token_name, token_update_parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Updates a token 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 token_name: The name of the token. :type token_name: str :param token_update_parameters: The parameters for updating a token. :type token_update_parameters: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.TokenUpdateParameters :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 Token or ClientRawResponse<Token> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerregistry.v2020_11_01_preview.models.Token] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerregistry.v2020_11_01_preview.models.Token]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._update_initial( resource_group_name=resource_group_name, registry_name=registry_name, token_name=token_name, token_update_parameters=token_update_parameters, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('Token', 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(self, resource_group_name, server_name, database_name, retention_days=None, custom_headers=None, raw=False, polling=True, **operation_config): """Updates a database's short term retention policy. :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 server_name: The name of the server. :type server_name: str :param database_name: The name of the database. :type database_name: str :param retention_days: The backup retention period in days. This is how many days Point-in-Time Restore will be supported. :type retention_days: 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 BackupShortTermRetentionPolicy or ClientRawResponse<BackupShortTermRetentionPolicy> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._update_initial( resource_group_name=resource_group_name, server_name=server_name, database_name=database_name, retention_days=retention_days, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('BackupShortTermRetentionPolicy', 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, managed_instance_name, key_name, server_key_type, uri=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a managed instance key. :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 managed_instance_name: The name of the managed instance. :type managed_instance_name: str :param key_name: The name of the managed instance key to be operated on (updated or created). :type key_name: str :param server_key_type: The key type like 'ServiceManaged', 'AzureKeyVault'. Possible values include: 'ServiceManaged', 'AzureKeyVault' :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required. :type uri: 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 ManagedInstanceKey or ClientRawResponse<ManagedInstanceKey> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ManagedInstanceKey] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ManagedInstanceKey]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, managed_instance_name=managed_instance_name, key_name=key_name, server_key_type=server_key_type, uri=uri, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('ManagedInstanceKey', 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 VirtualNetworkGatewayConnection or ClientRawResponse<VirtualNetworkGatewayConnection> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_04_01.models.VirtualNetworkGatewayConnection] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_04_01.models.VirtualNetworkGatewayConnection]] :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('VirtualNetworkGatewayConnection', 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_advertised_routes(self, resource_group_name, hub_name, connection_name, custom_headers=None, raw=False, polling=True, **operation_config): """Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param hub_name: The name of the virtual hub. :type hub_name: str :param connection_name: The name of the virtual hub bgp connection. :type connection_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 PeerRouteList or ClientRawResponse<PeerRouteList> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2020_07_01.models.PeerRouteList] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2020_07_01.models.PeerRouteList]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._list_advertised_routes_initial( resource_group_name=resource_group_name, hub_name=hub_name, connection_name=connection_name, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('PeerRouteList', 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, partner_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Update event subscription of a partner topic. Update event subscription of a partner topic. :param resource_group_name: The name of the resource group within the user's subscription. :type resource_group_name: str :param partner_topic_name: Name of the partner topic. :type partner_topic_name: str :param event_subscription_name: Name of the event subscription to be created. Event subscription names must be between 3 and 100 characters in length and use alphanumeric letters only. :type event_subscription_name: str :param event_subscription_update_parameters: Updated event subscription information. :type event_subscription_update_parameters: ~azure.mgmt.eventgrid.models.EventSubscriptionUpdateParameters :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 EventSubscription or ClientRawResponse<EventSubscription> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.EventSubscription] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.EventSubscription]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._update_initial( resource_group_name=resource_group_name, partner_topic_name=partner_topic_name, event_subscription_name=event_subscription_name, event_subscription_update_parameters= event_subscription_update_parameters, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('EventSubscription', 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)