INSTRUCTION stringlengths 1 8.43k | RESPONSE stringlengths 75 104k |
|---|---|
Deletes the specified OS image from your image repository. | def delete_os_image(self, image_name, delete_vhd=False):
'''
Deletes the specified OS image from your image repository.
image_name:
The name of the image.
delete_vhd:
Deletes the underlying vhd blob in Azure storage.
'''
_validate_not_none('image_... |
Retrieves the specified data disk from a virtual machine. | def get_data_disk(self, service_name, deployment_name, role_name, lun):
'''
Retrieves the specified data disk from a virtual machine.
service_name:
The name of the service.
deployment_name:
The name of the deployment.
role_name:
The name of th... |
Adds a data disk to a virtual machine. | def add_data_disk(self, service_name, deployment_name, role_name, lun,
host_caching=None, media_link=None, disk_label=None,
disk_name=None, logical_disk_size_in_gb=None,
source_media_link=None):
'''
Adds a data disk to a virtual machine.
... |
Updates the specified data disk attached to the specified virtual machine. | def update_data_disk(self, service_name, deployment_name, role_name, lun,
host_caching=None, media_link=None, updated_lun=None,
disk_label=None, disk_name=None,
logical_disk_size_in_gb=None):
'''
Updates the specified data disk a... |
Removes the specified data disk from a virtual machine. | def delete_data_disk(self, service_name, deployment_name, role_name, lun, delete_vhd=False):
'''
Removes the specified data disk from a virtual machine.
service_name:
The name of the service.
deployment_name:
The name of the deployment.
role_name:
... |
Adds a disk to the user image repository. The disk can be an OS disk or a data disk. | def add_disk(self, has_operating_system, label, media_link, name, os):
'''
Adds a disk to the user image repository. The disk can be an OS disk
or a data disk.
has_operating_system:
Deprecated.
label:
Specifies the description of the disk.
media_l... |
Updates an existing disk in your image repository. | def update_disk(self, disk_name, has_operating_system=None, label=None, media_link=None,
name=None, os=None):
'''
Updates an existing disk in your image repository.
disk_name:
The name of the disk to update.
has_operating_system:
Deprecated.
... |
Deletes the specified data or operating system disk from your image repository. | def delete_disk(self, disk_name, delete_vhd=False):
'''
Deletes the specified data or operating system disk from your image
repository.
disk_name:
The name of the disk to delete.
delete_vhd:
Deletes the underlying vhd blob in Azure storage.
'''
... |
Get all smartGroups within the subscription. | def get_all(
self, target_resource=None, target_resource_group=None, target_resource_type=None, monitor_service=None, monitor_condition=None, severity=None, smart_group_state=None, time_range=None, page_count=None, sort_by=None, sort_order=None, custom_headers=None, raw=False, **operation_config):
"... |
Summarizes policy states for the resources under the management group. | def summarize_for_management_group(
self, management_group_name, query_options=None, custom_headers=None, raw=False, **operation_config):
"""Summarizes policy states for the resources under the management group.
:param management_group_name: Management group name.
:type management_g... |
This is a temporary patch pending a fix in uAMQP. | def _build_receiver(self):
"""This is a temporary patch pending a fix in uAMQP."""
# pylint: disable=protected-access
self._handler.message_handler = self._handler.receiver_type(
self._handler._session,
self._handler._remote_address,
self._handler._name,
... |
Open receiver connection and authenticate session. | def open(self):
"""Open receiver connection and authenticate session.
If the receiver is already open, this operation will do nothing.
This method will be called automatically when one starts to iterate
messages in the receiver, so there should be no need to call it directly.
A ... |
Receive a batch of messages at once. | def fetch_next(self, max_batch_size=None, timeout=None):
"""Receive a batch of messages at once.
This approach it optimal if you wish to process multiple messages simultaneously. Note that the
number of messages retrieved in a single batch will be dependent on
whether `prefetch` was set... |
Renew the session lock. | def renew_lock(self):
"""Renew the session lock.
This operation must be performed periodically in order to retain a lock on the
session to continue message processing.
Once the lock is lost the connection will be closed. This operation can
also be performed as a threaded backgro... |
Browse messages currently pending in the queue. | def peek(self, count=1, start_from=None):
"""Browse messages currently pending in the queue.
Peeked messages are not removed from queue, nor are they locked. They cannot be completed,
deferred or dead-lettered.
This operation will only peek pending messages in the current session.
... |
List session IDs. | def list_sessions(self, updated_since=None, max_results=100, skip=0):
"""List session IDs.
List the Session IDs with pending messages in the queue where the state of the session
has been updated since the timestamp provided. If no timestamp is provided, all will be returned.
If the stat... |
Create or update a VM scale set. | def create_or_update(
self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config):
"""Create or update a VM scale set.
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:... |
Converts SinglePlacementGroup property to false for a existing virtual machine scale set. | def convert_to_single_placement_group(
self, resource_group_name, vm_scale_set_name, active_placement_group_id=None, custom_headers=None, raw=False, **operation_config):
"""Converts SinglePlacementGroup property to false for a existing virtual
machine scale set.
:param resource_grou... |
Find all Autorest generated code in that module prefix. This actually looks for a models package only ( not file ). We could be smarter if necessary. | def find_autorest_generated_folder(module_prefix="azure"):
"""Find all Autorest generated code in that module prefix.
This actually looks for a "models" package only (not file). We could be smarter if necessary.
"""
_LOGGER.info(f"Looking for Autorest generated package in {module_prefix}")
# Manual... |
Assuming package is azure - mgmt - compute and module name is azure. mgmt. compute. v2018 - 08 - 01 will return v2018 - 08 - 01 | def get_sub_module_part(package_name, module_name):
"""Assuming package is azure-mgmt-compute and module name is azure.mgmt.compute.v2018-08-01
will return v2018-08-01
"""
sub_module_from_package = package_name.replace("-", ".")
if not module_name.startswith(sub_module_from_package):
_LOGGER... |
Module depends on the API version: | def models(cls, api_version=DEFAULT_API_VERSION):
"""Module depends on the API version:
* 2016-02-01: :mod:`v2016_02_01.models<azure.mgmt.resource.resources.v2016_02_01.models>`
* 2016-09-01: :mod:`v2016_09_01.models<azure.mgmt.resource.resources.v2016_09_01.models>`
* 2017-05-... |
Instance depends on the API version: | def resource_groups(self):
"""Instance depends on the API version:
* 2016-02-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2016_02_01.operations.ResourceGroupsOperations>`
* 2016-09-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2016_09_01.operat... |
Module depends on the API version: | def models(cls, api_version=DEFAULT_API_VERSION):
"""Module depends on the API version:
* 2015-10-01-preview: :mod:`v2015_10_01_preview.models<azure.mgmt.resource.policy.v2015_10_01_preview.models>`
* 2016-04-01: :mod:`v2016_04_01.models<azure.mgmt.resource.policy.v2016_04_01.models>`
... |
Instance depends on the API version: | def policy_assignments(self):
"""Instance depends on the API version:
* 2015-10-01-preview: :class:`PolicyAssignmentsOperations<azure.mgmt.resource.policy.v2015_10_01_preview.operations.PolicyAssignmentsOperations>`
* 2016-04-01: :class:`PolicyAssignmentsOperations<azure.mgmt.resource.pol... |
Instance depends on the API version: | def policy_set_definitions(self):
"""Instance depends on the API version:
* 2017-06-01-preview: :class:`PolicySetDefinitionsOperations<azure.mgmt.resource.policy.v2017_06_01_preview.operations.PolicySetDefinitionsOperations>`
* 2018-03-01: :class:`PolicySetDefinitionsOperations<azure.mgmt... |
Detect profanity and match against custom and shared blacklists. | def screen_text(
self, text_content_type, text_content, language=None, autocorrect=False, pii=False, list_id=None, classify=False, custom_headers=None, raw=False, callback=None, **operation_config):
"""Detect profanity and match against custom and shared blacklists.
Detects profanity in mor... |
Creates a new key stores it then returns key parameters and attributes to the client. | def create_key(
self, vault_base_url, key_name, kty, key_size=None, key_ops=None, key_attributes=None, tags=None, curve=None, custom_headers=None, raw=False, **operation_config):
"""Creates a new key, stores it, then returns key parameters and
attributes to the client.
The create ke... |
Imports an externally created key stores it and returns key parameters and attributes to the client. | def import_key(
self, vault_base_url, key_name, key, hsm=None, key_attributes=None, tags=None, custom_headers=None, raw=False, **operation_config):
"""Imports an externally created key, stores it, and returns key
parameters and attributes to the client.
The import key operation may ... |
The update key operation changes specified attributes of a stored key and can be applied to any key type and key version stored in Azure Key Vault. | def update_key(
self, vault_base_url, key_name, key_version, key_ops=None, key_attributes=None, tags=None, custom_headers=None, raw=False, **operation_config):
"""The update key operation changes specified attributes of a stored key
and can be applied to any key type and key version stored i... |
Sets a secret in a specified key vault. | def set_secret(
self, vault_base_url, secret_name, value, tags=None, content_type=None, secret_attributes=None, custom_headers=None, raw=False, **operation_config):
"""Sets a secret in a specified key vault.
The SET operation adds a secret to the Azure Key Vault. If the named
secret... |
Sets the specified certificate issuer. | def set_certificate_issuer(
self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, custom_headers=None, raw=False, **operation_config):
"""Sets the specified certificate issuer.
The SetCertificateIssuer operation adds or updates the specif... |
Creates or updates a new storage account. This operation requires the storage/ set permission. | def set_storage_account(
self, vault_base_url, storage_account_name, resource_id, active_key_name, auto_regenerate_key, regeneration_period=None, storage_account_attributes=None, tags=None, custom_headers=None, raw=False, **operation_config):
"""Creates or updates a new storage account. This operati... |
Module depends on the API version: | def models(cls, api_version=DEFAULT_API_VERSION):
"""Module depends on the API version:
* 2015-06-15: :mod:`v2015_06_15.models<azure.mgmt.storage.v2015_06_15.models>`
* 2016-01-01: :mod:`v2016_01_01.models<azure.mgmt.storage.v2016_01_01.models>`
* 2016-12-01: :mod:`v2016_12_01.... |
Instance depends on the API version: | def blob_containers(self):
"""Instance depends on the API version:
* 2018-02-01: :class:`BlobContainersOperations<azure.mgmt.storage.v2018_02_01.operations.BlobContainersOperations>`
* 2018-03-01-preview: :class:`BlobContainersOperations<azure.mgmt.storage.v2018_03_01_preview.operations.B... |
Instance depends on the API version: | def blob_services(self):
"""Instance depends on the API version:
* 2018-07-01: :class:`BlobServicesOperations<azure.mgmt.storage.v2018_07_01.operations.BlobServicesOperations>`
"""
api_version = self._get_api_version('blob_services')
if api_version == '2018-07-01':
... |
Instance depends on the API version: | def management_policies(self):
"""Instance depends on the API version:
* 2018-07-01: :class:`ManagementPoliciesOperations<azure.mgmt.storage.v2018_07_01.operations.ManagementPoliciesOperations>`
"""
api_version = self._get_api_version('management_policies')
if api_version == ... |
Instance depends on the API version: | def skus(self):
"""Instance depends on the API version:
* 2017-06-01: :class:`SkusOperations<azure.mgmt.storage.v2017_06_01.operations.SkusOperations>`
* 2017-10-01: :class:`SkusOperations<azure.mgmt.storage.v2017_10_01.operations.SkusOperations>`
* 2018-02-01: :class:`SkusOper... |
Instance depends on the API version: | def storage_accounts(self):
"""Instance depends on the API version:
* 2015-06-15: :class:`StorageAccountsOperations<azure.mgmt.storage.v2015_06_15.operations.StorageAccountsOperations>`
* 2016-01-01: :class:`StorageAccountsOperations<azure.mgmt.storage.v2016_01_01.operations.StorageAccoun... |
Instance depends on the API version: | def usage(self):
"""Instance depends on the API version:
* 2015-06-15: :class:`UsageOperations<azure.mgmt.storage.v2015_06_15.operations.UsageOperations>`
* 2016-01-01: :class:`UsageOperations<azure.mgmt.storage.v2016_01_01.operations.UsageOperations>`
* 2016-12-01: :class:`Usa... |
Instance depends on the API version: | def usages(self):
"""Instance depends on the API version:
* 2018-03-01-preview: :class:`UsagesOperations<azure.mgmt.storage.v2018_03_01_preview.operations.UsagesOperations>`
* 2018-07-01: :class:`UsagesOperations<azure.mgmt.storage.v2018_07_01.operations.UsagesOperations>`
"""
... |
Module depends on the API version: | def models(cls, api_version=DEFAULT_API_VERSION):
"""Module depends on the API version:
* 2016-06-01: :mod:`v2016_06_01.models<azure.mgmt.resource.subscriptions.v2016_06_01.models>`
"""
if api_version == '2016-06-01':
from .v2016_06_01 import models
return mod... |
Create a Service Bus client from a connection string. | def from_connection_string(cls, conn_str, *, loop=None, **kwargs):
"""Create a Service Bus client from a connection string.
:param conn_str: The connection string.
:type conn_str: str
Example:
.. literalinclude:: ../examples/async_examples/test_examples_async.py
... |
Get an async client for a subscription entity. | def get_subscription(self, topic_name, subscription_name):
"""Get an async client for a subscription entity.
:param topic_name: The name of the topic.
:type topic_name: str
:param subscription_name: The name of the subscription.
:type subscription_name: str
:rtype: ~azur... |
Get an async client for all subscription entities in the topic. | def list_subscriptions(self, topic_name):
"""Get an async client for all subscription entities in the topic.
:param topic_name: The topic to list subscriptions for.
:type topic_name: str
:rtype: list[~azure.servicebus.aio.async_client.SubscriptionClient]
:raises: ~azure.serviceb... |
Send one or more messages to the current entity. | async def send(self, messages, message_timeout=0, session=None, **kwargs):
"""Send one or more messages to the current entity.
This operation will open a single-use connection, send the supplied messages, and close
connection. If the entity requires sessions, a session ID must be either
... |
Get a Sender for the Service Bus endpoint. | def get_sender(self, message_timeout=0, session=None, **kwargs):
"""Get a Sender for the Service Bus endpoint.
A Sender represents a single open connection within which multiple send operations can be made.
:param message_timeout: The period in seconds during which messages sent with
... |
Get a Receiver for the Service Bus endpoint. | def get_receiver(self, session=None, prefetch=0, mode=ReceiveSettleMode.PeekLock, idle_timeout=0, **kwargs):
"""Get a Receiver for the Service Bus endpoint.
A Receiver represents a single open connection with which multiple receive operations can be made.
:param session: A specific session fro... |
Get a Receiver for the deadletter endpoint of the entity. | def get_deadletter_receiver(
self, transfer_deadletter=False, prefetch=0,
mode=ReceiveSettleMode.PeekLock, idle_timeout=0, **kwargs):
"""Get a Receiver for the deadletter endpoint of the entity.
A Receiver represents a single open connection with which multiple receive operation... |
Extracts request id from response header. | def parse_response_for_async_op(response):
''' Extracts request id from response header. '''
if response is None:
return None
result = AsynchronousOperationResult()
if response.headers:
for name, value in response.headers:
if name.lower() == 'x-ms-request-id':
... |
Returns a new service which will process requests with the specified filter. Filtering operations can include logging automatic retrying etc... The filter is a lambda which receives the HTTPRequest and another lambda. The filter can perform any pre - processing on the request pass it off to the next lambda and then per... | def with_filter(self, filter):
'''Returns a new service which will process requests with the
specified filter. Filtering operations can include logging, automatic
retrying, etc... The filter is a lambda which receives the HTTPRequest
and another lambda. The filter can perform any pre-... |
Sets the proxy server host and port for the HTTP CONNECT Tunnelling. | def set_proxy(self, host, port, user=None, password=None):
'''
Sets the proxy server host and port for the HTTP CONNECT Tunnelling.
host:
Address of the proxy. Ex: '192.168.0.100'
port:
Port of the proxy. Ex: 6000
user:
User for proxy authoriz... |
Performs a GET request and returns the response. | def perform_get(self, path, x_ms_version=None):
'''
Performs a GET request and returns the response.
path:
Path to the resource.
Ex: '/<subscription-id>/services/hostedservices/<service-name>'
x_ms_version:
If specified, this is used for the x-ms-vers... |
Performs a PUT request and returns the response. | def perform_put(self, path, body, x_ms_version=None):
'''
Performs a PUT request and returns the response.
path:
Path to the resource.
Ex: '/<subscription-id>/services/hostedservices/<service-name>'
body:
Body for the PUT request.
x_ms_version... |
Waits for an asynchronous operation to complete. | def wait_for_operation_status(self,
request_id, wait_for_status='Succeeded', timeout=30, sleep_interval=5,
progress_callback=wait_for_operation_status_progress_default_callback,
success_callback=wait_for_operation_status_success_default_callback,
failure_callback=wait_for_operation_statu... |
Returns the status of the specified operation. After calling an asynchronous operation you can call Get Operation Status to determine whether the operation has succeeded failed or is still in progress. | def get_operation_status(self, request_id):
'''
Returns the status of the specified operation. After calling an
asynchronous operation, you can call Get Operation Status to determine
whether the operation has succeeded, failed, or is still in progress.
request_id:
Th... |
Add additional headers for management. | def _update_management_header(self, request, x_ms_version):
''' Add additional headers for management. '''
if request.method in ['PUT', 'POST', 'MERGE', 'DELETE']:
request.headers.append(('Content-Length', str(len(request.body))))
# append additional headers base on the service
... |
Assumed called on Travis to prepare a package to be deployed | def travis_build_package():
"""Assumed called on Travis, to prepare a package to be deployed
This method prints on stdout for Travis.
Return is obj to pass to sys.exit() directly
"""
travis_tag = os.environ.get('TRAVIS_TAG')
if not travis_tag:
print("TRAVIS_TAG environment variable is ... |
List certificates in a specified key vault. | def get_certificates(
self, vault_base_url, maxresults=None, include_pending=None, custom_headers=None, raw=False, **operation_config):
"""List certificates in a specified key vault.
The GetCertificates operation returns the set of certificates resources
in the specified key vault. ... |
Get list of available service bus regions. | def get_regions(self):
'''
Get list of available service bus regions.
'''
response = self._perform_get(
self._get_path('services/serviceBus/Regions/', None),
None)
return _MinidomXmlToObject.convert_response_to_feeds(
response,
_Se... |
List the service bus namespaces defined on the account. | def list_namespaces(self):
'''
List the service bus namespaces defined on the account.
'''
response = self._perform_get(
self._get_path('services/serviceBus/Namespaces/', None),
None)
return _MinidomXmlToObject.convert_response_to_feeds(
respo... |
Get details about a specific namespace. | def get_namespace(self, name):
'''
Get details about a specific namespace.
name:
Name of the service bus namespace.
'''
response = self._perform_get(
self._get_path('services/serviceBus/Namespaces', name),
None)
return _ServiceBusMana... |
Create a new service bus namespace. | def create_namespace(self, name, region):
'''
Create a new service bus namespace.
name:
Name of the service bus namespace to create.
region:
Region to create the namespace in.
'''
_validate_not_none('name', name)
return self._perform_put(... |
Delete a service bus namespace. | def delete_namespace(self, name):
'''
Delete a service bus namespace.
name:
Name of the service bus namespace to delete.
'''
_validate_not_none('name', name)
return self._perform_delete(
self._get_path('services/serviceBus/Namespaces', name),
... |
Checks to see if the specified service bus namespace is available or if it has already been taken. | def check_namespace_availability(self, name):
'''
Checks to see if the specified service bus namespace is available, or
if it has already been taken.
name:
Name of the service bus namespace to validate.
'''
_validate_not_none('name', name)
response =... |
Enumerates the queues in the service namespace. | def list_queues(self, name):
'''
Enumerates the queues in the service namespace.
name:
Name of the service bus namespace.
'''
_validate_not_none('name', name)
response = self._perform_get(
self._get_list_queues_path(name),
None)
... |
Retrieves the topics in the service namespace. | def list_topics(self, name):
'''
Retrieves the topics in the service namespace.
name:
Name of the service bus namespace.
'''
response = self._perform_get(
self._get_list_topics_path(name),
None)
return _MinidomXmlToObject.convert_resp... |
Retrieves the notification hubs in the service namespace. | def list_notification_hubs(self, name):
'''
Retrieves the notification hubs in the service namespace.
name:
Name of the service bus namespace.
'''
response = self._perform_get(
self._get_list_notification_hubs_path(name),
None)
return... |
Retrieves the relays in the service namespace. | def list_relays(self, name):
'''
Retrieves the relays in the service namespace.
name:
Name of the service bus namespace.
'''
response = self._perform_get(
self._get_list_relays_path(name),
None)
return _MinidomXmlToObject.convert_resp... |
Retrieves the list of supported metrics for this namespace and queue | def get_supported_metrics_queue(self, name, queue_name):
'''
Retrieves the list of supported metrics for this namespace and queue
name:
Name of the service bus namespace.
queue_name:
Name of the service bus queue in this namespace.
'''
response = ... |
Retrieves the list of supported metrics for this namespace and topic | def get_supported_metrics_topic(self, name, topic_name):
'''
Retrieves the list of supported metrics for this namespace and topic
name:
Name of the service bus namespace.
topic_name:
Name of the service bus queue in this namespace.
'''
response = ... |
Retrieves the list of supported metrics for this namespace and topic | def get_supported_metrics_notification_hub(self, name, hub_name):
'''
Retrieves the list of supported metrics for this namespace and topic
name:
Name of the service bus namespace.
hub_name:
Name of the service bus notification hub in this namespace.
'''
... |
Retrieves the list of supported metrics for this namespace and relay | def get_supported_metrics_relay(self, name, relay_name):
'''
Retrieves the list of supported metrics for this namespace and relay
name:
Name of the service bus namespace.
relay_name:
Name of the service bus relay in this namespace.
'''
response = ... |
Retrieves the list of supported metrics for this namespace and queue | def get_metrics_data_queue(self, name, queue_name, metric, rollup, filter_expresssion):
'''
Retrieves the list of supported metrics for this namespace and queue
name:
Name of the service bus namespace.
queue_name:
Name of the service bus queue in this namespace.
... |
Retrieves the list of supported metrics for this namespace and topic | def get_metrics_data_topic(self, name, topic_name, metric, rollup, filter_expresssion):
'''
Retrieves the list of supported metrics for this namespace and topic
name:
Name of the service bus namespace.
topic_name:
Name of the service bus queue in this namespace.
... |
Retrieves the list of supported metrics for this namespace and topic | def get_metrics_data_notification_hub(self, name, hub_name, metric, rollup, filter_expresssion):
'''
Retrieves the list of supported metrics for this namespace and topic
name:
Name of the service bus namespace.
hub_name:
Name of the service bus notification hub i... |
Retrieves the list of supported metrics for this namespace and relay | def get_metrics_data_relay(self, name, relay_name, metric, rollup, filter_expresssion):
'''
Retrieves the list of supported metrics for this namespace and relay
name:
Name of the service bus namespace.
relay_name:
Name of the service bus relay in this namespace.
... |
This operation gets rollup data for Service Bus metrics queue. Rollup data includes the time granularity for the telemetry aggregation as well as the retention settings for each time granularity. | def get_metrics_rollups_queue(self, name, queue_name, metric):
'''
This operation gets rollup data for Service Bus metrics queue.
Rollup data includes the time granularity for the telemetry aggregation as well as
the retention settings for each time granularity.
name:
... |
This operation gets rollup data for Service Bus metrics topic. Rollup data includes the time granularity for the telemetry aggregation as well as the retention settings for each time granularity. | def get_metrics_rollups_topic(self, name, topic_name, metric):
'''
This operation gets rollup data for Service Bus metrics topic.
Rollup data includes the time granularity for the telemetry aggregation as well as
the retention settings for each time granularity.
name:
... |
This operation gets rollup data for Service Bus metrics notification hub. Rollup data includes the time granularity for the telemetry aggregation as well as the retention settings for each time granularity. | def get_metrics_rollups_notification_hub(self, name, hub_name, metric):
'''
This operation gets rollup data for Service Bus metrics notification hub.
Rollup data includes the time granularity for the telemetry aggregation as well as
the retention settings for each time granularity.
... |
This operation gets rollup data for Service Bus metrics relay. Rollup data includes the time granularity for the telemetry aggregation as well as the retention settings for each time granularity. | def get_metrics_rollups_relay(self, name, relay_name, metric):
'''
This operation gets rollup data for Service Bus metrics relay.
Rollup data includes the time granularity for the telemetry aggregation as well as
the retention settings for each time granularity.
name:
... |
Create a virtual environment in a directory. | def create(env_dir, system_site_packages=False, clear=False,
symlinks=False, with_pip=False, prompt=None):
"""Create a virtual environment in a directory."""
builder = ExtendedEnvBuilder(system_site_packages=system_site_packages,
clear=clear, symlinks=symlink... |
Create a venv with these packages in a temp dir and yielf the env. | def create_venv_with_package(packages):
"""Create a venv with these packages in a temp dir and yielf the env.
packages should be an iterable of pip version instructio (e.g. package~=1.2.3)
"""
with tempfile.TemporaryDirectory() as tempdir:
myenv = create(tempdir, with_pip=True)
pip_call... |
This operation generates a thumbnail image with the user - specified width and height. By default the service analyzes the image identifies the region of interest ( ROI ) and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input ... | def generate_thumbnail_in_stream(
self, width, height, image, smart_cropping=False, custom_headers=None, raw=False, callback=None, **operation_config):
"""This operation generates a thumbnail image with the user-specified
width and height. By default, the service analyzes the image,
... |
Create a new Azure SQL Database server. | def create_server(self, admin_login, admin_password, location):
'''
Create a new Azure SQL Database server.
admin_login:
The administrator login name for the new server.
admin_password:
The administrator login password for the new server.
location:
... |
Reset the administrator password for a server. | def set_server_admin_password(self, server_name, admin_password):
'''
Reset the administrator password for a server.
server_name:
Name of the server to change the password.
admin_password:
The new administrator password for the server.
'''
_valida... |
Deletes an Azure SQL Database server ( including all its databases ). | def delete_server(self, server_name):
'''
Deletes an Azure SQL Database server (including all its databases).
server_name:
Name of the server you want to delete.
'''
_validate_not_none('server_name', server_name)
return self._perform_delete(
self.... |
Gets quotas for an Azure SQL Database Server. | def list_quotas(self, server_name):
'''
Gets quotas for an Azure SQL Database Server.
server_name:
Name of the server.
'''
_validate_not_none('server_name', server_name)
response = self._perform_get(self._get_quotas_path(server_name),
... |
Gets the event logs for an Azure SQL Database Server. | def get_server_event_logs(self, server_name, start_date,
interval_size_in_minutes, event_types=''):
'''
Gets the event logs for an Azure SQL Database Server.
server_name:
Name of the server to retrieve the event logs from.
start_date:
... |
Creates an Azure SQL Database server firewall rule. | def create_firewall_rule(self, server_name, name, start_ip_address,
end_ip_address):
'''
Creates an Azure SQL Database server firewall rule.
server_name:
Name of the server to set the firewall rule on.
name:
The name of the new firew... |
Update a firewall rule for an Azure SQL Database server. | def update_firewall_rule(self, server_name, name, start_ip_address,
end_ip_address):
'''
Update a firewall rule for an Azure SQL Database server.
server_name:
Name of the server to set the firewall rule on.
name:
The name of the fire... |
Deletes an Azure SQL Database server firewall rule. | def delete_firewall_rule(self, server_name, name):
'''
Deletes an Azure SQL Database server firewall rule.
server_name:
Name of the server with the firewall rule you want to delete.
name:
Name of the firewall rule you want to delete.
'''
_validate... |
Retrieves the set of firewall rules for an Azure SQL Database Server. | def list_firewall_rules(self, server_name):
'''
Retrieves the set of firewall rules for an Azure SQL Database Server.
server_name:
Name of the server.
'''
_validate_not_none('server_name', server_name)
response = self._perform_get(self._get_firewall_rules_pat... |
Gets the service level objectives for an Azure SQL Database server. | def list_service_level_objectives(self, server_name):
'''
Gets the service level objectives for an Azure SQL Database server.
server_name:
Name of the server.
'''
_validate_not_none('server_name', server_name)
response = self._perform_get(
self._g... |
Creates a new Azure SQL Database. | def create_database(self, server_name, name, service_objective_id,
edition=None, collation_name=None,
max_size_bytes=None):
'''
Creates a new Azure SQL Database.
server_name:
Name of the server to contain the new database.
name... |
Updates existing database details. | 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.
... |
Deletes an Azure SQL Database. | 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... |
List the SQL databases defined on the specified server name | 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(
... |
Visual Search API lets you discover insights about an image such as visually similar images shopping sources and related searches. The API can also perform text recognition identify entities ( people places things ) return other topical content for the user to explore and more. For more information see [ Visual Search ... | def visual_search(
self, accept_language=None, content_type=None, user_agent=None, client_id=None, client_ip=None, location=None, market=None, safe_search=None, set_lang=None, knowledge_request=None, image=None, custom_headers=None, raw=False, **operation_config):
"""Visual Search API lets you disco... |
Gets all legal agreements that user needs to accept before purchasing a domain. | 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
... |
Open handler connection and authenticate session. | async def open(self):
"""Open handler connection and authenticate session.
If the handler is already open, this operation will do nothing.
A handler opened with this method must be explicitly closed.
It is recommended to open a handler within a context manager as
opposed to call... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.