From f03276f7864a691b0dd20e78360659f5cd1ba2bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vit=C3=A1liy=20Pyvovar?= Date: Fri, 7 Sep 2018 14:59:52 -0700 Subject: [PATCH] Adding SQL Interface Endpoint Profiles swagger with examples --- .../InterfaceEndpointProfiles.json | 416 ++++++++++++++++++ ...nterfaceEndpointProfileCreateOrUpdate.json | 23 + .../InterfaceEndpointProfileDelete.json | 20 + .../examples/InterfaceEndpointProfileGet.json | 23 + .../InterfaceEndpointProfileListByServer.json | 36 ++ specification/sql/resource-manager/readme.md | 11 + 6 files changed, 529 insertions(+) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/InterfaceEndpointProfiles.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/InterfaceEndpointProfileCreateOrUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/InterfaceEndpointProfileDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/InterfaceEndpointProfileGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/InterfaceEndpointProfileListByServer.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/InterfaceEndpointProfiles.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/InterfaceEndpointProfiles.json new file mode 100644 index 000000000000..9cb2df6bfe10 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/InterfaceEndpointProfiles.json @@ -0,0 +1,416 @@ +{ + "swagger": "2.0", + "info": { + "version": "2017-10-01-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}/interfaceEndpointProfiles/{interfaceEndpointProfileName}": { + "get": { + "tags": [ + "InterfaceEndpointProfiles" + ], + "description": "Gets a interface endpoint profile.", + "operationId": "InterfaceEndpointProfiles_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "interfaceEndpointProfileName", + "in": "path", + "description": "The name of the interface endpoint profile.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a specified interface endpoint profile.", + "schema": { + "$ref": "#/definitions/InterfaceEndpointProfile" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets interface endpoint profiles on server.": { + "$ref": "./examples/InterfaceEndpointProfileGet.json" + } + } + }, + "put": { + "tags": [ + "InterfaceEndpointProfiles" + ], + "description": "Creates or updates a interface endpoint profile.", + "operationId": "InterfaceEndpointProfiles_CreateOrUpdate", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "interfaceEndpointProfileName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/InterfaceEndpointProfile" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated a interface endpoint profile.", + "schema": { + "$ref": "#/definitions/InterfaceEndpointProfile" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 NullInterfaceEndpointProfileRequest - Interface endpoint Profile Request is Null\n\n * 400 NullInterfaceEndpointProfileRequestParameters - Interface endpoint Profile Request Parameters are Null\n\n * 400 NullVnetNetworkSubnetId - Virtual Network subnet id is Null\n\n * 400 InterfaceEndpointProfileUserErrorBadRequest - Azure SQL Server Interface Endpoint Profile encountered an user error\n\n * 403 InterfaceEndpointProfileResourceAccessDenied - Azure SQL Server Interface Endpoint Profile encountered permission error\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 InterfaceEndpointProfileFeatureNotEnabled - Azure SQL Server Interface Endpoint Profiles feature is not enabled\n\n * 404 InterfaceEndpointProfileResourceNotFound - Azure SQL Server Interface Endpoint Profile encountered a resource not found error\n\n * 404 InterfaceEndpointProfileSubscriptionNotFound - Azure SQL Server Interface Endpoint Profiles subscription id not found\n\n * 504 InterfaceEndpointProfileResourceTimedOut - Azure SQL Server Interface Endpoint Profile encountered a timeout" + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created a interface endpoint profile.", + "schema": { + "$ref": "#/definitions/InterfaceEndpointProfile" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Creates or updates interface endpoint profile.": { + "$ref": "./examples/InterfaceEndpointProfileCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "InterfaceEndpointProfiles" + ], + "description": "Deletes the interface endpoint profile with the given name.", + "operationId": "InterfaceEndpointProfiles_Delete", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "interfaceEndpointProfileName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the interface endpoint profile." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server 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" + }, + "204": { + "description": "The specified interface endpoint profile does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Deletes interface endpoint profile.": { + "$ref": "./examples/InterfaceEndpointProfileDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/interfaceEndpointProfiles": { + "get": { + "tags": [ + "InterfaceEndpointProfiles" + ], + "description": "Gets a list of interface endpoint profiles attached to a server.", + "operationId": "InterfaceEndpointProfiles_ListByServer", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Succesfully retrieved the list of interface endpoint profiles.", + "schema": { + "$ref": "#/definitions/InterfaceEndpointProfilesListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List of interface endpoint profiles on server.": { + "$ref": "./examples/InterfaceEndpointProfileListByServer.json" + } + } + } + } + }, + "definitions": { + "InterfaceEndpointProfileProperties": { + "description": "The properties of a interface endpoint profile.", + "required": [ + "virtualNetworkSubnetId" + ], + "type": "object", + "properties": { + "virtualNetworkSubnetId": { + "description": "The ARM resource id of the virtual network subnet.", + "type": "string" + }, + "privateIp": { + "description": "The Private ip associated with the interface endpoint profile", + "type": "string", + "readOnly": true + }, + "state": { + "description": "State of the interface endpoint profile.", + "enum": [ + "Initializing", + "InProgress", + "Ready", + "Failed", + "Deleting", + "Unknown" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "InterfaceEndpointProfileStateType", + "modelAsString": true + } + } + } + }, + "Resource": { + "description": "ARM resource.", + "type": "object", + "properties": { + "id": { + "description": "Resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Resource name.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "Resource type.", + "type": "string", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "ProxyResource": { + "description": "ARM proxy resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": {} + }, + "InterfaceEndpointProfile": { + "description": "A interface endpoint profile resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/InterfaceEndpointProfileProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "InterfaceEndpointProfilesListResult": { + "description": "A list of interface endpoint profiles.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/InterfaceEndpointProfile" + }, + "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" + } + }, + "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/2017-10-01-preview/examples/InterfaceEndpointProfileCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/InterfaceEndpointProfileCreateOrUpdate.json new file mode 100644 index 000000000000..7f89fcedfa11 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/InterfaceEndpointProfileCreateOrUpdate.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myresourceGroup", + "serverName": "alphasvr", + "interfaceEndpointProfileName": "ie7", + "api-version": "2017-10-01-preview", + "properties": { + "virtualNetworkSubnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myresourceGroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet77" + } + }, + "responses": { + "200": { + "body": "" + }, + "202": { + "body": "" + }, + "204": { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/InterfaceEndpointProfileDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/InterfaceEndpointProfileDelete.json new file mode 100644 index 000000000000..8c6072d3438c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/InterfaceEndpointProfileDelete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myresourceGroup", + "serverName": "sourcesvr", + "interfaceEndpointProfileName": "myInterfaceEndpointName", + "api-version": "2017-10-01-preview" + }, + "responses": { + "200": { + "body": "" + }, + "202": { + "body": "" + }, + "204": { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/InterfaceEndpointProfileGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/InterfaceEndpointProfileGet.json new file mode 100644 index 000000000000..3d92bf7639d0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/InterfaceEndpointProfileGet.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myresourceGroup", + "serverName": "alphasvr", + "interfaceEndpointProfileName": "ie7", + "api-version": "2017-10-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "virtualNetworkSubnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myresourceGroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet77", + "privateIp": "10.20.30.40", + "state": "Ready" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myresourceGroup/providers/Microsoft.Sql/servers/alphasvr/interfaceEndpointProfiles/ie7", + "name": "ie7", + "type": "Microsoft.Sql/servers/interfaceEndpointProfiles" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/InterfaceEndpointProfileListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/InterfaceEndpointProfileListByServer.json new file mode 100644 index 000000000000..38951cdf9c8c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/InterfaceEndpointProfileListByServer.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myresourceGroup", + "serverName": "alphasvr", + "api-version": "2017-10-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "virtualNetworkSubnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myresourceGroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet33", + "privateIp": "18.28.38.48", + "state": "Ready" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myresourceGroup/providers/Microsoft.Sql/servers/alphasvr/interfaceEndpointProfiles/ie44", + "name": "ie44", + "type": "Microsoft.Sql/servers/interfaceEndpointProfiles" + }, + { + "properties": { + "virtualNetworkSubnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myresourceGroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet77", + "privateIp": "18.28.38.48", + "state": "Ready" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myresourceGroup/providers/Microsoft.Sql/servers/alphasvr/interfaceEndpointProfiles/ie7", + "name": "ie7", + "type": "Microsoft.Sql/servers/interfaceEndpointProfiles" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index 16a08ea194ac..c3b4e353d253 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -103,6 +103,9 @@ input-file: - Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json - Microsoft.Sql/preview/2017-10-01-preview/TdeCertificates.json - Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceTdeCertificates.json +- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceKeys.json +- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceEncryptionProtectors.json +- Microsoft.Sql/preview/2017-10-01-preview/InterfaceEndpointProfiles.json # Needed when there is more than one input file @@ -177,6 +180,9 @@ input-file: - Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json - Microsoft.Sql/preview/2017-10-01-preview/TdeCertificates.json - Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceTdeCertificates.json +- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceKeys.json +- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceEncryptionProtectors.json +- Microsoft.Sql/preview/2017-10-01-preview/InterfaceEndpointProfiles.json # Needed when there is more than one input file override-info: @@ -244,6 +250,9 @@ input-file: - Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json - Microsoft.Sql/preview/2017-10-01-preview/TdeCertificates.json - Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceTdeCertificates.json +- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceKeys.json +- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceEncryptionProtectors.json +- Microsoft.Sql/preview/2017-10-01-preview/InterfaceEndpointProfiles.json # Needed when there is more than one input file override-info: @@ -409,6 +418,8 @@ input-file: - ./Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json - ./Microsoft.Sql/preview/2017-10-01-preview/TdeCertificates.json - ./Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceTdeCertificates.json + - ./Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceKeys.json + - ./Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceEncryptionProtectors.json # Needed when there is more than one input file override-info: