def grant_access(self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): """Grants access to a disk. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param disk_name: The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. :type disk_name: str :param access: Possible values include: 'None', 'Read' :type access: str or ~azure.mgmt.compute.v2018_04_01.models.AccessLevel :param duration_in_seconds: Time duration in seconds until the SAS access expires. :type duration_in_seconds: 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 AccessUri or ClientRawResponse<AccessUri> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.AccessUri] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.AccessUri]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._grant_access_initial( resource_group_name=resource_group_name, disk_name=disk_name, access=access, duration_in_seconds=duration_in_seconds, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('AccessUri', 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 create_or_update(self, resource_group_name, express_route_gateway_name, put_express_route_gateway_parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a ExpressRoute gateway in a specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param express_route_gateway_name: The name of the ExpressRoute gateway. :type express_route_gateway_name: str :param put_express_route_gateway_parameters: Parameters required in an ExpressRoute gateway PUT operation. :type put_express_route_gateway_parameters: ~azure.mgmt.network.v2020_03_01.models.ExpressRouteGateway :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 ExpressRouteGateway or ClientRawResponse<ExpressRouteGateway> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2020_03_01.models.ExpressRouteGateway] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2020_03_01.models.ExpressRouteGateway]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, express_route_gateway_name=express_route_gateway_name, put_express_route_gateway_parameters= put_express_route_gateway_parameters, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('ExpressRouteGateway', 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)
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 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)
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, 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)
def update(self, resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Update StreamingEndpoint. Updates a existing StreamingEndpoint. :param resource_group_name: The name of the resource group within the Azure subscription. :type resource_group_name: str :param account_name: The Media Services account name. :type account_name: str :param streaming_endpoint_name: The name of the StreamingEndpoint. :type streaming_endpoint_name: str :param parameters: StreamingEndpoint properties needed for creation. :type parameters: ~azure.mgmt.media.models.StreamingEndpoint :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 StreamingEndpoint or ClientRawResponse<StreamingEndpoint> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.media.models.StreamingEndpoint] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.media.models.StreamingEndpoint]] :raises: :class:`ApiErrorException<azure.mgmt.media.models.ApiErrorException>` """ raw_result = self._update_initial( resource_group_name=resource_group_name, account_name=account_name, streaming_endpoint_name=streaming_endpoint_name, parameters=parameters, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('StreamingEndpoint', 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_watcher_name, connection_monitor_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Create or update a connection monitor. :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 of the connection monitor. :type connection_monitor_name: str :param parameters: Parameters that define the operation to create a connection monitor. :type parameters: ~azure.mgmt.network.v2019_06_01.models.ConnectionMonitor :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 ConnectionMonitorResult or ClientRawResponse<ConnectionMonitorResult> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2019_06_01.models.ConnectionMonitorResult] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_06_01.models.ConnectionMonitorResult]] :raises: :class:`ErrorResponseException<azure.mgmt.network.v2019_06_01.models.ErrorResponseException>` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, network_watcher_name=network_watcher_name, connection_monitor_name=connection_monitor_name, parameters=parameters, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('ConnectionMonitorResult', 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, 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.v2019_04_01.models.DdosProtectionPlan] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_04_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 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.v2016_09_01.models.ApplicationGatewayBackendHealth] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2016_09_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 export_throttled_requests(self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): """Export logs that show total throttled Api requests for this subscription in the given time window. :param parameters: Parameters supplied to the LogAnalytics getThrottledRequests Api. :type parameters: ~azure.mgmt.compute.v2018_10_01.models.ThrottledRequestsInput :param location: The location upon which virtual-machine-sizes is queried. :type location: 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 LogAnalyticsOperationResult or ClientRawResponse<LogAnalyticsOperationResult> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.LogAnalyticsOperationResult] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.LogAnalyticsOperationResult]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._export_throttled_requests_initial( parameters=parameters, location=location, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('LogAnalyticsOperationResult', 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': 'azure-async-operation'}, **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, hana_instance_name, hana_instance_parameter, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a SAP HANA instance. Creates a SAP HANA instance for the specified subscription, resource group, and instance name. :param resource_group_name: Name of the resource group. :type resource_group_name: str :param hana_instance_name: Name of the SAP HANA on Azure instance. :type hana_instance_name: str :param hana_instance_parameter: Request body representing a HanaInstance :type hana_instance_parameter: ~azure.mgmt.hanaonazure.models.HanaInstance :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 HanaInstance or ClientRawResponse<HanaInstance> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.hanaonazure.models.HanaInstance] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.hanaonazure.models.HanaInstance]] :raises: :class:`ErrorResponseException<azure.mgmt.hanaonazure.models.ErrorResponseException>` """ raw_result = self._create_initial( resource_group_name=resource_group_name, hana_instance_name=hana_instance_name, hana_instance_parameter=hana_instance_parameter, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('HanaInstance', 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, replication_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): """Updates a replication 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 replication_name: The name of the replication. :type replication_name: str :param tags: The tags for the replication. :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 Replication or ClientRawResponse<Replication> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerregistry.v2017_10_01.models.Replication] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerregistry.v2017_10_01.models.Replication]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._update_initial( resource_group_name=resource_group_name, registry_name=registry_name, replication_name=replication_name, tags=tags, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('Replication', 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, system_topic_name, system_topic_update_parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Update a system topic. Asynchronously updates a system topic 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 system_topic_name: Name of the system topic. :type system_topic_name: str :param system_topic_update_parameters: SystemTopic update information. :type system_topic_update_parameters: ~azure.mgmt.eventgrid.models.SystemTopicUpdateParameters :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 SystemTopic or ClientRawResponse<SystemTopic> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.SystemTopic] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.SystemTopic]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._update_initial( resource_group_name=resource_group_name, system_topic_name=system_topic_name, system_topic_update_parameters=system_topic_update_parameters, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('SystemTopic', 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, azure_ad_only_authentication, custom_headers=None, raw=False, polling=True, **operation_config): """Sets Server Active Directory only authentication property or updates an existing server Active Directory only authentication property. :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 azure_ad_only_authentication: Azure Active Directory only Authentication enabled. :type azure_ad_only_authentication: 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 ServerAzureADOnlyAuthentication or ClientRawResponse<ServerAzureADOnlyAuthentication> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ServerAzureADOnlyAuthentication] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ServerAzureADOnlyAuthentication]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, server_name=server_name, azure_ad_only_authentication=azure_ad_only_authentication, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('ServerAzureADOnlyAuthentication', 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)
def create(self, resource_group_name, cluster_name, extension_name, workspace_id=None, primary_key=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates an HDInsight cluster extension. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param cluster_name: The name of the cluster. :type cluster_name: str :param extension_name: The name of the cluster extension. :type extension_name: str :param workspace_id: The workspace ID for the cluster monitoring extension. :type workspace_id: str :param primary_key: The certificate for the cluster monitoring extensions. :type primary_key: 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:`ErrorResponseException<azure.mgmt.hdinsight.models.ErrorResponseException>` """ raw_result = self._create_initial( resource_group_name=resource_group_name, cluster_name=cluster_name, extension_name=extension_name, workspace_id=workspace_id, primary_key=primary_key, 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)
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)
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_10_01.models.PacketCaptureQueryStatusResult] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_10_01.models.PacketCaptureQueryStatusResult]] :raises: :class:`ErrorResponseException<azure.mgmt.network.v2018_10_01.models.ErrorResponseException>` """ 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)
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_02_01.models.ConnectionResetSharedKey] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_02_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, name, kube_environment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): """Create a Kubernetes Environment. Description for Create a Kubernetes Environment. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str :param name: Name of the Kubernetes Environment. :type name: str :param kube_environment_envelope: Configuration details of the Kubernetes Environment. :type kube_environment_envelope: ~azure.mgmt.web.v2019_08_01.models.KubeEnvironment :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 KubeEnvironment or ClientRawResponse<KubeEnvironment> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.KubeEnvironment] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.KubeEnvironment]] :raises: :class:`DefaultErrorResponseException<azure.mgmt.web.v2019_08_01.models.DefaultErrorResponseException>` """ raw_result = self._create_initial( resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment_envelope, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('KubeEnvironment', 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, virtual_wan_name, p2_svpn_server_configuration_name, p2_svpn_server_configuration_parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it doesn't exist else updates the existing P2SVpnServerConfiguration. :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. :type virtual_wan_name: str :param p2_svpn_server_configuration_name: The name of the P2SVpnServerConfiguration. :type p2_svpn_server_configuration_name: str :param p2_svpn_server_configuration_parameters: Parameters supplied to create or Update a P2SVpnServerConfiguration. :type p2_svpn_server_configuration_parameters: ~azure.mgmt.network.v2018_11_01.models.P2SVpnServerConfiguration :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 P2SVpnServerConfiguration or ClientRawResponse<P2SVpnServerConfiguration> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_11_01.models.P2SVpnServerConfiguration] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_11_01.models.P2SVpnServerConfiguration]] :raises: :class:`ErrorException<azure.mgmt.network.v2018_11_01.models.ErrorException>` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, virtual_wan_name=virtual_wan_name, p2_svpn_server_configuration_name=p2_svpn_server_configuration_name, p2_svpn_server_configuration_parameters= p2_svpn_server_configuration_parameters, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('P2SVpnServerConfiguration', 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 generate_vpn_profile(self, resource_group_name, gateway_name, authentication_method=None, custom_headers=None, raw=False, polling=True, **operation_config): """Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param gateway_name: The name of the P2SVpnGateway. :type gateway_name: str :param authentication_method: VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' :type authentication_method: str or ~azure.mgmt.network.v2019_07_01.models.AuthenticationMethod :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 VpnProfileResponse or ClientRawResponse<VpnProfileResponse> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2019_07_01.models.VpnProfileResponse] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_07_01.models.VpnProfileResponse]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._generate_vpn_profile_initial( resource_group_name=resource_group_name, gateway_name=gateway_name, authentication_method=authentication_method, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('VpnProfileResponse', 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, 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)
def create_or_update(self, resource_group_name, lab_name, user_name, name, secret, custom_headers=None, raw=False, polling=True, **operation_config): """Create or replace an existing secret. 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_name: The name of the lab. :type lab_name: str :param user_name: The name of the user profile. :type user_name: str :param name: The name of the secret. :type name: str :param secret: A secret. :type secret: ~azure.mgmt.devtestlabs.models.Secret :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 Secret or ClientRawResponse<Secret> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.devtestlabs.models.Secret] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.devtestlabs.models.Secret]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, lab_name=lab_name, user_name=user_name, name=name, secret=secret, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('Secret', 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, 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)
def patch(self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. :param resource_group_name: Name of the resource group within the azure subscription. :type resource_group_name: str :param cluster_name: The name of the Event Hubs Cluster. :type cluster_name: str :param parameters: The properties of the Event Hubs Cluster which should be updated. :type parameters: ~azure.mgmt.eventhub.v2018_01_01_preview.models.Cluster :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 Cluster or ClientRawResponse<Cluster> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventhub.v2018_01_01_preview.models.Cluster] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventhub.v2018_01_01_preview.models.Cluster]] :raises: :class:`ErrorResponseException<azure.mgmt.eventhub.v2018_01_01_preview.models.ErrorResponseException>` """ raw_result = self._patch_initial( resource_group_name=resource_group_name, cluster_name=cluster_name, parameters=parameters, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('Cluster', 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, virtual_network_gateway_connection_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a virtual network gateway connection in the specified resource group. :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 parameters: Parameters supplied to the create or update virtual network gateway connection operation. :type parameters: ~azure.mgmt.network.v2018_07_01.models.VirtualNetworkGatewayConnection :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_07_01.models.VirtualNetworkGatewayConnection] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_07_01.models.VirtualNetworkGatewayConnection]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, virtual_network_gateway_connection_name= virtual_network_gateway_connection_name, parameters=parameters, 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 update(self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): """Updates (patches) a disk. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param disk_name: The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. :type disk_name: str :param disk: Disk object supplied in the body of the Patch disk operation. :type disk: ~azure.mgmt.compute.v2018_04_01.models.DiskUpdate :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 Disk or ClientRawResponse<Disk> if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.Disk] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.Disk]] :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>` """ raw_result = self._update_initial( resource_group_name=resource_group_name, disk_name=disk_name, disk=disk, custom_headers=custom_headers, raw=True, **operation_config) def get_long_running_output(response): deserialized = self._deserialize('Disk', 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)