From bb740c92b5c94f12e945ef924c4d369c056ead22 Mon Sep 17 00:00:00 2001 From: Amol Agarwal Date: Wed, 3 Jun 2020 21:59:13 -0700 Subject: [PATCH 01/10] Add a new api and add 2020-02-02-preview versions --- .../ServerAzureADAdministrators.json | 7 +- .../examples/AdministratorCreateOrUpdate.json | 3 +- .../examples/AdministratorGet.json | 2 +- .../examples/AdministratorList.json | 24 +- .../ServerAzureADAdministrators.json | 507 ++++++++++++++++++ .../examples/AdministratorCreateOrUpdate.json | 49 ++ .../examples/AdministratorDelete.json | 14 + .../examples/AdministratorGet.json | 25 + .../examples/AdministratorList.json | 25 + .../DisableAzureADOnlyAuthUpdate.json | 26 + .../examples/EnableAzureADOnlyAuthUpdate.json | 26 + specification/sql/resource-manager/readme.md | 32 ++ 12 files changed, 720 insertions(+), 20 deletions(-) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADAdministrators.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorCreateOrUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/DisableAzureADOnlyAuthUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/EnableAzureADOnlyAuthUpdate.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json index cdd9476a0624..35a0df9f5d0f 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json @@ -118,7 +118,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use disableAzureADOnlyAuthentication API instead.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - AzureADOnlyAuthentication parameter is read only, please use enableAzureADOnlyAuthentication or disableAzureADOnlyAuthentication API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use disableAzureADOnlyAuthentication API first.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." }, "202": { "description": "Accepted" @@ -176,7 +176,7 @@ "description": "Successfully deleted the Azure Active Directory administrator." }, "default": { - "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - AzureADOnlyAuthentication parameter is read only, please use enableAzureADOnlyAuthentication or disableAzureADOnlyAuthentication API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use disableAzureADOnlyAuthentication API first.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." }, "202": { "description": "Accepted" @@ -316,7 +316,8 @@ }, "azureADOnlyAuthentication": { "description": "Azure Active Directory only Authentication enabled.", - "type": "boolean" + "type": "boolean", + "readOnly": true } } }, diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorCreateOrUpdate.json index bf99bf84a0fa..4ef268e50473 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorCreateOrUpdate.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorCreateOrUpdate.json @@ -11,8 +11,7 @@ "administratorType": "ActiveDirectory", "login": "bob@contoso.com", "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "azureADOnlyAuthentication": true + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" } } }, diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorGet.json index 52aee36b3f44..ba72e354e2e8 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorGet.json @@ -17,7 +17,7 @@ "login": "bob@contoso.com", "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "azureADOnlyAuthentication": true + "azureADOnlyAuthentication": "true" } } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorList.json index 0fb15a505729..ba72e354e2e8 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorList.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorList.json @@ -9,20 +9,16 @@ "responses": { "200": { "body": { - "value": [ - { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", - "name": "ActiveDirectory", - "type": "Microsoft.Sql/servers/administrators", - "properties": { - "administratorType": "ActiveDirectory", - "login": "bob@contoso.com", - "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "azureADOnlyAuthentication": true - } - } - ] + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.Sql/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "azureADOnlyAuthentication": "true" + } } } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADAdministrators.json new file mode 100644 index 000000000000..84bd00d7bb96 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADAdministrators.json @@ -0,0 +1,507 @@ +{ + "swagger": "2.0", + "info": { + "version": "2020-02-02-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/enableAzureADOnlyAuthentication": { + "post": { + "tags": [ + "ServerAzureADAdministrators" + ], + "description": "Enables Azure Active Directory only authentication on logical Server.", + "operationId": "ServerAzureADAdministrators_EnableAzureADOnlyAuthentication", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "Successfully enabled Azure Active Directory only authentication on logical server.", + "schema": { + "$ref": "#/definitions/ServerAzureADAdministrator" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Enables Azure Active Directory only authentication on logical server.": { + "$ref": "./examples/EnableAzureADOnlyAuthUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}": { + "get": { + "tags": [ + "ServerAzureADAdministrators" + ], + "description": "Gets a Azure Active Directory administrator.", + "operationId": "ServerAzureADAdministrators_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "administratorName", + "in": "path", + "description": "The name of server active directory administrator.", + "required": true, + "type": "string", + "enum": [ + "ActiveDirectory" + ], + "x-ms-enum": { + "name": "AdministratorName", + "modelAsString": true + } + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a specified Azure Active Directory administrator.", + "schema": { + "$ref": "#/definitions/ServerAzureADAdministrator" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets a Azure Active Directory administrator.": { + "$ref": "./examples/AdministratorGet.json" + } + } + }, + "put": { + "tags": [ + "ServerAzureADAdministrators" + ], + "description": "Creates or updates an existing Azure Active Directory administrator.", + "operationId": "ServerAzureADAdministrators_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "administratorName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "ActiveDirectory" + ], + "x-ms-enum": { + "name": "AdministratorName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The required parameters for creating or updating an Active Directory Administrator.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerAzureADAdministrator" + } + } + ], + "responses": { + "200": { + "description": "Successfully updated a Azure Active Directory administrator.", + "schema": { + "$ref": "#/definitions/ServerAzureADAdministrator" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - AzureADOnlyAuthentication parameter is read only, please use enableAzureADOnlyAuthentication or disableAzureADOnlyAuthentication API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use disableAzureADOnlyAuthentication API first.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created a Azure Active Directory administrator.", + "schema": { + "$ref": "#/definitions/ServerAzureADAdministrator" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Creates or updates an existing Azure Active Directory administrator.": { + "$ref": "./examples/AdministratorCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ServerAzureADAdministrators" + ], + "description": "Deletes the Azure Active Directory administrator with the given name.", + "operationId": "ServerAzureADAdministrators_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "administratorName", + "in": "path", + "description": "The name of server active directory administrator.", + "required": true, + "type": "string", + "enum": [ + "ActiveDirectory" + ], + "x-ms-enum": { + "name": "AdministratorName", + "modelAsString": true + } + } + ], + "responses": { + "200": { + "description": "Successfully deleted the Azure Active Directory administrator." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - AzureADOnlyAuthentication parameter is read only, please use enableAzureADOnlyAuthentication or disableAzureADOnlyAuthentication API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use disableAzureADOnlyAuthentication API first.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified Azure Active Directory administrator does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete Azure Active Directory administrator.": { + "$ref": "./examples/AdministratorDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators": { + "get": { + "tags": [ + "ServerAzureADAdministrators" + ], + "description": "Gets a list of Azure Active Directory administrators in a server.", + "operationId": "ServerAzureADAdministrators_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of Azure Active Directory administrators.", + "schema": { + "$ref": "#/definitions/AdministratorListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of Azure Active Directory administrator.": { + "$ref": "./examples/AdministratorList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/disableAzureADOnlyAuthentication": { + "post": { + "tags": [ + "ServerAzureADAdministrators" + ], + "description": "Disables Azure Active Directory only authentication on logical Server.", + "operationId": "ServerAzureADAdministrators_DisableAzureADOnlyAuthentication", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "Successfully disabled Azure Active Directory only authentication on logical server.", + "schema": { + "$ref": "#/definitions/ServerAzureADAdministrator" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Disables Azure Active Directory only authentication on logical server.": { + "$ref": "./examples/DisableAzureADOnlyAuthUpdate.json" + } + } + } + } + }, + "definitions": { + "AdministratorProperties": { + "description": "Properties of a active directory administrator.", + "required": [ + "administratorType", + "login", + "sid" + ], + "type": "object", + "properties": { + "administratorType": { + "description": "Type of the sever administrator.", + "enum": [ + "ActiveDirectory" + ], + "type": "string", + "x-ms-enum": { + "name": "AdministratorType", + "modelAsString": true + } + }, + "login": { + "description": "Login name of the server administrator.", + "type": "string" + }, + "sid": { + "format": "uuid", + "description": "SID (object ID) of the server administrator.", + "type": "string" + }, + "tenantId": { + "format": "uuid", + "description": "Tenant ID of the administrator.", + "type": "string" + }, + "azureADOnlyAuthentication": { + "description": "Azure Active Directory only Authentication enabled.", + "type": "boolean", + "readOnly": true + } + } + }, + "Resource": { + "description": "ARM resource.", + "type": "object", + "properties": { + "id": { + "description": "Resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Resource name.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "Resource type.", + "type": "string", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "ProxyResource": { + "description": "ARM proxy resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": {} + }, + "ServerAzureADAdministrator": { + "description": "Azure Active Directory administrator.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/AdministratorProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "AdministratorListResult": { + "description": "A list of active directory administrators.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerAzureADAdministrator" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "BlobAuditingPolicyNameParameter": { + "name": "blobAuditingPolicyName", + "in": "path", + "description": "The name of the blob auditing policy.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-parameter-location": "method" + }, + "SqlVirtualMachineInstanceNameParameter": { + "name": "sqlVirtualMachineInstanceName", + "in": "path", + "description": "The name of the SqlVirtualMachineInstance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "SqlVirtualMachineContainerNameParameter": { + "name": "sqlVirtualMachineContainerName", + "in": "path", + "description": "The name of the SqlVirtualMachineContainer.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "VirtualClusterNameParameter": { + "name": "virtualClusterName", + "in": "path", + "description": "The name of the virtual cluster.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorCreateOrUpdate.json new file mode 100644 index 000000000000..4ef268e50473 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorCreateOrUpdate.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "administratorName": "ActiveDirectory", + "api-version": "2019-06-01-preview", + "name": "ActiveDirectory", + "parameters": { + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.Sql/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "azureADOnlyAuthentication": true + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", + "name": "activeDirectory", + "type": "Microsoft.Sql/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "azureADOnlyAuthentication": true + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorDelete.json new file mode 100644 index 000000000000..d78d90a0566e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "administratorName": "ActiveDirectory", + "api-version": "2019-06-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorGet.json new file mode 100644 index 000000000000..ba72e354e2e8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "administratorName": "ActiveDirectory", + "api-version": "2019-06-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.Sql/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "azureADOnlyAuthentication": "true" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorList.json new file mode 100644 index 000000000000..ba72e354e2e8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorList.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "administratorName": "ActiveDirectory", + "api-version": "2019-06-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.Sql/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "azureADOnlyAuthentication": "true" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/DisableAzureADOnlyAuthUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/DisableAzureADOnlyAuthUpdate.json new file mode 100644 index 000000000000..91bf39fc96a1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/DisableAzureADOnlyAuthUpdate.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "api-version": "2019-06-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.Sql/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "d6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "azureADOnlyAuthentication": false + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/EnableAzureADOnlyAuthUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/EnableAzureADOnlyAuthUpdate.json new file mode 100644 index 000000000000..91bf39fc96a1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/EnableAzureADOnlyAuthUpdate.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "api-version": "2019-06-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.Sql/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "d6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "azureADOnlyAuthentication": false + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index b67d56d4dc40..8f76e2d47ed9 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -140,6 +140,7 @@ input-file: - Microsoft.Sql/preview/2019-06-01-preview/managedInstanceOperations.json - Microsoft.Sql/preview/2019-06-01-preview/syncGroups.json - Microsoft.Sql/preview/2019-06-01-preview/syncMembers.json +- Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADAdministrators.json # Needed when there is more than one input file override-info: @@ -241,6 +242,7 @@ input-file: - Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json - Microsoft.Sql/preview/2019-06-01-preview/syncGroups.json - Microsoft.Sql/preview/2019-06-01-preview/syncMembers.json +- Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADAdministrators.json # Needed when there is more than one input file override-info: @@ -331,6 +333,7 @@ input-file: - Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json - Microsoft.Sql/preview/2019-06-01-preview/syncGroups.json - Microsoft.Sql/preview/2019-06-01-preview/syncMembers.json +- Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADAdministrators.json # Needed when there is more than one input file override-info: @@ -475,6 +478,34 @@ override-info: The following packages are each composed of all apis from only one api-version. +### Tag: package-pure-2020-02-preview + +These settings apply only when `--tag=package-pure-2020-02-preview` is specified on the command line. + +This section contains all input swagger files for version 2020-02-02-preview. All APIs of that version must be added this section when the API is ready for production. + +APIs must only be added to this section when the API is publicly available in at least 1 production region and at least 1 generated client has been tested end-to-end. + +These can be regenerated by running the following PowerShell script from this readme file's folder: `dir .\Microsoft.Sql\preview\2019-06-01-preview\ -File | Resolve-Path -Relative | % { " - $_".Replace("\", "/") }` + +``` yaml $(tag) == 'package-pure-2020-02-preview' +input-file: + - ./Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADAdministrators.json + +# Needed when there is more than one input file +override-info: + title: SqlManagementClient + ``` + +# Needed when there is more than one input file +override-info: + title: SqlManagementClient +``` + +## Pure package versions + +The following packages are each composed of all apis from only one api-version. + ### Tag: package-pure-2019-06-preview These settings apply only when `--tag=package-pure-2019-06-preview` is specified on the command line. @@ -870,6 +901,7 @@ input-file: - $(this-folder)/Microsoft.Sql/preview/2019-06-01-preview/managedInstanceOperations.json - $(this-folder)/Microsoft.Sql/preview/2019-06-01-preview/syncGroups.json - $(this-folder)/Microsoft.Sql/preview/2019-06-01-preview/syncMembers.json + - $(this-folder)/Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADAdministrators.json - $(this-folder)/Microsoft.Sql/stable/2014-04-01/capabilities.json - $(this-folder)/Microsoft.Sql/stable/2014-04-01/databases.json - $(this-folder)/Microsoft.Sql/stable/2014-04-01/elasticPools.json From 23e3fc498e88d83136979e133d69668c74433483 Mon Sep 17 00:00:00 2001 From: Amol Agarwal Date: Wed, 3 Jun 2020 22:41:54 -0700 Subject: [PATCH 02/10] Fix get and list example files. --- .../examples/AdministratorGet.json | 2 +- .../examples/AdministratorList.json | 24 +++++++++++-------- .../examples/AdministratorGet.json | 2 +- .../examples/AdministratorList.json | 24 +++++++++++-------- 4 files changed, 30 insertions(+), 22 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorGet.json index ba72e354e2e8..52aee36b3f44 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorGet.json @@ -17,7 +17,7 @@ "login": "bob@contoso.com", "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "azureADOnlyAuthentication": "true" + "azureADOnlyAuthentication": true } } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorList.json index ba72e354e2e8..0fb15a505729 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorList.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorList.json @@ -9,16 +9,20 @@ "responses": { "200": { "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", - "name": "ActiveDirectory", - "type": "Microsoft.Sql/servers/administrators", - "properties": { - "administratorType": "ActiveDirectory", - "login": "bob@contoso.com", - "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "azureADOnlyAuthentication": "true" - } + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.Sql/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "azureADOnlyAuthentication": true + } + } + ] } } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorGet.json index ba72e354e2e8..52aee36b3f44 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorGet.json @@ -17,7 +17,7 @@ "login": "bob@contoso.com", "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "azureADOnlyAuthentication": "true" + "azureADOnlyAuthentication": true } } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorList.json index ba72e354e2e8..0fb15a505729 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorList.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorList.json @@ -9,16 +9,20 @@ "responses": { "200": { "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", - "name": "ActiveDirectory", - "type": "Microsoft.Sql/servers/administrators", - "properties": { - "administratorType": "ActiveDirectory", - "login": "bob@contoso.com", - "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "azureADOnlyAuthentication": "true" - } + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.Sql/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "azureADOnlyAuthentication": true + } + } + ] } } } From ff0596e1f6426074d8169810c37f8e34e4b1e8f2 Mon Sep 17 00:00:00 2001 From: Amol Agarwal Date: Wed, 1 Jul 2020 18:05:17 -0700 Subject: [PATCH 03/10] Remove 2019 api version from composite and update examples to 2020 api version. --- .../examples/AdministratorCreateOrUpdate.json | 2 +- .../2020-02-02-preview/examples/AdministratorDelete.json | 2 +- .../preview/2020-02-02-preview/examples/AdministratorGet.json | 2 +- .../preview/2020-02-02-preview/examples/AdministratorList.json | 2 +- .../examples/DisableAzureADOnlyAuthUpdate.json | 2 +- .../examples/EnableAzureADOnlyAuthUpdate.json | 2 +- specification/sql/resource-manager/readme.md | 3 --- 7 files changed, 6 insertions(+), 9 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorCreateOrUpdate.json index 4ef268e50473..aa12b45fa916 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorCreateOrUpdate.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorCreateOrUpdate.json @@ -4,7 +4,7 @@ "resourceGroupName": "sqlcrudtest-4799", "serverName": "sqlcrudtest-6440", "administratorName": "ActiveDirectory", - "api-version": "2019-06-01-preview", + "api-version": "2020-02-02-preview", "name": "ActiveDirectory", "parameters": { "properties": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorDelete.json index d78d90a0566e..5e1564c681c5 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorDelete.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorDelete.json @@ -4,7 +4,7 @@ "resourceGroupName": "sqlcrudtest-4799", "serverName": "sqlcrudtest-6440", "administratorName": "ActiveDirectory", - "api-version": "2019-06-01-preview" + "api-version": "2020-02-02-preview" }, "responses": { "200": {}, diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorGet.json index 52aee36b3f44..4c58c90475c1 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorGet.json @@ -4,7 +4,7 @@ "resourceGroupName": "sqlcrudtest-4799", "serverName": "sqlcrudtest-6440", "administratorName": "ActiveDirectory", - "api-version": "2019-06-01-preview" + "api-version": "2020-02-02-preview" }, "responses": { "200": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorList.json index 0fb15a505729..7a9290b569c9 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorList.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorList.json @@ -4,7 +4,7 @@ "resourceGroupName": "sqlcrudtest-4799", "serverName": "sqlcrudtest-6440", "administratorName": "ActiveDirectory", - "api-version": "2019-06-01-preview" + "api-version": "2020-02-02-preview" }, "responses": { "200": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/DisableAzureADOnlyAuthUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/DisableAzureADOnlyAuthUpdate.json index 91bf39fc96a1..90abc170ab96 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/DisableAzureADOnlyAuthUpdate.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/DisableAzureADOnlyAuthUpdate.json @@ -3,7 +3,7 @@ "subscriptionId": "00000000-1111-2222-3333-444444444444", "resourceGroupName": "sqlcrudtest-4799", "serverName": "sqlcrudtest-6440", - "api-version": "2019-06-01-preview", + "api-version": "2020-02-02-preview", "parameters": {} }, "responses": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/EnableAzureADOnlyAuthUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/EnableAzureADOnlyAuthUpdate.json index 91bf39fc96a1..90abc170ab96 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/EnableAzureADOnlyAuthUpdate.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/EnableAzureADOnlyAuthUpdate.json @@ -3,7 +3,7 @@ "subscriptionId": "00000000-1111-2222-3333-444444444444", "resourceGroupName": "sqlcrudtest-4799", "serverName": "sqlcrudtest-6440", - "api-version": "2019-06-01-preview", + "api-version": "2020-02-02-preview", "parameters": {} }, "responses": { diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index a5ee5ecc3b9d..a2b4cb0a71ee 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -136,7 +136,6 @@ input-file: - Microsoft.Sql/preview/2019-06-01-preview/WorkloadGroups.json - Microsoft.Sql/preview/2019-06-01-preview/WorkloadClassifiers.json - Microsoft.Sql/preview/2019-06-01-preview/managedDatabases.json -- Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json - Microsoft.Sql/preview/2019-06-01-preview/managedInstanceOperations.json - Microsoft.Sql/preview/2019-06-01-preview/syncGroups.json - Microsoft.Sql/preview/2019-06-01-preview/syncMembers.json @@ -240,7 +239,6 @@ input-file: - Microsoft.Sql/preview/2019-06-01-preview/WorkloadGroups.json - Microsoft.Sql/preview/2019-06-01-preview/WorkloadClassifiers.json - Microsoft.Sql/preview/2019-06-01-preview/managedDatabases.json -- Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json - Microsoft.Sql/preview/2019-06-01-preview/syncGroups.json - Microsoft.Sql/preview/2019-06-01-preview/syncMembers.json - Microsoft.Sql/preview/2019-06-01-preview/FailoverManagedInstance.json @@ -332,7 +330,6 @@ input-file: - Microsoft.Sql/preview/2019-06-01-preview/WorkloadGroups.json - Microsoft.Sql/preview/2019-06-01-preview/WorkloadClassifiers.json - Microsoft.Sql/preview/2019-06-01-preview/managedDatabases.json -- Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json - Microsoft.Sql/preview/2019-06-01-preview/syncGroups.json - Microsoft.Sql/preview/2019-06-01-preview/syncMembers.json - Microsoft.Sql/preview/2019-06-01-preview/FailoverManagedInstance.json From d8487a0563963b0bd6bac443346308ea697c3acf Mon Sep 17 00:00:00 2001 From: Amol Agarwal Date: Wed, 22 Jul 2020 17:58:31 -0700 Subject: [PATCH 04/10] Create a new AzureADOnlyAuthentications api and remove enable\disable apis. --- .../ServerAzureADAdministrators.json | 48 +--- .../DisableAzureADOnlyAuthUpdate.json | 26 -- ... => ServerAzureADOnlyAuthentications.json} | 253 ++++++------------ .../examples/AdministratorCreateOrUpdate.json | 49 ---- .../AzureADOnlyAuthCreateOrUpdate.json | 39 +++ ...Delete.json => AzureADOnlyAuthDelete.json} | 4 +- ...tratorGet.json => AzureADOnlyAuthGet.json} | 15 +- ...atorList.json => AzureADOnlyAuthList.json} | 14 +- .../DisableAzureADOnlyAuthUpdate.json | 26 -- .../examples/EnableAzureADOnlyAuthUpdate.json | 26 -- specification/sql/resource-manager/readme.md | 10 +- 11 files changed, 144 insertions(+), 366 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/DisableAzureADOnlyAuthUpdate.json rename specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/{ServerAzureADAdministrators.json => ServerAzureADOnlyAuthentications.json} (54%) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorCreateOrUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthCreateOrUpdate.json rename specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/{AdministratorDelete.json => AzureADOnlyAuthDelete.json} (86%) rename specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/{AdministratorGet.json => AzureADOnlyAuthGet.json} (54%) rename specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/{AdministratorList.json => AzureADOnlyAuthList.json} (56%) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/DisableAzureADOnlyAuthUpdate.json delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/EnableAzureADOnlyAuthUpdate.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json index 35a0df9f5d0f..5f68c6516644 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json @@ -118,7 +118,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - AzureADOnlyAuthentication parameter is read only, please use enableAzureADOnlyAuthentication or disableAzureADOnlyAuthentication API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use disableAzureADOnlyAuthentication API first.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - AzureADOnlyAuthentication parameter is read only, please use azureADOnlyAuthentication API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentication API first.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." }, "202": { "description": "Accepted" @@ -176,7 +176,7 @@ "description": "Successfully deleted the Azure Active Directory administrator." }, "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - AzureADOnlyAuthentication parameter is read only, please use enableAzureADOnlyAuthentication or disableAzureADOnlyAuthentication API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use disableAzureADOnlyAuthentication API first.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - AzureADOnlyAuthentication parameter is read only, please use azureADOnlyAuthentication API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentication API first.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." }, "202": { "description": "Accepted" @@ -235,50 +235,6 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/disableAzureADOnlyAuthentication": { - "post": { - "tags": [ - "ServerAzureADAdministrators" - ], - "description": "Disables Azure Active Directory only authentication on logical Server.", - "operationId": "ServerAzureADAdministrators_DisableAzureADOnlyAuthentication", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ServerNameParameter" - } - ], - "responses": { - "200": { - "description": "Successfully disabled Azure Active Directory only authentication on logical server.", - "schema": { - "$ref": "#/definitions/ServerAzureADAdministrator" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." - }, - "202": { - "description": "Accepted" - } - }, - "x-ms-long-running-operation": true, - "x-ms-examples": { - "Disables Azure Active Directory only authentication on logical server.": { - "$ref": "./examples/DisableAzureADOnlyAuthUpdate.json" - } - } - } - } - }, "definitions": { "AdministratorProperties": { "description": "Properties of a active directory administrator.", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/DisableAzureADOnlyAuthUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/DisableAzureADOnlyAuthUpdate.json deleted file mode 100644 index 91bf39fc96a1..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/DisableAzureADOnlyAuthUpdate.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "sqlcrudtest-4799", - "serverName": "sqlcrudtest-6440", - "api-version": "2019-06-01-preview", - "parameters": {} - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", - "name": "ActiveDirectory", - "type": "Microsoft.Sql/servers/administrators", - "properties": { - "administratorType": "ActiveDirectory", - "login": "bob@contoso.com", - "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "tenantId": "d6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "azureADOnlyAuthentication": false - } - } - }, - "202": {} - } -} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADOnlyAuthentications.json similarity index 54% rename from specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADAdministrators.json rename to specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADOnlyAuthentications.json index 84bd00d7bb96..b7d3840d0b55 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADAdministrators.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADOnlyAuthentications.json @@ -16,56 +16,13 @@ "application/json" ], "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/enableAzureADOnlyAuthentication": { - "post": { - "tags": [ - "ServerAzureADAdministrators" - ], - "description": "Enables Azure Active Directory only authentication on logical Server.", - "operationId": "ServerAzureADAdministrators_EnableAzureADOnlyAuthentication", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ServerNameParameter" - } - ], - "responses": { - "200": { - "description": "Successfully enabled Azure Active Directory only authentication on logical server.", - "schema": { - "$ref": "#/definitions/ServerAzureADAdministrator" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." - }, - "202": { - "description": "Accepted" - } - }, - "x-ms-long-running-operation": true, - "x-ms-examples": { - "Enables Azure Active Directory only authentication on logical server.": { - "$ref": "./examples/EnableAzureADOnlyAuthUpdate.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications/{authenticationName}": { "get": { "tags": [ - "ServerAzureADAdministrators" + "ServerAzureADOnlyAuthentications" ], - "description": "Gets a Azure Active Directory administrator.", - "operationId": "ServerAzureADAdministrators_Get", + "description": "Gets a specific Azure Active Directory only authentication property.", + "operationId": "ServerAzureADOnlyAuthentications_Get", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" @@ -80,25 +37,25 @@ "$ref": "#/parameters/ServerNameParameter" }, { - "name": "administratorName", + "name": "authenticationName", "in": "path", - "description": "The name of server active directory administrator.", + "description": "The name of server azure active directory only authentication.", "required": true, "type": "string", "enum": [ - "ActiveDirectory" + "Default" ], "x-ms-enum": { - "name": "AdministratorName", + "name": "AuthenticationName", "modelAsString": true } } ], "responses": { "200": { - "description": "Successfully retrieved a specified Azure Active Directory administrator.", + "description": "Successfully retrieved a specified Azure Active Directory only authentication properties.", "schema": { - "$ref": "#/definitions/ServerAzureADAdministrator" + "$ref": "#/definitions/ServerAzureADOnlyAuthentication" } }, "default": { @@ -106,17 +63,17 @@ } }, "x-ms-examples": { - "Gets a Azure Active Directory administrator.": { - "$ref": "./examples/AdministratorGet.json" + "Gets a Azure Active Directory only authentication property.": { + "$ref": "./examples/AzureADOnlyAuthGet.json" } } }, "put": { "tags": [ - "ServerAzureADAdministrators" + "ServerAzureADOnlyAuthentications" ], - "description": "Creates or updates an existing Azure Active Directory administrator.", - "operationId": "ServerAzureADAdministrators_CreateOrUpdate", + "description": "Sets Server Active Directory only authentication property or updates an existing server Active Directory only authenticaiton property.", + "operationId": "ServerAzureADOnlyAuthentications_CreateOrUpdate", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" @@ -131,61 +88,62 @@ "$ref": "#/parameters/ServerNameParameter" }, { - "name": "administratorName", + "name": "authenticationName", "in": "path", + "description": "The name of server azure active directory only authentication.", "required": true, "type": "string", "enum": [ - "ActiveDirectory" + "Default" ], "x-ms-enum": { - "name": "AdministratorName", + "name": "AuthenticationName", "modelAsString": true } }, { "name": "parameters", "in": "body", - "description": "The required parameters for creating or updating an Active Directory Administrator.", + "description": "The required parameters for creating or updating an Active Directory only authentication property.", "required": true, "schema": { - "$ref": "#/definitions/ServerAzureADAdministrator" + "$ref": "#/definitions/ServerAzureADOnlyAuthentication" } } ], "responses": { "200": { - "description": "Successfully updated a Azure Active Directory administrator.", + "description": "Successfully updated a Azure Active Directory only authentication property.", "schema": { - "$ref": "#/definitions/ServerAzureADAdministrator" + "$ref": "#/definitions/ServerAzureADOnlyAuthentication" } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - AzureADOnlyAuthentication parameter is read only, please use enableAzureADOnlyAuthentication or disableAzureADOnlyAuthentication API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use disableAzureADOnlyAuthentication API first.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." }, "202": { "description": "Accepted" }, "201": { - "description": "Successfully created a Azure Active Directory administrator.", + "description": "Successfully updated Azure Active Directory only authentication property.", "schema": { - "$ref": "#/definitions/ServerAzureADAdministrator" + "$ref": "#/definitions/ServerAzureADOnlyAuthentication" } } }, "x-ms-long-running-operation": true, "x-ms-examples": { - "Creates or updates an existing Azure Active Directory administrator.": { - "$ref": "./examples/AdministratorCreateOrUpdate.json" + "Creates or updates Azure Active Directory only authentication object.": { + "$ref": "./examples/AzureADOnlyAuthCreateOrUpdate.json" } } }, "delete": { "tags": [ - "ServerAzureADAdministrators" + "ServerAzureADOnlyAuthentications" ], - "description": "Deletes the Azure Active Directory administrator with the given name.", - "operationId": "ServerAzureADAdministrators_Delete", + "description": "Deletes an existing server Active Directory only authentication property.", + "operationId": "ServerAzureADOnlyAuthentications_Delete", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" @@ -200,49 +158,49 @@ "$ref": "#/parameters/ServerNameParameter" }, { - "name": "administratorName", + "name": "authenticationName", "in": "path", - "description": "The name of server active directory administrator.", + "description": "The name of server azure active directory only authentication.", "required": true, "type": "string", "enum": [ - "ActiveDirectory" + "Default" ], "x-ms-enum": { - "name": "AdministratorName", + "name": "AuthenticationName", "modelAsString": true } } ], "responses": { "200": { - "description": "Successfully deleted the Azure Active Directory administrator." + "description": "Successfully deleted the Azure Active Directory only property." }, "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - AzureADOnlyAuthentication parameter is read only, please use enableAzureADOnlyAuthentication or disableAzureADOnlyAuthentication API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use disableAzureADOnlyAuthentication API first.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." }, "202": { "description": "Accepted" }, "204": { - "description": "The specified Azure Active Directory administrator does not exist." + "description": "The specified Azure Active Directory only property does not exist." } }, "x-ms-long-running-operation": true, "x-ms-examples": { - "Delete Azure Active Directory administrator.": { - "$ref": "./examples/AdministratorDelete.json" + "Deletes Azure Active Directory only authentication object.": { + "$ref": "./examples/AzureADOnlyAuthDelete.json" } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications": { "get": { "tags": [ - "ServerAzureADAdministrators" + "ServerAzureADOnlyAuthentications" ], - "description": "Gets a list of Azure Active Directory administrators in a server.", - "operationId": "ServerAzureADAdministrators_ListByServer", + "description": "Gets a list of server Azure Active Directory only authentications.", + "operationId": "ServerAzureADOnlyAuthentications_ListByServer", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" @@ -259,9 +217,9 @@ ], "responses": { "200": { - "description": "Successfully retrieved the list of Azure Active Directory administrators.", + "description": "Successfully retrieved the list of Azure Active Directory only authentication objects.", "schema": { - "$ref": "#/definitions/AdministratorListResult" + "$ref": "#/definitions/AzureADOnlyAuthListResult" } }, "default": { @@ -272,95 +230,24 @@ "nextLinkName": "nextLink" }, "x-ms-examples": { - "Gets a list of Azure Active Directory administrator.": { - "$ref": "./examples/AdministratorList.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/disableAzureADOnlyAuthentication": { - "post": { - "tags": [ - "ServerAzureADAdministrators" - ], - "description": "Disables Azure Active Directory only authentication on logical Server.", - "operationId": "ServerAzureADAdministrators_DisableAzureADOnlyAuthentication", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ServerNameParameter" - } - ], - "responses": { - "200": { - "description": "Successfully disabled Azure Active Directory only authentication on logical server.", - "schema": { - "$ref": "#/definitions/ServerAzureADAdministrator" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." - }, - "202": { - "description": "Accepted" - } - }, - "x-ms-long-running-operation": true, - "x-ms-examples": { - "Disables Azure Active Directory only authentication on logical server.": { - "$ref": "./examples/DisableAzureADOnlyAuthUpdate.json" + "Gets a list of Azure Active Directory only authentication object.": { + "$ref": "./examples/AzureADOnlyAuthList.json" } } } } }, "definitions": { - "AdministratorProperties": { - "description": "Properties of a active directory administrator.", + "AzureADOnlyAuthProperties": { + "description": "Properties of a active directory only authentication.", "required": [ - "administratorType", - "login", - "sid" + "azureADOnlyAuthentication" ], "type": "object", "properties": { - "administratorType": { - "description": "Type of the sever administrator.", - "enum": [ - "ActiveDirectory" - ], - "type": "string", - "x-ms-enum": { - "name": "AdministratorType", - "modelAsString": true - } - }, - "login": { - "description": "Login name of the server administrator.", - "type": "string" - }, - "sid": { - "format": "uuid", - "description": "SID (object ID) of the server administrator.", - "type": "string" - }, - "tenantId": { - "format": "uuid", - "description": "Tenant ID of the administrator.", - "type": "string" - }, "azureADOnlyAuthentication": { "description": "Azure Active Directory only Authentication enabled.", - "type": "boolean", - "readOnly": true + "type": "boolean" } } }, @@ -396,8 +283,8 @@ ], "properties": {} }, - "ServerAzureADAdministrator": { - "description": "Azure Active Directory administrator.", + "ServerAzureADOnlyAuthentication": { + "description": "Azure Active Directory only authentication.", "type": "object", "allOf": [ { @@ -406,21 +293,21 @@ ], "properties": { "properties": { - "$ref": "#/definitions/AdministratorProperties", + "$ref": "#/definitions/AzureADOnlyAuthProperties", "description": "Resource properties.", "x-ms-client-flatten": true } } }, - "AdministratorListResult": { - "description": "A list of active directory administrators.", + "AzureADOnlyAuthListResult": { + "description": "A list of active directory only authentications.", "type": "object", "properties": { "value": { "description": "Array of results.", "type": "array", "items": { - "$ref": "#/definitions/ServerAzureADAdministrator" + "$ref": "#/definitions/ServerAzureADOnlyAuthentication" }, "readOnly": true }, @@ -491,6 +378,30 @@ "required": true, "type": "string", "x-ms-parameter-location": "method" + }, + "WorkspaceNameParameter": { + "name": "workspaceName", + "in": "path", + "description": "The name of the workspace.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "SqlPoolNameParameter": { + "name": "sqlPoolName", + "in": "path", + "description": "The name of the sql pool.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "SqlDatabaseNameParameter": { + "name": "sqlDatabaseName", + "in": "path", + "description": "The name of the sql database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" } }, "securityDefinitions": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorCreateOrUpdate.json deleted file mode 100644 index aa12b45fa916..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorCreateOrUpdate.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "sqlcrudtest-4799", - "serverName": "sqlcrudtest-6440", - "administratorName": "ActiveDirectory", - "api-version": "2020-02-02-preview", - "name": "ActiveDirectory", - "parameters": { - "properties": { - "administratorType": "ActiveDirectory", - "login": "bob@contoso.com", - "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", - "name": "ActiveDirectory", - "type": "Microsoft.Sql/servers/administrators", - "properties": { - "administratorType": "ActiveDirectory", - "login": "bob@contoso.com", - "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "azureADOnlyAuthentication": true - } - } - }, - "201": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", - "name": "activeDirectory", - "type": "Microsoft.Sql/servers/administrators", - "properties": { - "administratorType": "ActiveDirectory", - "login": "bob@contoso.com", - "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "azureADOnlyAuthentication": true - } - } - }, - "202": {} - } -} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthCreateOrUpdate.json new file mode 100644 index 000000000000..7c448165265d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthCreateOrUpdate.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "authenticationName": "Default", + "api-version": "2020-02-02-preview", + "name": "Default", + "parameters": { + "properties": { + "azureADOnlyAuthentication": false + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/servers/azureadonlyauthentications", + "properties": { + "azureADOnlyAuthentication": false + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/servers/azureadonlyauthentications", + "properties": { + "azureADOnlyAuthentication": false + } + } + }, + "202": {} + } +} + diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthDelete.json similarity index 86% rename from specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorDelete.json rename to specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthDelete.json index 5e1564c681c5..f66d5f0c5114 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorDelete.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthDelete.json @@ -3,7 +3,7 @@ "subscriptionId": "00000000-1111-2222-3333-444444444444", "resourceGroupName": "sqlcrudtest-4799", "serverName": "sqlcrudtest-6440", - "administratorName": "ActiveDirectory", + "authenticationName": "Default", "api-version": "2020-02-02-preview" }, "responses": { @@ -12,3 +12,5 @@ "204": {} } } + + diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthGet.json similarity index 54% rename from specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorGet.json rename to specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthGet.json index 4c58c90475c1..32028319be31 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthGet.json @@ -3,23 +3,22 @@ "subscriptionId": "00000000-1111-2222-3333-444444444444", "resourceGroupName": "sqlcrudtest-4799", "serverName": "sqlcrudtest-6440", - "administratorName": "ActiveDirectory", + "authenticationName": "Default", "api-version": "2020-02-02-preview" }, "responses": { "200": { "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", - "name": "ActiveDirectory", - "type": "Microsoft.Sql/servers/administrators", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/servers/azureadonlyauthentications", "properties": { - "administratorType": "ActiveDirectory", - "login": "bob@contoso.com", - "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", "azureADOnlyAuthentication": true } } } } } + + + diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthList.json similarity index 56% rename from specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorList.json rename to specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthList.json index 7a9290b569c9..5ff0c31d6b02 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AdministratorList.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthList.json @@ -3,7 +3,7 @@ "subscriptionId": "00000000-1111-2222-3333-444444444444", "resourceGroupName": "sqlcrudtest-4799", "serverName": "sqlcrudtest-6440", - "administratorName": "ActiveDirectory", + "authenticationName": "Default", "api-version": "2020-02-02-preview" }, "responses": { @@ -11,14 +11,10 @@ "body": { "value": [ { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", - "name": "ActiveDirectory", - "type": "Microsoft.Sql/servers/administrators", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/servers/azureadonlyauthentications", "properties": { - "administratorType": "ActiveDirectory", - "login": "bob@contoso.com", - "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", "azureADOnlyAuthentication": true } } @@ -27,3 +23,5 @@ } } } + + diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/DisableAzureADOnlyAuthUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/DisableAzureADOnlyAuthUpdate.json deleted file mode 100644 index 90abc170ab96..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/DisableAzureADOnlyAuthUpdate.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "sqlcrudtest-4799", - "serverName": "sqlcrudtest-6440", - "api-version": "2020-02-02-preview", - "parameters": {} - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", - "name": "ActiveDirectory", - "type": "Microsoft.Sql/servers/administrators", - "properties": { - "administratorType": "ActiveDirectory", - "login": "bob@contoso.com", - "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "tenantId": "d6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "azureADOnlyAuthentication": false - } - } - }, - "202": {} - } -} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/EnableAzureADOnlyAuthUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/EnableAzureADOnlyAuthUpdate.json deleted file mode 100644 index 90abc170ab96..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/EnableAzureADOnlyAuthUpdate.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "sqlcrudtest-4799", - "serverName": "sqlcrudtest-6440", - "api-version": "2020-02-02-preview", - "parameters": {} - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", - "name": "ActiveDirectory", - "type": "Microsoft.Sql/servers/administrators", - "properties": { - "administratorType": "ActiveDirectory", - "login": "bob@contoso.com", - "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "tenantId": "d6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "azureADOnlyAuthentication": false - } - } - }, - "202": {} - } -} diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index c3faaab536a9..8a142f2b04f5 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -140,7 +140,7 @@ input-file: - Microsoft.Sql/preview/2019-06-01-preview/syncMembers.json - Microsoft.Sql/preview/2019-06-01-preview/FailoverManagedInstance.json - Microsoft.Sql/preview/2020-02-02-preview/managedDatabases.json -- Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADAdministrators.json +- Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADOnlyAuthentications.json # Needed when there is more than one input file override-info: @@ -242,7 +242,7 @@ input-file: - Microsoft.Sql/preview/2019-06-01-preview/syncMembers.json - Microsoft.Sql/preview/2019-06-01-preview/FailoverManagedInstance.json - Microsoft.Sql/preview/2020-02-02-preview/managedDatabases.json -- Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADAdministrators.json +- Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADOnlyAuthentications.json # Needed when there is more than one input file override-info: @@ -333,7 +333,7 @@ input-file: - Microsoft.Sql/preview/2019-06-01-preview/syncMembers.json - Microsoft.Sql/preview/2019-06-01-preview/FailoverManagedInstance.json - Microsoft.Sql/preview/2020-02-02-preview/managedDatabases.json -- Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADAdministrators.json +- Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADOnlyAuthentications.json # Needed when there is more than one input file override-info: @@ -495,7 +495,7 @@ input-file: - ./Microsoft.Sql/preview/2020-02-02-preview/ServerSecurityAlertPolicies.json - ./Microsoft.Sql/preview/2020-02-02-preview/operations.json - ./Microsoft.Sql/preview/2020-02-02-preview/managedDatabases.json -- Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADAdministrators.json +- Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADOnlyAuthentications.json # Needed when there is more than one input file override-info: @@ -899,7 +899,7 @@ input-file: - $(this-folder)/Microsoft.Sql/preview/2019-06-01-preview/syncGroups.json - $(this-folder)/Microsoft.Sql/preview/2019-06-01-preview/syncMembers.json - $(this-folder)/Microsoft.Sql/preview/2020-02-02-preview/managedDatabases.json - - $(this-folder)/Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADAdministrators.json + - $(this-folder)/Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADOnlyAuthentications.json - $(this-folder)/Microsoft.Sql/stable/2014-04-01/capabilities.json - $(this-folder)/Microsoft.Sql/stable/2014-04-01/databases.json - $(this-folder)/Microsoft.Sql/stable/2014-04-01/elasticPools.json From 20e05b19ba5444b7f866e93daae4523a02de2f90 Mon Sep 17 00:00:00 2001 From: Amol Agarwal Date: Wed, 22 Jul 2020 18:04:10 -0700 Subject: [PATCH 05/10] update readme file. --- specification/sql/resource-manager/readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index 8a142f2b04f5..35842908fc1d 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -136,6 +136,7 @@ input-file: - Microsoft.Sql/preview/2019-06-01-preview/WorkloadGroups.json - Microsoft.Sql/preview/2019-06-01-preview/WorkloadClassifiers.json - Microsoft.Sql/preview/2019-06-01-preview/managedInstanceOperations.json +- Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json - Microsoft.Sql/preview/2019-06-01-preview/syncGroups.json - Microsoft.Sql/preview/2019-06-01-preview/syncMembers.json - Microsoft.Sql/preview/2019-06-01-preview/FailoverManagedInstance.json @@ -238,6 +239,7 @@ input-file: - Microsoft.Sql/preview/2018-06-01-preview/ManagedInstanceLongTermRetentionPolicies.json - Microsoft.Sql/preview/2019-06-01-preview/WorkloadGroups.json - Microsoft.Sql/preview/2019-06-01-preview/WorkloadClassifiers.json +- Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json - Microsoft.Sql/preview/2019-06-01-preview/syncGroups.json - Microsoft.Sql/preview/2019-06-01-preview/syncMembers.json - Microsoft.Sql/preview/2019-06-01-preview/FailoverManagedInstance.json @@ -329,6 +331,7 @@ input-file: - Microsoft.Sql/preview/2018-06-01-preview/ManagedInstanceLongTermRetentionPolicies.json - Microsoft.Sql/preview/2019-06-01-preview/WorkloadGroups.json - Microsoft.Sql/preview/2019-06-01-preview/WorkloadClassifiers.json +- Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json - Microsoft.Sql/preview/2019-06-01-preview/syncGroups.json - Microsoft.Sql/preview/2019-06-01-preview/syncMembers.json - Microsoft.Sql/preview/2019-06-01-preview/FailoverManagedInstance.json From 65f3c0747bd944baea08b8046587fcdfdefe7038 Mon Sep 17 00:00:00 2001 From: Amol Agarwal Date: Wed, 22 Jul 2020 19:09:55 -0700 Subject: [PATCH 06/10] remove blank line and other azureADOnlyAuthentication parameter from aad admin api. --- .../2019-06-01-preview/ServerAzureADAdministrators.json | 2 +- .../examples/AdministratorCreateOrUpdate.json | 6 ++---- .../2019-06-01-preview/examples/AdministratorGet.json | 3 +-- .../2019-06-01-preview/examples/AdministratorList.json | 3 +-- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json index 5f68c6516644..cbb99e532079 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json @@ -417,4 +417,4 @@ } } } -} +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorCreateOrUpdate.json index 4ef268e50473..8697a1c2f6f9 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorCreateOrUpdate.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorCreateOrUpdate.json @@ -25,8 +25,7 @@ "administratorType": "ActiveDirectory", "login": "bob@contoso.com", "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "azureADOnlyAuthentication": true + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" } } }, @@ -39,8 +38,7 @@ "administratorType": "ActiveDirectory", "login": "bob@contoso.com", "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "azureADOnlyAuthentication": true + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" } } }, diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorGet.json index 52aee36b3f44..ff2acb6324dc 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorGet.json @@ -16,8 +16,7 @@ "administratorType": "ActiveDirectory", "login": "bob@contoso.com", "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "azureADOnlyAuthentication": true + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" } } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorList.json index 0fb15a505729..282785c9164a 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorList.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/AdministratorList.json @@ -18,8 +18,7 @@ "administratorType": "ActiveDirectory", "login": "bob@contoso.com", "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "azureADOnlyAuthentication": true + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" } } ] From 35b2bdbaea7e03ffface4ee62ee57de050fc624a Mon Sep 17 00:00:00 2001 From: Amol Agarwal Date: Wed, 22 Jul 2020 20:31:00 -0700 Subject: [PATCH 07/10] Add missing curly braces and parameters. --- .../ServerAzureADAdministrators.json | 38 ++++++++++++++++--- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json index cbb99e532079..234e84781351 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json @@ -90,6 +90,7 @@ { "name": "administratorName", "in": "path", + "description": "The name of server active directory administrator.", "required": true, "type": "string", "enum": [ @@ -103,7 +104,7 @@ { "name": "parameters", "in": "body", - "description": "The required parameters for creating or updating an Active Directory Administrator.", + "description": "The requested Azure Active Directory administrator Resource state.", "required": true, "schema": { "$ref": "#/definitions/ServerAzureADAdministrator" @@ -118,7 +119,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - AzureADOnlyAuthentication parameter is read only, please use azureADOnlyAuthentication API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentication API first.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentications API first.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." }, "202": { "description": "Accepted" @@ -154,7 +155,7 @@ "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { - "$ref": "#/parameters/ServerNameParameter" + "$ref": "#/parameters/ServerNameParameter" }, { "name": "administratorName", @@ -176,7 +177,7 @@ "description": "Successfully deleted the Azure Active Directory administrator." }, "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - AzureADOnlyAuthentication parameter is read only, please use azureADOnlyAuthentication API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentication API first.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentications API first.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." }, "202": { "description": "Accepted" @@ -212,7 +213,7 @@ }, { "$ref": "#/parameters/ServerNameParameter" - } + } ], "responses": { "200": { @@ -234,7 +235,8 @@ } } } - }, + } + }, "definitions": { "AdministratorProperties": { "description": "Properties of a active directory administrator.", @@ -404,6 +406,30 @@ "required": true, "type": "string", "x-ms-parameter-location": "method" + }, + "WorkspaceNameParameter": { + "name": "workspaceName", + "in": "path", + "description": "The name of the workspace.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "SqlPoolNameParameter": { + "name": "sqlPoolName", + "in": "path", + "description": "The name of the sql pool.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "SqlDatabaseNameParameter": { + "name": "sqlDatabaseName", + "in": "path", + "description": "The name of the sql database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" } }, "securityDefinitions": { From 26ce1d96e7b65126615baf6afb9520608b6a0500 Mon Sep 17 00:00:00 2001 From: Amol Agarwal Date: Wed, 22 Jul 2020 20:54:58 -0700 Subject: [PATCH 08/10] fix typo --- .../2020-02-02-preview/ServerAzureADOnlyAuthentications.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADOnlyAuthentications.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADOnlyAuthentications.json index b7d3840d0b55..ad025ce40cd6 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADOnlyAuthentications.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADOnlyAuthentications.json @@ -72,7 +72,7 @@ "tags": [ "ServerAzureADOnlyAuthentications" ], - "description": "Sets Server Active Directory only authentication property or updates an existing server Active Directory only authenticaiton property.", + "description": "Sets Server Active Directory only authentication property or updates an existing server Active Directory only authentication property.", "operationId": "ServerAzureADOnlyAuthentications_CreateOrUpdate", "parameters": [ { From fdb8ea2ec6bf1a3fc271c806322ccea12ad86fb1 Mon Sep 17 00:00:00 2001 From: Amol Agarwal Date: Wed, 22 Jul 2020 21:13:57 -0700 Subject: [PATCH 09/10] Prettier fixes --- .../examples/AzureADOnlyAuthCreateOrUpdate.json | 1 - .../2020-02-02-preview/examples/AzureADOnlyAuthDelete.json | 2 -- .../2020-02-02-preview/examples/AzureADOnlyAuthGet.json | 3 --- .../2020-02-02-preview/examples/AzureADOnlyAuthList.json | 2 -- 4 files changed, 8 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthCreateOrUpdate.json index 7c448165265d..9a22a93dc4cd 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthCreateOrUpdate.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthCreateOrUpdate.json @@ -36,4 +36,3 @@ "202": {} } } - diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthDelete.json index f66d5f0c5114..88b5bf5a4fef 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthDelete.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthDelete.json @@ -12,5 +12,3 @@ "204": {} } } - - diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthGet.json index 32028319be31..1500749144cc 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthGet.json @@ -19,6 +19,3 @@ } } } - - - diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthList.json index 5ff0c31d6b02..21395a5084fa 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthList.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthList.json @@ -23,5 +23,3 @@ } } } - - From 1f4957128685095df6ff1e5aaaa484888a33961e Mon Sep 17 00:00:00 2001 From: Amol Agarwal Date: Wed, 22 Jul 2020 21:30:19 -0700 Subject: [PATCH 10/10] Fix more prettier issues. --- .../2019-06-01-preview/ServerAzureADAdministrators.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json index 234e84781351..5fd09941f7c8 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json @@ -155,7 +155,7 @@ "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { - "$ref": "#/parameters/ServerNameParameter" + "$ref": "#/parameters/ServerNameParameter" }, { "name": "administratorName", @@ -213,7 +213,7 @@ }, { "$ref": "#/parameters/ServerNameParameter" - } + } ], "responses": { "200": { @@ -443,4 +443,4 @@ } } } -} \ No newline at end of file +}