From dff936dea8701fe2ca026e8a20fa1f41b38810e7 Mon Sep 17 00:00:00 2001 From: Amol Agarwal <57109831+amolagar5@users.noreply.github.com> Date: Fri, 24 Jul 2020 19:12:12 -0700 Subject: [PATCH] Add a new api and add 2020-02-02-preview versions (#9710) * Add a new api and add 2020-02-02-preview versions * Fix get and list example files. * Remove 2019 api version from composite and update examples to 2020 api version. * Create a new AzureADOnlyAuthentications api and remove enable\disable apis. * update readme file. * remove blank line and other azureADOnlyAuthentication parameter from aad admin api. * Add missing curly braces and parameters. * fix typo * Prettier fixes * Fix more prettier issues. Co-authored-by: Amol Agarwal --- .../ServerAzureADAdministrators.json | 77 ++-- .../examples/AdministratorCreateOrUpdate.json | 9 +- .../examples/AdministratorGet.json | 3 +- .../examples/AdministratorList.json | 3 +- .../DisableAzureADOnlyAuthUpdate.json | 26 -- .../ServerAzureADOnlyAuthentications.json | 418 ++++++++++++++++++ .../AzureADOnlyAuthCreateOrUpdate.json | 38 ++ .../examples/AzureADOnlyAuthDelete.json | 14 + .../examples/AzureADOnlyAuthGet.json | 21 + .../examples/AzureADOnlyAuthList.json | 25 ++ specification/sql/resource-manager/readme.md | 7 +- 11 files changed, 557 insertions(+), 84 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/DisableAzureADOnlyAuthUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADOnlyAuthentications.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthCreateOrUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthList.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..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 @@ -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 - 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 - 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" @@ -176,7 +177,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 - 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" @@ -234,49 +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": { @@ -316,7 +274,8 @@ }, "azureADOnlyAuthentication": { "description": "Azure Active Directory only Authentication enabled.", - "type": "boolean" + "type": "boolean", + "readOnly": true } } }, @@ -447,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": { 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..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 @@ -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" } } }, @@ -26,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" } } }, @@ -40,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" } } ] 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/ServerAzureADOnlyAuthentications.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADOnlyAuthentications.json new file mode 100644 index 000000000000..ad025ce40cd6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADOnlyAuthentications.json @@ -0,0 +1,418 @@ +{ + "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}/azureADOnlyAuthentications/{authenticationName}": { + "get": { + "tags": [ + "ServerAzureADOnlyAuthentications" + ], + "description": "Gets a specific Azure Active Directory only authentication property.", + "operationId": "ServerAzureADOnlyAuthentications_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": "authenticationName", + "in": "path", + "description": "The name of server azure active directory only authentication.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AuthenticationName", + "modelAsString": true + } + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a specified Azure Active Directory only authentication properties.", + "schema": { + "$ref": "#/definitions/ServerAzureADOnlyAuthentication" + } + }, + "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 only authentication property.": { + "$ref": "./examples/AzureADOnlyAuthGet.json" + } + } + }, + "put": { + "tags": [ + "ServerAzureADOnlyAuthentications" + ], + "description": "Sets Server Active Directory only authentication property or updates an existing server Active Directory only authentication property.", + "operationId": "ServerAzureADOnlyAuthentications_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": "authenticationName", + "in": "path", + "description": "The name of server azure active directory only authentication.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AuthenticationName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The required parameters for creating or updating an Active Directory only authentication property.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerAzureADOnlyAuthentication" + } + } + ], + "responses": { + "200": { + "description": "Successfully updated a Azure Active Directory only authentication property.", + "schema": { + "$ref": "#/definitions/ServerAzureADOnlyAuthentication" + } + }, + "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" + }, + "201": { + "description": "Successfully updated Azure Active Directory only authentication property.", + "schema": { + "$ref": "#/definitions/ServerAzureADOnlyAuthentication" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Creates or updates Azure Active Directory only authentication object.": { + "$ref": "./examples/AzureADOnlyAuthCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ServerAzureADOnlyAuthentications" + ], + "description": "Deletes an existing server Active Directory only authentication property.", + "operationId": "ServerAzureADOnlyAuthentications_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": "authenticationName", + "in": "path", + "description": "The name of server azure active directory only authentication.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AuthenticationName", + "modelAsString": true + } + } + ], + "responses": { + "200": { + "description": "Successfully deleted the Azure Active Directory only property." + }, + "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" + }, + "204": { + "description": "The specified Azure Active Directory only property does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Deletes Azure Active Directory only authentication object.": { + "$ref": "./examples/AzureADOnlyAuthDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications": { + "get": { + "tags": [ + "ServerAzureADOnlyAuthentications" + ], + "description": "Gets a list of server Azure Active Directory only authentications.", + "operationId": "ServerAzureADOnlyAuthentications_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 only authentication objects.", + "schema": { + "$ref": "#/definitions/AzureADOnlyAuthListResult" + } + }, + "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 only authentication object.": { + "$ref": "./examples/AzureADOnlyAuthList.json" + } + } + } + } + }, + "definitions": { + "AzureADOnlyAuthProperties": { + "description": "Properties of a active directory only authentication.", + "required": [ + "azureADOnlyAuthentication" + ], + "type": "object", + "properties": { + "azureADOnlyAuthentication": { + "description": "Azure Active Directory only Authentication enabled.", + "type": "boolean" + } + } + }, + "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": {} + }, + "ServerAzureADOnlyAuthentication": { + "description": "Azure Active Directory only authentication.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/AzureADOnlyAuthProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "AzureADOnlyAuthListResult": { + "description": "A list of active directory only authentications.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerAzureADOnlyAuthentication" + }, + "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" + }, + "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": { + "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/AzureADOnlyAuthCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthCreateOrUpdate.json new file mode 100644 index 000000000000..9a22a93dc4cd --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthCreateOrUpdate.json @@ -0,0 +1,38 @@ +{ + "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/AzureADOnlyAuthDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthDelete.json new file mode 100644 index 000000000000..88b5bf5a4fef --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "authenticationName": "Default", + "api-version": "2020-02-02-preview" + }, + "responses": { + "200": {}, + "202": {}, + "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 new file mode 100644 index 000000000000..1500749144cc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "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/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/servers/azureadonlyauthentications", + "properties": { + "azureADOnlyAuthentication": true + } + } + } + } +} 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 new file mode 100644 index 000000000000..21395a5084fa --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/AzureADOnlyAuthList.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "authenticationName": "Default", + "api-version": "2020-02-02-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "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": true + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index bb93264ff82f..35842908fc1d 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -135,12 +135,13 @@ 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/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 - Microsoft.Sql/preview/2020-02-02-preview/managedDatabases.json +- Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADOnlyAuthentications.json # Needed when there is more than one input file override-info: @@ -243,6 +244,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/ServerAzureADOnlyAuthentications.json # Needed when there is more than one input file override-info: @@ -334,6 +336,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/ServerAzureADOnlyAuthentications.json # Needed when there is more than one input file override-info: @@ -495,6 +498,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/ServerAzureADOnlyAuthentications.json # Needed when there is more than one input file override-info: @@ -898,6 +902,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/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