diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2017-12-01-preview/examples/ServerAdminCreateUpdate.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2017-12-01-preview/examples/ServerAdminCreateUpdate.json new file mode 100644 index 000000000000..0e646dbca90e --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2017-12-01-preview/examples/ServerAdminCreateUpdate.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "serverName": "mysqltestsvc4", + "administratorName": "activeDirectory", + "api-version": "2017-12-01-preview", + "properties": { + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/servers/mysqltestsvc4/administrators/activeDirectory", + "name": "activeDirectory", + "type": "Microsoft.DBforMySQL/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" + } + } + }, + "202": { + "body": "Accepted" + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2017-12-01-preview/examples/ServerAdminDelete.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2017-12-01-preview/examples/ServerAdminDelete.json new file mode 100644 index 000000000000..10dc27f86aaa --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2017-12-01-preview/examples/ServerAdminDelete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "serverName": "mysqltestsvc4", + "administratorName": "activeDirectory", + "api-version": "2017-12-01-preview" + }, + "responses": { + "200": { + "body": "OK" + }, + "202": { + "body": "Accepted" + }, + "204": { + "body": "No Content" + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2017-12-01-preview/examples/ServerAdminGet.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2017-12-01-preview/examples/ServerAdminGet.json new file mode 100644 index 000000000000..55dcc08c1637 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2017-12-01-preview/examples/ServerAdminGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "serverName": "mysqltestsvc4", + "administratorName": "activeDirectory", + "api-version": "2017-12-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/servers/mysqltestsvc4/administrators/activeDirectory", + "name": "activeDirectory", + "type": "Microsoft.DBforMySQL/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" + } + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2017-12-01-preview/examples/ServerAdminList.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2017-12-01-preview/examples/ServerAdminList.json new file mode 100644 index 000000000000..8cff5bc20aa7 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2017-12-01-preview/examples/ServerAdminList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "serverName": "mysqltestsvc4", + "api-version": "2017-12-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/servers/mysqltestsvc4/administrators/activeDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.DBforMySQL/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" + } + } + ] + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2017-12-01-preview/examples/VirtualNetworkRulesDelete.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2017-12-01-preview/examples/VirtualNetworkRulesDelete.json index 8d51878323cd..2a5d616e1221 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2017-12-01-preview/examples/VirtualNetworkRulesDelete.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2017-12-01-preview/examples/VirtualNetworkRulesDelete.json @@ -7,14 +7,8 @@ "api-version": "2017-12-01-preview" }, "responses": { - "200": { - "body": "" - }, - "202": { - "body": "" - }, - "204": { - "body": "" - } + "200": {}, + "202": {}, + "204": {} } } diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2017-12-01-preview/mysql.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2017-12-01-preview/mysql.json index b7a1f683cc53..77942474ddee 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2017-12-01-preview/mysql.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2017-12-01-preview/mysql.json @@ -1072,6 +1072,196 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/Administrators/activeDirectory": { + "get": { + "tags": [ + "ServerAdministrators" + ], + "operationId": "ServerAdministrators_Get", + "x-ms-examples": { + "ServerAdministratorGet": { "$ref": "./examples/ServerAdminGet.json" } + }, + "description": "Gets information about a AAD server administrator.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + }, + "put": { + "tags": [ + "ServerAdministrators" + ], + "operationId": "ServerAdministrators_CreateOrUpdate", + "x-ms-examples": { + "ServerAdministratorCreate": { "$ref": "./examples/ServerAdminCreateUpdate.json" } + }, + "description": "Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "properties", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + }, + "description": "The required parameters for creating or updating an AAD server administrator." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true + }, + "delete": { + "tags": [ + "ServerAdministrators" + ], + "operationId": "ServerAdministrators_Delete", + "x-ms-examples": { + "ServerAdministratorsDelete": { "$ref": "./examples/ServerAdminDelete.json" } + }, + "description": "Deletes AAD Administrator.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + } + }, + "204": { + "description": "NoContent", + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/administrators": { + "get": { + "tags": [ + "ServerAdministrators" + ], + "operationId": "ServerAdministrators_ListByServer", + "description": "Returns a list of server Administrators.", + "x-ms-examples": { + "get a list of server administrators": { + "$ref": "./examples/ServerAdminList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerAdministratorResourceListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, "/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/performanceTiers": { "get": { "tags": [ @@ -2272,6 +2462,68 @@ } }, "description": "An error response from the Batch service." + }, + "ServerAdministratorProperties": { + "properties": { + "administratorType": { + "type": "string", + "description": "The type of administrator.", + "enum": [ + "ActiveDirectory" + ], + "x-ms-enum": { + "name": "AdministratorType" + } + }, + "login": { + "type": "string", + "description": "The server administrator login value." + }, + "sid": { + "type": "string", + "description": "The server administrator Sid (Secure ID).", + "format": "uuid" + }, + "tenantId": { + "type": "string", + "description": "The server Active Directory Administrator tenant id.", + "format": "uuid" + } + }, + "required": [ + "tenantId", + "administratorType", + "login", + "sid" + ], + "description": "The properties of an server Administrator." + }, + "ServerAdministratorResource": { + "properties": { + "properties": { + "$ref": "#/definitions/ServerAdministratorProperties", + "x-ms-client-flatten": true, + "description": "Properties of the server AAD administrator." + } + }, + "description": "Represents a and external administrator to be created.", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ] + }, + "ServerAdministratorResourceListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ServerAdministratorResource" + }, + "description": "The list of server Active Directory Administrators for the server." + } + }, + "description": "The response to a list Active Directory Administrators request." } }, "parameters": { diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2018-06-01-privatepreview/examples/ServerAdminCreateUpdate.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2018-06-01-privatepreview/examples/ServerAdminCreateUpdate.json new file mode 100644 index 000000000000..8fdca339667c --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2018-06-01-privatepreview/examples/ServerAdminCreateUpdate.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "serverName": "mysqltestsvc4", + "administratorName": "activeDirectory", + "api-version": "2018-06-01-privatepreview", + "properties": { + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/servers/mysqltestsvc4/administrators/activeDirectory", + "name": "activeDirectory", + "type": "Microsoft.DBforMySQL/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" + } + } + }, + "202": { + "body": "Accepted" + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2018-06-01-privatepreview/examples/ServerAdminDelete.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2018-06-01-privatepreview/examples/ServerAdminDelete.json new file mode 100644 index 000000000000..27789e74bf1d --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2018-06-01-privatepreview/examples/ServerAdminDelete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "serverName": "mysqltestsvc4", + "administratorName": "activeDirectory", + "api-version": "2018-06-01-privatepreview" + }, + "responses": { + "200": { + "body": "OK" + }, + "202": { + "body": "Accepted" + }, + "204": { + "body": "No Content" + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2018-06-01-privatepreview/examples/ServerAdminGet.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2018-06-01-privatepreview/examples/ServerAdminGet.json new file mode 100644 index 000000000000..921a633ff5f4 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2018-06-01-privatepreview/examples/ServerAdminGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "serverName": "mysqltestsvc4", + "administratorName": "activeDirectory", + "api-version": "2018-06-01-privatepreview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/servers/mysqltestsvc4/administrators/activeDirectory", + "name": "activeDirectory", + "type": "Microsoft.DBforMySQL/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" + } + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2018-06-01-privatepreview/examples/ServerAdminList.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2018-06-01-privatepreview/examples/ServerAdminList.json new file mode 100644 index 000000000000..b5abca2e56d5 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2018-06-01-privatepreview/examples/ServerAdminList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "serverName": "mysqltestsvc4", + "api-version": "2018-06-01-privatepreview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/servers/mysqltestsvc4/administrators/activeDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.DBforMySQL/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" + } + } + ] + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2018-06-01-privatepreview/examples/VirtualNetworkRulesDelete.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2018-06-01-privatepreview/examples/VirtualNetworkRulesDelete.json index 0fa496b85696..eba76be987c7 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2018-06-01-privatepreview/examples/VirtualNetworkRulesDelete.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2018-06-01-privatepreview/examples/VirtualNetworkRulesDelete.json @@ -7,14 +7,8 @@ "api-version": "2017-12-01" }, "responses": { - "200": { - "body": "" - }, - "202": { - "body": "" - }, - "204": { - "body": "" - } + "200": {}, + "202": {}, + "204": {} } } diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2018-06-01-privatepreview/mysql.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2018-06-01-privatepreview/mysql.json index 0b8d89484000..a6638f0f4aa8 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2018-06-01-privatepreview/mysql.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2018-06-01-privatepreview/mysql.json @@ -1072,6 +1072,196 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/Administrators/activeDirectory": { + "get": { + "tags": [ + "ServerAdministrators" + ], + "operationId": "ServerAdministrators_Get", + "x-ms-examples": { + "ServerAdministratorGet": { "$ref": "./examples/ServerAdminGet.json" } + }, + "description": "Gets information about a AAD server administrator.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + }, + "put": { + "tags": [ + "ServerAdministrators" + ], + "operationId": "ServerAdministrators_CreateOrUpdate", + "x-ms-examples": { + "ServerAdministratorCreate": { "$ref": "./examples/ServerAdminCreateUpdate.json" } + }, + "description": "Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "properties", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + }, + "description": "The required parameters for creating or updating an AAD server administrator." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true + }, + "delete": { + "tags": [ + "ServerAdministrators" + ], + "operationId": "ServerAdministrators_Delete", + "x-ms-examples": { + "ServerAdministratorsDelete": { "$ref": "./examples/ServerAdminDelete.json" } + }, + "description": "Deletes AAD Administrator.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + } + }, + "204": { + "description": "NoContent", + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/administrators": { + "get": { + "tags": [ + "ServerAdministrators" + ], + "operationId": "ServerAdministrators_ListByServer", + "description": "Returns a list of server Administrators.", + "x-ms-examples": { + "get a list of server administrators": { + "$ref": "./examples/ServerAdminList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerAdministratorResourceListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, "/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/performanceTiers": { "get": { "tags": [ @@ -2832,6 +3022,68 @@ } }, "description": "An error response from the Batch service." + }, + "ServerAdministratorProperties": { + "properties": { + "administratorType": { + "type": "string", + "description": "The type of administrator.", + "enum": [ + "ActiveDirectory" + ], + "x-ms-enum": { + "name": "AdministratorType" + } + }, + "login": { + "type": "string", + "description": "The server administrator login value." + }, + "sid": { + "type": "string", + "description": "The server administrator Sid (Secure ID).", + "format": "uuid" + }, + "tenantId": { + "type": "string", + "description": "The server Active Directory Administrator tenant id.", + "format": "uuid" + } + }, + "required": [ + "tenantId", + "administratorType", + "login", + "sid" + ], + "description": "The properties of an server Administrator." + }, + "ServerAdministratorResource": { + "properties": { + "properties": { + "$ref": "#/definitions/ServerAdministratorProperties", + "x-ms-client-flatten": true, + "description": "Properties of the server AAD administrator." + } + }, + "description": "Represents a and external administrator to be created.", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ] + }, + "ServerAdministratorResourceListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ServerAdministratorResource" + }, + "description": "The list of server Active Directory Administrators for the server." + } + }, + "description": "The response to a list Active Directory Administrators request." }, "QueryTextProperties": { "properties": { diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/examples/ServerAdminCreateUpdate.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/examples/ServerAdminCreateUpdate.json new file mode 100644 index 000000000000..6ce3abaea0a4 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/examples/ServerAdminCreateUpdate.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "serverName": "pgtestsvc4", + "administratorName": "activeDirectory", + "api-version": "2017-12-01-preview", + "properties": { + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4/administrators/activeDirectory", + "name": "activeDirectory", + "type": "Microsoft.DBforPostgreSQL/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" + } + } + }, + "202": { + "body": "Accepted" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/examples/ServerAdminDelete.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/examples/ServerAdminDelete.json new file mode 100644 index 000000000000..91cb5a60f981 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/examples/ServerAdminDelete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "serverName": "pgtestsvc4", + "administratorName": "activeDirectory", + "api-version": "2017-12-01-preview" + }, + "responses": { + "200": { + "body": "OK" + }, + "202": { + "body": "Accepted" + }, + "204": { + "body": "No Content" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/examples/ServerAdminGet.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/examples/ServerAdminGet.json new file mode 100644 index 000000000000..1abc43fa7b10 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/examples/ServerAdminGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "serverName": "pgtestsvc4", + "administratorName": "activeDirectory", + "api-version": "2017-12-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4/administrators/activeDirectory", + "name": "activeDirectory", + "type": "Microsoft.DBforPostgreSQL/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" + } + } + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/examples/ServerAdminList.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/examples/ServerAdminList.json new file mode 100644 index 000000000000..e0465320869f --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/examples/ServerAdminList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "serverName": "pgtestsvc4", + "api-version": "2017-12-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4/administrators/activeDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.DBforPostgreSQL/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" + } + } + ] + } + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/examples/VirtualNetworkRulesDelete.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/examples/VirtualNetworkRulesDelete.json index 8d51878323cd..2a5d616e1221 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/examples/VirtualNetworkRulesDelete.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/examples/VirtualNetworkRulesDelete.json @@ -7,14 +7,8 @@ "api-version": "2017-12-01-preview" }, "responses": { - "200": { - "body": "" - }, - "202": { - "body": "" - }, - "204": { - "body": "" - } + "200": {}, + "202": {}, + "204": {} } } diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/postgresql.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/postgresql.json index 8b42536d8fd1..23cd0d060e34 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/postgresql.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/postgresql.json @@ -1072,6 +1072,196 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/Administrators/activeDirectory": { + "get": { + "tags": [ + "ServerAdministrators" + ], + "operationId": "ServerAdministrators_Get", + "x-ms-examples": { + "ServerAdministratorGet": { "$ref": "./examples/ServerAdminGet.json" } + }, + "description": "Gets information about a AAD server administrator.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + }, + "put": { + "tags": [ + "ServerAdministrators" + ], + "operationId": "ServerAdministrators_CreateOrUpdate", + "x-ms-examples": { + "ServerAdministratorCreate": { "$ref": "./examples/ServerAdminCreateUpdate.json" } + }, + "description": "Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "properties", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + }, + "description": "The required parameters for creating or updating an AAD server administrator." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true + }, + "delete": { + "tags": [ + "ServerAdministrators" + ], + "operationId": "ServerAdministrators_Delete", + "x-ms-examples": { + "ServerAdministratorsDelete": { "$ref": "./examples/ServerAdminDelete.json" } + }, + "description": "Deletes AAD Administrator.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + } + }, + "204": { + "description": "NoContent", + "schema": { + "$ref": "#/definitions/ServerAdministratorResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/administrators": { + "get": { + "tags": [ + "ServerAdministrators" + ], + "operationId": "ServerAdministrators_ListByServer", + "description": "Returns a list of server Administrators.", + "x-ms-examples": { + "get a list of server administrators": { + "$ref": "./examples/ServerAdminList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerAdministratorResourceListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, "/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/performanceTiers": { "get": { "tags": [ @@ -2276,6 +2466,68 @@ } }, "description": "An error response from the Batch service." + }, + "ServerAdministratorProperties": { + "properties": { + "administratorType": { + "type": "string", + "description": "The type of administrator.", + "enum": [ + "ActiveDirectory" + ], + "x-ms-enum": { + "name": "AdministratorType" + } + }, + "login": { + "type": "string", + "description": "The server administrator login value." + }, + "sid": { + "type": "string", + "description": "The server administrator Sid (Secure ID).", + "format": "uuid" + }, + "tenantId": { + "type": "string", + "description": "The server Active Directory Administrator tenant id.", + "format": "uuid" + } + }, + "required": [ + "tenantId", + "administratorType", + "login", + "sid" + ], + "description": "The properties of an server Administrator." + }, + "ServerAdministratorResource": { + "properties": { + "properties": { + "$ref": "#/definitions/ServerAdministratorProperties", + "x-ms-client-flatten": true, + "description": "Properties of the server AAD administrator." + } + }, + "description": "Represents a and external administrator to be created.", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ] + }, + "ServerAdministratorResourceListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ServerAdministratorResource" + }, + "description": "The list of server Active Directory Administrators for the server." + } + }, + "description": "The response to a list Active Directory Administrators request." } }, "parameters": {