From 407164bb6e915f6c89eb0815c925eb351c1024b8 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 13 Jul 2021 18:15:24 +0000 Subject: [PATCH] CodeGen from PR 15027 in Azure/azure-rest-api-specs Merge bf7e0abc6b9af1e2a3741a715c39c4281806dcdd into 7f3c678432df706220db21d8712d3b1bae6ae1a0 --- sdk/sql/azure-mgmt-sql/_meta.json | 8 ++-- .../azure-mgmt-sql/azure/mgmt/sql/_version.py | 2 +- ...erver_blob_auditing_policies_operations.py | 1 + ...erver_blob_auditing_policies_operations.py | 1 + .../azure/mgmt/sql/models/__init__.py | 3 -- .../azure/mgmt/sql/models/_models.py | 44 +---------------- .../azure/mgmt/sql/models/_models_py3.py | 47 +------------------ .../models/_sql_management_client_enums.py | 1 + ...erver_blob_auditing_policies_operations.py | 1 + ...erver_blob_auditing_policies_operations.py | 1 + 10 files changed, 14 insertions(+), 95 deletions(-) diff --git a/sdk/sql/azure-mgmt-sql/_meta.json b/sdk/sql/azure-mgmt-sql/_meta.json index 7981d8999e7a..242efd24cda6 100644 --- a/sdk/sql/azure-mgmt-sql/_meta.json +++ b/sdk/sql/azure-mgmt-sql/_meta.json @@ -1,11 +1,11 @@ { - "autorest": "3.4.2", + "autorest": "3.4.5", "use": [ - "@autorest/python@5.8.0", + "@autorest/python@5.8.3", "@autorest/modelerfour@4.19.2" ], - "commit": "a07f49e3f75a134c1acdacc338c9f9dc32386f66", + "commit": "0b540cc19c40416f320e4febf79c3bf2fccd682e", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/sql/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.0 --use=@autorest/modelerfour@4.19.2 --version=3.4.2", + "autorest_command": "autorest specification/sql/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.3 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/sql/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_version.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_version.py index cac9f5d10f8b..c78e629b6f08 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_version.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.0.0" +VERSION = "0.9.0" diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_extended_server_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_extended_server_blob_auditing_policies_operations.py index 3e20973a15dc..986cc0589197 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_extended_server_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_extended_server_blob_auditing_policies_operations.py @@ -213,6 +213,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, {}) return deserialized + blob_auditing_policy_name = "default" path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'serverName': self._serialize.url("server_name", server_name, 'str'), diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_blob_auditing_policies_operations.py index adba6b50ad73..2439a5f1009e 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_blob_auditing_policies_operations.py @@ -213,6 +213,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, {}) return deserialized + blob_auditing_policy_name = "default" path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'serverName': self._serialize.url("server_name", server_name, 'str'), diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py index 8749adbf138a..db89bafe250b 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py @@ -240,7 +240,6 @@ from ._models_py3 import ReplicationLinkListResult from ._models_py3 import Resource from ._models_py3 import ResourceIdentity - from ._models_py3 import ResourceIdentityWithUserAssignedIdentities from ._models_py3 import ResourceMoveDefinition from ._models_py3 import ResourceWithWritableName from ._models_py3 import RestorableDroppedDatabase @@ -582,7 +581,6 @@ from ._models import ReplicationLinkListResult # type: ignore from ._models import Resource # type: ignore from ._models import ResourceIdentity # type: ignore - from ._models import ResourceIdentityWithUserAssignedIdentities # type: ignore from ._models import ResourceMoveDefinition # type: ignore from ._models import ResourceWithWritableName # type: ignore from ._models import RestorableDroppedDatabase # type: ignore @@ -1066,7 +1064,6 @@ 'ReplicationLinkListResult', 'Resource', 'ResourceIdentity', - 'ResourceIdentityWithUserAssignedIdentities', 'ResourceMoveDefinition', 'ResourceWithWritableName', 'RestorableDroppedDatabase', diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py index c06f0769e26d..5dd8f1a0f817 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py @@ -436,7 +436,7 @@ class CheckNameAvailabilityRequest(msrest.serialization.Model): :param name: Required. :type name: str - :ivar type: Required. Default value: "Microsoft.Sql/servers". + :ivar type: Has constant value: "Microsoft.Sql/servers". :vartype type: str """ @@ -11299,7 +11299,7 @@ class ResourceIdentity(msrest.serialization.Model): :vartype principal_id: str :param type: The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. Possible values include: - "None", "SystemAssigned", "UserAssigned". + "None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned". :type type: str or ~azure.mgmt.sql.models.IdentityType :ivar tenant_id: The Azure Active Directory tenant id. :vartype tenant_id: str @@ -11328,46 +11328,6 @@ def __init__( self.tenant_id = None -class ResourceIdentityWithUserAssignedIdentities(msrest.serialization.Model): - """Azure Active Directory identity configuration for a resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param user_assigned_identities: The resource ids of the user assigned identities to use. - :type user_assigned_identities: dict[str, ~azure.mgmt.sql.models.UserIdentity] - :ivar principal_id: The Azure Active Directory principal id. - :vartype principal_id: str - :param type: The identity type. Set this to 'SystemAssigned' in order to automatically create - and assign an Azure Active Directory principal for the resource. Possible values include: - "None", "SystemAssigned", "UserAssigned". - :type type: str or ~azure.mgmt.sql.models.IdentityType - :ivar tenant_id: The Azure Active Directory tenant id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserIdentity}'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ResourceIdentityWithUserAssignedIdentities, self).__init__(**kwargs) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - self.principal_id = None - self.type = kwargs.get('type', None) - self.tenant_id = None - - class ResourceMoveDefinition(msrest.serialization.Model): """Contains the information necessary to perform a resource move (rename). diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py index cc85bdc04e28..2c17ba58eb75 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py @@ -450,7 +450,7 @@ class CheckNameAvailabilityRequest(msrest.serialization.Model): :param name: Required. :type name: str - :ivar type: Required. Default value: "Microsoft.Sql/servers". + :ivar type: Has constant value: "Microsoft.Sql/servers". :vartype type: str """ @@ -11885,7 +11885,7 @@ class ResourceIdentity(msrest.serialization.Model): :vartype principal_id: str :param type: The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. Possible values include: - "None", "SystemAssigned", "UserAssigned". + "None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned". :type type: str or ~azure.mgmt.sql.models.IdentityType :ivar tenant_id: The Azure Active Directory tenant id. :vartype tenant_id: str @@ -11917,49 +11917,6 @@ def __init__( self.tenant_id = None -class ResourceIdentityWithUserAssignedIdentities(msrest.serialization.Model): - """Azure Active Directory identity configuration for a resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param user_assigned_identities: The resource ids of the user assigned identities to use. - :type user_assigned_identities: dict[str, ~azure.mgmt.sql.models.UserIdentity] - :ivar principal_id: The Azure Active Directory principal id. - :vartype principal_id: str - :param type: The identity type. Set this to 'SystemAssigned' in order to automatically create - and assign an Azure Active Directory principal for the resource. Possible values include: - "None", "SystemAssigned", "UserAssigned". - :type type: str or ~azure.mgmt.sql.models.IdentityType - :ivar tenant_id: The Azure Active Directory tenant id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserIdentity}'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__( - self, - *, - user_assigned_identities: Optional[Dict[str, "UserIdentity"]] = None, - type: Optional[Union[str, "IdentityType"]] = None, - **kwargs - ): - super(ResourceIdentityWithUserAssignedIdentities, self).__init__(**kwargs) - self.user_assigned_identities = user_assigned_identities - self.principal_id = None - self.type = type - self.tenant_id = None - - class ResourceMoveDefinition(msrest.serialization.Model): """Contains the information necessary to perform a resource move (rename). diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py index 08176739e084..a9a95e2d3790 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py @@ -444,6 +444,7 @@ class IdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): NONE = "None" SYSTEM_ASSIGNED = "SystemAssigned" USER_ASSIGNED = "UserAssigned" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned" class ImplementationMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Gets the method in which this recommended action can be manually implemented. e.g., TSql, diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_server_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_server_blob_auditing_policies_operations.py index 2861d55a7ff6..2dc1c73087f4 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_server_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_server_blob_auditing_policies_operations.py @@ -220,6 +220,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, {}) return deserialized + blob_auditing_policy_name = "default" path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'serverName': self._serialize.url("server_name", server_name, 'str'), diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_blob_auditing_policies_operations.py index e25b70fa5bb9..5eaa202c79ff 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_blob_auditing_policies_operations.py @@ -220,6 +220,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, {}) return deserialized + blob_auditing_policy_name = "default" path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'serverName': self._serialize.url("server_name", server_name, 'str'),