Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AvailabilityGroupListener(ProxyResource):
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:ivar provisioning_state: Provisioning state to track the aysnc operation
:ivar provisioning_state: Provisioning state to track the async operation
status.
:vartype provisioning_state: str
:param availability_group_name: Name of the availability group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AvailabilityGroupListener(ProxyResource):
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:ivar provisioning_state: Provisioning state to track the aysnc operation
:ivar provisioning_state: Provisioning state to track the async operation
status.
:vartype provisioning_state: str
:param availability_group_name: Name of the availability group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ class SqlStorageUpdateSettings(Model):

:param disk_count: Virtual machine disk count.
:type disk_count: int
:param starting_device_id: Device id of the first disk to be updated.
:type starting_device_id: int
:param disk_configuration_type: Disk configuration to apply to SQL Server.
Possible values include: 'NEW', 'EXTEND', 'ADD'
:type disk_configuration_type: str or
~azure.mgmt.sqlvirtualmachine.models.DiskConfigurationType
:param starting_device_id: Device id of the first disk to be updated.
:type starting_device_id: int
"""

_attribute_map = {
'disk_count': {'key': 'diskCount', 'type': 'int'},
'disk_configuration_type': {'key': 'diskConfigurationType', 'type': 'str'},
'starting_device_id': {'key': 'startingDeviceId', 'type': 'int'},
'disk_configuration_type': {'key': 'diskConfigurationType', 'type': 'str'},
}

def __init__(self, **kwargs):
super(SqlStorageUpdateSettings, self).__init__(**kwargs)
self.disk_count = kwargs.get('disk_count', None)
self.disk_configuration_type = kwargs.get('disk_configuration_type', None)
self.starting_device_id = kwargs.get('starting_device_id', None)
self.disk_configuration_type = kwargs.get('disk_configuration_type', None)
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ class SqlStorageUpdateSettings(Model):

:param disk_count: Virtual machine disk count.
:type disk_count: int
:param starting_device_id: Device id of the first disk to be updated.
:type starting_device_id: int
:param disk_configuration_type: Disk configuration to apply to SQL Server.
Possible values include: 'NEW', 'EXTEND', 'ADD'
:type disk_configuration_type: str or
~azure.mgmt.sqlvirtualmachine.models.DiskConfigurationType
:param starting_device_id: Device id of the first disk to be updated.
:type starting_device_id: int
"""

_attribute_map = {
'disk_count': {'key': 'diskCount', 'type': 'int'},
'disk_configuration_type': {'key': 'diskConfigurationType', 'type': 'str'},
'starting_device_id': {'key': 'startingDeviceId', 'type': 'int'},
'disk_configuration_type': {'key': 'diskConfigurationType', 'type': 'str'},
}

def __init__(self, *, disk_count: int=None, disk_configuration_type=None, starting_device_id: int=None, **kwargs) -> None:
def __init__(self, *, disk_count: int=None, starting_device_id: int=None, disk_configuration_type=None, **kwargs) -> None:
super(SqlStorageUpdateSettings, self).__init__(**kwargs)
self.disk_count = disk_count
self.disk_configuration_type = disk_configuration_type
self.starting_device_id = starting_device_id
self.disk_configuration_type = disk_configuration_type
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class SqlVirtualMachine(TrackedResource):
:param virtual_machine_resource_id: ARM Resource id of underlying virtual
machine created from SQL marketplace image.
:type virtual_machine_resource_id: str
:ivar provisioning_state: Provisioning state to track the aysnc operation
:ivar provisioning_state: Provisioning state to track the async operation
status.
:vartype provisioning_state: str
:ivar sql_image_offer: SQL image offer. Examples include SQL2016-WS2016,
Expand All @@ -45,9 +45,9 @@ class SqlVirtualMachine(TrackedResource):
include: 'PAYG', 'AHUB'
:type sql_server_license_type: str or
~azure.mgmt.sqlvirtualmachine.models.SqlServerLicenseType
:ivar sql_image_sku: SQL image sku. Possible values include: 'Developer',
'Express', 'Standard', 'Enterprise', 'Web'
:vartype sql_image_sku: str or
:param sql_image_sku: SQL Server edition type. Possible values include:
'Developer', 'Express', 'Standard', 'Enterprise', 'Web'
:type sql_image_sku: str or
~azure.mgmt.sqlvirtualmachine.models.SqlImageSku
:param sql_virtual_machine_group_resource_id: ARM resource id of the SQL
virtual machine group this SQL virtual machine is or will be part of.
Expand Down Expand Up @@ -79,7 +79,6 @@ class SqlVirtualMachine(TrackedResource):
'location': {'required': True},
'provisioning_state': {'readonly': True},
'sql_image_offer': {'readonly': True},
'sql_image_sku': {'readonly': True},
}

_attribute_map = {
Expand Down Expand Up @@ -109,7 +108,7 @@ def __init__(self, **kwargs):
self.provisioning_state = None
self.sql_image_offer = None
self.sql_server_license_type = kwargs.get('sql_server_license_type', None)
self.sql_image_sku = None
self.sql_image_sku = kwargs.get('sql_image_sku', None)
self.sql_virtual_machine_group_resource_id = kwargs.get('sql_virtual_machine_group_resource_id', None)
self.wsfc_domain_credentials = kwargs.get('wsfc_domain_credentials', None)
self.auto_patching_settings = kwargs.get('auto_patching_settings', None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SqlVirtualMachineGroup(TrackedResource):
:type location: str
:param tags: Resource tags.
:type tags: dict[str, str]
:ivar provisioning_state: Provisioning state to track the aysnc operation
:ivar provisioning_state: Provisioning state to track the async operation
status.
:vartype provisioning_state: str
:param sql_image_offer: SQL image offer. Examples may include
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SqlVirtualMachineGroup(TrackedResource):
:type location: str
:param tags: Resource tags.
:type tags: dict[str, str]
:ivar provisioning_state: Provisioning state to track the aysnc operation
:ivar provisioning_state: Provisioning state to track the async operation
status.
:vartype provisioning_state: str
:param sql_image_offer: SQL image offer. Examples may include
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class SqlVirtualMachine(TrackedResource):
:param virtual_machine_resource_id: ARM Resource id of underlying virtual
machine created from SQL marketplace image.
:type virtual_machine_resource_id: str
:ivar provisioning_state: Provisioning state to track the aysnc operation
:ivar provisioning_state: Provisioning state to track the async operation
status.
:vartype provisioning_state: str
:ivar sql_image_offer: SQL image offer. Examples include SQL2016-WS2016,
Expand All @@ -45,9 +45,9 @@ class SqlVirtualMachine(TrackedResource):
include: 'PAYG', 'AHUB'
:type sql_server_license_type: str or
~azure.mgmt.sqlvirtualmachine.models.SqlServerLicenseType
:ivar sql_image_sku: SQL image sku. Possible values include: 'Developer',
'Express', 'Standard', 'Enterprise', 'Web'
:vartype sql_image_sku: str or
:param sql_image_sku: SQL Server edition type. Possible values include:
'Developer', 'Express', 'Standard', 'Enterprise', 'Web'
:type sql_image_sku: str or
~azure.mgmt.sqlvirtualmachine.models.SqlImageSku
:param sql_virtual_machine_group_resource_id: ARM resource id of the SQL
virtual machine group this SQL virtual machine is or will be part of.
Expand Down Expand Up @@ -79,7 +79,6 @@ class SqlVirtualMachine(TrackedResource):
'location': {'required': True},
'provisioning_state': {'readonly': True},
'sql_image_offer': {'readonly': True},
'sql_image_sku': {'readonly': True},
}

_attribute_map = {
Expand All @@ -102,14 +101,14 @@ class SqlVirtualMachine(TrackedResource):
'server_configurations_management_settings': {'key': 'properties.serverConfigurationsManagementSettings', 'type': 'ServerConfigurationsManagementSettings'},
}

def __init__(self, *, location: str, tags=None, identity=None, virtual_machine_resource_id: str=None, sql_server_license_type=None, sql_virtual_machine_group_resource_id: str=None, wsfc_domain_credentials=None, auto_patching_settings=None, auto_backup_settings=None, key_vault_credential_settings=None, server_configurations_management_settings=None, **kwargs) -> None:
def __init__(self, *, location: str, tags=None, identity=None, virtual_machine_resource_id: str=None, sql_server_license_type=None, sql_image_sku=None, sql_virtual_machine_group_resource_id: str=None, wsfc_domain_credentials=None, auto_patching_settings=None, auto_backup_settings=None, key_vault_credential_settings=None, server_configurations_management_settings=None, **kwargs) -> None:
super(SqlVirtualMachine, self).__init__(location=location, tags=tags, **kwargs)
self.identity = identity
self.virtual_machine_resource_id = virtual_machine_resource_id
self.provisioning_state = None
self.sql_image_offer = None
self.sql_server_license_type = sql_server_license_type
self.sql_image_sku = None
self.sql_image_sku = sql_image_sku
self.sql_virtual_machine_group_resource_id = sql_virtual_machine_group_resource_id
self.wsfc_domain_credentials = wsfc_domain_credentials
self.auto_patching_settings = auto_patching_settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,70 @@ def __init__(self, client, config, serializer, deserializer):

self.config = config

def list(
self, custom_headers=None, raw=False, **operation_config):
"""Gets all SQL virtual machines in a subscription.

:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: An iterator like instance of SqlVirtualMachine
:rtype:
~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachinePaged[~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachine]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
def internal_paging(next_link=None, raw=False):

if not next_link:
# Construct URL
url = self.list.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)

# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

else:
url = next_link
query_parameters = {}

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp

return response

# Deserialize response
deserialized = models.SqlVirtualMachinePaged(internal_paging, self._deserialize.dependencies)

if raw:
header_dict = {}
client_raw_response = models.SqlVirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict)
return client_raw_response

return deserialized
list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines'}

def get(
self, resource_group_name, sql_virtual_machine_name, expand=None, custom_headers=None, raw=False, **operation_config):
"""Gets a SQL virtual machine.
Expand Down Expand Up @@ -465,67 +529,3 @@ def internal_paging(next_link=None, raw=False):

return deserialized
list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines'}

def list(
self, custom_headers=None, raw=False, **operation_config):
"""Gets all SQL virtual machines in a subscription.

:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: An iterator like instance of SqlVirtualMachine
:rtype:
~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachinePaged[~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachine]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
def internal_paging(next_link=None, raw=False):

if not next_link:
# Construct URL
url = self.list.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)

# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

else:
url = next_link
query_parameters = {}

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp

return response

# Deserialize response
deserialized = models.SqlVirtualMachinePaged(internal_paging, self._deserialize.dependencies)

if raw:
header_dict = {}
client_raw_response = models.SqlVirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict)
return client_raw_response

return deserialized
list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines'}
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
# regenerated.
# --------------------------------------------------------------------------

VERSION = "0.2.0"
VERSION = "2017-03-01-preview"