repo_name stringclasses 4
values | method_name stringlengths 3 72 | method_code stringlengths 87 3.59k | method_summary stringlengths 12 196 | original_method_code stringlengths 129 8.98k | method_path stringlengths 15 136 |
|---|---|---|---|---|---|
Azure/azure-sdk-for-python | _MinidomXmlToObject._find_namespaces_from_child | def _find_namespaces_from_child(parent, child, namespaces):
for cur_child in parent.childNodes:
if cur_child is child:
return True
if _MinidomXmlToObject._find_namespaces_from_child(cur_child, child, namespaces):
for key in cur_child.attri... | Recursively searches from the parent to the child, gathering all the applicable namespaces along the way | def _find_namespaces_from_child(parent, child, namespaces):
"""Recursively searches from the parent to the child,
gathering all the applicable namespaces along the way"""
for cur_child in parent.childNodes:
if cur_child is child:
return True
if _MinidomXml... | azure-servicemanagement-legacy/azure/servicemanagement/_serialization.py |
Azure/azure-sdk-for-python | _ServiceBusManagementXmlSerializer.xml_to_namespace | def xml_to_namespace(xmlstr):
xmldoc = minidom.parseString(xmlstr)
namespace = ServiceBusNamespace()
mappings = (
('Name', 'name', None),
('Region', 'region', None),
('DefaultKey', 'default_key', None),
('Status', 'status', None),
('Cr... | Converts xml response to service bus namespace The xml format for | def xml_to_namespace(xmlstr):
'''Converts xml response to service bus namespace
The xml format for namespace:
<entry>
<id>uuid:00000000-0000-0000-0000-000000000000;id=0000000</id>
<title type="text">myunittests</title>
<updated>2012-08-22T16:48:10Z</updated>
<content type="application/xml">
<Namesp... | azure-servicemanagement-legacy/azure/servicemanagement/_serialization.py |
Azure/azure-sdk-for-python | _ServiceBusManagementXmlSerializer.xml_to_region | def xml_to_region(xmlstr):
xmldoc = minidom.parseString(xmlstr)
region = ServiceBusRegion()
for desc in _MinidomXmlToObject.get_children_from_path(xmldoc, 'entry', 'content',
'RegionCodeDescription'):
node_value = _MinidomXmlToObject.get_f... | Converts xml response to service bus region The xml format for | def xml_to_region(xmlstr):
'''Converts xml response to service bus region
The xml format for region:
<entry>
<id>uuid:157c311f-081f-4b4a-a0ba-a8f990ffd2a3;id=1756759</id>
<title type="text"></title>
<updated>2013-04-10T18:25:29Z</updated>
<content type="application/xml">
<RegionCodeDescription
... | azure-servicemanagement-legacy/azure/servicemanagement/_serialization.py |
Azure/azure-sdk-for-python | _ServiceBusManagementXmlSerializer.xml_to_namespace_availability | def xml_to_namespace_availability(xmlstr):
xmldoc = minidom.parseString(xmlstr)
availability = AvailabilityResponse()
for desc in _MinidomXmlToObject.get_children_from_path(xmldoc, 'entry', 'content',
'NamespaceAvailability'):
node_value =... | Converts xml response to service bus namespace availability The xml | def xml_to_namespace_availability(xmlstr):
'''Converts xml response to service bus namespace availability
The xml format:
<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<id>uuid:9fc7c652-1856-47ab-8d74-cd31502ea8e6;id=3683292</id>
<title type="text"></title>
... | azure-servicemanagement-legacy/azure/servicemanagement/_serialization.py |
Azure/azure-sdk-for-python | _ServiceBusManagementXmlSerializer.xml_to_metrics | def xml_to_metrics(xmlstr, object_type):
xmldoc = minidom.parseString(xmlstr)
return_obj = object_type()
members = dict(vars(return_obj))
for xml_entry in _MinidomXmlToObject.get_children_from_path(xmldoc,
'entry'):
... | Converts xml response to service bus metrics objects The xml format for MetricProperties <entry> <id> | def xml_to_metrics(xmlstr, object_type):
'''Converts xml response to service bus metrics objects
The xml format for MetricProperties
<entry>
<id>https://sbgm.windows.net/Metrics(\'listeners.active\')</id>
<title/>
<updated>2014-10-09T11:56:50Z</updated>
<author>
<name/>
</au... | azure-servicemanagement-legacy/azure/servicemanagement/_serialization.py |
Azure/azure-sdk-for-python | RunbookDraftOperations.replace_content | def replace_content(
self, resource_group_name, automation_account_name, runbook_name, runbook_content, custom_headers=None, raw=False, callback=None, polling=True, **operation_config):
raw_result = self._replace_content_initial(
resource_group_name=resource_group_name,
autom... | Replaces the runbook draft content. | def replace_content(
self, resource_group_name, automation_account_name, runbook_name, runbook_content, custom_headers=None, raw=False, callback=None, polling=True, **operation_config):
"""Replaces the runbook draft content.
:param resource_group_name: Name of an Azure Resource group.
... | azure-mgmt-automation/azure/mgmt/automation/operations/runbook_draft_operations.py |
Azure/azure-sdk-for-python | DomainsOperations.list_recommendations | def list_recommendations(
self, keywords=None, max_domain_recommendations=None, custom_headers=None, raw=False, **operation_config):
parameters = models.DomainRecommendationSearchParameters(keywords=keywords, max_domain_recommendations=max_domain_recommendations)
def internal_paging(next_li... | Get domain name recommendations based on keywords. Get domain name recommendations based on keywords. | def list_recommendations(
self, keywords=None, max_domain_recommendations=None, custom_headers=None, raw=False, **operation_config):
"""Get domain name recommendations based on keywords.
Get domain name recommendations based on keywords.
:param keywords: Keywords to be used for gen... | azure-mgmt-web/azure/mgmt/web/operations/domains_operations.py |
Azure/azure-sdk-for-python | KnowledgebaseOperations.update | def update(
self, kb_id, update_kb, custom_headers=None, raw=False, **operation_config):
url = self.update.metadata['url']
path_format_arguments = {
'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
'kbId':... | Asynchronous operation to modify a knowledgebase. | def update(
self, kb_id, update_kb, custom_headers=None, raw=False, **operation_config):
"""Asynchronous operation to modify a knowledgebase.
:param kb_id: Knowledgebase id.
:type kb_id: str
:param update_kb: Post body of the request.
:type update_kb:
~azure... | azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/knowledgebase_operations.py |
Azure/azure-sdk-for-python | UsersOperations.get_member_groups | def get_member_groups(
self, object_id, security_enabled_only, additional_properties=None, custom_headers=None, raw=False, **operation_config):
parameters = models.UserGetMemberGroupsParameters(additional_properties=additional_properties, security_enabled_only=security_enabled_only)
def int... | Gets a collection that contains the object IDs of the groups of which the user is a member. | def get_member_groups(
self, object_id, security_enabled_only, additional_properties=None, custom_headers=None, raw=False, **operation_config):
"""Gets a collection that contains the object IDs of the groups of which
the user is a member.
:param object_id: The object ID of the user ... | azure-graphrbac/azure/graphrbac/operations/users_operations.py |
Azure/azure-sdk-for-python | build_package_from_pr_number | def build_package_from_pr_number(gh_token, sdk_id, pr_number, output_folder, *, with_comment=False):
con = Github(gh_token)
repo = con.get_repo(sdk_id)
sdk_pr = repo.get_pull(pr_number)
package_names = {f.filename.split('/')[0] for f in sdk_pr.get_files() if f.filename.startswith("azure")}
abso... | Will clone the given PR branch and vuild the package with the given name. | def build_package_from_pr_number(gh_token, sdk_id, pr_number, output_folder, *, with_comment=False):
"""Will clone the given PR branch and vuild the package with the given name."""
con = Github(gh_token)
repo = con.get_repo(sdk_id)
sdk_pr = repo.get_pull(pr_number)
# "get_files" of Github only down... | azure-sdk-tools/packaging_tools/drop_tools.py |
Azure/azure-sdk-for-python | RedisOperations.import_data | def import_data(
self, resource_group_name, name, files, format=None, custom_headers=None, raw=False, polling=True, **operation_config):
raw_result = self._import_data_initial(
resource_group_name=resource_group_name,
name=name,
files=files,
format=for... | Import data into Redis cache. | def import_data(
self, resource_group_name, name, files, format=None, custom_headers=None, raw=False, polling=True, **operation_config):
"""Import data into Redis cache.
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param name: T... | azure-mgmt-redis/azure/mgmt/redis/operations/redis_operations.py |
Azure/azure-sdk-for-python | RunbookOperations.publish | def publish(
self, resource_group_name, automation_account_name, runbook_name, custom_headers=None, raw=False, polling=True, **operation_config):
raw_result = self._publish_initial(
resource_group_name=resource_group_name,
automation_account_name=automation_account_name,
... | Publish runbook draft. | def publish(
self, resource_group_name, automation_account_name, runbook_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Publish runbook draft.
:param resource_group_name: Name of an Azure Resource group.
:type resource_group_name: str
:param auto... | azure-mgmt-automation/azure/mgmt/automation/operations/runbook_operations.py |
Azure/azure-sdk-for-python | AlterationsOperations.replace | def replace(
self, word_alterations, custom_headers=None, raw=False, **operation_config):
word_alterations1 = models.WordAlterationsDTO(word_alterations=word_alterations)
url = self.replace.metadata['url']
path_format_arguments = {
'Endpoint': self._serialize.ur... | Replace alterations data. | def replace(
self, word_alterations, custom_headers=None, raw=False, **operation_config):
"""Replace alterations data.
:param word_alterations: Collection of word alterations.
:type word_alterations:
list[~azure.cognitiveservices.knowledge.qnamaker.models.AlterationsDTO]
... | azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/alterations_operations.py |
Azure/azure-sdk-for-python | ServiceManagementService.regenerate_storage_account_keys | def regenerate_storage_account_keys(self, service_name, key_type):
_validate_not_none('service_name', service_name)
_validate_not_none('key_type', key_type)
return self._perform_post(
self._get_storage_service_path(
service_name) + '/keys?action=regenerate',
... | Regenerates the primary or secondary access key for the specified storage account. | def regenerate_storage_account_keys(self, service_name, key_type):
'''
Regenerates the primary or secondary access key for the specified
storage account.
service_name:
Name of the storage service account.
key_type:
Specifies which key to regenerate. Valid... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.create_storage_account | def create_storage_account(self, service_name, description, label,
affinity_group=None, location=None,
geo_replication_enabled=None,
extended_properties=None,
account_type='Standard_GRS'):
... | Creates a new storage account in Windows Azure. | def create_storage_account(self, service_name, description, label,
affinity_group=None, location=None,
geo_replication_enabled=None,
extended_properties=None,
account_type='Standard_GRS'):
... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.update_storage_account | def update_storage_account(self, service_name, description=None,
label=None, geo_replication_enabled=None,
extended_properties=None,
account_type='Standard_GRS'):
_validate_not_none('service_name', service_name)
... | Updates the label, the description, and enables or disables the geo-replication status for a storage account in Windows Azure. | def update_storage_account(self, service_name, description=None,
label=None, geo_replication_enabled=None,
extended_properties=None,
account_type='Standard_GRS'):
'''
Updates the label, the description, and enab... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.delete_storage_account | def delete_storage_account(self, service_name):
_validate_not_none('service_name', service_name)
return self._perform_delete(
self._get_storage_service_path(service_name),
as_async=True) | Deletes the specified storage account from Windows Azure. | def delete_storage_account(self, service_name):
'''
Deletes the specified storage account from Windows Azure.
service_name:
Name of the storage service account.
'''
_validate_not_none('service_name', service_name)
return self._perform_delete(
self... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.check_storage_account_name_availability | def check_storage_account_name_availability(self, service_name):
_validate_not_none('service_name', service_name)
return self._perform_get(
self._get_storage_service_path() +
'/operations/isavailable/' +
_str(service_name) + '',
AvailabilityResponse) | Checks to see if the specified storage account name is available, or if it has already been taken. | def check_storage_account_name_availability(self, service_name):
'''
Checks to see if the specified storage account name is available, or
if it has already been taken.
service_name:
Name of the storage service account.
'''
_validate_not_none('service_name', s... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.create_hosted_service | def create_hosted_service(self, service_name, label, description=None,
location=None, affinity_group=None,
extended_properties=None):
_validate_not_none('service_name', service_name)
_validate_not_none('label', label)
if affinity_group ... | Creates a new hosted service in Windows Azure. | def create_hosted_service(self, service_name, label, description=None,
location=None, affinity_group=None,
extended_properties=None):
'''
Creates a new hosted service in Windows Azure.
service_name:
A name for the hosted se... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.delete_hosted_service | def delete_hosted_service(self, service_name, complete=False):
_validate_not_none('service_name', service_name)
path = self._get_hosted_service_path(service_name)
if complete == True:
path = path +'?comp=media'
return self._perform_delete(path, as_async=True) | Deletes the specified hosted service from Windows Azure. | def delete_hosted_service(self, service_name, complete=False):
'''
Deletes the specified hosted service from Windows Azure.
service_name:
Name of the hosted service.
complete:
True if all OS/data disks and the source blobs for the disks should
also be... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.create_deployment | def create_deployment(self, service_name, deployment_slot, name,
package_url, label, configuration,
start_deployment=False,
treat_warnings_as_error=False,
extended_properties=None):
_validate_not_none('servic... | Uploads a new service package and creates a new deployment on staging or production. | def create_deployment(self, service_name, deployment_slot, name,
package_url, label, configuration,
start_deployment=False,
treat_warnings_as_error=False,
extended_properties=None):
'''
Uploads a new ... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.delete_deployment | def delete_deployment(self, service_name, deployment_name,delete_vhd=False):
_validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
path= self._get_deployment_path_using_name(service_name, deployment_name)
if delete_vhd:
path +... | Deletes the specified deployment. | def delete_deployment(self, service_name, deployment_name,delete_vhd=False):
'''
Deletes the specified deployment.
service_name:
Name of the hosted service.
deployment_name:
The name of the deployment.
'''
_validate_not_none('service_name', servic... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.change_deployment_configuration | def change_deployment_configuration(self, service_name, deployment_name,
configuration,
treat_warnings_as_error=False,
mode='Auto', extended_properties=None):
_validate_not_none('service_name'... | Initiates a change to the deployment configuration. | def change_deployment_configuration(self, service_name, deployment_name,
configuration,
treat_warnings_as_error=False,
mode='Auto', extended_properties=None):
'''
Initiates a change to... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.update_deployment_status | def update_deployment_status(self, service_name, deployment_name, status):
_validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
_validate_not_none('status', status)
return self._perform_post(
self._get_deployment_path_using_n... | Initiates a change in deployment status. | def update_deployment_status(self, service_name, deployment_name, status):
'''
Initiates a change in deployment status.
service_name:
Name of the hosted service.
deployment_name:
The name of the deployment.
status:
The change to initiate to th... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.upgrade_deployment | def upgrade_deployment(self, service_name, deployment_name, mode,
package_url, configuration, label, force,
role_to_upgrade=None, extended_properties=None):
_validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deploy... | Initiates an upgrade. | def upgrade_deployment(self, service_name, deployment_name, mode,
package_url, configuration, label, force,
role_to_upgrade=None, extended_properties=None):
'''
Initiates an upgrade.
service_name:
Name of the hosted service.
... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.walk_upgrade_domain | def walk_upgrade_domain(self, service_name, deployment_name,
upgrade_domain):
_validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
_validate_not_none('upgrade_domain', upgrade_domain)
return self._perform_post... | Specifies the next upgrade domain to be walked during manual in-place upgrade or configuration change. | def walk_upgrade_domain(self, service_name, deployment_name,
upgrade_domain):
'''
Specifies the next upgrade domain to be walked during manual in-place
upgrade or configuration change.
service_name:
Name of the hosted service.
deployment_n... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.reboot_role_instance | def reboot_role_instance(self, service_name, deployment_name,
role_instance_name):
_validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
_validate_not_none('role_instance_name', role_instance_name)
return self... | Requests a reboot of a role instance that is running in a deployment. | def reboot_role_instance(self, service_name, deployment_name,
role_instance_name):
'''
Requests a reboot of a role instance that is running in a deployment.
service_name:
Name of the hosted service.
deployment_name:
The name of the de... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.check_hosted_service_name_availability | def check_hosted_service_name_availability(self, service_name):
_validate_not_none('service_name', service_name)
return self._perform_get(
'/' + self.subscription_id +
'/services/hostedservices/operations/isavailable/' +
_str(service_name) + '',
Availabili... | Checks to see if the specified hosted service name is available, or if it has already been taken. | def check_hosted_service_name_availability(self, service_name):
'''
Checks to see if the specified hosted service name is available, or if
it has already been taken.
service_name:
Name of the hosted service.
'''
_validate_not_none('service_name', service_name... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.list_service_certificates | def list_service_certificates(self, service_name):
_validate_not_none('service_name', service_name)
return self._perform_get(
'/' + self.subscription_id + '/services/hostedservices/' +
_str(service_name) + '/certificates',
Certificates) | Lists all of the service certificates associated with the specified hosted service. | def list_service_certificates(self, service_name):
'''
Lists all of the service certificates associated with the specified
hosted service.
service_name:
Name of the hosted service.
'''
_validate_not_none('service_name', service_name)
return self._perf... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.add_service_certificate | def add_service_certificate(self, service_name, data, certificate_format,
password=None):
_validate_not_none('service_name', service_name)
_validate_not_none('data', data)
_validate_not_none('certificate_format', certificate_format)
_validate_not_none('pas... | Adds a certificate to a hosted service. | def add_service_certificate(self, service_name, data, certificate_format,
password=None):
'''
Adds a certificate to a hosted service.
service_name:
Name of the hosted service.
data:
The base-64 encoded form of the pfx/cer file.
... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.delete_service_certificate | def delete_service_certificate(self, service_name, thumbalgorithm,
thumbprint):
_validate_not_none('service_name', service_name)
_validate_not_none('thumbalgorithm', thumbalgorithm)
_validate_not_none('thumbprint', thumbprint)
return self._perform_delet... | Deletes a service certificate from the certificate store of a hosted service. | def delete_service_certificate(self, service_name, thumbalgorithm,
thumbprint):
'''
Deletes a service certificate from the certificate store of a hosted
service.
service_name:
Name of the hosted service.
thumbalgorithm:
... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.create_affinity_group | def create_affinity_group(self, name, label, location, description=None):
_validate_not_none('name', name)
_validate_not_none('label', label)
_validate_not_none('location', location)
return self._perform_post(
'/' + self.subscription_id + '/affinitygroups',
_XmlSe... | Creates a new affinity group for the specified subscription. | def create_affinity_group(self, name, label, location, description=None):
'''
Creates a new affinity group for the specified subscription.
name:
A name for the affinity group that is unique to the subscription.
label:
A name for the affinity group. The name can b... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.delete_affinity_group | def delete_affinity_group(self, affinity_group_name):
_validate_not_none('affinity_group_name', affinity_group_name)
return self._perform_delete('/' + self.subscription_id + \
'/affinitygroups/' + \
_str(affinity_group_name)) | Deletes an affinity group in the specified subscription. | def delete_affinity_group(self, affinity_group_name):
'''
Deletes an affinity group in the specified subscription.
affinity_group_name:
The name of the affinity group.
'''
_validate_not_none('affinity_group_name', affinity_group_name)
return self._perform_del... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.list_subscription_operations | def list_subscription_operations(self, start_time=None, end_time=None, object_id_filter=None,
operation_result_filter=None, continuation_token=None):
start_time = ('StartTime=' + start_time) if start_time else ''
end_time = ('EndTime=' + end_time) if end_time else ''... | List subscription operations. | def list_subscription_operations(self, start_time=None, end_time=None, object_id_filter=None,
operation_result_filter=None, continuation_token=None):
'''
List subscription operations.
start_time: Required. An ISO8601 date.
end_time: Required. An ISO8... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.create_reserved_ip_address | def create_reserved_ip_address(self, name, label=None, location=None):
_validate_not_none('name', name)
return self._perform_post(
self._get_reserved_ip_path(),
_XmlSerializer.create_reserved_ip_to_xml(name, label, location),
as_async=True) | Reserves an IPv4 address for the specified subscription. | def create_reserved_ip_address(self, name, label=None, location=None):
'''
Reserves an IPv4 address for the specified subscription.
name:
Required. Specifies the name for the reserved IP address.
label:
Optional. Specifies a label for the reserved IP address. The... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.delete_reserved_ip_address | def delete_reserved_ip_address(self, name):
_validate_not_none('name', name)
return self._perform_delete(self._get_reserved_ip_path(name),
as_async=True) | Deletes a reserved IP address from the specified subscription. | def delete_reserved_ip_address(self, name):
'''
Deletes a reserved IP address from the specified subscription.
name:
Required. Name of the reserved IP address.
'''
_validate_not_none('name', name)
return self._perform_delete(self._get_reserved_ip_path(name),
... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.associate_reserved_ip_address | def associate_reserved_ip_address(
self, name, service_name, deployment_name, virtual_ip_name=None
):
_validate_not_none('name', name)
_validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
return self._perform_post(
... | Associate an existing reservedIP to a deployment. | def associate_reserved_ip_address(
self, name, service_name, deployment_name, virtual_ip_name=None
):
'''
Associate an existing reservedIP to a deployment.
name:
Required. Name of the reserved IP address.
service_name:
Required. Name of the hosted se... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.disassociate_reserved_ip_address | def disassociate_reserved_ip_address(
self, name, service_name, deployment_name, virtual_ip_name=None
):
_validate_not_none('name', name)
_validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
return self._perform_post(
... | Disassociate an existing reservedIP from the given deployment. | def disassociate_reserved_ip_address(
self, name, service_name, deployment_name, virtual_ip_name=None
):
'''
Disassociate an existing reservedIP from the given deployment.
name:
Required. Name of the reserved IP address.
service_name:
Required. Name ... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.get_reserved_ip_address | def get_reserved_ip_address(self, name):
_validate_not_none('name', name)
return self._perform_get(self._get_reserved_ip_path(name), ReservedIP) | Retrieves information about the specified reserved IP address. | def get_reserved_ip_address(self, name):
'''
Retrieves information about the specified reserved IP address.
name:
Required. Name of the reserved IP address.
'''
_validate_not_none('name', name)
return self._perform_get(self._get_reserved_ip_path(name), Reserv... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.get_role | def get_role(self, service_name, deployment_name, role_name):
_validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
_validate_not_none('role_name', role_name)
return self._perform_get(
self._get_role_path(service_name, deploym... | Retrieves the specified virtual machine. | def get_role(self, service_name, deployment_name, role_name):
'''
Retrieves the specified virtual machine.
service_name:
The name of the service.
deployment_name:
The name of the deployment.
role_name:
The name of the role.
'''
... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.create_virtual_machine_deployment | def create_virtual_machine_deployment(self, service_name, deployment_name,
deployment_slot, label, role_name,
system_config, os_virtual_hard_disk,
network_config=None,
... | Provisions a virtual machine based on the supplied configuration. | def create_virtual_machine_deployment(self, service_name, deployment_name,
deployment_slot, label, role_name,
system_config, os_virtual_hard_disk,
network_config=None,
... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.add_role | def add_role(self, service_name, deployment_name, role_name, system_config,
os_virtual_hard_disk, network_config=None,
availability_set_name=None, data_virtual_hard_disks=None,
role_size=None, role_type='PersistentVMRole',
resource_extension_references... | Adds a virtual machine to an existing deployment. | def add_role(self, service_name, deployment_name, role_name, system_config,
os_virtual_hard_disk, network_config=None,
availability_set_name=None, data_virtual_hard_disks=None,
role_size=None, role_type='PersistentVMRole',
resource_extension_references... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.update_role | def update_role(self, service_name, deployment_name, role_name,
os_virtual_hard_disk=None, network_config=None,
availability_set_name=None, data_virtual_hard_disks=None,
role_size=None, role_type='PersistentVMRole',
resource_extension_refer... | Updates the specified virtual machine. | def update_role(self, service_name, deployment_name, role_name,
os_virtual_hard_disk=None, network_config=None,
availability_set_name=None, data_virtual_hard_disks=None,
role_size=None, role_type='PersistentVMRole',
resource_extension_refer... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.delete_role | def delete_role(self, service_name, deployment_name, role_name, complete = False):
_validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
_validate_not_none('role_name', role_name)
path = self._get_role_path(service_name, deployment_name,... | Deletes the specified virtual machine. | def delete_role(self, service_name, deployment_name, role_name, complete = False):
'''
Deletes the specified virtual machine.
service_name:
The name of the service.
deployment_name:
The name of the deployment.
role_name:
The name of the role.
... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.capture_role | def capture_role(self, service_name, deployment_name, role_name,
post_capture_action, target_image_name,
target_image_label, provisioning_configuration=None):
_validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)... | The Capture Role operation captures a virtual machine image to your image gallery. From the captured image, you can create additional customized virtual machines. | def capture_role(self, service_name, deployment_name, role_name,
post_capture_action, target_image_name,
target_image_label, provisioning_configuration=None):
'''
The Capture Role operation captures a virtual machine image to your
image gallery. From the... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.start_role | def start_role(self, service_name, deployment_name, role_name):
_validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
_validate_not_none('role_name', role_name)
return self._perform_post(
self._get_role_instance_operations_pat... | Starts the specified virtual machine. | def start_role(self, service_name, deployment_name, role_name):
'''
Starts the specified virtual machine.
service_name:
The name of the service.
deployment_name:
The name of the deployment.
role_name:
The name of the role.
'''
... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.start_roles | def start_roles(self, service_name, deployment_name, role_names):
_validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
_validate_not_none('role_names', role_names)
return self._perform_post(
self._get_roles_operations_path(se... | Starts the specified virtual machines. | def start_roles(self, service_name, deployment_name, role_names):
'''
Starts the specified virtual machines.
service_name:
The name of the service.
deployment_name:
The name of the deployment.
role_names:
The names of the roles, as an enumerab... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.restart_role | def restart_role(self, service_name, deployment_name, role_name):
_validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
_validate_not_none('role_name', role_name)
return self._perform_post(
self._get_role_instance_operations_p... | Restarts the specified virtual machine. | def restart_role(self, service_name, deployment_name, role_name):
'''
Restarts the specified virtual machine.
service_name:
The name of the service.
deployment_name:
The name of the deployment.
role_name:
The name of the role.
'''
... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.shutdown_role | def shutdown_role(self, service_name, deployment_name, role_name,
post_shutdown_action='Stopped'):
_validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
_validate_not_none('role_name', role_name)
_validate_not_none('... | Shuts down the specified virtual machine. | def shutdown_role(self, service_name, deployment_name, role_name,
post_shutdown_action='Stopped'):
'''
Shuts down the specified virtual machine.
service_name:
The name of the service.
deployment_name:
The name of the deployment.
role... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.shutdown_roles | def shutdown_roles(self, service_name, deployment_name, role_names,
post_shutdown_action='Stopped'):
_validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
_validate_not_none('role_names', role_names)
_validate_not_n... | Shuts down the specified virtual machines. | def shutdown_roles(self, service_name, deployment_name, role_names,
post_shutdown_action='Stopped'):
'''
Shuts down the specified virtual machines.
service_name:
The name of the service.
deployment_name:
The name of the deployment.
... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.add_dns_server | def add_dns_server(self, service_name, deployment_name, dns_server_name, address):
_validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
_validate_not_none('dns_server_name', dns_server_name)
_validate_not_none('address', address)
... | Adds a DNS server definition to an existing deployment. | def add_dns_server(self, service_name, deployment_name, dns_server_name, address):
'''
Adds a DNS server definition to an existing deployment.
service_name:
The name of the service.
deployment_name:
The name of the deployment.
dns_server_name:
... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.update_dns_server | def update_dns_server(self, service_name, deployment_name, dns_server_name, address):
_validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
_validate_not_none('dns_server_name', dns_server_name)
_validate_not_none('address', address)
... | Updates the ip address of a DNS server. | def update_dns_server(self, service_name, deployment_name, dns_server_name, address):
'''
Updates the ip address of a DNS server.
service_name:
The name of the service.
deployment_name:
The name of the deployment.
dns_server_name:
Specifies th... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.delete_dns_server | def delete_dns_server(self, service_name, deployment_name, dns_server_name):
_validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
_validate_not_none('dns_server_name', dns_server_name)
return self._perform_delete(
self._get_d... | Deletes a DNS server from a deployment. | def delete_dns_server(self, service_name, deployment_name, dns_server_name):
'''
Deletes a DNS server from a deployment.
service_name:
The name of the service.
deployment_name:
The name of the deployment.
dns_server_name:
Name of the DNS serve... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.list_resource_extension_versions | def list_resource_extension_versions(self, publisher_name, extension_name):
return self._perform_get(self._get_resource_extension_versions_path(
publisher_name, extension_name),
ResourceExtensions) | Lists the versions of a resource extension that are available to add to a Virtual Machine. | def list_resource_extension_versions(self, publisher_name, extension_name):
'''
Lists the versions of a resource extension that are available to add
to a Virtual Machine.
publisher_name:
Name of the resource extension publisher.
extension_name:
Name of th... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.replicate_vm_image | def replicate_vm_image(self, vm_image_name, regions, offer, sku, version):
_validate_not_none('vm_image_name', vm_image_name)
_validate_not_none('regions', regions)
_validate_not_none('offer', offer)
_validate_not_none('sku', sku)
_validate_not_none('version', version)
r... | Replicate a VM image to multiple target locations. This operation is only for publishers. You have to be registered as image publisher with Microsoft Azure to be able to call this. | def replicate_vm_image(self, vm_image_name, regions, offer, sku, version):
'''
Replicate a VM image to multiple target locations. This operation
is only for publishers. You have to be registered as image publisher
with Microsoft Azure to be able to call this.
vm_image_name:
... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.unreplicate_vm_image | def unreplicate_vm_image(self, vm_image_name):
_validate_not_none('vm_image_name', vm_image_name)
return self._perform_put(
self._get_unreplication_path_using_vm_image_name(vm_image_name),
None,
as_async=True,
x_ms_version='2015-04-01'
) | Unreplicate a VM image from all regions This operation is only for publishers. You have to be registered as image publisher with Microsoft Azure to be able to call this | def unreplicate_vm_image(self, vm_image_name):
'''
Unreplicate a VM image from all regions This operation
is only for publishers. You have to be registered as image publisher
with Microsoft Azure to be able to call this
vm_image_name:
Specifies the name of the VM Ima... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.share_vm_image | def share_vm_image(self, vm_image_name, permission):
_validate_not_none('vm_image_name', vm_image_name)
_validate_not_none('permission', permission)
path = self._get_sharing_path_using_vm_image_name(vm_image_name)
query = '&permission=' + permission
path = path + '?' + query.lst... | Share an already replicated OS image. This operation is only for publishers. You have to be registered as image publisher with Windows Azure to be able to call this. | def share_vm_image(self, vm_image_name, permission):
'''
Share an already replicated OS image. This operation is only for
publishers. You have to be registered as image publisher with Windows
Azure to be able to call this.
vm_image_name:
The name of the virtual machi... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.create_vm_image | def create_vm_image(self, vm_image):
_validate_not_none('vm_image', vm_image)
_validate_not_none('vm_image.name', vm_image.name)
_validate_not_none('vm_image.label', vm_image.label)
_validate_not_none('vm_image.os_disk_configuration.os_state',
vm_image.os_disk_... | Creates a VM Image in the image repository that is associated with the specified subscription using a specified set of virtual hard disks. | def create_vm_image(self, vm_image):
'''
Creates a VM Image in the image repository that is associated with the
specified subscription using a specified set of virtual hard disks.
vm_image:
An instance of VMImage class.
vm_image.name: Required. Specifies the name of ... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.delete_vm_image | def delete_vm_image(self, vm_image_name, delete_vhd=False):
_validate_not_none('vm_image_name', vm_image_name)
path = self._get_vm_image_path(vm_image_name)
if delete_vhd:
path += '?comp=media'
return self._perform_delete(path, as_async=True) | Deletes the specified VM Image from the image repository that is associated with the specified subscription. | def delete_vm_image(self, vm_image_name, delete_vhd=False):
'''
Deletes the specified VM Image from the image repository that is
associated with the specified subscription.
vm_image_name:
The name of the image.
delete_vhd:
Deletes the underlying vhd blob ... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.list_vm_images | def list_vm_images(self, location=None, publisher=None, category=None):
path = self._get_vm_image_path()
query = ''
if location:
query += '&location=' + location
if publisher:
query += '&publisher=' + publisher
if category:
query += '&category=... | Retrieves a list of the VM Images from the image repository that is associated with the specified subscription. | def list_vm_images(self, location=None, publisher=None, category=None):
'''
Retrieves a list of the VM Images from the image repository that is
associated with the specified subscription.
'''
path = self._get_vm_image_path()
query = ''
if location:
que... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.update_vm_image | def update_vm_image(self, vm_image_name, vm_image):
_validate_not_none('vm_image_name', vm_image_name)
_validate_not_none('vm_image', vm_image)
return self._perform_put(self._get_vm_image_path(vm_image_name),
_XmlSerializer.update_vm_image_to_xml(vm_image),
... | Updates a VM Image in the image repository that is associated with the specified subscription. | def update_vm_image(self, vm_image_name, vm_image):
'''
Updates a VM Image in the image repository that is associated with the
specified subscription.
vm_image_name:
Name of image to update.
vm_image:
An instance of VMImage class.
vm_image.label: ... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.add_os_image | def add_os_image(self, label, media_link, name, os):
_validate_not_none('label', label)
_validate_not_none('media_link', media_link)
_validate_not_none('name', name)
_validate_not_none('os', os)
return self._perform_post(self._get_image_path(),
_... | Adds an OS image that is currently stored in a storage account in your subscription to the image repository. | def add_os_image(self, label, media_link, name, os):
'''
Adds an OS image that is currently stored in a storage account in your
subscription to the image repository.
label:
Specifies the friendly name of the image.
media_link:
Specifies the location of th... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.update_os_image | def update_os_image(self, image_name, label, media_link, name, os):
_validate_not_none('image_name', image_name)
_validate_not_none('label', label)
_validate_not_none('media_link', media_link)
_validate_not_none('name', name)
_validate_not_none('os', os)
return self._perf... | Updates an OS image that in your image repository. | def update_os_image(self, image_name, label, media_link, name, os):
'''
Updates an OS image that in your image repository.
image_name:
The name of the image to update.
label:
Specifies the friendly name of the image to be updated. You cannot
use this ... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.update_os_image_from_image_reference | def update_os_image_from_image_reference(self, image_name, os_image):
_validate_not_none('image_name', image_name)
_validate_not_none('os_image', os_image)
return self._perform_put(self._get_image_path(image_name),
_XmlSerializer.update_os_image_to_xml(os_image), as_async=True
... | Updates metadata elements from a given OS image reference. | def update_os_image_from_image_reference(self, image_name, os_image):
'''
Updates metadata elements from a given OS image reference.
image_name:
The name of the image to update.
os_image:
An instance of OSImage class.
os_image.label: Optional. Specifies a... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.delete_os_image | def delete_os_image(self, image_name, delete_vhd=False):
_validate_not_none('image_name', image_name)
path = self._get_image_path(image_name)
if delete_vhd:
path += '?comp=media'
return self._perform_delete(path, as_async=True) | 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_... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.get_data_disk | def get_data_disk(self, service_name, deployment_name, role_name, lun):
_validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
_validate_not_none('role_name', role_name)
_validate_not_none('lun', lun)
return self._perform_get(
... | 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... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.add_data_disk | 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):
_validate_not_none('service_name', service_name)
... | 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.
... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.update_data_disk | 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):
_validate_not_none('service_name', service_na... | 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... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.delete_data_disk | def delete_data_disk(self, service_name, deployment_name, role_name, lun, delete_vhd=False):
_validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
_validate_not_none('role_name', role_name)
_validate_not_none('lun', lun)
path = se... | 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:
... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.add_disk | def add_disk(self, has_operating_system, label, media_link, name, os):
_validate_not_none('label', label)
_validate_not_none('media_link', media_link)
_validate_not_none('name', name)
_validate_not_none('os', os)
return self._perform_post(self._get_disk_path(),
... | 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... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.update_disk | def update_disk(self, disk_name, has_operating_system=None, label=None, media_link=None,
name=None, os=None):
_validate_not_none('disk_name', disk_name)
_validate_not_none('label', label)
return self._perform_put(self._get_disk_path(disk_name),
... | 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.
... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | ServiceManagementService.delete_disk | def delete_disk(self, disk_name, delete_vhd=False):
_validate_not_none('disk_name', disk_name)
path = self._get_disk_path(disk_name)
if delete_vhd:
path += '?comp=media'
return self._perform_delete(path) | 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.
'''
... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py |
Azure/azure-sdk-for-python | PolicyStatesOperations.summarize_for_management_group | def summarize_for_management_group(
self, management_group_name, query_options=None, custom_headers=None, raw=False, **operation_config):
top = None
if query_options is not None:
top = query_options.top
from_parameter = None
if query_options is not None:
... | 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... | azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/policy_states_operations.py |
Azure/azure-sdk-for-python | Receiver._build_receiver | def _build_receiver(self):
self._handler.message_handler = self._handler.receiver_type(
self._handler._session,
self._handler._remote_address,
self._handler._name,
on_message_received=self._handler._message_received,
name='receiver-link-{}'.fo... | 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,
... | azure-servicebus/azure/servicebus/receive_handler.py |
Azure/azure-sdk-for-python | VirtualMachineScaleSetsOperations.create_or_update | def create_or_update(
self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config):
raw_result = self._create_or_update_initial(
resource_group_name=resource_group_name,
vm_scale_set_name=vm_scale_set_name,
... | 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
:... | azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_scale_sets_operations.py |
Azure/azure-sdk-for-python | VirtualMachineScaleSetsOperations.convert_to_single_placement_group | 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):
parameters = models.VMScaleSetConvertToSinglePlacementGroupInput(active_placement_group_id=active_placement_group_id)
... | 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... | azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_scale_sets_operations.py |
Azure/azure-sdk-for-python | TextModerationOperations.screen_text | 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):
url = self.screen_text.metadata['url']
path_format_arguments = {
'Endpoi... | Detect profanity and match against custom and shared blacklists. Detects profanity in more than 100 languages 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... | azure-cognitiveservices-vision-contentmoderator/azure/cognitiveservices/vision/contentmoderator/operations/text_moderation_operations.py |
Azure/azure-sdk-for-python | KeyVaultClient.set_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):
parameter = models.CertificateIssuerSetParameters(provider=provider, credentials=credentials, organization_detai... | Sets the specified certificate issuer. The SetCertificateIssuer operation adds or updates the specified certificate issuer. This operation requires the certificates/setissuers permission. | 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... | azure-keyvault/azure/keyvault/v2016_10_01/key_vault_client.py |
Azure/azure-sdk-for-python | ServiceBusClient.from_connection_string | def from_connection_string(cls, conn_str, *, loop=None, **kwargs):
address, policy, key, _ = parse_conn_str(conn_str)
parsed_namespace = urlparse(address)
namespace, _, base = parsed_namespace.hostname.partition('.')
return cls(
service_namespace=namespace,
shared... | 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
... | azure-servicebus/azure/servicebus/aio/async_client.py |
Azure/azure-sdk-for-python | ServiceBusClient.get_subscription | def get_subscription(self, topic_name, subscription_name):
try:
subscription = self.mgmt_client.get_subscription(topic_name, subscription_name)
except requests.exceptions.ConnectionError as e:
raise ServiceBusConnectionError("Namespace: {} not found".format(self.service_namespace... | 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... | azure-servicebus/azure/servicebus/aio/async_client.py |
Azure/azure-sdk-for-python | ServiceBusClient.list_subscriptions | def list_subscriptions(self, topic_name):
try:
subs = self.mgmt_client.list_subscriptions(topic_name)
except requests.exceptions.ConnectionError as e:
raise ServiceBusConnectionError("Namespace: {} not found".format(self.service_namespace), e)
except AzureServiceBusResour... | 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... | azure-servicebus/azure/servicebus/aio/async_client.py |
Azure/azure-sdk-for-python | SendClientMixin.get_sender | def get_sender(self, message_timeout=0, session=None, **kwargs):
handler_id = str(uuid.uuid4())
if self.entity and self.requires_session:
return SessionSender(
handler_id,
self.entity_uri,
self.auth_config,
session=session,
... | Get a Sender for the Service Bus endpoint. A Sender represents a single open connection within which multiple send operations can be made. | 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
... | azure-servicebus/azure/servicebus/aio/async_client.py |
Azure/azure-sdk-for-python | ReceiveClientMixin.get_receiver | def get_receiver(self, session=None, prefetch=0, mode=ReceiveSettleMode.PeekLock, idle_timeout=0, **kwargs):
if self.entity and not self.requires_session and session:
raise ValueError("A session cannot be used with a non-sessionful entitiy.")
if self.entity and self.requires_session and not ... | Get a Receiver for the Service Bus endpoint. A Receiver represents a single open connection with which multiple receive operations can be made. | 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... | azure-servicebus/azure/servicebus/aio/async_client.py |
Azure/azure-sdk-for-python | ReceiveClientMixin.get_deadletter_receiver | def get_deadletter_receiver(
self, transfer_deadletter=False, prefetch=0,
mode=ReceiveSettleMode.PeekLock, idle_timeout=0, **kwargs):
if int(prefetch) < 0 or int(prefetch) > 50000:
raise ValueError("Prefetch must be an integer between 0 and 50000 inclusive.")
prefetc... | Get a Receiver for the deadletter endpoint of the entity. A Receiver represents a single open connection with which multiple receive operations can be made. | 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... | azure-servicebus/azure/servicebus/aio/async_client.py |
Azure/azure-sdk-for-python | parse_response_for_async_op | def parse_response_for_async_op(response):
if response is None:
return None
result = AsynchronousOperationResult()
if response.headers:
for name, value in response.headers:
if name.lower() == 'x-ms-request-id':
result.request_id = value
return result | 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':
... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementclient.py |
Azure/azure-sdk-for-python | _ServiceManagementClient.perform_get | def perform_get(self, path, x_ms_version=None):
request = HTTPRequest()
request.method = 'GET'
request.host = self.host
request.path = path
request.path, request.query = self._httpclient._update_request_uri_query(request)
request.headers = self._update_management_header(r... | 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... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementclient.py |
Azure/azure-sdk-for-python | _ServiceManagementClient.perform_put | def perform_put(self, path, body, x_ms_version=None):
request = HTTPRequest()
request.method = 'PUT'
request.host = self.host
request.path = path
request.body = _get_request_body(body)
request.path, request.query = self._httpclient._update_request_uri_query(request)
... | 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... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementclient.py |
Azure/azure-sdk-for-python | _ServiceManagementClient._update_management_header | def _update_management_header(self, request, x_ms_version):
if request.method in ['PUT', 'POST', 'MERGE', 'DELETE']:
request.headers.append(('Content-Length', str(len(request.body))))
request.headers.append(('x-ms-version', x_ms_version or self.x_ms_version))
if n... | 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
... | azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementclient.py |
Azure/azure-sdk-for-python | travis_build_package | def travis_build_package():
travis_tag = os.environ.get('TRAVIS_TAG')
if not travis_tag:
print("TRAVIS_TAG environment variable is not present")
return "TRAVIS_TAG environment variable is not present"
try:
name, version = travis_tag.split("_")
except ValueError:
print("T... | 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 | 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 ... | build_package.py |
Azure/azure-sdk-for-python | ServiceBusManagementService.get_regions | def get_regions(self):
response = self._perform_get(
self._get_path('services/serviceBus/Regions/', None),
None)
return _MinidomXmlToObject.convert_response_to_feeds(
response,
_ServiceBusManagementXmlSerializer.xml_to_region) | 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... | azure-servicemanagement-legacy/azure/servicemanagement/servicebusmanagementservice.py |
Azure/azure-sdk-for-python | ServiceBusManagementService.list_namespaces | def list_namespaces(self):
response = self._perform_get(
self._get_path('services/serviceBus/Namespaces/', None),
None)
return _MinidomXmlToObject.convert_response_to_feeds(
response,
_ServiceBusManagementXmlSerializer.xml_to_namespace) | 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... | azure-servicemanagement-legacy/azure/servicemanagement/servicebusmanagementservice.py |
Azure/azure-sdk-for-python | ServiceBusManagementService.get_namespace | def get_namespace(self, name):
response = self._perform_get(
self._get_path('services/serviceBus/Namespaces', name),
None)
return _ServiceBusManagementXmlSerializer.xml_to_namespace(
response.body) | 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... | azure-servicemanagement-legacy/azure/servicemanagement/servicebusmanagementservice.py |
Azure/azure-sdk-for-python | ServiceBusManagementService.create_namespace | def create_namespace(self, name, region):
_validate_not_none('name', name)
return self._perform_put(
self._get_path('services/serviceBus/Namespaces', name),
_ServiceBusManagementXmlSerializer.namespace_to_xml(region)) | 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(... | azure-servicemanagement-legacy/azure/servicemanagement/servicebusmanagementservice.py |
Azure/azure-sdk-for-python | ServiceBusManagementService.delete_namespace | def delete_namespace(self, name):
_validate_not_none('name', name)
return self._perform_delete(
self._get_path('services/serviceBus/Namespaces', name),
None) | 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),
... | azure-servicemanagement-legacy/azure/servicemanagement/servicebusmanagementservice.py |
Azure/azure-sdk-for-python | ServiceBusManagementService.check_namespace_availability | def check_namespace_availability(self, name):
_validate_not_none('name', name)
response = self._perform_get(
self._get_path('services/serviceBus/CheckNamespaceAvailability',
None) + '/?namespace=' + _str(name), None)
return _ServiceBusManagementXmlSeriali... | 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 =... | azure-servicemanagement-legacy/azure/servicemanagement/servicebusmanagementservice.py |
Azure/azure-sdk-for-python | ServiceBusManagementService.list_topics | def list_topics(self, name):
response = self._perform_get(
self._get_list_topics_path(name),
None)
return _MinidomXmlToObject.convert_response_to_feeds(
response,
partial(
_MinidomXmlToObject.convert_xml_to_azure_object,
az... | 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... | azure-servicemanagement-legacy/azure/servicemanagement/servicebusmanagementservice.py |
Azure/azure-sdk-for-python | ServiceBusManagementService.list_notification_hubs | def list_notification_hubs(self, name):
response = self._perform_get(
self._get_list_notification_hubs_path(name),
None)
return _MinidomXmlToObject.convert_response_to_feeds(
response,
partial(
_MinidomXmlToObject.convert_xml_to_azure_obje... | 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... | azure-servicemanagement-legacy/azure/servicemanagement/servicebusmanagementservice.py |
Azure/azure-sdk-for-python | ServiceBusManagementService.list_relays | def list_relays(self, name):
response = self._perform_get(
self._get_list_relays_path(name),
None)
return _MinidomXmlToObject.convert_response_to_feeds(
response,
partial(
_MinidomXmlToObject.convert_xml_to_azure_object,
az... | 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... | azure-servicemanagement-legacy/azure/servicemanagement/servicebusmanagementservice.py |
Azure/azure-sdk-for-python | ServiceBusManagementService.get_metrics_rollups_queue | def get_metrics_rollups_queue(self, name, queue_name, metric):
response = self._perform_get(
self._get_get_metrics_rollup_queue_path(name, queue_name, metric),
None)
return _MinidomXmlToObject.convert_response_to_feeds(
response,
partial(
... | 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:
... | azure-servicemanagement-legacy/azure/servicemanagement/servicebusmanagementservice.py |
Azure/azure-sdk-for-python | ServiceBusManagementService.get_metrics_rollups_topic | def get_metrics_rollups_topic(self, name, topic_name, metric):
response = self._perform_get(
self._get_get_metrics_rollup_topic_path(name, topic_name, metric),
None)
return _MinidomXmlToObject.convert_response_to_feeds(
response,
partial(
... | 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:
... | azure-servicemanagement-legacy/azure/servicemanagement/servicebusmanagementservice.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.