_id
stringlengths
2
7
title
stringlengths
1
88
partition
stringclasses
3 values
text
stringlengths
75
19.8k
language
stringclasses
1 value
meta_information
dict
q267500
SqlDatabaseManagementService.update_database
test
def update_database(self, server_name, name, new_database_name=None, service_objective_id=None, edition=None, max_size_bytes=None): ''' Updates existing database details. server_name: Name of the server to contain the new database. ...
python
{ "resource": "" }
q267501
SqlDatabaseManagementService.delete_database
test
def delete_database(self, server_name, name): ''' Deletes an Azure SQL Database. server_name: Name of the server where the database is located. name: Name of the database to delete. ''' return self._perform_delete(self._get_databases_path(server_n...
python
{ "resource": "" }
q267502
SqlDatabaseManagementService.list_databases
test
def list_databases(self, name): ''' List the SQL databases defined on the specified server name ''' response = self._perform_get(self._get_list_databases_path(name), None) return _MinidomXmlToObject.parse_service_resources_response( ...
python
{ "resource": "" }
q267503
TopLevelDomainsOperations.list_agreements
test
def list_agreements( self, name, include_privacy=None, for_transfer=None, custom_headers=None, raw=False, **operation_config): """Gets all legal agreements that user needs to accept before purchasing a domain. Gets all legal agreements that user needs to accept before purchasing a ...
python
{ "resource": "" }
q267504
BaseHandler.close
test
async def close(self, exception=None): """Close down the handler connection. If the handler has already closed, this operation will do nothing. An optional exception can be passed in to indicate that the handler was shutdown due to error. It is recommended to open a handler with...
python
{ "resource": "" }
q267505
Receiver.close
test
async def close(self, exception=None): """Close down the receiver connection. If the receiver has already closed, this operation will do nothing. An optional exception can be passed in to indicate that the handler was shutdown due to error. It is recommended to open a handler within a c...
python
{ "resource": "" }
q267506
SessionReceiver.get_session_state
test
async def get_session_state(self): """Get the session state. Returns None if no state has been set. :rtype: str Example: .. literalinclude:: ../examples/async_examples/test_examples_async.py :start-after: [START set_session_state] :end-befor...
python
{ "resource": "" }
q267507
SessionReceiver.set_session_state
test
async def set_session_state(self, state): """Set the session state. :param state: The state value. :type state: str or bytes or bytearray Example: .. literalinclude:: ../examples/async_examples/test_examples_async.py :start-after: [START set_session_state] ...
python
{ "resource": "" }
q267508
SessionReceiver.receive_deferred_messages
test
async def receive_deferred_messages(self, sequence_numbers, mode=ReceiveSettleMode.PeekLock): """Receive messages that have previously been deferred. This operation can only receive deferred messages from the current session. When receiving deferred messages from a partitioned entity, all of th...
python
{ "resource": "" }
q267509
ReservationOperations.merge
test
def merge( self, reservation_order_id, sources=None, custom_headers=None, raw=False, polling=True, **operation_config): """Merges two `Reservation`s. Merge the specified `Reservation`s into a new `Reservation`. The two `Reservation`s being merged must have same properties. ...
python
{ "resource": "" }
q267510
HttpBearerChallenge._validate_challenge
test
def _validate_challenge(self, challenge): """ Verifies that the challenge is a Bearer challenge and returns the key=value pairs. """ bearer_string = 'Bearer ' if not challenge: raise ValueError('Challenge cannot be empty') challenge = challenge.strip() if not challen...
python
{ "resource": "" }
q267511
WorkspacesOperations.purge
test
def purge( self, resource_group_name, workspace_name, table, filters, custom_headers=None, raw=False, polling=True, **operation_config): """Purges data in an Log Analytics workspace by a set of user-defined filters. :param resource_group_name: The name of the resource group to get. ...
python
{ "resource": "" }
q267512
_error_handler
test
def _error_handler(error): """Handle connection and service errors. Called internally when an event has failed to send so we can parse the error to determine whether we should attempt to retry sending the event again. Returns the action to take according to error type. :param error: The error ...
python
{ "resource": "" }
q267513
ServiceBusService.create_queue
test
def create_queue(self, queue_name, queue=None, fail_on_exist=False): ''' Creates a new queue. Once created, this queue's resource manifest is immutable. queue_name: Name of the queue to create. queue: Queue object to create. fail_on_exist: ...
python
{ "resource": "" }
q267514
ServiceBusService.delete_queue
test
def delete_queue(self, queue_name, fail_not_exist=False): ''' Deletes an existing queue. This operation will also remove all associated state including messages in the queue. queue_name: Name of the queue to delete. fail_not_exist: Specify whether to thro...
python
{ "resource": "" }
q267515
ServiceBusService.get_queue
test
def get_queue(self, queue_name): ''' Retrieves an existing queue. queue_name: Name of the queue. ''' _validate_not_none('queue_name', queue_name) request = HTTPRequest() request.method = 'GET' request.host = self._get_host() request.pa...
python
{ "resource": "" }
q267516
ServiceBusService.create_topic
test
def create_topic(self, topic_name, topic=None, fail_on_exist=False): ''' Creates a new topic. Once created, this topic resource manifest is immutable. topic_name: Name of the topic to create. topic: Topic object to create. fail_on_exist: ...
python
{ "resource": "" }
q267517
ServiceBusService.get_topic
test
def get_topic(self, topic_name): ''' Retrieves the description for the specified topic. topic_name: Name of the topic. ''' _validate_not_none('topic_name', topic_name) request = HTTPRequest() request.method = 'GET' request.host = self._get_hos...
python
{ "resource": "" }
q267518
ServiceBusService.create_rule
test
def create_rule(self, topic_name, subscription_name, rule_name, rule=None, fail_on_exist=False): ''' Creates a new rule. Once created, this rule's resource manifest is immutable. topic_name: Name of the topic. subscription_name: Name o...
python
{ "resource": "" }
q267519
ServiceBusService.get_rule
test
def get_rule(self, topic_name, subscription_name, rule_name): ''' Retrieves the description for the specified rule. topic_name: Name of the topic. subscription_name: Name of the subscription. rule_name: Name of the rule. ''' _v...
python
{ "resource": "" }
q267520
ServiceBusService.list_rules
test
def list_rules(self, topic_name, subscription_name): ''' Retrieves the rules that exist under the specified subscription. topic_name: Name of the topic. subscription_name: Name of the subscription. ''' _validate_not_none('topic_name', topic_name) ...
python
{ "resource": "" }
q267521
ServiceBusService.create_subscription
test
def create_subscription(self, topic_name, subscription_name, subscription=None, fail_on_exist=False): ''' Creates a new subscription. Once created, this subscription resource manifest is immutable. topic_name: Name of the topic. subscripti...
python
{ "resource": "" }
q267522
ServiceBusService.get_subscription
test
def get_subscription(self, topic_name, subscription_name): ''' Gets an existing subscription. topic_name: Name of the topic. subscription_name: Name of the subscription. ''' _validate_not_none('topic_name', topic_name) _validate_not_none('...
python
{ "resource": "" }
q267523
ServiceBusService.list_subscriptions
test
def list_subscriptions(self, topic_name): ''' Retrieves the subscriptions in the specified topic. topic_name: Name of the topic. ''' _validate_not_none('topic_name', topic_name) request = HTTPRequest() request.method = 'GET' request.host = sel...
python
{ "resource": "" }
q267524
ServiceBusService.send_topic_message
test
def send_topic_message(self, topic_name, message=None): ''' Enqueues a message into the specified topic. The limit to the number of messages which may be present in the topic is governed by the message size in MaxTopicSizeInBytes. If this message causes the topic to exceed its qu...
python
{ "resource": "" }
q267525
ServiceBusService.unlock_subscription_message
test
def unlock_subscription_message(self, topic_name, subscription_name, sequence_number, lock_token): ''' Unlock a message for processing by other receivers on a given subscription. This operation deletes the lock object, causing the message to be unlocke...
python
{ "resource": "" }
q267526
ServiceBusService.send_queue_message_batch
test
def send_queue_message_batch(self, queue_name, messages=None): ''' Sends a batch of messages into the specified queue. The limit to the number of messages which may be present in the topic is governed by the message size the MaxTopicSizeInMegaBytes. If this message will cause the queue ...
python
{ "resource": "" }
q267527
ServiceBusService.unlock_queue_message
test
def unlock_queue_message(self, queue_name, sequence_number, lock_token): ''' Unlocks a message for processing by other receivers on a given queue. This operation deletes the lock object, causing the message to be unlocked. A message must have first been locked by a receiver befor...
python
{ "resource": "" }
q267528
ServiceBusService.receive_queue_message
test
def receive_queue_message(self, queue_name, peek_lock=True, timeout=60): ''' Receive a message from a queue for processing. queue_name: Name of the queue. peek_lock: Optional. True to retrieve and lock the message. False to read and delete the message...
python
{ "resource": "" }
q267529
ServiceBusService.receive_subscription_message
test
def receive_subscription_message(self, topic_name, subscription_name, peek_lock=True, timeout=60): ''' Receive a message from a subscription for processing. topic_name: Name of the topic. subscription_name: Name of the subscri...
python
{ "resource": "" }
q267530
ServiceBusService.create_event_hub
test
def create_event_hub(self, hub_name, hub=None, fail_on_exist=False): ''' Creates a new Event Hub. hub_name: Name of event hub. hub: Optional. Event hub properties. Instance of EventHub class. hub.message_retention_in_days: Number of days to re...
python
{ "resource": "" }
q267531
ServiceBusService.update_event_hub
test
def update_event_hub(self, hub_name, hub=None): ''' Updates an Event Hub. hub_name: Name of event hub. hub: Optional. Event hub properties. Instance of EventHub class. hub.message_retention_in_days: Number of days to retain the events for this...
python
{ "resource": "" }
q267532
ServiceBusService.get_event_hub
test
def get_event_hub(self, hub_name): ''' Retrieves an existing event hub. hub_name: Name of the event hub. ''' _validate_not_none('hub_name', hub_name) request = HTTPRequest() request.method = 'GET' request.host = self._get_host() reques...
python
{ "resource": "" }
q267533
ServiceBusService.send_event
test
def send_event(self, hub_name, message, device_id=None, broker_properties=None): ''' Sends a new message event to an Event Hub. ''' _validate_not_none('hub_name', hub_name) request = HTTPRequest() request.method = 'POST' request.host = self._get...
python
{ "resource": "" }
q267534
ServiceBusService._update_service_bus_header
test
def _update_service_bus_header(self, request): ''' Add additional headers for Service Bus. ''' if request.method in ['PUT', 'POST', 'MERGE', 'DELETE']: request.headers.append(('Content-Length', str(len(request.body)))) # if it is not GET or HEAD request, must set content-type. ...
python
{ "resource": "" }
q267535
ServiceBusWrapTokenAuthentication._get_authorization
test
def _get_authorization(self, request, httpclient): ''' return the signed string with token. ''' return 'WRAP access_token="' + \ self._get_token(request.host, request.path, httpclient) + '"'
python
{ "resource": "" }
q267536
ServiceBusWrapTokenAuthentication._token_is_expired
test
def _token_is_expired(self, token): # pylint: disable=no-self-use ''' Check if token expires or not. ''' time_pos_begin = token.find('ExpiresOn=') + len('ExpiresOn=') time_pos_end = token.find('&', time_pos_begin) token_expire_time = int(token[time_pos_begin:time_pos_end]) time_...
python
{ "resource": "" }
q267537
ServiceBusWrapTokenAuthentication._get_token
test
def _get_token(self, host, path, httpclient): ''' Returns token for the request. host: the Service Bus service request. path: the Service Bus service request. ''' wrap_scope = 'http://' + host + path + self.issuer + self.account_key # Che...
python
{ "resource": "" }
q267538
_HTTPClient._update_request_uri_query
test
def _update_request_uri_query(self, request): '''pulls the query string out of the URI and moves it into the query portion of the request object. If there are already query parameters on the request the parameters in the URI will appear after the existing parameters''' if '?' i...
python
{ "resource": "" }
q267539
ManagedClustersOperations.reset_service_principal_profile
test
def reset_service_principal_profile( self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): """Reset Service Principal Profile of a managed cluster. Update the service principal Profile for a managed cluster. ...
python
{ "resource": "" }
q267540
Message.delete
test
def delete(self): ''' Deletes itself if find queue name or topic name and subscription name. ''' if self._queue_name: self.service_bus_service.delete_queue_message( self._queue_name, self.broker_properties['SequenceNumber'], self.broker...
python
{ "resource": "" }
q267541
Message.unlock
test
def unlock(self): ''' Unlocks itself if find queue name or topic name and subscription name. ''' if self._queue_name: self.service_bus_service.unlock_queue_message( self._queue_name, self.broker_properties['SequenceNumber'], self.broker...
python
{ "resource": "" }
q267542
Message.renew_lock
test
def renew_lock(self): ''' Renew lock on itself if find queue name or topic name and subscription name. ''' if self._queue_name: self.service_bus_service.renew_lock_queue_message( self._queue_name, self.broker_properties['SequenceNumber'], ...
python
{ "resource": "" }
q267543
Message.add_headers
test
def add_headers(self, request): ''' add addtional headers to request for message request.''' # Adds custom properties if self.custom_properties: for name, value in self.custom_properties.items(): request.headers.append((name, self._serialize_escaped_properties_value(...
python
{ "resource": "" }
q267544
Message.as_batch_body
test
def as_batch_body(self): ''' return the current message as expected by batch body format''' if sys.version_info >= (3,) and isinstance(self.body, bytes): # It HAS to be string to be serialized in JSON body = self.body.decode('utf-8') else: # Python 2.7 people ...
python
{ "resource": "" }
q267545
ServiceFabricClientAPIs.get_cluster_health
test
def get_cluster_health( self, nodes_health_state_filter=0, applications_health_state_filter=0, events_health_state_filter=0, exclude_health_statistics=False, include_system_application_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): """Gets the health of a S...
python
{ "resource": "" }
q267546
ServiceFabricClientAPIs.get_cluster_health_using_policy
test
def get_cluster_health_using_policy( self, nodes_health_state_filter=0, applications_health_state_filter=0, events_health_state_filter=0, exclude_health_statistics=False, include_system_application_health_statistics=False, timeout=60, application_health_policy_map=None, cluster_health_policy=None, custom_he...
python
{ "resource": "" }
q267547
ServiceFabricClientAPIs.unprovision_application_type
test
def unprovision_application_type( self, application_type_name, application_type_version, timeout=60, async_parameter=None, custom_headers=None, raw=False, **operation_config): """Removes or unregisters a Service Fabric application type from the cluster. This operation can only be pe...
python
{ "resource": "" }
q267548
ServiceFabricClientAPIs.get_repair_task_list
test
def get_repair_task_list( self, task_id_filter=None, state_filter=None, executor_filter=None, custom_headers=None, raw=False, **operation_config): """Gets a list of repair tasks matching the given filters. This API supports the Service Fabric platform; it is not meant to be used dir...
python
{ "resource": "" }
q267549
ServiceFabricClientAPIs.submit_property_batch
test
def submit_property_batch( self, name_id, timeout=60, operations=None, custom_headers=None, raw=False, **operation_config): """Submits a property batch. Submits a batch of property operations. Either all or none of the operations will be committed. :param name_id: The Servi...
python
{ "resource": "" }
q267550
_general_error_handler
test
def _general_error_handler(http_error): ''' Simple error handler for azure.''' message = str(http_error) if http_error.respbody is not None: message += '\n' + http_error.respbody.decode('utf-8-sig') raise AzureHttpError(message, http_error.status)
python
{ "resource": "" }
q267551
WebAppsOperations.start_web_site_network_trace_operation
test
def start_web_site_network_trace_operation( self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): """Start capturing network packets for the site. Start capturing network packets for...
python
{ "resource": "" }
q267552
WebAppsOperations.list_slot_differences_slot
test
def list_slot_differences_slot( self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): """Get the difference in configuration settings between two web app slots. Get the difference in configuration settings between two web app...
python
{ "resource": "" }
q267553
WebAppsOperations.swap_slot_slot
test
def swap_slot_slot( self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): """Swaps two deployment slots of an app. Swaps two deployment slots of an app. :param resource_group_name: Name of the resource ...
python
{ "resource": "" }
q267554
EventsOperations.get_by_type
test
def get_by_type( self, app_id, event_type, timespan=None, filter=None, search=None, orderby=None, select=None, skip=None, top=None, format=None, count=None, apply=None, custom_headers=None, raw=False, **operation_config): """Execute OData query. Executes an OData query for events. ...
python
{ "resource": "" }
q267555
LargeFaceListOperations.add_face_from_stream
test
def add_face_from_stream( self, large_face_list_id, image, user_data=None, target_face=None, custom_headers=None, raw=False, callback=None, **operation_config): """Add a face to a large face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFace...
python
{ "resource": "" }
q267556
KeyVaultAuthBase._handle_redirect
test
def _handle_redirect(self, r, **kwargs): """Reset auth_attempted on redirects.""" if r.is_redirect: self._thread_local.auth_attempted = False
python
{ "resource": "" }
q267557
MigrationConfigsOperations.create_and_start_migration
test
def create_and_start_migration( self, resource_group_name, namespace_name, target_namespace, post_migration_name, custom_headers=None, raw=False, polling=True, **operation_config): """Creates Migration configuration and starts migration of entities from Standard to Premium namespace. ...
python
{ "resource": "" }
q267558
EventGridClient.publish_events
test
def publish_events( self, topic_hostname, events, custom_headers=None, raw=False, **operation_config): """Publishes a batch of events to an Azure Event Grid topic. :param topic_hostname: The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net :type topic_hostn...
python
{ "resource": "" }
q267559
ResourcesOperations.move_resources
test
def move_resources( self, source_resource_group_name, resources=None, target_resource_group=None, custom_headers=None, raw=False, polling=True, **operation_config): """Moves resources from one resource group to another resource group. The resources to move must be in the same source resourc...
python
{ "resource": "" }
q267560
DefaultProfile.use
test
def use(self, profile): """Define a new default profile.""" if not isinstance(profile, (KnownProfiles, ProfileDefinition)): raise ValueError("Can only set as default a ProfileDefinition or a KnownProfiles") type(self).profile = profile
python
{ "resource": "" }
q267561
PolicyTrackedResourcesOperations.list_query_results_for_management_group
test
def list_query_results_for_management_group( self, management_group_name, query_options=None, custom_headers=None, raw=False, **operation_config): """Queries policy tracked resources under the management group. :param management_group_name: Management group name. :type management_gr...
python
{ "resource": "" }
q267562
ServiceBusMixin.create_queue
test
def create_queue( self, queue_name, lock_duration=30, max_size_in_megabytes=None, requires_duplicate_detection=False, requires_session=False, default_message_time_to_live=None, dead_lettering_on_message_expiration=False, duplicate_detec...
python
{ "resource": "" }
q267563
ServiceBusMixin.delete_queue
test
def delete_queue(self, queue_name, fail_not_exist=False): """Delete a queue entity. :param queue_name: The name of the queue to delete. :type queue_name: str :param fail_not_exist: Whether to raise an exception if the named queue is not found. If set to True, a ServiceBusResour...
python
{ "resource": "" }
q267564
ServiceBusMixin.create_topic
test
def create_topic( self, topic_name, default_message_time_to_live=None, max_size_in_megabytes=None, requires_duplicate_detection=None, duplicate_detection_history_time_window=None, enable_batched_operations=None): """Create a topic entity. :par...
python
{ "resource": "" }
q267565
ServiceBusMixin.delete_topic
test
def delete_topic(self, topic_name, fail_not_exist=False): """Delete a topic entity. :param topic_name: The name of the topic to delete. :type topic_name: str :param fail_not_exist: Whether to raise an exception if the named topic is not found. If set to True, a ServiceBusResour...
python
{ "resource": "" }
q267566
ServiceBusMixin.create_subscription
test
def create_subscription( self, topic_name, subscription_name, lock_duration=30, requires_session=None, default_message_time_to_live=None, dead_lettering_on_message_expiration=None, dead_lettering_on_filter_evaluation_exceptions=None, enable_batched...
python
{ "resource": "" }
q267567
BaseClient.from_connection_string
test
def from_connection_string(cls, conn_str, name=None, **kwargs): """Create a Client from a Service Bus connection string. :param conn_str: The connection string. :type conn_str: str :param name: The name of the entity, if the 'EntityName' property is not included in the connecti...
python
{ "resource": "" }
q267568
BaseClient.get_properties
test
def get_properties(self): """Perform an operation to update the properties of the entity. :returns: The properties of the entity as a dictionary. :rtype: dict[str, Any] :raises: ~azure.servicebus.common.errors.ServiceBusResourceNotFound if the entity does not exist. :raises: ~az...
python
{ "resource": "" }
q267569
SessionMixin.expired
test
def expired(self): """Whether the receivers lock on a particular session has expired. :rtype: bool """ if self.locked_until and self.locked_until <= datetime.datetime.now(): return True return False
python
{ "resource": "" }
q267570
SessionOperations.create
test
def create( self, resource_group_name, node_name, session, user_name=None, password=None, retention_period=None, credential_data_format=None, encryption_certificate_thumbprint=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a session for a node. :param re...
python
{ "resource": "" }
q267571
SubscriptionFactoryOperations.create_subscription
test
def create_subscription( self, billing_account_name, invoice_section_name, body, custom_headers=None, raw=False, polling=True, **operation_config): """Creates an Azure subscription. :param billing_account_name: The name of the commerce root billing account. :type billing_ac...
python
{ "resource": "" }
q267572
LogAnalyticsOperations.export_request_rate_by_interval
test
def export_request_rate_by_interval( self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): """Export logs that show Api requests made by this subscription in the given time window to show throttling activities. :param parameters: Parameters s...
python
{ "resource": "" }
q267573
_handle_output
test
def _handle_output(results_queue): """Scan output for exceptions If there is an output from an add task collection call add it to the results. :param results_queue: Queue containing results of attempted add_collection's :type results_queue: collections.deque :return: list of TaskAddResults :rt...
python
{ "resource": "" }
q267574
_TaskWorkflowManager._bulk_add_tasks
test
def _bulk_add_tasks(self, results_queue, chunk_tasks_to_add): """Adds a chunk of tasks to the job Retry chunk if body exceeds the maximum request size and retry tasks if failed due to server errors. :param results_queue: Queue to place the return value of the request :type resu...
python
{ "resource": "" }
q267575
_TaskWorkflowManager.task_collection_thread_handler
test
def task_collection_thread_handler(self, results_queue): """Main method for worker to run Pops a chunk of tasks off the collection of pending tasks to be added and submits them to be added. :param collections.deque results_queue: Queue for worker to output results to """ # Add ...
python
{ "resource": "" }
q267576
build_config
test
def build_config(config : Dict[str, Any]) -> Dict[str, str]: """Will build the actual config for Jinja2, based on SDK config. """ result = config.copy() # Manage the classifier stable/beta is_stable = result.pop("is_stable", False) if is_stable: result["classifier"] = "Development Status...
python
{ "resource": "" }
q267577
GlobalUsersOperations.reset_password
test
def reset_password( self, user_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 user_name: The name of the user. :type user_name:...
python
{ "resource": "" }
q267578
GlobalUsersOperations.start_environment
test
def start_environment( self, user_name, environment_id, custom_headers=None, raw=False, polling=True, **operation_config): """Starts an environment by starting all resources inside the environment. This operation can take a while to complete. :param user_name: The name of the user. ...
python
{ "resource": "" }
q267579
_create_message
test
def _create_message(response, service_instance): ''' Create message from response. response: response from Service Bus cloud server. service_instance: the Service Bus client. ''' respbody = response.body custom_properties = {} broker_properties = None message_type = None...
python
{ "resource": "" }
q267580
_convert_etree_element_to_rule
test
def _convert_etree_element_to_rule(entry_element): ''' Converts entry element to rule object. The format of xml for rule: <entry xmlns='http://www.w3.org/2005/Atom'> <content type='application/xml'> <RuleDescription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com...
python
{ "resource": "" }
q267581
_convert_etree_element_to_queue
test
def _convert_etree_element_to_queue(entry_element): ''' Converts entry element to queue object. The format of xml response for queue: <QueueDescription xmlns=\"http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\"> <MaxSizeInBytes>10000</MaxSizeInBytes> <DefaultMessageTimeToLive>PT5...
python
{ "resource": "" }
q267582
_convert_etree_element_to_topic
test
def _convert_etree_element_to_topic(entry_element): '''Converts entry element to topic The xml format for topic: <entry xmlns='http://www.w3.org/2005/Atom'> <content type='application/xml'> <TopicDescription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.micro...
python
{ "resource": "" }
q267583
_convert_etree_element_to_subscription
test
def _convert_etree_element_to_subscription(entry_element): '''Converts entry element to subscription The xml format for subscription: <entry xmlns='http://www.w3.org/2005/Atom'> <content type='application/xml'> <SubscriptionDescription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" ...
python
{ "resource": "" }
q267584
CertificateOperations.create
test
def create( self, resource_group_name, account_name, certificate_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, **operation_config): """Creates a new certificate inside the specified account. :param resource_group_name: The name of the resource group th...
python
{ "resource": "" }
q267585
CertificateOperations.delete
test
def delete( self, resource_group_name, account_name, certificate_name, custom_headers=None, raw=False, **operation_config): """Deletes the specified certificate. :param resource_group_name: The name of the resource group that contains the Batch account. :type resource_group...
python
{ "resource": "" }
q267586
get_client_from_cli_profile
test
def get_client_from_cli_profile(client_class, **kwargs): """Return a SDK client initialized with current CLI credentials, CLI default subscription and CLI default cloud. This method will fill automatically the following client parameters: - credentials - subscription_id - base_url Parameters p...
python
{ "resource": "" }
q267587
get_client_from_json_dict
test
def get_client_from_json_dict(client_class, config_dict, **kwargs): """Return a SDK client initialized with a JSON auth dict. The easiest way to obtain this content is to call the following CLI commands: .. code:: bash az ad sp create-for-rbac --sdk-auth This method will fill automatically t...
python
{ "resource": "" }
q267588
get_client_from_auth_file
test
def get_client_from_auth_file(client_class, auth_path=None, **kwargs): """Return a SDK client initialized with auth file. The easiest way to obtain this file is to call the following CLI commands: .. code:: bash az ad sp create-for-rbac --sdk-auth You can specific the file path directly, or ...
python
{ "resource": "" }
q267589
_ETreeXmlToObject.parse_enum_results_list
test
def parse_enum_results_list(response, return_type, resp_type, item_type): """resp_body is the XML we received resp_type is a string, such as Containers, return_type is the type we're constructing, such as ContainerEnumResults item_type is the type object of the item to be created, such a...
python
{ "resource": "" }
q267590
_ETreeXmlToObject.get_entry_properties_from_element
test
def get_entry_properties_from_element(element, include_id, id_prefix_to_skip=None, use_title_as_id=False): ''' get properties from element tree element ''' properties = {} etag = element.attrib.get(_make_etree_ns_attr_name(_etree_entity_feed_namespaces['m'], 'etag'), None) if etag is no...
python
{ "resource": "" }
q267591
DpsCertificateOperations.delete
test
def delete( self, resource_group_name, if_match, provisioning_service_name, certificate_name, certificatename=None, certificateraw_bytes=None, certificateis_verified=None, certificatepurpose=None, certificatecreated=None, certificatelast_updated=None, certificatehas_private_key=None, certificatenonce=None, ...
python
{ "resource": "" }
q267592
ServiceBusClient.get_queue
test
def get_queue(self, queue_name): """Get a client for a queue entity. :param queue_name: The name of the queue. :type queue_name: str :rtype: ~azure.servicebus.servicebus_client.QueueClient :raises: ~azure.servicebus.common.errors.ServiceBusConnectionError if the namespace is not...
python
{ "resource": "" }
q267593
ServiceBusClient.list_queues
test
def list_queues(self): """Get clients for all queue entities in the namespace. :rtype: list[~azure.servicebus.servicebus_client.QueueClient] :raises: ~azure.servicebus.common.errors.ServiceBusConnectionError if the namespace is not found. Example: .. literalinclude:: ../exa...
python
{ "resource": "" }
q267594
ServiceBusClient.get_topic
test
def get_topic(self, topic_name): """Get a client for a topic entity. :param topic_name: The name of the topic. :type topic_name: str :rtype: ~azure.servicebus.servicebus_client.TopicClient :raises: ~azure.servicebus.common.errors.ServiceBusConnectionError if the namespace is not...
python
{ "resource": "" }
q267595
ServiceBusClient.list_topics
test
def list_topics(self): """Get a client for all topic entities in the namespace. :rtype: list[~azure.servicebus.servicebus_client.TopicClient] :raises: ~azure.servicebus.common.errors.ServiceBusConnectionError if the namespace is not found. Example: .. literalinclude:: ../ex...
python
{ "resource": "" }
q267596
ReceiveClientMixin.receive_deferred_messages
test
def receive_deferred_messages(self, sequence_numbers, mode=ReceiveSettleMode.PeekLock, **kwargs): """Receive messages by sequence number that have been previously deferred. When receiving deferred messages from a partitioned entity, all of the supplied sequence numbers must be messages from the...
python
{ "resource": "" }
q267597
ReceiveClientMixin.settle_deferred_messages
test
def settle_deferred_messages(self, settlement, messages, **kwargs): """Settle messages that have been previously deferred. :param settlement: How the messages are to be settled. This must be a string of one of the following values: 'completed', 'suspended', 'abandoned'. :type settlemen...
python
{ "resource": "" }
q267598
WebsiteManagementService.get_site
test
def get_site(self, webspace_name, website_name): ''' List the web sites defined on this webspace. webspace_name: The name of the webspace. website_name: The name of the website. ''' return self._perform_get(self._get_sites_details_path(webspace_na...
python
{ "resource": "" }
q267599
WebsiteManagementService.create_site
test
def create_site(self, webspace_name, website_name, geo_region, host_names, plan='VirtualDedicatedPlan', compute_mode='Shared', server_farm=None, site_mode=None): ''' Create a website. webspace_name: The name of the webspace. website_na...
python
{ "resource": "" }