diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceCreateMax.json new file mode 100644 index 000000000000..302e706e28fb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceCreateMax.json @@ -0,0 +1,75 @@ +{ + "parameters" : { + "subscriptionId" : "20D7082A-0FC7-4468-82BD-542694D5042B", + "resourceGroupName" : "testrg", + "managedInstanceName" : "testinstance", + "api-version" : "2015-05-01-preview", + "parameters" : { + "tags" : { + "tagKey1" : "TagValue1" + }, + "location" : "Japan East", + "sku" : { + "name" : "CLS3", + "tier" : "Standard", + "capacity" : 1 + }, + "properties" : { + "fullyQualifiedDomainName" : "testinstance.database.windows.net", + "administratorLogin" : "dummylogin", + "administratorLoginPassword" : "Un53cuRE!", + "subnetId" : "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "Full" + } + } + }, + "responses" : { + "200" : { + "body" : { + "tags" : { + "tagKey1" : "TagValue1" + }, + "id" : "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance1", + "name" : "testinstance1", + "type" : "Microsoft.Sql/managedInstances", + "location" : "japaneast", + "sku" : { + "name" : "CLS3", + "tier" : "Standard", + "capacity" : 1 + }, + "properties" : { + "fullyQualifiedDomainName" : "testinstance.database.windows.net", + "administratorLogin" : "dummylogin", + "subnetId" : "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state" : "Ready" + } + } + }, + "201" : { + "body" : { + "tags" : { + "tagKey1" : "TagValue1" + }, + "id" : "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance2", + "name" : "testinstance2", + "type" : "Microsoft.Sql/managedInstances", + "location" : "japaneast", + "sku" : { + "name" : "CLS3", + "tier" : "Standard", + "capacity" : 1 + }, + "properties" : { + "fullyQualifiedDomainName" : "testinstance.database.windows.net", + "administratorLogin" : "dummylogin", + "subnetId" : "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state" : "Ready" + } + } + }, + "202" : {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceCreateMin.json new file mode 100644 index 000000000000..beda44eea784 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceCreateMin.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId" : "20D7082A-0FC7-4468-82BD-542694D5042B", + "resourceGroupName" : "testrg", + "managedInstanceName" : "testinstance", + "api-version": "2015-05-01-preview", + "parameters": { + "properties": { + "administratorLogin": "dummylogin", + "administratorLoginPassword": "Un53cuRE!" + }, + "location": "Japan East" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances", + "location": "japaneast", + "sku" : { + "name" : "CLS3", + "tier" : "Standard", + "capacity" : 1 + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.database.windows.net", + "administratorLogin": "dummylogin", + "state": "Ready" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances", + "location": "japaneast", + "sku" : { + "name" : "CLS3", + "tier" : "Standard", + "capacity" : 1 + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.database.windows.net", + "administratorLogin": "dummylogin", + "state": "Ready" + } + } + }, + "202": {} + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceDelete.json new file mode 100644 index 000000000000..1b1db6fb5f6a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceDelete.json @@ -0,0 +1,17 @@ +{ + "parameters" : { + "subscriptionId" : "20D7082A-0FC7-4468-82BD-542694D5042B", + "resourceGroupName" : "testrg", + "managedInstanceName" : "testinstance", + "api-version" : "2015-05-01-preview" + }, + "responses" : { + "200" : { + "body" : "" + }, + "202" : {}, + "204" : { + "body" : "" + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceGet.json new file mode 100644 index 000000000000..cb1f257242f5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceGet.json @@ -0,0 +1,33 @@ +{ + "parameters" : { + "subscriptionId" : "20d7082a-0fc7-4468-82bd-542694d5042b", + "resourceGroupName" : "testrg", + "managedInstanceName" : "testcl", + "api-version" : "2015-05-01-preview" + }, + "responses" : { + "200" : { + "body" : { + "sku" : { + "name" : "CLS3", + "tier" : "Standard", + "capacity": 1, + "family":"Gen4" + }, + "properties" : { + "fullyQualifiedDomainName" : "testcl.database.windows.net", + "administratorLogin": "cloudSA", + "state": "Ready", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "Full" + + }, + "location" : "onebox", + "id" : "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl", + "name" : "testcl", + "type" : "Microsoft.Sql/managedInstances" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceList.json new file mode 100644 index 000000000000..91418cef315f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceList.json @@ -0,0 +1,50 @@ +{ + "parameters" : { + "subscriptionId": "20D7082A-0FC7-4468-82BD-542694D5042B", + "api-version" : "2015-05-01-preview" + }, + "responses" : { + "200" : { + "body" : { + "value" : [{ + "location" : "onebox", + "id" : "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testcl", + "name" : "testcl", + "type": "Microsoft.Sql/managedInstances", + "sku" : { + "name" : "CLS3", + "tier" : "Standard", + "capacity" : 1 + }, + "properties" : { + "fullyQualifiedDomainName" : "testcl.database.windows.net", + "administratorLogin" : "cloudSA", + "state": "Ready", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "Full" + } + }, { + "location" : "onebox", + "id" : "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testcl2", + "name" : "testcl2", + "type": "Microsoft.Sql/managedInstances", + "sku" : { + "name" : "CLS15", + "tier" : "Standard", + "capacity" : 22 + }, + "properties" : { + "fullyQualifiedDomainName" : "testcl2.database.windows.net", + "administratorLogin" : "cloudSA", + "state": "Ready", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "Full" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceListByResourceGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceListByResourceGroup.json new file mode 100644 index 000000000000..9995b41f70d5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceListByResourceGroup.json @@ -0,0 +1,53 @@ +{ + "parameters" : { + "subscriptionId": "20D7082A-0FC7-4468-82BD-542694D5042B", + "resourceGroupName" : "Test1", + "api-version" : "2015-05-01-preview" + }, + "responses" : { + "200" : { + "body" : { + "value" : [{ + "location" : "onebox", + "id" : "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testcl", + "name" : "testcl", + "type": "Microsoft.Sql/managedInstances", + "sku" : { + "name" : "CLS3", + "tier" : "Standard", + "capacity" : 1, + "family":"Gen5" + }, + "properties" : { + "fullyQualifiedDomainName" : "testcl.database.windows.net", + "administratorLogin" : "cloudSA", + "state": "Ready", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "Full" + } + }, { + "location" : "onebox", + "id" : "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testcl2", + "name" : "testcl2", + "type": "Microsoft.Sql/managedInstances", + "sku" : { + "name" : "CLS15", + "tier" : "Standard", + "capacity" : 22, + "family":"Gen4" + }, + "properties" : { + "fullyQualifiedDomainName" : "testcl2.database.windows.net", + "administratorLogin" : "cloudSA", + "state": "Ready", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "Full" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceUpdateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceUpdateMax.json new file mode 100644 index 000000000000..c15b0a36e799 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceUpdateMax.json @@ -0,0 +1,49 @@ +{ + "parameters" : { + "subscriptionId" : "20D7082A-0FC7-4468-82BD-542694D5042B", + "resourceGroupName" : "testrg", + "managedInstanceName" : "testinstance", + "api-version" : "2015-05-01-preview", + "parameters" : { + "tags" : { + "tagKey1" : "TagValue1" + }, + "sku" : { + "name" : "CLS3", + "tier" : "Standard", + "capacity" : 1 + }, + "properties" : { + "fullyQualifiedDomainName" : "testinstance.database.windows.net", + "administratorLogin" : "dummylogin", + "administratorLoginPassword" : "Un53cuRE!", + "subnetId" : "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1" + } + } + }, + "responses" : { + "200" : { + "body" : { + "tags" : { + "tagKey1" : "TagValue1" + }, + "id" : "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance1", + "name" : "testinstance1", + "type" : "Microsoft.Sql/managedInstances", + "location" : "japaneast", + "sku" : { + "name" : "CLS3", + "tier" : "Standard", + "capacity" : 1 + }, + "properties" : { + "fullyQualifiedDomainName" : "testinstance.database.windows.net", + "administratorLogin" : "dummylogin", + "subnetId" : "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state" : "Ready" + } + } + }, + "202" : {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceUpdateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceUpdateMin.json new file mode 100644 index 000000000000..78a2c3b9f7d5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/ManagedInstanceUpdateMin.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId" : "20D7082A-0FC7-4468-82BD-542694D5042B", + "resourceGroupName" : "testrg", + "managedInstanceName" : "testinstance", + "api-version": "2015-05-01-preview", + "parameters": { + "tags": { + "tagKey1": "TagValue1" + } + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "id": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances", + "location": "japaneast", + "sku" : { + "name" : "CLS3", + "tier" : "Standard", + "capacity" : 1 + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.database.windows.net", + "administratorLogin": "dummylogin", + "state": "Ready" + } + } + }, + "202": {} + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/managedInstances.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/managedInstances.json new file mode 100644 index 000000000000..75e19a2b6ea5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/managedInstances.json @@ -0,0 +1,617 @@ +{ + "swagger": "2.0", + "info": { + "version": "2015-05-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}/providers/Microsoft.Sql/managedInstances": { + "get": { + "tags": [ + "ManagedInstances" + ], + "description": "Gets a list of all managed instances in the subscription.", + "operationId": "ManagedInstances_List", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of managed instances.", + "schema": { + "$ref": "#/definitions/ManagedInstanceListResult" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List managed instances": { + "$ref": "./examples/ManagedInstanceList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances": { + "get": { + "tags": [ + "ManagedInstances" + ], + "description": "Gets a list of managed instances in a resource group.", + "operationId": "ManagedInstances_ListByResourceGroup", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of managed instances.", + "schema": { + "$ref": "#/definitions/ManagedInstanceListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveManagedInstance - The requested managed instance was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List managed instances by resource group": { + "$ref": "./examples/ManagedInstanceListByResourceGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}": { + "get": { + "tags": [ + "ManagedInstances" + ], + "description": "Gets a managed instance.", + "operationId": "ManagedInstances_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified managed instance.", + "schema": { + "$ref": "#/definitions/ManagedInstance" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveManagedInstance - The requested managed instance was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-examples": { + "Get managed instance": { + "$ref": "./examples/ManagedInstanceGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedInstances" + ], + "description": "Creates or updates a managed instance.", + "operationId": "ManagedInstances_CreateOrUpdate", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested managed instance resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstance" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the managed instance.", + "schema": { + "$ref": "#/definitions/ManagedInstance" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 VnetAddressRangeError - Virtual network address range is invalid.\n\n * 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 InvalidSubnetResourceId - The provided subnet resource ID for the managed instance create or update is invalid.\n\n * 400 VnetInWrongRegion - Virtual network is in wrong region.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveManagedInstance - The requested managed instance was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\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 * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the managed instance.", + "schema": { + "$ref": "#/definitions/ManagedInstance" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create managed instance with minimal properties": { + "$ref": "./examples/ManagedInstanceCreateMin.json" + }, + "Create managed instance with all properties": { + "$ref": "./examples/ManagedInstanceCreateMax.json" + } + } + }, + "delete": { + "tags": [ + "ManagedInstances" + ], + "description": "Deletes a managed instance.", + "operationId": "ManagedInstances_Delete", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the managed instance." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveManagedInstance - The requested managed instance was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.\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 * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified managed instance does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete managed instance": { + "$ref": "./examples/ManagedInstanceDelete.json" + } + } + }, + "patch": { + "tags": [ + "ManagedInstances" + ], + "description": "Updates a managed instance.", + "operationId": "ManagedInstances_Update", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested managed instance resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstanceUpdate" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the managed instance.", + "schema": { + "$ref": "#/definitions/ManagedInstance" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 VnetAddressRangeError - Virtual network address range is invalid.\n\n * 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 InvalidSubnetResourceId - The provided subnet resource ID for the managed instance create or update is invalid.\n\n * 400 VnetInWrongRegion - Virtual network is in wrong region.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveManagedInstance - The requested managed instance was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\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 * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 409 ServerAlreadyExists - Duplicate server name.\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": { + "Update managed instance with minimal properties": { + "$ref": "./examples/ManagedInstanceUpdateMin.json" + }, + "Update managed instance with all properties": { + "$ref": "./examples/ManagedInstanceUpdateMax.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceListResult": { + "description": "A list of managed instances.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstance" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ResourceIdentity": { + "description": "Azure Active Directory identity configuration for a resource.", + "type": "object", + "properties": { + "principalId": { + "format": "uuid", + "description": "The Azure Active Directory principal id.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.", + "enum": [ + "SystemAssigned" + ], + "type": "string", + "x-ms-enum": { + "name": "IdentityType", + "modelAsString": true + } + }, + "tenantId": { + "format": "uuid", + "description": "The Azure Active Directory tenant id.", + "type": "string", + "readOnly": true + } + } + }, + "Sku": { + "description": "An ARM Resource SKU.", + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "description": "The name of the SKU, typically, a letter + Number code, e.g. P3.", + "type": "string" + }, + "tier": { + "description": "The tier of the particular SKU, e.g. Basic, Premium.", + "type": "string" + }, + "size": { + "description": "Size of the particular SKU", + "type": "string" + }, + "family": { + "description": "If the service has different generations of hardware, for the same SKU, then that can be captured here.", + "type": "string" + }, + "capacity": { + "format": "int32", + "description": "Capacity of the particular SKU.", + "type": "integer" + } + } + }, + "ManagedInstanceProperties": { + "description": "The properties of a managed instance.", + "type": "object", + "properties": { + "fullyQualifiedDomainName": { + "description": "The fully qualified domain name of the managed instance.", + "type": "string", + "readOnly": true + }, + "administratorLogin": { + "description": "Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation).", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "administratorLoginPassword": { + "description": "The administrator login password (required for managed instance creation).", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "subnetId": { + "description": "Subnet resource ID for the managed instance.", + "type": "string" + }, + "state": { + "description": "The state of the managed instance.", + "type": "string", + "readOnly": true + }, + "licenseType": { + "description": "The license type. Possible values are 'LicenseIncluded' and 'BasePrice'.", + "type": "string" + }, + "vCores": { + "format": "int32", + "description": "The number of VCores.", + "type": "integer" + }, + "storageSizeInGB": { + "format": "int32", + "description": "The maximum storage size in GB.", + "type": "integer" + } + } + }, + "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 + }, + "TrackedResource": { + "description": "ARM tracked top level resource.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "location": { + "description": "Resource location.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "ManagedInstance": { + "description": "An Azure SQL managed instance.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TrackedResource" + } + ], + "properties": { + "identity": { + "$ref": "#/definitions/ResourceIdentity", + "description": "The Azure Active Directory identity of the managed instance.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "sku": { + "$ref": "#/definitions/Sku", + "description": "Managed instance sku" + }, + "properties": { + "$ref": "#/definitions/ManagedInstanceProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstanceUpdate": { + "description": "An update request for an Azure SQL Database managed instance.", + "type": "object", + "properties": { + "sku": { + "$ref": "#/definitions/Sku", + "description": "Managed instance sku" + }, + "properties": { + "$ref": "#/definitions/ManagedInstanceProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "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-03-01-preview/examples/CompleteManagedRestore.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CompleteManagedRestore.json new file mode 100644 index 000000000000..404be24e99b4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CompleteManagedRestore.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "southeastasia", + "operationId": "111111111-2222-8888-5555-777777777777/completeRestore", + "api-version": "2017-03-01-preview", + "parameters": { + "lastBackupName": "testdb1_log4" + } + }, + "responses": { + "200": {}, + "202": {} + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseCreateMax.json new file mode 100644 index 000000000000..5b90cf7227b6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseCreateMax.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2017-03-01-preview", + "parameters": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia" + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb1", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe" + }, + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb2", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe" + }, + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseCreateMin.json new file mode 100644 index 000000000000..dc8110cb783b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseCreateMin.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2017-03-01-preview", + "parameters": { + "location": "southeastasia" + } + }, + "responses": { + "200": { + "body": { + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb1", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe" + }, + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb2", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe" + }, + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseCreatePointInTimeRestore.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseCreatePointInTimeRestore.json new file mode 100644 index 000000000000..35e787d9b8d3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseCreatePointInTimeRestore.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2017-03-01-preview", + "parameters": { + "location": "southeastasia", + "properties": { + "createMode": "PointInTimeRestore", + "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb", + "restorePointInTime": "2017-07-14T05:35:31.503Z" + } + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb1", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe" + }, + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb2", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe" + }, + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackup.json new file mode 100644 index 000000000000..b548481d70ed --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackup.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2017-03-01-preview", + "parameters": { + "properties": { + "createMode": "RestoreExternalBackup", + "storageContainerUri": "https://myaccountname.blob.core.windows.net/backups", + "storageContainerSasToken": "sv=2015-12-11&sr=c&sp=rl&sig=1234", + "collation": "SQL_Latin1_General_CP1_CI_AS" + }, + "location": "southeastasia" + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb1", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe" + }, + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb2", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe" + }, + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseDelete.json new file mode 100644 index 000000000000..f2f90b41b6e8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "testdb", + "api-version": "2017-03-01-preview" + }, + "responses": { + "200": { + "body": "" + }, + "202": {}, + "204": { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseGet.json new file mode 100644 index 000000000000..20605c075e18 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Test1", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2015-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb1", + "location": "southeastasia", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "creationDate": "2017-08-04T15:00:17.73Z", + "defaultSecondaryLocation": "North Europe", + "status": "Online" + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseListByManagedInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseListByManagedInstance.json new file mode 100644 index 000000000000..605b6eaef54c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseListByManagedInstance.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Test1", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2015-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb1", + "location": "southeastasia", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "creationDate": "2017-08-04T15:00:17.73Z", + "defaultSecondaryLocation": "North Europe", + "status": "Online" + }, + "type": "Microsoft.Sql/managedInstances/databases" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb2", + "location": "southeastasia", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "creationDate": "2017-08-04T15:00:17.73Z", + "defaultSecondaryLocation": "North Europe", + "status": "Online" + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseUpdateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseUpdateMax.json new file mode 100644 index 000000000000..1f105bbaf543 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseUpdateMax.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "testdb", + "api-version": "2017-03-01-preview", + "parameters": { + "tags": { + "tagKey1": "TagValue1" + } + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb" + }, + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseUpdateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseUpdateMin.json new file mode 100644 index 000000000000..1f105bbaf543 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ManagedDatabaseUpdateMin.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "testdb", + "api-version": "2017-03-01-preview", + "parameters": { + "tags": { + "tagKey1": "TagValue1" + } + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb" + }, + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/managedDatabases.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/managedDatabases.json new file mode 100644 index 000000000000..6894d182d083 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/managedDatabases.json @@ -0,0 +1,661 @@ +{ + "swagger": "2.0", + "info": { + "version": "2017-03-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}/providers/Microsoft.Sql/locations/{locationName}/managedDatabaseRestoreAzureAsyncOperation/{operationId}/completeRestore": { + "post": { + "tags": [ + "ManagedDatabases" + ], + "description": "Completes the restore operation on a managed database.", + "operationId": "ManagedDatabases_CompleteRestore", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "operationId", + "in": "path", + "description": "Management operation id that this request tries to complete.", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "name": "parameters", + "in": "body", + "description": "The definition for completing the restore of this managed database.", + "required": true, + "schema": { + "$ref": "#/definitions/CompleteDatabaseRestoreDefinition" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully issued complete restore request." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidDatabaseCompleteRestoreRequest - The complete database restore request is invalid\n\n * 400 InvalidDatabaseCompleteRestoreRequestLastBackupName - The last backup name is invalid\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character." + }, + "202": { + "description": "Completing migration is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Completes a managed database restore": { + "$ref": "./examples/CompleteManagedRestore.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases": { + "get": { + "tags": [ + "ManagedDatabases" + ], + "description": "Gets a list of managed databases.", + "operationId": "ManagedDatabases_ListByInstance", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of databases.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List databases by managed instances": { + "$ref": "./examples/ManagedDatabaseListByManagedInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}": { + "get": { + "tags": [ + "ManagedDatabases" + ], + "description": "Gets a managed database.", + "operationId": "ManagedDatabases_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified managed database.", + "schema": { + "$ref": "#/definitions/ManagedDatabase" + } + }, + "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 a managed database": { + "$ref": "./examples/ManagedDatabaseGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedDatabases" + ], + "description": "Creates a new database or updates an existing database.", + "operationId": "ManagedDatabases_CreateOrUpdate", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested database resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedDatabase" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the database.", + "schema": { + "$ref": "#/definitions/ManagedDatabase" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 InvalidDatabaseCreateOrUpdateRequest - The request body for the create or update database operation is invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidSourceDatabaseId - Invalid source database identifier.\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 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MissingCollation - Collation is required.\n\n * 400 MissingSourceDatabaseId - Missing source database identifier.\n\n * 400 MissingRestorePointInTime - Missing restore point in time\n\n * 400 MissingStorageContainerSasToken - Missing storage container SAS token\n\n * 400 MissingStorageContainerUri - Missing storage container URI\n\n * 400 RestorableDroppedDatabaseIdGivenForRestoreWithSourceDatabaseId - Cannot specify restorableDroppedDatabaseId when sourceDatabaseId is already given in restore create mode\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the database.", + "schema": { + "$ref": "#/definitions/ManagedDatabase" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Creates a new managed database by restoring from an external backup": { + "$ref": "./examples/ManagedDatabaseCreateRestoreExternalBackup.json" + }, + "Creates a new managed database with maximal properties": { + "$ref": "./examples/ManagedDatabaseCreateMax.json" + }, + "Creates a new managed database with minimal properties": { + "$ref": "./examples/ManagedDatabaseCreateMin.json" + }, + "Creates a new managed database using point in time restore": { + "$ref": "./examples/ManagedDatabaseCreatePointInTimeRestore.json" + } + } + }, + "delete": { + "tags": [ + "ManagedDatabases" + ], + "description": "Deletes the managed database.", + "operationId": "ManagedDatabases_Delete", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the managed database." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\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 * 409 ServerDisabled - Server is disabled.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Deleting the managed database is in progress." + }, + "204": { + "description": "The specified managed database does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete managed database": { + "$ref": "./examples/ManagedDatabaseDelete.json" + } + } + }, + "patch": { + "tags": [ + "ManagedDatabases" + ], + "description": "Updates an existing database.", + "operationId": "ManagedDatabases_Update", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested database resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedDatabaseUpdate" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the database.", + "schema": { + "$ref": "#/definitions/ManagedDatabase" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." + }, + "202": { + "description": "Deleting the managed database is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Updates a managed database with minimal properties": { + "$ref": "./examples/ManagedDatabaseUpdateMin.json" + }, + "Updates a managed database with maximal properties": { + "$ref": "./examples/ManagedDatabaseUpdateMax.json" + } + } + } + } + }, + "definitions": { + "CompleteDatabaseRestoreDefinition": { + "description": "Contains the information necessary to perform a complete database restore operation.", + "required": [ + "lastBackupName" + ], + "type": "object", + "properties": { + "lastBackupName": { + "description": "The last backup name to apply", + "type": "string" + } + } + }, + "ManagedDatabaseListResult": { + "description": "A list of managed databases.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedDatabase" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedDatabaseProperties": { + "description": "The managed database's properties.", + "type": "object", + "properties": { + "collation": { + "description": "Collation of the managed database.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "status": { + "description": "Status for the database.", + "enum": [ + "Online", + "Offline", + "Shutdown", + "Creating", + "Inaccessible" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ManagedDatabaseStatus", + "modelAsString": true + } + }, + "creationDate": { + "format": "date-time", + "description": "Creation date of the database.", + "type": "string", + "readOnly": true + }, + "earliestRestorePoint": { + "format": "date-time", + "description": "Earliest restore point in time for point in time restore.", + "type": "string", + "readOnly": true + }, + "restorePointInTime": { + "format": "date-time", + "description": "Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "defaultSecondaryLocation": { + "description": "Geo paired region.", + "type": "string", + "readOnly": true + }, + "catalogCollation": { + "description": "Collation of the metadata catalog.", + "enum": [ + "DATABASE_DEFAULT", + "SQL_Latin1_General_CP1_CI_AS" + ], + "type": "string", + "x-ms-enum": { + "name": "CatalogCollationType", + "modelAsString": true + }, + "x-ms-mutability": [ + "read", + "create" + ] + }, + "createMode": { + "description": "Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified.", + "enum": [ + "Default", + "RestoreExternalBackup", + "PointInTimeRestore" + ], + "type": "string", + "x-ms-enum": { + "name": "ManagedDatabaseCreateMode", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "storageContainerUri": { + "description": "Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "sourceDatabaseId": { + "description": "The resource identifier of the source database associated with create operation of this database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "storageContainerSasToken": { + "description": "Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "failoverGroupId": { + "description": "Instance Failover Group resource identifier that this managed database belongs to.", + "type": "string", + "readOnly": 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 + }, + "TrackedResource": { + "description": "ARM tracked top level resource.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "location": { + "description": "Resource location.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "ManagedDatabase": { + "description": "A managed database resource.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TrackedResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedDatabaseProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedDatabaseUpdate": { + "description": "An managed database update.", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/ManagedDatabaseProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "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/readme.md b/specification/sql/resource-manager/readme.md index 17c8dc2b16c7..a9a8ac1693ab 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -63,6 +63,7 @@ input-file: - Microsoft.Sql/preview/2015-05-01-preview/databaseAutomaticTuning.json - Microsoft.Sql/preview/2015-05-01-preview/encryptionProtectors.json - Microsoft.Sql/preview/2015-05-01-preview/failoverGroups.json +- Microsoft.Sql/preview/2015-05-01-preview/managedInstances.json - Microsoft.Sql/preview/2015-05-01-preview/operations.json - Microsoft.Sql/preview/2015-05-01-preview/serverKeys.json - Microsoft.Sql/preview/2015-05-01-preview/servers.json @@ -72,12 +73,14 @@ input-file: - Microsoft.Sql/preview/2015-05-01-preview/usages.json - Microsoft.Sql/preview/2015-05-01-preview/virtualNetworkRules.json - Microsoft.Sql/preview/2017-03-01-preview/longTermRetention.json +- Microsoft.Sql/preview/2017-03-01-preview/managedDatabases.json - Microsoft.Sql/preview/2017-03-01-preview/renameDatabase.json - Microsoft.Sql/preview/2017-03-01-preview/serverAutomaticTuning.json - Microsoft.Sql/preview/2017-03-01-preview/serverDnsAliases.json - Microsoft.Sql/preview/2017-03-01-preview/restorePoints.json - Microsoft.Sql/preview/2017-10-01-preview/cancelOperations.json - Microsoft.Sql/preview/2017-10-01-preview/cancelPoolOperations.json +- Microsoft.Sql/preview/2017-10-01-preview/instanceFailoverGroups.json # Needed when there is more than one input file override-info: @@ -118,6 +121,7 @@ input-file: - Microsoft.Sql/preview/2015-05-01-preview/databaseAutomaticTuning.json - Microsoft.Sql/preview/2015-05-01-preview/encryptionProtectors.json - Microsoft.Sql/preview/2015-05-01-preview/failoverGroups.json +- Microsoft.Sql/preview/2015-05-01-preview/managedInstances.json - Microsoft.Sql/preview/2015-05-01-preview/operations.json - Microsoft.Sql/preview/2015-05-01-preview/serverKeys.json - Microsoft.Sql/preview/2015-05-01-preview/servers.json @@ -126,12 +130,14 @@ input-file: - Microsoft.Sql/preview/2015-05-01-preview/syncMembers.json - Microsoft.Sql/preview/2015-05-01-preview/usages.json - Microsoft.Sql/preview/2015-05-01-preview/virtualNetworkRules.json +- Microsoft.Sql/preview/2017-03-01-preview/managedDatabases.json - Microsoft.Sql/preview/2017-03-01-preview/renameDatabase.json - Microsoft.Sql/preview/2017-03-01-preview/serverAutomaticTuning.json - Microsoft.Sql/preview/2017-03-01-preview/serverDnsAliases.json - Microsoft.Sql/preview/2017-03-01-preview/restorePoints.json - Microsoft.Sql/preview/2017-10-01-preview/cancelOperations.json - Microsoft.Sql/preview/2017-10-01-preview/cancelPoolOperations.json +- Microsoft.Sql/preview/2017-10-01-preview/instanceFailoverGroups.json # Needed when there is more than one input file override-info: @@ -172,6 +178,7 @@ input-file: - Microsoft.Sql/preview/2015-05-01-preview/databaseAutomaticTuning.json - Microsoft.Sql/preview/2015-05-01-preview/encryptionProtectors.json - Microsoft.Sql/preview/2015-05-01-preview/failoverGroups.json +- Microsoft.Sql/preview/2015-05-01-preview/managedInstances.json - Microsoft.Sql/preview/2015-05-01-preview/operations.json - Microsoft.Sql/preview/2015-05-01-preview/serverKeys.json - Microsoft.Sql/preview/2015-05-01-preview/servers.json @@ -182,6 +189,7 @@ input-file: - Microsoft.Sql/preview/2015-05-01-preview/virtualNetworkRules.json - Microsoft.Sql/preview/2017-03-01-preview/cancelOperations.json - Microsoft.Sql/preview/2017-03-01-preview/dataWarehouseUserActivities.json +- Microsoft.Sql/preview/2017-03-01-preview/managedDatabases.json - Microsoft.Sql/preview/2017-03-01-preview/renameDatabase.json - Microsoft.Sql/preview/2017-03-01-preview/serverAutomaticTuning.json - Microsoft.Sql/preview/2017-03-01-preview/serverDnsAliases.json @@ -226,6 +234,7 @@ input-file: - Microsoft.Sql/preview/2015-05-01-preview/blobAuditingPolicies.json - Microsoft.Sql/preview/2015-05-01-preview/encryptionProtectors.json - Microsoft.Sql/preview/2015-05-01-preview/failoverGroups.json +- Microsoft.Sql/preview/2015-05-01-preview/managedInstances.json - Microsoft.Sql/preview/2015-05-01-preview/operations.json - Microsoft.Sql/preview/2015-05-01-preview/serverKeys.json - Microsoft.Sql/preview/2015-05-01-preview/servers.json @@ -280,6 +289,7 @@ These can be regenerated by running the following PowerShell script from this re input-file: - ./Microsoft.Sql/preview/2017-10-01-preview/cancelOperations.json - ./Microsoft.Sql/preview/2017-10-01-preview/cancelPoolOperations.json + - ./Microsoft.Sql/preview/2017-10-01-preview/instanceFailoverGroups.json # Needed when there is more than one input file override-info: @@ -300,6 +310,7 @@ These can be regenerated by running the following PowerShell script from this re input-file: - ./Microsoft.Sql/preview/2017-03-01-preview/databases.json - ./Microsoft.Sql/preview/2017-03-01-preview/longTermRetention.json + - ./Microsoft.Sql/preview/2017-03-01-preview/managedDatabases.json - ./Microsoft.Sql/preview/2017-03-01-preview/renameDatabase.json - ./Microsoft.Sql/preview/2017-03-01-preview/serverDnsAliases.json - ./Microsoft.Sql/preview/2017-03-01-preview/restorePoints.json @@ -325,6 +336,7 @@ input-file: - ./Microsoft.Sql/preview/2015-05-01-preview/blobAuditingPolicies.json - ./Microsoft.Sql/preview/2015-05-01-preview/encryptionProtectors.json - ./Microsoft.Sql/preview/2015-05-01-preview/failoverGroups.json + - ./Microsoft.Sql/preview/2015-05-01-preview/managedInstances.json - ./Microsoft.Sql/preview/2015-05-01-preview/operations.json - ./Microsoft.Sql/preview/2015-05-01-preview/serverKeys.json - ./Microsoft.Sql/preview/2015-05-01-preview/servers.json