Skip to content

Commit

Permalink
[AutoPR] sql/resource-manager (#8425)
Browse files Browse the repository at this point in the history
* Generated from 9402dbf3fb3d5fffcb80f501b1fc857ff97ab723 (#7329)

Fixing PR validation errors

* regenerated

* history and version

* [AutoPR sql/resource-manager] Update databaseVulnerabilityAssessments.json (#8444)

* Generated from b2ff9bfa546b57e9905bb6f57322b1add1b29c17

Fixed documentation for storageAccountAccessKey parameter in SQL templates

* Generated from b2ff9bfa546b57e9905bb6f57322b1add1b29c17

Fixed documentation for storageAccountAccessKey parameter in SQL templates

* changelog & version
  • Loading branch information
AutorestCI authored and Zim Kalinowski committed Nov 12, 2019
1 parent 200d7fc commit d3765b4
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 37 deletions.
10 changes: 10 additions & 0 deletions sdk/sql/azure-mgmt-sql/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
Release History
===============

0.15.0 (2019-11-12)
+++++++++++++++++++

**Breaking changes**

- Operation DatabasesOperations.failover has a new signature
- Operation ManagedInstanceAdministratorsOperations.get has a new signature
- Operation ManagedInstanceAdministratorsOperations.delete has a new signature
- Operation ManagedInstanceAdministratorsOperations.create_or_update has a new signature

0.14.0 (2019-10-04)
+++++++++++++++++++

Expand Down
2 changes: 2 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@
VulnerabilityAssessmentPolicyBaselineName,
SensitivityLabelSource,
CapabilityGroup,
ReplicaType,
)

__all__ = [
Expand Down Expand Up @@ -807,4 +808,5 @@
'VulnerabilityAssessmentPolicyBaselineName',
'SensitivityLabelSource',
'CapabilityGroup',
'ReplicaType',
]
18 changes: 9 additions & 9 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1372,9 +1372,9 @@ class DatabaseVulnerabilityAssessment(ProxyResource):
is required if server level vulnerability assessment policy doesn't set
:type storage_container_path: str
:param storage_container_sas_key: A shared access signature (SAS Key) that
has write access to the blob container specified in 'storageContainerPath'
parameter. If 'storageAccountAccessKey' isn't specified,
StorageContainerSasKey is required.
has read and write access to the blob container specified in
'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't
specified, StorageContainerSasKey is required.
:type storage_container_sas_key: str
:param storage_account_access_key: Specifies the identifier key of the
storage account for vulnerability assessment scan results. If
Expand Down Expand Up @@ -5490,9 +5490,9 @@ class ManagedInstanceVulnerabilityAssessment(ProxyResource):
https://myStorage.blob.core.windows.net/VaScans/).
:type storage_container_path: str
:param storage_container_sas_key: A shared access signature (SAS Key) that
has write access to the blob container specified in 'storageContainerPath'
parameter. If 'storageAccountAccessKey' isn't specified,
StorageContainerSasKey is required.
has read and write access to the blob container specified in
'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't
specified, StorageContainerSasKey is required.
:type storage_container_sas_key: str
:param storage_account_access_key: Specifies the identifier key of the
storage account for vulnerability assessment scan results. If
Expand Down Expand Up @@ -7765,9 +7765,9 @@ class ServerVulnerabilityAssessment(ProxyResource):
https://myStorage.blob.core.windows.net/VaScans/).
:type storage_container_path: str
:param storage_container_sas_key: A shared access signature (SAS Key) that
has write access to the blob container specified in 'storageContainerPath'
parameter. If 'storageAccountAccessKey' isn't specified,
StorageContainerSasKey is required.
has read and write access to the blob container specified in
'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't
specified, StorageContainerSasKey is required.
:type storage_container_sas_key: str
:param storage_account_access_key: Specifies the identifier key of the
storage account for vulnerability assessment scan results. If
Expand Down
18 changes: 9 additions & 9 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -1372,9 +1372,9 @@ class DatabaseVulnerabilityAssessment(ProxyResource):
is required if server level vulnerability assessment policy doesn't set
:type storage_container_path: str
:param storage_container_sas_key: A shared access signature (SAS Key) that
has write access to the blob container specified in 'storageContainerPath'
parameter. If 'storageAccountAccessKey' isn't specified,
StorageContainerSasKey is required.
has read and write access to the blob container specified in
'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't
specified, StorageContainerSasKey is required.
:type storage_container_sas_key: str
:param storage_account_access_key: Specifies the identifier key of the
storage account for vulnerability assessment scan results. If
Expand Down Expand Up @@ -5490,9 +5490,9 @@ class ManagedInstanceVulnerabilityAssessment(ProxyResource):
https://myStorage.blob.core.windows.net/VaScans/).
:type storage_container_path: str
:param storage_container_sas_key: A shared access signature (SAS Key) that
has write access to the blob container specified in 'storageContainerPath'
parameter. If 'storageAccountAccessKey' isn't specified,
StorageContainerSasKey is required.
has read and write access to the blob container specified in
'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't
specified, StorageContainerSasKey is required.
:type storage_container_sas_key: str
:param storage_account_access_key: Specifies the identifier key of the
storage account for vulnerability assessment scan results. If
Expand Down Expand Up @@ -7765,9 +7765,9 @@ class ServerVulnerabilityAssessment(ProxyResource):
https://myStorage.blob.core.windows.net/VaScans/).
:type storage_container_path: str
:param storage_container_sas_key: A shared access signature (SAS Key) that
has write access to the blob container specified in 'storageContainerPath'
parameter. If 'storageAccountAccessKey' isn't specified,
StorageContainerSasKey is required.
has read and write access to the blob container specified in
'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't
specified, StorageContainerSasKey is required.
:type storage_container_sas_key: str
:param storage_account_access_key: Specifies the identifier key of the
storage account for vulnerability assessment scan results. If
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -710,3 +710,9 @@ class CapabilityGroup(str, Enum):
supported_editions = "supportedEditions"
supported_elastic_pool_editions = "supportedElasticPoolEditions"
supported_managed_instance_versions = "supportedManagedInstanceVersions"


class ReplicaType(str, Enum):

primary = "Primary"
readable_secondary = "ReadableSecondary"
Original file line number Diff line number Diff line change
Expand Up @@ -1414,7 +1414,7 @@ def rename(


def _failover_initial(
self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config):
self, resource_group_name, server_name, database_name, replica_type=None, custom_headers=None, raw=False, **operation_config):
api_version = "2018-06-01-preview"

# Construct URL
Expand All @@ -1429,6 +1429,8 @@ def _failover_initial(

# Construct parameters
query_parameters = {}
if replica_type is not None:
query_parameters['replicaType'] = self._serialize.query("replica_type", replica_type, 'str')
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

# Construct headers
Expand All @@ -1454,7 +1456,7 @@ def _failover_initial(
return client_raw_response

def failover(
self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config):
self, resource_group_name, server_name, database_name, replica_type=None, custom_headers=None, raw=False, polling=True, **operation_config):
"""Failovers a database.
:param resource_group_name: The name of the resource group that
Expand All @@ -1465,6 +1467,9 @@ def failover(
:type server_name: str
:param database_name: The name of the database to failover.
:type database_name: str
:param replica_type: The type of replica to be failed over. Possible
values include: 'Primary', 'ReadableSecondary'
:type replica_type: str or ~azure.mgmt.sql.models.ReplicaType
:param dict custom_headers: headers that will be added to the request
:param bool raw: The poller return type is ClientRawResponse, the
direct response alongside the deserialized response
Expand All @@ -1480,6 +1485,7 @@ def failover(
resource_group_name=resource_group_name,
server_name=server_name,
database_name=database_name,
replica_type=replica_type,
custom_headers=custom_headers,
raw=True,
**operation_config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class ManagedInstanceAdministratorsOperations(object):
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview".
:ivar administrator_name: The administrator name. Constant value: "ActiveDirectory".
"""

models = models
Expand All @@ -38,6 +39,7 @@ def __init__(self, client, config, serializer, deserializer):
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2017-03-01-preview"
self.administrator_name = "ActiveDirectory"

self.config = config

Expand Down Expand Up @@ -116,7 +118,7 @@ def internal_paging(next_link=None):
list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators'}

def get(
self, resource_group_name, managed_instance_name, administrator_name, custom_headers=None, raw=False, **operation_config):
self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, **operation_config):
"""Gets a managed instance administrator.
:param resource_group_name: The name of the resource group that
Expand All @@ -125,8 +127,6 @@ def get(
:type resource_group_name: str
:param managed_instance_name: The name of the managed instance.
:type managed_instance_name: str
:param administrator_name: The administrator name.
:type administrator_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
Expand All @@ -142,7 +142,7 @@ def get(
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'),
'administratorName': self._serialize.url("administrator_name", administrator_name, 'str'),
'administratorName': self._serialize.url("self.administrator_name", self.administrator_name, 'str'),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -183,13 +183,13 @@ def get(


def _create_or_update_initial(
self, resource_group_name, managed_instance_name, administrator_name, parameters, custom_headers=None, raw=False, **operation_config):
self, resource_group_name, managed_instance_name, parameters, custom_headers=None, raw=False, **operation_config):
# Construct URL
url = self.create_or_update.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'),
'administratorName': self._serialize.url("administrator_name", administrator_name, 'str'),
'administratorName': self._serialize.url("self.administrator_name", self.administrator_name, 'str'),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -235,7 +235,7 @@ def _create_or_update_initial(
return deserialized

def create_or_update(
self, resource_group_name, managed_instance_name, administrator_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config):
self, resource_group_name, managed_instance_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config):
"""Creates or updates a managed instance administrator.
:param resource_group_name: The name of the resource group that
Expand All @@ -244,8 +244,6 @@ def create_or_update(
:type resource_group_name: str
:param managed_instance_name: The name of the managed instance.
:type managed_instance_name: str
:param administrator_name: The requested administrator name.
:type administrator_name: str
:param parameters: The requested administrator parameters.
:type parameters: ~azure.mgmt.sql.models.ManagedInstanceAdministrator
:param dict custom_headers: headers that will be added to the request
Expand All @@ -265,7 +263,6 @@ def create_or_update(
raw_result = self._create_or_update_initial(
resource_group_name=resource_group_name,
managed_instance_name=managed_instance_name,
administrator_name=administrator_name,
parameters=parameters,
custom_headers=custom_headers,
raw=True,
Expand All @@ -292,13 +289,13 @@ def get_long_running_output(response):


def _delete_initial(
self, resource_group_name, managed_instance_name, administrator_name, custom_headers=None, raw=False, **operation_config):
self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, **operation_config):
# Construct URL
url = self.delete.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'),
'administratorName': self._serialize.url("administrator_name", administrator_name, 'str'),
'administratorName': self._serialize.url("self.administrator_name", self.administrator_name, 'str'),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -330,7 +327,7 @@ def _delete_initial(
return client_raw_response

def delete(
self, resource_group_name, managed_instance_name, administrator_name, custom_headers=None, raw=False, polling=True, **operation_config):
self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Deletes a managed instance administrator.
:param resource_group_name: The name of the resource group that
Expand All @@ -339,8 +336,6 @@ def delete(
:type resource_group_name: str
:param managed_instance_name: The name of the managed instance.
:type managed_instance_name: str
:param administrator_name: The administrator name.
:type administrator_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: The poller return type is ClientRawResponse, the
direct response alongside the deserialized response
Expand All @@ -355,7 +350,6 @@ def delete(
raw_result = self._delete_initial(
resource_group_name=resource_group_name,
managed_instance_name=managed_instance_name,
administrator_name=administrator_name,
custom_headers=custom_headers,
raw=True,
**operation_config
Expand Down
2 changes: 1 addition & 1 deletion sdk/sql/azure-mgmt-sql/azure/mgmt/sql/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
# regenerated.
# --------------------------------------------------------------------------

VERSION = "0.14.0"
VERSION = "0.15.0"

0 comments on commit d3765b4

Please sign in to comment.