desc stringlengths 3 26.7k | decl stringlengths 11 7.89k | bodies stringlengths 8 553k |
|---|---|---|
'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.'
| 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)) + ''), AvailabilityResponse)
|
'Lists all of the service certificates associated with the specified
hosted service.
service_name:
Name of the hosted service.'
| 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)
|
'Returns the public data for the specified X.509 certificate associated
with a hosted service.
service_name:
Name of the hosted service.
thumbalgorithm:
The algorithm for the certificate\'s thumbprint.
thumbprint:
The hexadecimal representation of the thumbprint.'
| def get_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_get((((((((('/' + self.subscription_id) + '/services/hostedservices/') + _str(service_name)) + '/certificates/') + _str(thumbalgorithm))... |
'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.
certificate_format:
The service certificate format.
password:
The certificate password. Default to None when using cer format.'
| 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('password', password)
return self._perform_post((((('/' + self.subscription_id) + '/services/hostedservices/') + _str(service_name)) + '/c... |
'Deletes a service certificate from the certificate store of a hosted
service.
service_name:
Name of the hosted service.
thumbalgorithm:
The algorithm for the certificate\'s thumbprint.
thumbprint:
The hexadecimal representation of the thumbprint.'
| 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_delete(((((((('/' + self.subscription_id) + '/services/hostedservices/') + _str(service_name)) + '/certificates/') + _str(thumbalgorithm... |
'The List Management Certificates operation lists and returns basic
information about all of the management certificates associated with
the specified subscription. Management certificates, which are also
known as subscription certificates, authenticate clients attempting to
connect to resources associated with your Wi... | def list_management_certificates(self):
| return self._perform_get((('/' + self.subscription_id) + '/certificates'), SubscriptionCertificates)
|
'The Get Management Certificate operation retrieves information about
the management certificate with the specified thumbprint. Management
certificates, which are also known as subscription certificates,
authenticate clients attempting to connect to resources associated
with your Windows Azure subscription.
thumbprint:... | def get_management_certificate(self, thumbprint):
| _validate_not_none('thumbprint', thumbprint)
return self._perform_get(((('/' + self.subscription_id) + '/certificates/') + _str(thumbprint)), SubscriptionCertificate)
|
'The Add Management Certificate operation adds a certificate to the
list of management certificates. Management certificates, which are
also known as subscription certificates, authenticate clients
attempting to connect to resources associated with your Windows Azure
subscription.
public_key:
A base64 representation of... | def add_management_certificate(self, public_key, thumbprint, data):
| _validate_not_none('public_key', public_key)
_validate_not_none('thumbprint', thumbprint)
_validate_not_none('data', data)
return self._perform_post((('/' + self.subscription_id) + '/certificates'), _XmlSerializer.subscription_certificate_to_xml(public_key, thumbprint, data))
|
'The Delete Management Certificate operation deletes a certificate from
the list of management certificates. Management certificates, which
are also known as subscription certificates, authenticate clients
attempting to connect to resources associated with your Windows Azure
subscription.
thumbprint:
The thumb print th... | def delete_management_certificate(self, thumbprint):
| _validate_not_none('thumbprint', thumbprint)
return self._perform_delete(((('/' + self.subscription_id) + '/certificates/') + _str(thumbprint)))
|
'Lists the affinity groups associated with the specified subscription.'
| def list_affinity_groups(self):
| return self._perform_get((('/' + self.subscription_id) + '/affinitygroups'), AffinityGroups)
|
'Returns the system properties associated with the specified affinity
group.
affinity_group_name:
The name of the affinity group.'
| def get_affinity_group_properties(self, affinity_group_name):
| _validate_not_none('affinity_group_name', affinity_group_name)
return self._perform_get((((('/' + self.subscription_id) + '/affinitygroups/') + _str(affinity_group_name)) + ''), AffinityGroup)
|
'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 be up to 100 characters
in length.
location:
The data center location where the affinity group will be created.
To list available locat... | 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'), _XmlSerializer.create_affinity_group_to_xml(name, label, description, location))
|
'Updates the label and/or the description for an affinity group for the
specified subscription.
affinity_group_name:
The name of the affinity group.
label:
A name for the affinity group. The name can be up to 100 characters
in length.
description:
A description for the affinity group. The description can be up to
1024 ... | def update_affinity_group(self, affinity_group_name, label, description=None):
| _validate_not_none('affinity_group_name', affinity_group_name)
_validate_not_none('label', label)
return self._perform_put(((('/' + self.subscription_id) + '/affinitygroups/') + _str(affinity_group_name)), _XmlSerializer.update_affinity_group_to_xml(label, description))
|
'Deletes an affinity group in the specified subscription.
affinity_group_name:
The name of the 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)))
|
'Lists all of the data center locations that are valid for your
subscription.'
| def list_locations(self):
| return self._perform_get((('/' + self.subscription_id) + '/locations'), Locations)
|
'Lists the versions of the guest operating system that are currently
available in Windows Azure.'
| def list_operating_systems(self):
| return self._perform_get((('/' + self.subscription_id) + '/operatingsystems'), OperatingSystems)
|
'Lists the guest operating system families available in Windows Azure,
and also lists the operating system versions available for each family.'
| def list_operating_system_families(self):
| return self._perform_get((('/' + self.subscription_id) + '/operatingsystemfamilies'), OperatingSystemFamilies)
|
'Returns account and resource allocation information on the specified
subscription.'
| def get_subscription(self):
| return self._perform_get((('/' + self.subscription_id) + ''), Subscription)
|
'List subscription operations.
start_time: Required. An ISO8601 date.
end_time: Required. An ISO8601 date.
object_id_filter: Optional. Returns subscription operations only for the specified object type and object ID
operation_result_filter: Optional. Returns subscription operations only for the specified result status,... | 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 '')
object_id_filter = (('ObjectIdFilter=' + object_id_filter) if object_id_filter else '')
operation_result_filter = (('OperationResultFilter=' + operation_result_filter) if operation_r... |
'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 label
can be up to 100 characters long and can be used for your tracking
purposes.
location:
Required. Specifies the location of t... | 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), async=True)
|
'Deletes a reserved IP address from the specified subscription.
name:
Required. Name of the 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), async=True)
|
'Associate an existing reservedIP to a deployment.
name:
Required. Name of the reserved IP address.
service_name:
Required. Name of the hosted service.
deployment_name:
Required. Name of the deployment.
virtual_ip_name:
Optional. Name of the VirtualIP in case of multi Vip tenant.
If this value is not specified default ... | 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(self._get_reserved_ip_path_for_association(name), _XmlSerializer.associate_reserved_ip_to_xml(service_name, deployment_name, virtual_ip_name)... |
'Disassociate an existing reservedIP from the given deployment.
name:
Required. Name of the reserved IP address.
service_name:
Required. Name of the hosted service.
deployment_name:
Required. Name of the deployment.
virtual_ip_name:
Optional. Name of the VirtualIP in case of multi Vip tenant.
If this value is not speci... | 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(self._get_reserved_ip_path_for_disassociation(name), _XmlSerializer.associate_reserved_ip_to_xml(service_name, deployment_name, virtual_ip_na... |
'Retrieves information about the specified reserved IP address.
name:
Required. Name of the 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)
|
'Lists the IP addresses that have been reserved for the specified
subscription.'
| def list_reserved_ip_addresses(self):
| return self._perform_get(self._get_reserved_ip_path(), ReservedIPs)
|
'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.'
| 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, deployment_name, role_name), PersistentVMRole)
|
'Provisions a virtual machine based on the supplied configuration.
service_name:
Name of the hosted service.
deployment_name:
The name for the deployment. The deployment name must be unique
among other deployments for the hosted service.
deployment_slot:
The environment to which the hosted service is deployed. Valid
va... | def create_virtual_machine_deployment(self, service_name, deployment_name, deployment_slot, label, 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', virtual_network_name=None, resource_extension_re... | _validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
_validate_not_none('deployment_slot', deployment_slot)
_validate_not_none('label', label)
_validate_not_none('role_name', role_name)
return self._perform_post(self._get_deployment_path_using_n... |
'Adds a virtual machine to an existing deployment.
service_name:
The name of the service.
deployment_name:
The name of the deployment.
role_name:
The name of the role.
system_config:
Contains the metadata required to provision a virtual machine from
a Windows or Linux OS image. Use an instance of
WindowsConfigurationS... | 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=None, provision_guest_agent=None, vm_image_name=None, media_locatio... | _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_path(service_name, deployment_name), _XmlSerializer.add_role_to_xml(role_name, system_config, os_virtual_hard_disk, ... |
'Updates 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.
os_virtual_hard_disk:
Contains the parameters Windows Azure uses to create the operating
system disk for the virtual machine.
network_config:
Encapsulates the meta... | 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_references=None, provision_guest_agent=None):
| _validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
_validate_not_none('role_name', role_name)
return self._perform_put(self._get_role_path(service_name, deployment_name, role_name), _XmlSerializer.update_role_to_xml(role_name, os_virtual_hard_disk, ro... |
'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.
complete:
True if all OS/data disks and the source blobs for the disks should
also be deleted from storage.'
| 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, role_name)
if (complete == True):
path = (path + '?comp=media')
return self._perfor... |
'The Capture Role operation captures a virtual machine image to your
image gallery. From the captured image, you can create additional
customized virtual machines.
service_name:
The name of the service.
deployment_name:
The name of the deployment.
role_name:
The name of the role.
post_capture_action:
Specifies the acti... | 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)
_validate_not_none('role_name', role_name)
_validate_not_none('post_capture_action', post_capture_action)
_validate_not_none('target_image_name', target_image_name)
_validate_not_none('target_... |
'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.'
| 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_path(service_name, deployment_name, role_name), _XmlSerializer.start_role_operation_to_xml(), as... |
'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 enumerable of strings.'
| 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(service_name, deployment_name), _XmlSerializer.start_roles_operation_to_xml(role_names), async=Tr... |
'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.'
| 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_path(service_name, deployment_name, role_name), _XmlSerializer.restart_role_operation_to_xml(), ... |
'Shuts down 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.
post_shutdown_action:
Specifies how the Virtual Machine should be shut down. Values are:
Stopped
Shuts down the Virtual Machine but retains the compute
resource... | 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('post_shutdown_action', post_shutdown_action)
return self._perform_post(self._get_role_instance_operations_path(service_name, deployme... |
'Shuts down 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 enumerable of strings.
post_shutdown_action:
Specifies how the Virtual Machine should be shut down. Values are:
Stopped
Shuts down the Virtual Machine... | 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_none('post_shutdown_action', post_shutdown_action)
return self._perform_post(self._get_roles_operations_path(service_name, deployment_nam... |
'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:
Specifies the name of the DNS server.
address:
Specifies the IP address of the 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)
return self._perform_post(self._get_dns_server_path(service_name, deployment_name), _XmlSerializer.dns... |
'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 the name of the DNS server.
address:
Specifies the IP address of the 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)
return self._perform_put(self._get_dns_server_path(service_name, deployment_name, dns_server_name), _X... |
'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 server that you want to delete.'
| 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_dns_server_path(service_name, deployment_name, dns_server_name), async=True)
|
'Lists the resource extensions that are available to add to a
Virtual Machine.'
| def list_resource_extensions(self):
| return self._perform_get(self._get_resource_extensions_path(), ResourceExtensions)
|
'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 the resource extension.'
| 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)
|
'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:
Specifies the name of the VM Image that is to be used for
replication
regions:
Specified a list of regions to replicate the... | 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)
return self._perform_put(self._get_replication_path_using_vm_image_name(vm_image_name), _XmlSerialize... |
'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 Image that is to be used for
unreplication. The VM Image Name should be the user VM Image,
not the publish... | 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, async=True, x_ms_version='2015-04-01')
|
'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 machine image to share
permission:
The sharing permission: public, msdn, or private'
| 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.lstrip('&'))
return self._perform_put(path, None, async=True, x_ms_v... |
'Creates a copy of the operating system virtual hard disk (VHD) and all
of the data VHDs that are associated with the Virtual Machine, saves
the VHD copies in the same storage location as the original VHDs, and
registers the copies as a VM Image in the image repository that is
associated with the specified subscription... | def capture_vm_image(self, service_name, deployment_name, role_name, options):
| _validate_not_none('service_name', service_name)
_validate_not_none('deployment_name', deployment_name)
_validate_not_none('role_name', role_name)
_validate_not_none('options', options)
_validate_not_none('options.os_state', options.os_state)
_validate_not_none('options.vm_image_name', options.v... |
'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 the image.
vm_image.label: Required. Specifies an identifier for the image.
vm_image.descript... | 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_configuration.os_state)
_validate_not_none('vm_image.os_disk_configuration.o... |
'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 in Azure storage.'
| 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, async=True)
|
'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):
| path = self._get_vm_image_path()
query = ''
if location:
query += ('&location=' + location)
if publisher:
query += ('&publisher=' + publisher)
if category:
query += ('&category=' + category)
if query:
path = ((path + '?') + query.lstrip('&'))
return self._perf... |
'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: Optional. Specifies an identifier for the image.
vm_image.os_disk_configuration:
Required. Specifies configuration information f... | 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), async=True)
|
'Retrieves a list of the OS images from the image repository.'
| def list_os_images(self):
| return self._perform_get(self._get_image_path(), Images)
|
'Retrieves an OS image from the image repository.'
| def get_os_image(self, image_name):
| return self._perform_get(self._get_image_path(image_name), OSImage)
|
'Retrieves an OS image from the image repository, including replication
progress.'
| def get_os_image_details(self, image_name):
| return self._perform_get(self._get_image_details_path(image_name), OSImageDetails)
|
'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 the blob in Windows Azure blob store
where the media for the image is located. The blob location must
belong to a storage a... | 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(), _XmlSerializer.os_image_to_xml(label, media_link, name, os), async=True)
|
'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 operation to update images provided by the Windows Azure
platform.
media_link:
Specifies the location of the blob in Windows Azure blob stor... | 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._perform_put(self._get_image_path(image_name), _XmlSerializer.os_image_to_xml(label, media_link, ... |
'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 an identifier for the image.
os_image.description: Optional. Specifies the description of the image.
os_image.language: Optional. Specifies... | 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), async=True)
|
'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.'
| 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, async=True)
|
'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 the role.
lun:
The Logical Unit Number (LUN) for the 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(self._get_data_disk_path(service_name, deployment_name, role_name, lun), DataVirtualHardDisk)
|
'Adds a data disk to a virtual machine.
service_name:
The name of the service.
deployment_name:
The name of the deployment.
role_name:
The name of the role.
lun:
Specifies the Logical Unit Number (LUN) for the disk. The LUN
specifies the slot in which the data drive appears when mounted
for usage by the 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):
| _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_post(self._get_data_disk_path(service_name, deployment_name, role_name), _XmlSerializer.data_virtual_... |
'Updates the specified data disk attached to 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.
lun:
Specifies the Logical Unit Number (LUN) for the disk. The LUN
specifies the slot in which the data drive appears when moun... | 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_name)
_validate_not_none('deployment_name', deployment_name)
_validate_not_none('role_name', role_name)
_validate_not_none('lun', lun)
return self._perform_put(self._get_data_disk_path(service_name, deployment_name, role_name, lun), _XmlSerializer.data_virt... |
'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:
The name of the role.
lun:
The Logical Unit Number (LUN) for the disk.
delete_vhd:
Deletes the underlying vhd blob in Azure storage.'
| 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 = self._get_data_disk_path(service_name, deployment_name, role_name, lun)
if delete_vhd:
path += '?comp=m... |
'Retrieves a list of the disks in your image repository.'
| def list_disks(self):
| return self._perform_get(self._get_disk_path(), Disks)
|
'Retrieves a disk from your image repository.'
| def get_disk(self, disk_name):
| return self._perform_get(self._get_disk_path(disk_name), Disk)
|
'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_link:
Specifies the location of the blob in Windows Azure blob store
where the media for the disk is located. The blob location must
belong to the s... | 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(), _XmlSerializer.disk_to_xml(label, media_link, name, os))
|
'Updates an existing disk in your image repository.
disk_name:
The name of the disk to update.
has_operating_system:
Deprecated.
label:
Specifies the description of the disk.
media_link:
Deprecated.
name:
Deprecated.
os:
Deprecated.'
| 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), _XmlSerializer.disk_to_xml(label, None, None, None))
|
'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.'
| 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)
|
'Retrieves a list of the virtual networks.'
| def list_virtual_network_sites(self):
| return self._perform_get(self._get_virtual_network_site_path(), VirtualNetworkSites)
|
'Initializes the sql database management service.
subscription_id:
Subscription to manage.
cert_file:
Path to .pem certificate file (httplib), or location of the
certificate in your Personal certificate store (winhttp) in the
CURRENT_USER\my\CertificateName format.
If a request_session is specified, then this is unused... | def __init__(self, subscription_id=None, cert_file=None, host=MANAGEMENT_HOST, request_session=None, timeout=DEFAULT_HTTP_TIMEOUT):
| super(SqlDatabaseManagementService, self).__init__(subscription_id, cert_file, host, request_session, timeout)
self.content_type = 'application/xml'
|
'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:
The region to deploy the new server.'
| def create_server(self, admin_login, admin_password, location):
| _validate_not_none('admin_login', admin_login)
_validate_not_none('admin_password', admin_password)
_validate_not_none('location', location)
response = self.perform_post(self._get_servers_path(), _SqlManagementXmlSerializer.create_server_to_xml(admin_login, admin_password, location))
return _SqlMana... |
'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.'
| def set_server_admin_password(self, server_name, admin_password):
| _validate_not_none('server_name', server_name)
_validate_not_none('admin_password', admin_password)
return self._perform_post((self._get_servers_path(server_name) + '?op=ResetPassword'), _SqlManagementXmlSerializer.set_server_admin_password_to_xml(admin_password))
|
'Deletes an Azure SQL Database server (including all its databases).
server_name:
Name of the server you want to delete.'
| def delete_server(self, server_name):
| _validate_not_none('server_name', server_name)
return self._perform_delete(self._get_servers_path(server_name))
|
'List the SQL servers defined on the account.'
| def list_servers(self):
| return self._perform_get(self._get_servers_path(), Servers)
|
'Gets quotas for an Azure SQL Database Server.
server_name:
Name of the server.'
| def list_quotas(self, server_name):
| _validate_not_none('server_name', server_name)
response = self._perform_get(self._get_quotas_path(server_name), None)
return _MinidomXmlToObject.parse_service_resources_response(response, ServerQuota)
|
'Gets the event logs for an Azure SQL Database Server.
server_name:
Name of the server to retrieve the event logs from.
start_date:
The starting date and time of the events to retrieve in UTC format,
for example \'2011-09-28 16:05:00\'.
interval_size_in_minutes:
Size of the event logs to retrieve (in minutes).
Valid va... | def get_server_event_logs(self, server_name, start_date, interval_size_in_minutes, event_types=''):
| _validate_not_none('server_name', server_name)
_validate_not_none('start_date', start_date)
_validate_not_none('interval_size_in_minutes', interval_size_in_minutes)
_validate_not_none('event_types', event_types)
path = (self._get_server_event_logs_path(server_name) + '?startDate={0}&intervalSizeInMi... |
'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 firewall rule.
start_ip_address:
The lowest IP address in the range of the server-level firewall
setting. IP addresses equal to or greater than this can attempt to
connect to the s... | def create_firewall_rule(self, server_name, name, start_ip_address, end_ip_address):
| _validate_not_none('server_name', server_name)
_validate_not_none('name', name)
_validate_not_none('start_ip_address', start_ip_address)
_validate_not_none('end_ip_address', end_ip_address)
return self._perform_post(self._get_firewall_rules_path(server_name), _SqlManagementXmlSerializer.create_firew... |
'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 firewall rule to update.
start_ip_address:
The lowest IP address in the range of the server-level firewall
setting. IP addresses equal to or greater than this can attempt to
conne... | def update_firewall_rule(self, server_name, name, start_ip_address, end_ip_address):
| _validate_not_none('server_name', server_name)
_validate_not_none('name', name)
_validate_not_none('start_ip_address', start_ip_address)
_validate_not_none('end_ip_address', end_ip_address)
return self._perform_put(self._get_firewall_rules_path(server_name, name), _SqlManagementXmlSerializer.update_... |
'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.'
| def delete_firewall_rule(self, server_name, name):
| _validate_not_none('server_name', server_name)
_validate_not_none('name', name)
return self._perform_delete(self._get_firewall_rules_path(server_name, name))
|
'Retrieves the set of firewall rules for an Azure SQL Database Server.
server_name:
Name of the server.'
| def list_firewall_rules(self, server_name):
| _validate_not_none('server_name', server_name)
response = self._perform_get(self._get_firewall_rules_path(server_name), None)
return _MinidomXmlToObject.parse_service_resources_response(response, FirewallRule)
|
'Gets the service level objectives for an Azure SQL Database server.
server_name:
Name of the server.'
| def list_service_level_objectives(self, server_name):
| _validate_not_none('server_name', server_name)
response = self._perform_get(self._get_service_objectives_path(server_name), None)
return _MinidomXmlToObject.parse_service_resources_response(response, ServiceObjective)
|
'Creates a new Azure SQL Database.
server_name:
Name of the server to contain the new database.
name:
Required. The name for the new database. See Naming Requirements
in Azure SQL Database General Guidelines and Limitations and
Database Identifiers for more information.
service_objective_id:
Required. The GUID correspo... | def create_database(self, server_name, name, service_objective_id, edition=None, collation_name=None, max_size_bytes=None):
| _validate_not_none('server_name', server_name)
_validate_not_none('name', name)
_validate_not_none('service_objective_id', service_objective_id)
return self._perform_post(self._get_databases_path(server_name), _SqlManagementXmlSerializer.create_database_to_xml(name, service_objective_id, edition, collat... |
'Updates existing database details.
server_name:
Name of the server to contain the new database.
name:
Required. The name for the new database. See Naming Requirements
in Azure SQL Database General Guidelines and Limitations and
Database Identifiers for more information.
new_database_name:
Optional. The new name for th... | def update_database(self, server_name, name, new_database_name=None, service_objective_id=None, edition=None, max_size_bytes=None):
| _validate_not_none('server_name', server_name)
_validate_not_none('name', name)
return self._perform_put(self._get_databases_path(server_name, name), _SqlManagementXmlSerializer.update_database_to_xml(new_database_name, service_objective_id, edition, max_size_bytes))
|
'Deletes an Azure SQL Database.
server_name:
Name of the server where the database is located.
name:
Name of the database to delete.'
| def delete_database(self, server_name, name):
| return self._perform_delete(self._get_databases_path(server_name, name))
|
'List the SQL databases defined on the specified server name'
| def list_databases(self, name):
| response = self._perform_get(self._get_list_databases_path(name), None)
return _MinidomXmlToObject.parse_service_resources_response(response, Database)
|
'Initializes the scheduler management service.
subscription_id:
Subscription to manage.
cert_file:
Path to .pem certificate file (httplib), or location of the
certificate in your Personal certificate store (winhttp) in the
CURRENT_USER\my\CertificateName format.
If a request_session is specified, then this is unused.
h... | def __init__(self, subscription_id=None, cert_file=None, host=MANAGEMENT_HOST, request_session=None, timeout=DEFAULT_HTTP_TIMEOUT):
| super(SchedulerManagementService, self).__init__(subscription_id, cert_file, host, request_session, timeout)
|
'List the cloud services for scheduling defined on the account.'
| def list_cloud_services(self):
| return self._perform_get(self._get_list_cloud_services_path(), CloudServices)
|
'The Create Cloud Service request creates a new cloud service. When job
collections are created, they are hosted within a cloud service.
A cloud service groups job collections together in a given region.
Once a cloud service has been created, job collections can then be
created and contained within it.
cloud_service_id... | def create_cloud_service(self, cloud_service_id, label, description, geo_region):
| _validate_not_none('cloud_service_id', cloud_service_id)
_validate_not_none('label', label)
_validate_not_none('description', description)
_validate_not_none('geo_region', geo_region)
path = self._get_cloud_services_path(cloud_service_id)
body = _SchedulerManagementXmlSerializer.create_cloud_ser... |
'The Get Cloud Service operation gets all the resources (job collections)
in the cloud service.
cloud_service_id:
The cloud service id'
| def get_cloud_service(self, cloud_service_id):
| _validate_not_none('cloud_service_id', cloud_service_id)
path = self._get_cloud_services_path(cloud_service_id)
return self._perform_get(path, CloudService)
|
'The Get Cloud Service operation gets all the resources (job collections)
in the cloud service.
cloud_service_id:
The cloud service id'
| def delete_cloud_service(self, cloud_service_id):
| _validate_not_none('cloud_service_id', cloud_service_id)
path = self._get_cloud_services_path(cloud_service_id)
return self._perform_delete(path, async=True)
|
'The Check Name Availability operation checks if a new job collection with
the given name may be created, or if it is unavailable. The result of the
operation is a Boolean true or false.
cloud_service_id:
The cloud service id
job_collection_id:
The name of the job_collection_id.'
| def check_job_collection_name(self, cloud_service_id, job_collection_id):
| _validate_not_none('cloud_service_id', cloud_service_id)
_validate_not_none('job_collection_id', job_collection_id)
path = self._get_cloud_services_path(cloud_service_id, 'scheduler', 'jobCollections')
path += ('?op=checknameavailability&resourceName=' + job_collection_id)
return self._perform_post(... |
'The Create Job Collection request is specified as follows. Replace <subscription-id>
with your subscription ID, <cloud-service-id> with your cloud service ID, and
<job-collection-id> with the ID of the job collection you\'d like to create.
There are no "default" pre-existing job collections every job collection
must b... | def create_job_collection(self, cloud_service_id, job_collection_id, plan='Standard'):
| _validate_not_none('cloud_service_id', cloud_service_id)
_validate_not_none('job_collection_id', job_collection_id)
path = self._get_cloud_services_path(cloud_service_id, 'scheduler', 'jobCollections')
path += ('/' + _str(job_collection_id))
body = _SchedulerManagementXmlSerializer.create_job_collec... |
'The Delete Job Collection request is specified as follows. Replace <subscription-id>
with your subscription ID, <cloud-service-id> with your cloud service ID, and
<job-collection-id> with the ID of the job collection you\'d like to delete.
cloud_service_id:
The cloud service id
job_collection_id:
Name of the hosted se... | def delete_job_collection(self, cloud_service_id, job_collection_id):
| _validate_not_none('cloud_service_id', cloud_service_id)
_validate_not_none('job_collection_id', job_collection_id)
path = self._get_cloud_services_path(cloud_service_id, 'scheduler', 'jobCollections')
path += ('/' + _str(job_collection_id))
return self._perform_delete(path, async=True)
|
'The Get Job Collection operation gets the details of a job collection
cloud_service_id:
The cloud service id
job_collection_id:
Name of the hosted service.'
| def get_job_collection(self, cloud_service_id, job_collection_id):
| _validate_not_none('cloud_service_id', cloud_service_id)
_validate_not_none('job_collection_id', job_collection_id)
path = self._get_job_collection_path(cloud_service_id, job_collection_id)
return self._perform_get(path, Resource)
|
'The Create Job request creates a new job.
cloud_service_id:
The cloud service id
job_collection_id:
Name of the hosted service.
job_id:
The job id you wish to create.
job:
A dictionary of the payload'
| def create_job(self, cloud_service_id, job_collection_id, job_id, job):
| _validate_not_none('cloud_service_id', cloud_service_id)
_validate_not_none('job_collection_id', job_collection_id)
_validate_not_none('job_id', job_id)
_validate_not_none('job', job)
path = self._get_job_collection_path(cloud_service_id, job_collection_id, job_id)
self.content_type = 'applicati... |
'The Delete Job request creates a new job.
cloud_service_id:
The cloud service id
job_collection_id:
Name of the hosted service.
job_id:
The job id you wish to create.'
| def delete_job(self, cloud_service_id, job_collection_id, job_id):
| _validate_not_none('cloud_service_id', cloud_service_id)
_validate_not_none('job_collection_id', job_collection_id)
_validate_not_none('job_id', job_id)
path = self._get_job_collection_path(cloud_service_id, job_collection_id, job_id)
return self._perform_delete(path, async=True)
|
'The Get Job operation gets the details (including the current job status)
of the specified job from the specified job collection.
The return type is
cloud_service_id:
The cloud service id
job_collection_id:
Name of the hosted service.
job_id:
The job id you wish to create.'
| def get_job(self, cloud_service_id, job_collection_id, job_id):
| _validate_not_none('cloud_service_id', cloud_service_id)
_validate_not_none('job_collection_id', job_collection_id)
_validate_not_none('job_id', job_id)
path = self._get_job_collection_path(cloud_service_id, job_collection_id, job_id)
self.content_type = 'application/json'
payload = self._perfor... |
'The Get All Jobs operation gets all the jobs in a job collection.
The full list of jobs can be accessed by excluding any job ID in the
GET call (i.e. /jobs.)
The return type is
cloud_service_id:
The cloud service id
job_collection_id:
Name of the hosted service.'
| def get_all_jobs(self, cloud_service_id, job_collection_id):
| _validate_not_none('cloud_service_id', cloud_service_id)
_validate_not_none('job_collection_id', job_collection_id)
path = self._get_job_collection_path(cloud_service_id, job_collection_id, '')
self.content_type = 'application/json'
payload = self._perform_get(path).body.decode()
return json.loa... |
'Return distribution full name with - replaced with _'
| @property
def wheel_dist_name(self):
| return '-'.join((safer_name(self.distribution.get_name()), safer_version(self.distribution.get_version())))
|
'Return archive name without extension'
| def get_archive_basename(self):
| (impl_tag, abi_tag, plat_tag) = self.get_tag()
archive_basename = ('%s-%s-%s-%s' % (self.wheel_dist_name, impl_tag, abi_tag, plat_tag))
return archive_basename
|
'Return license filename from a license-file key in setup.cfg, or None.'
| def license_file(self):
| metadata = self.distribution.get_option_dict('metadata')
if (not ('license_file' in metadata)):
return None
return metadata['license_file'][1]
|
'Generate requirements from setup.cfg as
(\'Requires-Dist\', \'requirement; qualifier\') tuples. From a metadata
section in setup.cfg:
[metadata]
provides-extra = extra1
extra2
requires-dist = requirement; qualifier
another; qualifier2
unqualified
Yields
(\'Provides-Extra\', \'extra1\'),
(\'Provides-Extra\', \'extra2\'... | def setupcfg_requirements(self):
| metadata = self.distribution.get_option_dict('metadata')
for (key, title) in (('provides_extra', 'Provides-Extra'), ('requires_dist', 'Requires-Dist')):
if (not (key in metadata)):
continue
field = metadata[key]
for line in field[1].splitlines():
line = line.strip... |
'Add additional requirements from setup.cfg to file metadata_path'
| def add_requirements(self, metadata_path):
| additional = list(self.setupcfg_requirements())
if (not additional):
return
pkg_info = read_pkg_info(metadata_path)
if (('Provides-Extra' in pkg_info) or ('Requires-Dist' in pkg_info)):
warnings.warn('setup.cfg requirements overwrite values from setup.py')
del pkg_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.