From 82b38e7acfe5cea74583986c709938cc8a14d0d9 Mon Sep 17 00:00:00 2001 From: Dmitar Redzic Date: Fri, 4 Sep 2020 13:08:42 +0200 Subject: [PATCH 1/5] Add new resource to Microsoft.Sql "ServerTrustGroup". --- .../2020-02-02-preview/ServerTrustGroups.json | 503 ++++++++++++++++++ .../examples/ServerTrustGroupCreate.json | 77 +++ .../examples/ServerTrustGroupDelete.json | 15 + .../examples/ServerTrustGroupGet.json | 36 ++ .../examples/ServerTrustGroupList.json | 58 ++ ...ServerTrustGroupListByManagedInstance.json | 58 ++ 6 files changed, 747 insertions(+) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupCreate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupListByManagedInstance.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json new file mode 100644 index 000000000000..b2a391da57ec --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json @@ -0,0 +1,503 @@ +{ + "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/locations/{locationName}/serverTrustGroups/{serverTrustGroupName}": { + "get": { + "tags": [ + "ServerTrustGroups" + ], + "description": "Gets a server trust group.", + "operationId": "ServerTrustGroups_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "serverTrustGroupName", + "in": "path", + "description": "The name of the server trust group.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the the specified server trust group.", + "schema": { + "$ref": "#/definitions/ServerTrustGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get server trust group": { + "$ref": "./examples/ServerTrustGroupGet.json" + } + } + }, + "put": { + "tags": [ + "ServerTrustGroups" + ], + "description": "Creates or updates a server trust group.", + "operationId": "ServerTrustGroups_CreateOrUpdate", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "serverTrustGroupName", + "in": "path", + "description": "The name of the server trust group.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The server trust group parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerTrustGroup" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the server trust group.", + "schema": { + "$ref": "#/definitions/ServerTrustGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ServerTrustGroupCreateRequestInvalid - The resource or resource properties in the request body is empty or invalid\n\n * 400 ServerTrustGroupCreateRequestInvalidGroupMembers - The group members property in the request body is empty or invalid\n\n * 400 ServerTrustGroupCreateRequestInvalidGroupMembersCount - The group members property has an invalid number of servers\n\n * 400 ServerTrustGroupCreateRequestInvalidServer - The given serverId field in create server trust group request body is empty or invalid\n\n * 400 ServerTrustGroupCreateRequestDuplicateServer - One or more of the provided servers are duplicates.\n\n * 400 ServerTrustGroupCreateRequestInvalidTrustScopes - The trust scope property in the request body is empty or invalid.\n\n * 400 ServerTrustGroupCreateRequestInvalidTrustScopesValue - The trust scope property in the request body has an invalid value.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\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 the server trust group.", + "schema": { + "$ref": "#/definitions/ServerTrustGroup" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create server trust group": { + "$ref": "./examples/ServerTrustGroupCreate.json" + } + } + }, + "delete": { + "tags": [ + "ServerTrustGroups" + ], + "description": "Deletes a server trust group.", + "operationId": "ServerTrustGroups_Delete", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "serverTrustGroupName", + "in": "path", + "description": "The name of the server trust group.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the server trust group." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ServerTrustGroupCreateRequestInvalid - The resource or resource properties in the request body is empty or invalid\n\n * 400 ServerTrustGroupCreateRequestInvalidGroupMembers - The group members property in the request body is empty or invalid\n\n * 400 ServerTrustGroupCreateRequestInvalidGroupMembersCount - The group members property has an invalid number of servers\n\n * 400 ServerTrustGroupCreateRequestInvalidServer - The given serverId field in create server trust group request body is empty or invalid\n\n * 400 ServerTrustGroupCreateRequestDuplicateServer - One or more of the provided servers are duplicates.\n\n * 400 ServerTrustGroupCreateRequestInvalidTrustScopes - The trust scope property in the request body is empty or invalid.\n\n * 400 ServerTrustGroupCreateRequestInvalidTrustScopesValue - The trust scope property in the request body has an invalid value.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\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": { + "Drop server trust group": { + "$ref": "./examples/ServerTrustGroupDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups": { + "get": { + "tags": [ + "ServerTrustGroups" + ], + "description": "Lists a server trust group.", + "operationId": "ServerTrustGroups_ListByLocation", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the failover groups.", + "schema": { + "$ref": "#/definitions/ServerTrustGroupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List server trust groups": { + "$ref": "./examples/ServerTrustGroupList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustGroups": { + "get": { + "tags": [ + "ServerTrustGroupsList" + ], + "description": "Gets a server trust groups by instance name.", + "operationId": "ServerTrustGroupsList_ListByInstance", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server trust groups.", + "schema": { + "$ref": "#/definitions/ServerTrustGroupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List server trust groups by managed instance": { + "$ref": "./examples/ServerTrustGroupListByManagedInstance.json" + } + } + } + } + }, + "definitions": { + "ServerTrustGroupProperties": { + "description": "Properties of a server trust group.", + "required": [ + "groupMembers", + "trustScopes" + ], + "type": "object", + "properties": { + "groupMembers": { + "description": "Group members information for the server trust group.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerInfo" + } + }, + "trustScopes": { + "description": "Trust scope of the server trust group.", + "type": "array", + "items": { + "enum": [ + "GlobalTransactions" + ], + "type": "string" + } + } + } + }, + "ServerInfo": { + "description": "Server info for the server trust group.", + "required": [ + "serverId" + ], + "type": "object", + "properties": { + "serverId": { + "description": "Server Id.", + "type": "string" + } + } + }, + "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": {} + }, + "ServerTrustGroup": { + "description": "A server trust group.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ServerTrustGroupProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerTrustGroupListResult": { + "description": "A list of server trust groups.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerTrustGroup" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "The subscription ID that identifies an Azure subscription.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for the request.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "ResourceGroupParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "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" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupCreate.json new file mode 100644 index 000000000000..d658a78d9de4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupCreate.json @@ -0,0 +1,77 @@ +{ + "parameters": + { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan East", + "serverTrustGroupName": "server-trust-group-test", + "api-version": "2020-02-02-preview", + "parameters": + { + "properties": + { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2" + } + ], + "trustScopes": [ + "GlobalTransactions" + ] + } + } + }, + "responses": + { + "200": + { + "body": + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test", + "name": "server-trust-group-test", + "properties": + { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2" + } + ], + "trustScopes": [ + "GlobalTransactions" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + } + }, + "201": + { + "body": + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test", + "name": "server-trust-group-test", + "properties": + { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2" + } + ], + "trustScopes": [ + "GlobalTransactions" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + } + }, + "202": {} + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupDelete.json new file mode 100644 index 000000000000..66f9eeef54e3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupDelete.json @@ -0,0 +1,15 @@ +{ + "parameters": + { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan East", + "serverTrustGroupName": "server-trust-group-test", + "api-version": "2020-02-02-preview" + }, + "responses": + { + "200": {}, + "202": {} + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupGet.json new file mode 100644 index 000000000000..e8f068595a47 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupGet.json @@ -0,0 +1,36 @@ +{ + "parameters": + { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan East", + "serverTrustGroupName": "server-trust-group-test", + "api-version": "2020-02-02-preview" + }, + "responses": + { + "200": + { + "body": + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test", + "name": "server-trust-group-test", + "properties": + { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2" + } + ], + "trustScopes": [ + "GlobalTransactions" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupList.json new file mode 100644 index 000000000000..cb99d8e1ebd9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupList.json @@ -0,0 +1,58 @@ +{ + "parameters": + { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan East", + "api-version": "2020-02-02-preview" + }, + "responses": + { + "200": + { + "body": + { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test", + "name": "server-trust-group-test", + "properties": + { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2" + } + ], + "trustScopes": [ + "GlobalTransactions" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test-2", + "name": "server-trust-group-test-2", + "properties": + { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-3" + } + ], + "trustScopes": [ + "GlobalTransactions" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupListByManagedInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupListByManagedInstance.json new file mode 100644 index 000000000000..192d1a68a24b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupListByManagedInstance.json @@ -0,0 +1,58 @@ +{ + "parameters": + { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance-1", + "api-version": "2020-02-02-preview" + }, + "responses": + { + "200": + { + "body": + { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test", + "name": "server-trust-group-test", + "properties": + { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2" + } + ], + "trustScopes": [ + "GlobalTransactions" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test-2", + "name": "server-trust-group-test-2", + "properties": + { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-3" + } + ], + "trustScopes": [ + "GlobalTransactions" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + } + ] + } + } + } +} \ No newline at end of file From cdee652a2787581df49f4b3b2290bbae49011482 Mon Sep 17 00:00:00 2001 From: Dmitar Redzic Date: Fri, 4 Sep 2020 15:24:52 +0200 Subject: [PATCH 2/5] Update sql/readme.md --- specification/sql/resource-manager/readme.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index 18b8eaecc55b..697171636433 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -140,6 +140,7 @@ input-file: - Microsoft.Sql/preview/2020-02-02-preview/managedInstances.json - Microsoft.Sql/preview/2020-02-02-preview/importexport.json - Microsoft.Sql/preview/2020-02-02-preview/ManagedInstanceAzureADOnlyAuthentications.json +- Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json # Needed when there is more than one input file @@ -245,6 +246,7 @@ input-file: - Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADOnlyAuthentications.json - Microsoft.Sql/preview/2020-02-02-preview/managedInstances.json - Microsoft.Sql/preview/2020-02-02-preview/ManagedInstanceAzureADOnlyAuthentications.json +- Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json # Needed when there is more than one input file override-info: @@ -338,6 +340,7 @@ input-file: - Microsoft.Sql/preview/2020-02-02-preview/managedInstances.json - Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADOnlyAuthentications.json - Microsoft.Sql/preview/2020-02-02-preview/ManagedInstanceAzureADOnlyAuthentications.json +- Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json # Needed when there is more than one input file override-info: @@ -503,6 +506,7 @@ input-file: - ./Microsoft.Sql/preview/2020-02-02-preview/ServerAzureADOnlyAuthentications.json - Microsoft.Sql/preview/2020-02-02-preview/importexport.json - ./Microsoft.Sql/preview/2020-02-02-preview/ManagedInstanceAzureADOnlyAuthentications.json +- ./Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json # Needed when there is more than one input file override-info: From 4756d67951ac009d3ac8639d280f3844c11b2281 Mon Sep 17 00:00:00 2001 From: Dmitar Redzic Date: Fri, 4 Sep 2020 16:48:26 +0200 Subject: [PATCH 3/5] Add 204 response to ServerTrustGroup DELETE operation. --- .../preview/2020-02-02-preview/ServerTrustGroups.json | 3 +++ .../2020-02-02-preview/examples/ServerTrustGroupDelete.json | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json index b2a391da57ec..1e24ab09a8c9 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json @@ -172,6 +172,9 @@ }, "202": { "description": "Accepted" + }, + "204": { + "description": "The specified server trust group does not exist." } }, "x-ms-long-running-operation": true, diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupDelete.json index 66f9eeef54e3..63e4fd7ffcd8 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupDelete.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupDelete.json @@ -10,6 +10,7 @@ "responses": { "200": {}, - "202": {} + "202": {}, + "204": {} } } \ No newline at end of file From 066ef279503b8e55a04bfc18a45cbb0971103511 Mon Sep 17 00:00:00 2001 From: Dmitar Redzic Date: Fri, 4 Sep 2020 17:32:23 +0200 Subject: [PATCH 4/5] Fix "prettier check" errors --- .../2020-02-02-preview/ServerTrustGroups.json | 4 +-- .../examples/ServerTrustGroupCreate.json | 32 +++++++------------ .../examples/ServerTrustGroupDelete.json | 8 ++--- .../examples/ServerTrustGroupGet.json | 17 ++++------ .../examples/ServerTrustGroupList.json | 20 ++++-------- ...ServerTrustGroupListByManagedInstance.json | 20 ++++-------- 6 files changed, 36 insertions(+), 65 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json index 1e24ab09a8c9..42555790049e 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json @@ -231,7 +231,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustGroups": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustGroups": { "get": { "tags": [ "ServerTrustGroupsList" @@ -503,4 +503,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupCreate.json index d658a78d9de4..6636d4ced22e 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupCreate.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupCreate.json @@ -1,15 +1,12 @@ { - "parameters": - { + "parameters": { "subscriptionId": "00000000-1111-2222-3333-444444444444", "resourceGroupName": "Default", "locationName": "Japan East", "serverTrustGroupName": "server-trust-group-test", "api-version": "2020-02-02-preview", - "parameters": - { - "properties": - { + "parameters": { + "properties": { "groupMembers": [ { "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" @@ -24,16 +21,12 @@ } } }, - "responses": - { - "200": - { - "body": - { + "responses": { + "200": { + "body": { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test", "name": "server-trust-group-test", - "properties": - { + "properties": { "groupMembers": [ { "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" @@ -49,14 +42,11 @@ "type": "Microsoft.Sql/locations/serverTrustGroups" } }, - "201": - { - "body": - { + "201": { + "body": { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test", "name": "server-trust-group-test", - "properties": - { + "properties": { "groupMembers": [ { "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" @@ -74,4 +64,4 @@ }, "202": {} } -} \ No newline at end of file +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupDelete.json index 63e4fd7ffcd8..4c1dd79b6eb5 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupDelete.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupDelete.json @@ -1,16 +1,14 @@ { - "parameters": - { + "parameters": { "subscriptionId": "00000000-1111-2222-3333-444444444444", "resourceGroupName": "Default", "locationName": "Japan East", "serverTrustGroupName": "server-trust-group-test", "api-version": "2020-02-02-preview" }, - "responses": - { + "responses": { "200": {}, "202": {}, "204": {} } -} \ No newline at end of file +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupGet.json index e8f068595a47..c40170a9f7d0 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupGet.json @@ -1,22 +1,17 @@ { - "parameters": - { + "parameters": { "subscriptionId": "00000000-1111-2222-3333-444444444444", "resourceGroupName": "Default", "locationName": "Japan East", "serverTrustGroupName": "server-trust-group-test", "api-version": "2020-02-02-preview" }, - "responses": - { - "200": - { - "body": - { + "responses": { + "200": { + "body": { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test", "name": "server-trust-group-test", - "properties": - { + "properties": { "groupMembers": [ { "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" @@ -33,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupList.json index cb99d8e1ebd9..1196f696b1ff 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupList.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupList.json @@ -1,23 +1,18 @@ { - "parameters": - { + "parameters": { "subscriptionId": "00000000-1111-2222-3333-444444444444", "resourceGroupName": "Default", "locationName": "Japan East", "api-version": "2020-02-02-preview" }, - "responses": - { - "200": - { - "body": - { + "responses": { + "200": { + "body": { "value": [ { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test", "name": "server-trust-group-test", - "properties": - { + "properties": { "groupMembers": [ { "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" @@ -35,8 +30,7 @@ { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test-2", "name": "server-trust-group-test-2", - "properties": - { + "properties": { "groupMembers": [ { "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" @@ -55,4 +49,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupListByManagedInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupListByManagedInstance.json index 192d1a68a24b..29d799777643 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupListByManagedInstance.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/examples/ServerTrustGroupListByManagedInstance.json @@ -1,23 +1,18 @@ { - "parameters": - { + "parameters": { "subscriptionId": "00000000-1111-2222-3333-444444444444", "resourceGroupName": "Default-SQL-SouthEastAsia", "managedInstanceName": "managedInstance-1", "api-version": "2020-02-02-preview" }, - "responses": - { - "200": - { - "body": - { + "responses": { + "200": { + "body": { "value": [ { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test", "name": "server-trust-group-test", - "properties": - { + "properties": { "groupMembers": [ { "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" @@ -35,8 +30,7 @@ { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test-2", "name": "server-trust-group-test-2", - "properties": - { + "properties": { "groupMembers": [ { "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" @@ -55,4 +49,4 @@ } } } -} \ No newline at end of file +} From 9c723b93575e588ca756162972e57fee65262265 Mon Sep 17 00:00:00 2001 From: Dmitar Redzic Date: Fri, 4 Sep 2020 21:50:44 +0200 Subject: [PATCH 5/5] Fix naming for list by instance name operation. --- .../preview/2020-02-02-preview/ServerTrustGroups.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json index 42555790049e..74af95ea31a8 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json @@ -212,7 +212,7 @@ ], "responses": { "200": { - "description": "Successfully retrieved the failover groups.", + "description": "Successfully retrieved the server trust groups.", "schema": { "$ref": "#/definitions/ServerTrustGroupListResult" } @@ -234,10 +234,10 @@ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustGroups": { "get": { "tags": [ - "ServerTrustGroupsList" + "ServerTrustGroups" ], "description": "Gets a server trust groups by instance name.", - "operationId": "ServerTrustGroupsList_ListByInstance", + "operationId": "ServerTrustGroups_ListByInstance", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter"