diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/PrivateLink/preview/2022-09-30-preview/PrivateEndpointConnections.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/PrivateLink/preview/2022-09-30-preview/PrivateEndpointConnections.json new file mode 100644 index 000000000000..58039b0c2bfe --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/PrivateLink/preview/2022-09-30-preview/PrivateEndpointConnections.json @@ -0,0 +1,275 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-09-30-preview", + "title": "MySQLManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules and configurations." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}": { + "get": { + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Gets a private endpoint connection.", + "operationId": "PrivateEndpointConnections_Get", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "description": "The name of the private endpoint connection.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*" + }, + { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a specified private endpoint connection.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v4/privatelinks.json#/definitions/PrivateEndpointConnection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Gets private endpoint connection.": { + "$ref": "./examples/PrivateEndpointConnectionGet.json" + } + } + }, + "put": { + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Approve or reject a private endpoint connection with a given name.", + "operationId": "PrivateEndpointConnections_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "../../../../../../common-types/resource-management/v4/privatelinks.json#/definitions/PrivateEndpointConnection" + } + }, + { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully update the private endpoint connection by approving, rejecting or disconnecting it.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v4/privatelinks.json#/definitions/PrivateEndpointConnection" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v4/privatelinks.json#/definitions/PrivateEndpointConnection" + } + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Approve or reject a private endpoint connection with a given name.": { + "$ref": "./examples/PrivateEndpointConnectionUpdate.json" + } + } + }, + "delete": { + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Deletes a private endpoint connection with a given name.", + "operationId": "PrivateEndpointConnections_Delete", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted private endpoint connection." + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "204": { + "description": "Private endpoint connection does not exist." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Deletes a private endpoint connection with a given name.": { + "$ref": "./examples/PrivateEndpointConnectionDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections": { + "get": { + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Gets all private endpoint connections on a server.", + "operationId": "PrivateEndpointConnections_ListByServer", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved private endpoint connections.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v4/privatelinks.json#/definitions/PrivateEndpointConnectionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Gets list of private endpoint connections on a server.": { + "$ref": "./examples/PrivateEndpointConnectionList.json" + } + } + } + } + }, + "definitions": { + "TagsObject": { + "type": "object", + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags." + } + }, + "description": "Tags object for patch operations." + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/PrivateLink/preview/2022-09-30-preview/PrivateLinkResources.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/PrivateLink/preview/2022-09-30-preview/PrivateLinkResources.json new file mode 100644 index 000000000000..58ef45cbcc8b --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/PrivateLink/preview/2022-09-30-preview/PrivateLinkResources.json @@ -0,0 +1,130 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-09-30-preview", + "title": "MySQLManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules and configurations." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources": { + "get": { + "tags": [ + "PrivateLinkResources" + ], + "description": "Lists the private link resources for MySQL server.", + "operationId": "PrivateLinkResources_ListByServer", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved private link resources.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v4/privatelinks.json#/definitions/PrivateLinkResourceListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Gets private link resources for MySQL.": { + "$ref": "./examples/PrivateLinkResourcesList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName}": { + "get": { + "tags": [ + "PrivateLinkResources" + ], + "description": "Gets a private link resource for MySQL server.", + "operationId": "PrivateLinkResources_Get", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "name": "groupName", + "in": "path", + "description": "The name of the private link resource.", + "required": true, + "type": "string", + "pattern": "^[a-z0-9][-a-z0-9]*(?