diff --git a/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/azuredata.json b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/azuredata.json new file mode 100644 index 000000000000..17a247101e52 --- /dev/null +++ b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/azuredata.json @@ -0,0 +1,873 @@ +{ + "swagger": "2.0", + "info": { + "version": "2017-03-01-preview", + "title": "AzureDataManagementClient", + "description": "The AzureData management API provides a RESTful set of web APIs to manage Azure Data Resources. For example, register, delete and retrieve a SQL Server, SQL Server registration." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.AzureData/operations": { + "get": { + "tags": [ + "Operations" + ], + "description": "Lists all of the available SQL Server Registration API operations.", + "operationId": "Operations_List", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved operations.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidParameterValue - An invalid value was given to parameter.\n\n * 400 InvalidCrossSubscriptionVmMove - Invalid cross subscription move of resource.\n\n * 400 RPGenericUser - User Failure when calling other Resource Provider.\n\n * 400 InvalidArgument - Invalid argument '{0}'.\n\n * 400 ArgumentNotInRange - Argument '{0}' not in range.\n\n * 400 ResourceNotProvisioned - As the resource: {0} is not in a provisioned state, the request cannot be proceeded forward\n\n * 400 InvalidRgResourceId - Invalid Resourcegroup resource id specified.\n\n * 403 AccessDenied - Access denied.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotExist - Subscription id does not exist.\n\n * 404 ResourceDoesNotExist - Resource does not exist.\n\n * 404 OperationIdNotFound - Operation id could not be found.\n\n * 404 OperationTypeNotFound - Operation Type not found.\n\n * 409 ResourceAlreadyExists - Resource already exists.\n\n * 409 SqlExtensionNotInstalled - SQL extension not installed.\n\n * 409 MissingMoveResources - Cannot move resources(s) because some resources are missing in the request.\n\n * 409 OperationInProgress - Operation in progress on resource already.\n\n * 409 OperationCanceled - Operation Cancelled.\n\n * 500 RPGenericSystem - System Failure when calling other Resource Provider.\n\n * 500 UnExpectedErrorOccurred - Unexpected error occurred.\n\n * 500 OperationTimeout - Operation timed out." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Lists all of the available SQL Server Registration API operations.": { + "$ref": "./examples/ListOperation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/sqlServerRegistrations/{sqlServerRegistrationName}": { + "get": { + "tags": [ + "SqlServerRegistrations" + ], + "description": "Gets a SQL Server registration.", + "operationId": "SqlServerRegistrations_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "name": "sqlServerRegistrationName", + "in": "path", + "description": "Name of the SQL Server registration.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the SQL Server registration.", + "schema": { + "$ref": "#/definitions/SqlServerRegistration" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidParameterValue - An invalid value was given to parameter.\n\n * 400 InvalidCrossSubscriptionVmMove - Invalid cross subscription move of resource.\n\n * 400 RPGenericUser - User Failure when calling other Resource Provider.\n\n * 400 InvalidArgument - Invalid argument '{0}'.\n\n * 400 ArgumentNotInRange - Argument '{0}' not in range.\n\n * 400 ResourceNotProvisioned - As the resource: {0} is not in a provisioned state, the request cannot be proceeded forward\n\n * 400 InvalidRgResourceId - Invalid Resourcegroup resource id specified.\n\n * 403 AccessDenied - Access denied.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotExist - Subscription id does not exist.\n\n * 404 ResourceDoesNotExist - Resource does not exist.\n\n * 404 OperationIdNotFound - Operation id could not be found.\n\n * 404 OperationTypeNotFound - Operation Type not found.\n\n * 409 ResourceAlreadyExists - Resource already exists.\n\n * 409 SqlExtensionNotInstalled - SQL extension not installed.\n\n * 409 MissingMoveResources - Cannot move resources(s) because some resources are missing in the request.\n\n * 409 OperationInProgress - Operation in progress on resource already.\n\n * 409 OperationCanceled - Operation Cancelled.\n\n * 500 RPGenericSystem - System Failure when calling other Resource Provider.\n\n * 500 UnExpectedErrorOccurred - Unexpected error occurred.\n\n * 500 OperationTimeout - Operation timed out." + } + }, + "x-ms-examples": { + "Gets a SQL Server registration.": { + "$ref": "./examples/GetSqlServerRegistration.json" + } + } + }, + "put": { + "tags": [ + "SqlServerRegistrations" + ], + "description": "Creates or updates a SQL Server registration.", + "operationId": "SqlServerRegistrations_CreateOrUpdate", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "name": "sqlServerRegistrationName", + "in": "path", + "description": "Name of the SQL Server registration.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The SQL Server registration to be created or updated.", + "required": true, + "schema": { + "$ref": "#/definitions/SqlServerRegistration" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the SQL Server registration.", + "schema": { + "$ref": "#/definitions/SqlServerRegistration" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 RPGenericUser - User Failure when calling other Resource Provider.\n\n * 400 InvalidArgument - Invalid argument '{0}'.\n\n * 400 ArgumentNotInRange - Argument '{0}' not in range.\n\n * 400 ResourceNotProvisioned - As the resource: {0} is not in a provisioned state, the request cannot be proceeded forward\n\n * 400 InvalidRgResourceId - Invalid Resourcegroup resource id specified.\n\n * 400 InvalidParameterValue - An invalid value was given to parameter.\n\n * 400 InvalidCrossSubscriptionVmMove - Invalid cross subscription move of resource.\n\n * 400 TinaGroupUpdateFailVmAttached - SQL Server registration cannot be updated as it has attached a SQL Server.\n\n * 400 InvalidSqlImageOffer - Provided SQL image offer is invalid.\n\n * 400 InvalidSqlSku - Provided SQL sku is invalid.\n\n * 400 OuPathAndDomainMismatch - OU path is not within the domain provided.\n\n * 400 InvalidAccountNameFormat - Account name format is invalid.\n\n * 400 CloudWitnessUnsupported - For Windows Server 2012R2 setup cloud witness is not allowed.\n\n * 400 FileShareWitnessDisAllowed - For Windows Server 2016 and beyond setup, file share witness is not allowed.\n\n * 400 InvalidStorageAccountUrl - Invalid storage account url.\n\n * 400 TinaGroupNameTooLong - SQL Server registration name cannot exceed 15 characters.\n\n * 400 InvalidTinaGroupName - Invalid SQL Server registration name.\n\n * 400 TinaGroupNotEmpty - SQL Server registration is not empty.\n\n * 400 TinaGroupUpdateNotAllowed - Update to SQL Server registration is not allowed.\n\n * 403 AccessDenied - Access denied.\n\n * 404 SubscriptionDoesNotExist - Subscription id does not exist.\n\n * 404 ResourceDoesNotExist - Resource does not exist.\n\n * 404 OperationIdNotFound - Operation id could not be found.\n\n * 404 OperationTypeNotFound - Operation Type not found.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveTINAGroupInResourceGroup - Subscription does not have SQL Server registration in resource group.\n\n * 409 ResourceAlreadyExists - Resource already exists.\n\n * 409 SqlExtensionNotInstalled - SQL extension not installed.\n\n * 409 MissingMoveResources - Cannot move resources(s) because some resources are missing in the request.\n\n * 409 OperationInProgress - Operation in progress on resource already.\n\n * 409 OperationCanceled - Operation Cancelled.\n\n * 500 RPGenericSystem - System Failure when calling other Resource Provider.\n\n * 500 UnExpectedErrorOccurred - Unexpected error occurred.\n\n * 500 OperationTimeout - Operation timed out." + }, + "201": { + "description": "Successfully created the SQL Server registration.", + "schema": { + "$ref": "#/definitions/SqlServerRegistration" + } + } + }, + "x-ms-examples": { + "Creates or updates a SQL Server registration.": { + "$ref": "./examples/CreateOrUpdateSqlServerRegistration.json" + } + } + }, + "delete": { + "tags": [ + "SqlServerRegistrations" + ], + "description": "Deletes a SQL Server registration.", + "operationId": "SqlServerRegistrations_Delete", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "name": "sqlServerRegistrationName", + "in": "path", + "description": "Name of the SQL Server registration.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the SQL Server registration." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 RPGenericUser - User Failure when calling other Resource Provider.\n\n * 400 InvalidArgument - Invalid argument '{0}'.\n\n * 400 ArgumentNotInRange - Argument '{0}' not in range.\n\n * 400 ResourceNotProvisioned - As the resource: {0} is not in a provisioned state, the request cannot be proceeded forward\n\n * 400 InvalidRgResourceId - Invalid Resourcegroup resource id specified.\n\n * 400 InvalidParameterValue - An invalid value was given to parameter.\n\n * 400 InvalidCrossSubscriptionVmMove - Invalid cross subscription move of resource.\n\n * 400 TinaGroupUpdateFailVmAttached - SQL Server registration cannot be updated as it has attached a SQL Server.\n\n * 400 InvalidSqlImageOffer - Provided SQL image offer is invalid.\n\n * 400 InvalidSqlSku - Provided SQL sku is invalid.\n\n * 400 OuPathAndDomainMismatch - OU path is not within the domain provided.\n\n * 400 InvalidAccountNameFormat - Account name format is invalid.\n\n * 400 CloudWitnessUnsupported - For Windows Server 2012R2 setup cloud witness is not allowed.\n\n * 400 FileShareWitnessDisAllowed - For Windows Server 2016 and beyond setup, file share witness is not allowed.\n\n * 400 InvalidStorageAccountUrl - Invalid storage account url.\n\n * 400 TinaGroupNameTooLong - SQL Server registration name cannot exceed 15 characters.\n\n * 400 InvalidTinaGroupName - Invalid SQL Server registration name.\n\n * 400 TinaGroupNotEmpty - SQL Server registration is not empty.\n\n * 400 TinaGroupUpdateNotAllowed - Update to SQL Server registration is not allowed.\n\n * 403 AccessDenied - Access denied.\n\n * 404 SubscriptionDoesNotExist - Subscription id does not exist.\n\n * 404 ResourceDoesNotExist - Resource does not exist.\n\n * 404 OperationIdNotFound - Operation id could not be found.\n\n * 404 OperationTypeNotFound - Operation Type not found.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveTINAGroupInResourceGroup - Subscription does not have SQL Server registration in resource group.\n\n * 409 ResourceAlreadyExists - Resource already exists.\n\n * 409 SqlExtensionNotInstalled - SQL extension not installed.\n\n * 409 MissingMoveResources - Cannot move resources(s) because some resources are missing in the request.\n\n * 409 OperationInProgress - Operation in progress on resource already.\n\n * 409 OperationCanceled - Operation Cancelled.\n\n * 500 RPGenericSystem - System Failure when calling other Resource Provider.\n\n * 500 UnExpectedErrorOccurred - Unexpected error occurred.\n\n * 500 OperationTimeout - Operation timed out." + }, + "204": { + "description": "The specified SQL Server registration does not exist." + } + }, + "x-ms-examples": { + "Deletes a SQL Server registration.": { + "$ref": "./examples/DeleteSqlServerRegistration.json" + } + } + }, + "patch": { + "tags": [ + "SqlServerRegistrations" + ], + "description": "Updates SQL Server Registration tags.", + "operationId": "SqlServerRegistrations_Update", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "name": "sqlServerRegistrationName", + "in": "path", + "description": "Name of the SQL Server registration.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The SQL Server Registration.", + "required": true, + "schema": { + "$ref": "#/definitions/SqlServerRegistrationUpdate" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the SQL Server Registration.", + "schema": { + "$ref": "#/definitions/SqlServerRegistration" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 RPGenericUser - User Failure when calling other Resource Provider.\n\n * 400 InvalidArgument - Invalid argument '{0}'.\n\n * 400 ArgumentNotInRange - Argument '{0}' not in range.\n\n * 400 ResourceNotProvisioned - As the resource: {0} is not in a provisioned state, the request cannot be proceeded forward\n\n * 400 InvalidRgResourceId - Invalid Resourcegroup resource id specified.\n\n * 400 InvalidParameterValue - An invalid value was given to parameter.\n\n * 400 InvalidCrossSubscriptionVmMove - Invalid cross subscription move of resource.\n\n * 403 AccessDenied - Access denied.\n\n * 404 SubscriptionDoesNotExist - Subscription id does not exist.\n\n * 404 ResourceDoesNotExist - Resource does not exist.\n\n * 404 OperationIdNotFound - Operation id could not be found.\n\n * 404 OperationTypeNotFound - Operation Type not found.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ResourceAlreadyExists - Resource already exists.\n\n * 409 SqlExtensionNotInstalled - SQL extension not installed.\n\n * 409 MissingMoveResources - Cannot move resources(s) because some resources are missing in the request.\n\n * 409 OperationInProgress - Operation in progress on resource already.\n\n * 409 OperationCanceled - Operation Cancelled.\n\n * 500 RPGenericSystem - System Failure when calling other Resource Provider.\n\n * 500 UnExpectedErrorOccurred - Unexpected error occurred.\n\n * 500 OperationTimeout - Operation timed out." + } + }, + "x-ms-examples": { + "Updates a SQL Server Registration tags.": { + "$ref": "./examples/UpdateSqlServerRegistration.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/sqlServerRegistrations": { + "get": { + "tags": [ + "SqlServerRegistrations" + ], + "description": "Gets all SQL Server registrations in a resource group.", + "operationId": "SqlServerRegistrations_ListByResourceGroup", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved all SQL Server registrations in the resource group.", + "schema": { + "$ref": "#/definitions/SqlServerRegistrationListResult" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets all SQL Server registrations in a resource group.": { + "$ref": "./examples/ListByResourceGroupSqlServerRegistration.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AzureData/sqlServerRegistrations": { + "get": { + "tags": [ + "SqlServerRegistrations" + ], + "description": "Gets all SQL Server registrations in a subscription.", + "operationId": "SqlServerRegistrations_List", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved all SQL Server registrations in the subscription.", + "schema": { + "$ref": "#/definitions/SqlServerRegistrationListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidParameterValue - An invalid value was given to parameter.\n\n * 400 InvalidCrossSubscriptionVmMove - Invalid cross subscription move of resource.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets all SQL Server registrations in a subscription.": { + "$ref": "./examples/ListSubscriptionSqlServerRegistration.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/sqlServerRegistrations/{sqlServerRegistrationName}/sqlServers/{sqlServerName}": { + "get": { + "tags": [ + "SqlServers" + ], + "description": "Gets a SQL Server.", + "operationId": "SqlServers_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "name": "sqlServerRegistrationName", + "in": "path", + "description": "Name of the SQL Server registration.", + "required": true, + "type": "string" + }, + { + "name": "sqlServerName", + "in": "path", + "description": "Name of the SQL Server.", + "required": true, + "type": "string" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "required": false, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the SQL Server.", + "schema": { + "$ref": "#/definitions/SqlServer" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidParameterValue - An invalid value was given to parameter.\n\n * 400 InvalidCrossSubscriptionVmMove - Invalid cross subscription move of resource.\n\n * 400 RPGenericUser - User Failure when calling other Resource Provider.\n\n * 400 InvalidArgument - Invalid argument '{0}'.\n\n * 400 ArgumentNotInRange - Argument '{0}' not in range.\n\n * 400 ResourceNotProvisioned - As the resource: {0} is not in a provisioned state, the request cannot be proceeded forward\n\n * 400 InvalidRgResourceId - Invalid Resourcegroup resource id specified.\n\n * 403 AccessDenied - Access denied.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotExist - Subscription id does not exist.\n\n * 404 ResourceDoesNotExist - Resource does not exist.\n\n * 404 OperationIdNotFound - Operation id could not be found.\n\n * 404 OperationTypeNotFound - Operation Type not found.\n\n * 409 ResourceAlreadyExists - Resource already exists.\n\n * 409 SqlExtensionNotInstalled - SQL extension not installed.\n\n * 409 MissingMoveResources - Cannot move resources(s) because some resources are missing in the request.\n\n * 409 OperationInProgress - Operation in progress on resource already.\n\n * 409 OperationCanceled - Operation Cancelled.\n\n * 500 RPGenericSystem - System Failure when calling other Resource Provider.\n\n * 500 UnExpectedErrorOccurred - Unexpected error occurred.\n\n * 500 OperationTimeout - Operation timed out." + } + }, + "x-ms-examples": { + "Gets a SQL Server.": { + "$ref": "./examples/GetSqlServer.json" + } + } + }, + "put": { + "tags": [ + "SqlServers" + ], + "description": "Creates or updates a SQL Server.", + "operationId": "SqlServers_CreateOrUpdate", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "name": "sqlServerRegistrationName", + "in": "path", + "description": "Name of the SQL Server registration.", + "required": true, + "type": "string" + }, + { + "name": "sqlServerName", + "in": "path", + "description": "Name of the SQL Server.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The SQL Server to be created or updated.", + "required": true, + "schema": { + "$ref": "#/definitions/SqlServer" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the SQL Server.", + "schema": { + "$ref": "#/definitions/SqlServer" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidVmResourceIdChange - Server resource id property cannot be updated.\n\n * 400 TinaAlreadyIncludedInGroup - SQL Server cannot be moved from one group to another in same operation.\n\n * 400 TinaCannotRemoveFromGroup - SQL Server cannot be removed from group.\n\n * 400 VmLocationMismatch - VM location does not match that of SQL Server.\n\n * 400 SqlSkuMismatchWithGroup - SQL sku set on the SQL Server registration does not match that of the SQL Server.\n\n * 400 VmInsufficientPermission - Insufficient permission to Vm.\n\n * 400 SingleNicOnVmAllowed - Only Single NIC Servers are allowed.\n\n * 400 InvalidTinaGroupResourceIdParameterValue - SQL Server registration resource id is not in correct format.\n\n * 400 MismatchVmGroupSubscription - Subscription id for SQL Server and SQL Server registration are different.\n\n * 400 IncompleteDomainCredentialsProperty - Incomplete input provided for domain credentials property.\n\n * 400 BYOLChangeToPAYGNotSupported - The conversion from AHUB to PAYG is not supported for BYOL images\n\n * 400 InvalidVmResourceIdParameterValue - Provided Server resource id is not valid.\n\n * 400 MismatchInTinaAndVmResourceIdSubscription - Mismatch in subscription id for SQL Server and Server resource id property.\n\n * 400 MismatchTinaAndVmName - SQL Server name is not same as the Server name provided on ServerResourceId property.\n\n * 400 MismatchTinaAndVmRgName - SQL Server resource group name is not same as the Server resource group name provided on ServerResourceId property.\n\n * 400 NotSupportedTinaOSVersion - Server OS type is not Windows. Only Windows OS versions are supported\n\n * 400 VmNotRunning - The VM is not in running state.\n\n * 400 VmAgentNotRunning - The VM agent is not installed or in running state.\n\n * 400 SqlExtNotInstalled - Sql Iaas Extension is not installed on Server.\n\n * 400 PAYGNotSupportedForNonGalleryVM - License type PAYG is invalid for this Server as this was not created from Azure marketplace image.\n\n * 400 SqlVersionMismatchWithGroup - SQL version mismatch with SQL Server registration.\n\n * 400 VmOSVersionMismatchWithGroup - OS version mismatch with group.\n\n * 400 AutoBackupEncryptionPasswordNotSpecified - Password not provided when enabling encryption as auto backup setting.\n\n * 400 BackupScheduleTypeNotSet - Backup schedule type needs to be set.\n\n * 400 BackupStorageCredentialsNotSpecified - Backup storage credentials are not specified.\n\n * 400 KeyVaultCredentialsNotSpecified - Key vault credentials not specified.\n\n * 400 SqlCredentialsNotSpecified - SQL Server credentials are not specified.\n\n * 400 IncompleteAutoPatchingSettings - Incomplete auto patching settings specified.\n\n * 400 IncompleteAutoBackupSettings - Incomplete auto backup settings specified.\n\n * 400 IncompleteSqlStorageSettings - Incomplete SQL storage settings specified.\n\n * 400 InvalidParameterValue - An invalid value was given to parameter.\n\n * 400 InvalidCrossSubscriptionVmMove - Invalid cross subscription move of resource.\n\n * 400 RPGenericUser - User Failure when calling other Resource Provider.\n\n * 400 InvalidArgument - Invalid argument '{0}'.\n\n * 400 ArgumentNotInRange - Argument '{0}' not in range.\n\n * 400 ResourceNotProvisioned - As the resource: {0} is not in a provisioned state, the request cannot be proceeded forward\n\n * 400 InvalidRgResourceId - Invalid Resourcegroup resource id specified.\n\n * 403 AccessDenied - Access denied.\n\n * 404 SubscriptionDoesNotHaveTINAGroupInResourceGroup - Subscription does not have SQL Server registration in resource group.\n\n * 404 SubscriptionDoesNotHaveTINAInResourceGroup - Subscription does not have SQL Server Instance in resource group.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotExist - Subscription id does not exist.\n\n * 404 ResourceDoesNotExist - Resource does not exist.\n\n * 404 OperationIdNotFound - Operation id could not be found.\n\n * 404 OperationTypeNotFound - Operation Type not found.\n\n * 409 ResourceAlreadyExists - Resource already exists.\n\n * 409 SqlExtensionNotInstalled - SQL extension not installed.\n\n * 409 MissingMoveResources - Cannot move resources(s) because some resources are missing in the request.\n\n * 409 OperationInProgress - Operation in progress on resource already.\n\n * 409 OperationCanceled - Operation Cancelled.\n\n * 500 RPGenericSystem - System Failure when calling other Resource Provider.\n\n * 500 UnExpectedErrorOccurred - Unexpected error occurred.\n\n * 500 OperationTimeout - Operation timed out." + }, + "201": { + "description": "Successfully created the SQL Server.", + "schema": { + "$ref": "#/definitions/SqlServer" + } + } + }, + "x-ms-examples": { + "Creates or updates a SQL Server in a Registration group.": { + "$ref": "./examples/CreateOrUpdateSqlServerWithRegistrationGroup.json" + } + } + }, + "delete": { + "tags": [ + "SqlServers" + ], + "description": "Deletes a SQL Server.", + "operationId": "SqlServers_Delete", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "name": "sqlServerRegistrationName", + "in": "path", + "description": "Name of the SQL Server registration.", + "required": true, + "type": "string" + }, + { + "name": "sqlServerName", + "in": "path", + "description": "Name of the SQL Server.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the SQL Server." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidVmResourceIdChange - Server resource id property cannot be updated.\n\n * 400 TinaAlreadyIncludedInGroup - SQL Server cannot be moved from one group to another in same operation.\n\n * 400 TinaCannotRemoveFromGroup - SQL Server cannot be removed from group.\n\n * 400 VmLocationMismatch - VM location does not match that of SQL Server.\n\n * 400 SqlSkuMismatchWithGroup - SQL sku set on the SQL Server registration does not match that of the SQL Server.\n\n * 400 VmInsufficientPermission - Insufficient permission to Vm.\n\n * 400 SingleNicOnVmAllowed - Only Single NIC Servers are allowed.\n\n * 400 InvalidTinaGroupResourceIdParameterValue - SQL Server registration resource id is not in correct format.\n\n * 400 MismatchVmGroupSubscription - Subscription id for SQL Server and SQL Server registration are different.\n\n * 400 IncompleteDomainCredentialsProperty - Incomplete input provided for domain credentials property.\n\n * 400 BYOLChangeToPAYGNotSupported - The conversion from AHUB to PAYG is not supported for BYOL images\n\n * 400 InvalidVmResourceIdParameterValue - Provided Server resource id is not valid.\n\n * 400 MismatchInTinaAndVmResourceIdSubscription - Mismatch in subscription id for SQL Server and Server resource id property.\n\n * 400 MismatchTinaAndVmName - SQL Server name is not same as the Server name provided on ServerResourceId property.\n\n * 400 MismatchTinaAndVmRgName - SQL Server resource group name is not same as the Server resource group name provided on ServerResourceId property.\n\n * 400 NotSupportedTinaOSVersion - Server OS type is not Windows. Only Windows OS versions are supported\n\n * 400 VmNotRunning - The VM is not in running state.\n\n * 400 VmAgentNotRunning - The VM agent is not installed or in running state.\n\n * 400 SqlExtNotInstalled - Sql Iaas Extension is not installed on Server.\n\n * 400 PAYGNotSupportedForNonGalleryVM - License type PAYG is invalid for this Server as this was not created from Azure marketplace image.\n\n * 400 SqlVersionMismatchWithGroup - SQL version mismatch with SQL Server registration.\n\n * 400 VmOSVersionMismatchWithGroup - OS version mismatch with group.\n\n * 400 AutoBackupEncryptionPasswordNotSpecified - Password not provided when enabling encryption as auto backup setting.\n\n * 400 BackupScheduleTypeNotSet - Backup schedule type needs to be set.\n\n * 400 BackupStorageCredentialsNotSpecified - Backup storage credentials are not specified.\n\n * 400 KeyVaultCredentialsNotSpecified - Key vault credentials not specified.\n\n * 400 SqlCredentialsNotSpecified - SQL Server credentials are not specified.\n\n * 400 IncompleteAutoPatchingSettings - Incomplete auto patching settings specified.\n\n * 400 IncompleteAutoBackupSettings - Incomplete auto backup settings specified.\n\n * 400 IncompleteSqlStorageSettings - Incomplete SQL storage settings specified.\n\n * 400 InvalidParameterValue - An invalid value was given to parameter.\n\n * 400 InvalidCrossSubscriptionVmMove - Invalid cross subscription move of resource.\n\n * 400 RPGenericUser - User Failure when calling other Resource Provider.\n\n * 400 InvalidArgument - Invalid argument '{0}'.\n\n * 400 ArgumentNotInRange - Argument '{0}' not in range.\n\n * 400 ResourceNotProvisioned - As the resource: {0} is not in a provisioned state, the request cannot be proceeded forward\n\n * 400 InvalidRgResourceId - Invalid Resourcegroup resource id specified.\n\n * 403 AccessDenied - Access denied.\n\n * 404 SubscriptionDoesNotHaveTINAGroupInResourceGroup - Subscription does not have SQL Server registration in resource group.\n\n * 404 SubscriptionDoesNotHaveTINAInResourceGroup - Subscription does not have SQL Server Instance in resource group.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotExist - Subscription id does not exist.\n\n * 404 ResourceDoesNotExist - Resource does not exist.\n\n * 404 OperationIdNotFound - Operation id could not be found.\n\n * 404 OperationTypeNotFound - Operation Type not found.\n\n * 409 ResourceAlreadyExists - Resource already exists.\n\n * 409 SqlExtensionNotInstalled - SQL extension not installed.\n\n * 409 MissingMoveResources - Cannot move resources(s) because some resources are missing in the request.\n\n * 409 OperationInProgress - Operation in progress on resource already.\n\n * 409 OperationCanceled - Operation Cancelled.\n\n * 500 RPGenericSystem - System Failure when calling other Resource Provider.\n\n * 500 UnExpectedErrorOccurred - Unexpected error occurred.\n\n * 500 OperationTimeout - Operation timed out." + }, + "204": { + "description": "The specified SQL Server does not exist." + } + }, + "x-ms-examples": { + "Deletes a SQL Server.": { + "$ref": "./examples/DeleteSqlServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/sqlServerRegistrations/{sqlServerRegistrationName}/sqlServers": { + "get": { + "tags": [ + "SqlServers" + ], + "description": "Gets all SQL Servers in a SQL Server Registration.", + "operationId": "SqlServers_ListByResourceGroup", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "name": "sqlServerRegistrationName", + "in": "path", + "description": "Name of the SQL Server registration.", + "required": true, + "type": "string" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "required": false, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved all SQL Servers in the SQL Server Registration.", + "schema": { + "$ref": "#/definitions/SqlServerListResult" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets all SQL Servers in a SQL Server Registration.": { + "$ref": "./examples/ListByResourceGroupSqlServer.json" + } + } + } + } + }, + "definitions": { + "OperationListResult": { + "description": "Result of the request to list SQL operations.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "Operation": { + "description": "SQL REST API operation definition.", + "type": "object", + "properties": { + "name": { + "description": "The name of the operation being performed on this particular object.", + "type": "string", + "readOnly": true + }, + "display": { + "$ref": "#/definitions/OperationDisplay", + "description": "The localized display information for this particular operation / action.", + "readOnly": true + }, + "origin": { + "description": "The intended executor of the operation.", + "enum": [ + "user", + "system" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "OperationOrigin", + "modelAsString": true + } + }, + "properties": { + "description": "Additional descriptions for the operation.", + "type": "object", + "additionalProperties": { + "type": "object" + }, + "readOnly": true, + "x-ms-client-flatten": false + } + } + }, + "OperationDisplay": { + "description": "Display metadata associated with the operation.", + "type": "object", + "properties": { + "provider": { + "description": "The localized friendly form of the resource provider name.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "The localized friendly form of the resource type related to this action/operation.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "The localized friendly name for the operation.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The localized friendly description for the operation.", + "type": "string", + "readOnly": true + } + } + }, + "SqlServerRegistrationProperties": { + "description": "The SQL server Registration properties.", + "type": "object", + "properties": { + "subscriptionId": { + "format": "uuid", + "description": "Subscription Id", + "type": "string" + }, + "resourceGroup": { + "description": "Resource Group Name", + "type": "string" + }, + "propertyBag": { + "description": "Optional Properties as JSON string", + "type": "string" + } + } + }, + "Resource": { + "description": "ARM resource.", + "type": "object", + "properties": { + "id": { + "description": "Resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Resource name.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "Resource type.", + "type": "string", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "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" + } + } + } + }, + "SqlServerRegistration": { + "description": "A SQL server registration.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TrackedResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SqlServerRegistrationProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SqlServerRegistrationUpdate": { + "description": "An update to a SQL Server Registration.", + "type": "object", + "properties": { + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "SqlServerRegistrationListResult": { + "description": "Server.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SqlServerRegistration" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SqlServerProperties": { + "description": "The SQL server properties.", + "type": "object", + "properties": { + "cores": { + "format": "int32", + "description": "Cores of the Sql Server.", + "type": "integer", + "x-ms-mutability": [ + "update" + ] + }, + "version": { + "description": "Version of the Sql Server.", + "type": "string" + }, + "edition": { + "description": "Sql Server Edition.", + "type": "string" + }, + "registrationID": { + "description": "ID for Parent Sql Server Registration.", + "type": "string" + }, + "propertyBag": { + "description": "Sql Server Json Property Bag.", + "type": "string" + } + } + }, + "ProxyResource": { + "description": "ARM proxy resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": {} + }, + "SqlServer": { + "description": "A SQL server.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SqlServerProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SqlServerListResult": { + "description": "A list of SQL servers.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SqlServer" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "Subscription ID that identifies an Azure subscription.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "API version to use for the request.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "ResourceGroupParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "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" + }, + "SqlServerNameParameter": { + "name": "SqlServerName", + "in": "path", + "description": "Name of the Sql Server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "SqlServerRegistrationNameParameter": { + "name": "SqlServerRegistrationNameParameter", + "in": "path", + "description": "Name of the Sql Server registration.", + "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/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/CreateOrUpdateSqlServerRegistration.json b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/CreateOrUpdateSqlServerRegistration.json new file mode 100644 index 000000000000..e32fcfcf8b77 --- /dev/null +++ b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/CreateOrUpdateSqlServerRegistration.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "sqlServerRegistrationName": "testsqlregistration", + "api-version": "2017-03-01-preview", + "parameters": { + "location": "northeurope", + "tags": { + "mytag": "myval" + }, + "properties": { + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + }, + "location": "northeurope", + "tags": { + "mytag": "myval" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration", + "name": "testsqlregistration", + "type": "Microsoft.AzureData/SqlServerRegistrations" + } + }, + "201": { + "body": { + "properties": { + }, + "location": "northeurope", + "tags": { + "mytag": "myval" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration", + "name": "testsqlregistration", + "type": "Microsoft.AzureData/SqlServerRegistrations" + } + } + } +} diff --git a/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/CreateOrUpdateSqlServerWithRegistrationGroup.json b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/CreateOrUpdateSqlServerWithRegistrationGroup.json new file mode 100644 index 000000000000..a66741032d70 --- /dev/null +++ b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/CreateOrUpdateSqlServerWithRegistrationGroup.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "sqlServerRegistrationName": "testsqlregistration", + "sqlServerName": "testsqlserver", + "api-version": "2017-03-01-preview", + "parameters": { + "properties": { + "cores": 8, + "version": "2008", + "edition": "Latin", + "propertyBag": "", + "registrationID": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "cores": 8, + "version": "2008", + "edition": "Latin", + "propertyBag": "", + "registrationID": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration/sqlServers/testsqlserver", + "name": "testsqlserver", + "type": "Microsoft.AzureData/SqlServerRegistrations/SqlServers" + } + }, + "201": { + "body": { + "properties": { + "cores": 8, + "version": "2008", + "edition": "Latin", + "propertyBag": "", + "registrationID": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration/sqlServers/testsqlserver", + "name": "testsqlserver", + "type": "Microsoft.AzureData/SqlServerRegistrations/SqlServers" + } + } + } +} diff --git a/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/DeleteSqlServer.json b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/DeleteSqlServer.json new file mode 100644 index 000000000000..07e0011bf82d --- /dev/null +++ b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/DeleteSqlServer.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "sqlServerRegistrationName": "testsqlregistration", + "sqlServerName": "testsqlserver", + "api-version": "2017-03-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/DeleteSqlServerRegistration.json b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/DeleteSqlServerRegistration.json new file mode 100644 index 000000000000..f02ec7b7c364 --- /dev/null +++ b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/DeleteSqlServerRegistration.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "sqlServerRegistrationName": "testsqlregistration", + "api-version": "2017-03-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} \ No newline at end of file diff --git a/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/GetSqlServer.json b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/GetSqlServer.json new file mode 100644 index 000000000000..8a8fb708969b --- /dev/null +++ b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/GetSqlServer.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "sqlServerRegistrationName": "testsqlregistration", + "sqlServerName": "testsqlserver", + "api-version": "2017-03-01-preview", + "parameters": { + } + }, + "responses": { + "200": { + "body": { + "properties": { + "cores": 8, + "version": "2008", + "edition": "Latin", + "propertyBag": "", + "registrationID": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration/sqlServers/testsqlserver", + "name": "testsqlserver", + "type": "Microsoft.AzureData/SqlServerRegistrations/SqlServers" + } + } + } +} diff --git a/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/GetSqlServerRegistration.json b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/GetSqlServerRegistration.json new file mode 100644 index 000000000000..a8d423d4bd79 --- /dev/null +++ b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/GetSqlServerRegistration.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "sqlServerRegistrationName": "testsqlregistration", + "api-version": "2017-03-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + }, + "location": "northeurope", + "tags": { + "mytag": "myval" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration", + "name": "testsqlregistration", + "type": "Microsoft.AzureData/SqlServerRegistrations" + } + } + } +} diff --git a/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/ListByResourceGroupSqlServer.json b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/ListByResourceGroupSqlServer.json new file mode 100644 index 000000000000..5d7b4d5643f8 --- /dev/null +++ b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/ListByResourceGroupSqlServer.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "sqlServerRegistrationName": "testsqlregistration", + "api-version": "2017-03-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "cores": 8, + "version": "2008", + "edition": "Latin", + "propertyBag": "", + "registrationID": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration/sqlServers/testsqlserver1", + "name": "testsqlserver1", + "type": "Microsoft.AzureData/SqlServerRegistrations/SqlServers" + }, + { + "properties": { + "cores": 16, + "version": "2008", + "edition": "Latin", + "propertyBag": "", + "registrationID": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration/sqlServers/testsqlserver2", + "name": "testsqlserver2", + "type": "Microsoft.AzureData/SqlServerRegistrations/SqlServers" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/ListByResourceGroupSqlServerRegistration.json b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/ListByResourceGroupSqlServerRegistration.json new file mode 100644 index 000000000000..36cf73198939 --- /dev/null +++ b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/ListByResourceGroupSqlServerRegistration.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "api-version": "2017-03-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + }, + "location": "northeurope", + "tags": { + "mytag": "myval" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration1", + "name": "testsqlregistration1", + "type": "Microsoft.AzureData/SqlServerRegistrations" + }, + { + "properties": { + }, + "location": "northeurope", + "tags": { + "mytag": "myval" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration2", + "name": "testsqlregistration2", + "type": "Microsoft.AzureData/SqlServerRegistrations" + } + ] + } + } + } +} diff --git a/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/ListOperation.json b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/ListOperation.json new file mode 100644 index 000000000000..e0efb65e7bb6 --- /dev/null +++ b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/ListOperation.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2017-03-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.AzureData/sqlServerRegistrations/read", + "display": { + "resource": "SQL Server Registration", + "operation": "Get SQL Server Registration details", + "description": "Retrives details of SQL Server Registration" + } + }, + { + "name": "Microsoft.AzureData/sqlServerRegistrations/write", + "display": { + "resource": "SQL Server Registration", + "operation": "Create a new or update existing SQL Server Registration", + "description": "Create a new or change properties of existing SQL Server Registration" + } + }, + { + "name": "Microsoft.AzureData/sqlServerRegistrations/delete", + "display": { + "resource": "SQL Server Registration", + "operation": "Delete existing SQL Server Registration", + "description": "Delete existing SQL Server Registration" + } + }, + { + "name": "Microsoft.AzureData/operations/read", + "display": { + "resource": "Available REST operations" + } + }, + { + "name": "Microsoft.AzureData/sqlServers/read", + "display": { + "operation": "Get SQL Server Instance details", + "description": "Retrieves details of SQL Server" + } + }, + { + "name": "Microsoft.AzureData/sqlServers/write", + "display": { + "operation": "Create new or update existing SQL Server", + "description": "Create a new or change properties of existing SQL Server" + } + }, + { + "name": "Microsoft.AzureData/sqlServers/delete", + "display": { + "operation": "Delete exisiting SQL Server", + "description": "Delete exisiting SQL Server" + } + } + ] + } + } + } +} diff --git a/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/ListSubscriptionSqlServerRegistration.json b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/ListSubscriptionSqlServerRegistration.json new file mode 100644 index 000000000000..bcd3a7643406 --- /dev/null +++ b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/ListSubscriptionSqlServerRegistration.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2017-03-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + }, + "location": "northeurope", + "tags": { + "mytag": "myval" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration1", + "name": "testsqlregistration1", + "type": "Microsoft.AzureData/SqlServerRegistrations" + }, + { + "properties": { + }, + "location": "northeurope", + "tags": { + "mytag": "myval" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration2", + "name": "testsqlregistration2", + "type": "Microsoft.AzureData/SqlServerRegistrations" + } + ] + } + } + } +} diff --git a/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/UpdateSqlServerRegistration.json b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/UpdateSqlServerRegistration.json new file mode 100644 index 000000000000..ea705df46dd8 --- /dev/null +++ b/specification/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/examples/UpdateSqlServerRegistration.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "sqlServerRegistrationName": "testsqlregistration", + "api-version": "2017-03-01-preview", + "parameters": { + "tags": { + "mytag": "myval" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + }, + "location": "northeurope", + "tags": { + "mytag": "myval" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration", + "name": "testsqlregistration", + "type": "Microsoft.AzureData/SqlServerRegistrations" + } + } + } +} diff --git a/specification/azuredata/resource-manager/readme.csharp.md b/specification/azuredata/resource-manager/readme.csharp.md new file mode 100644 index 000000000000..c811c61c8082 --- /dev/null +++ b/specification/azuredata/resource-manager/readme.csharp.md @@ -0,0 +1,15 @@ +## C + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +```yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 1 + clear-output-folder: true + client-side-validation: false + namespace: Microsoft.Azure.Management.AzureData + output-folder: $(csharp-sdks-folder)/azuredata/Microsoft.Azure.Management.AzureData/src/Generated +``` diff --git a/specification/azuredata/resource-manager/readme.go.md b/specification/azuredata/resource-manager/readme.go.md new file mode 100644 index 000000000000..470d5832ef28 --- /dev/null +++ b/specification/azuredata/resource-manager/readme.go.md @@ -0,0 +1,19 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +```yaml $(go) +go: + license-header: MICROSOFT_APACHE_NO_VERSION + clear-output-folder: true +``` + +### Tag: package-2017-03-01-preview and go + +These settings apply only when `--tag=package-2017-03-01-preview --go` is specified on the command line. +Please also specify `--go-sdks-folder=`. + +```yaml $(tag) == 'package-2017-03-01-preview' && $(go) +namespace: Microsoft.AzureData +output-folder: $(go-sdks-folder)/services/preview/$(namespace)/mgmt/2017-03-01-preview/$(namespace) +``` diff --git a/specification/azuredata/resource-manager/readme.md b/specification/azuredata/resource-manager/readme.md new file mode 100644 index 000000000000..6a9b276de974 --- /dev/null +++ b/specification/azuredata/resource-manager/readme.md @@ -0,0 +1,80 @@ +# azuredata + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for azuredata. + +## Getting Started + +To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: + +> `autorest readme.md` + +To see additional help and options, run: + +> `autorest --help` + +For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. + +--- + +## Configuration + +### Basic Information + +These are the global settings for the azuredata. + +```yaml +openapi-type: arm +tag: package-2017-03-01-preview +``` + +### Tag: package-2017-03-01-preview + +These settings apply only when `--tag=package-2017-03-01-preview` is specified on the command line. + +```yaml $(tag) == 'package-2017-03-01-preview' +input-file: + - Microsoft.AzureData/preview/2017-03-01-preview/azuredata.json +``` + +--- + +# Code Generation + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +```yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-python + - repo: azure-sdk-for-java + - repo: azure-sdk-for-go + - repo: azure-sdk-for-js + - repo: azure-sdk-for-net + - repo: azure-sdk-for-ruby + after_scripts: + - bundle install && rake arm:regen_all_profiles['azure_mgmt_azuredata'] +``` + +## Go + +See configuration in [readme.go.md](./readme.go.md) + +## Python + +See configuration in [readme.python.md](./readme.python.md) + +## Ruby + +See configuration in [readme.ruby.md](./readme.ruby.md) + +## TypeScript + +See configuration in [readme.typescript.md](./readme.typescript.md) + +## CSharp + +See configuration in [readme.csharp.md](./readme.csharp.md) diff --git a/specification/azuredata/resource-manager/readme.python.md b/specification/azuredata/resource-manager/readme.python.md new file mode 100644 index 000000000000..bf6a13faa44e --- /dev/null +++ b/specification/azuredata/resource-manager/readme.python.md @@ -0,0 +1,21 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +```yaml $(python) +python: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 2 + namespace: Microsoft.AzureData + package-name: azuredata + package-version: 2017-03-01-preview + clear-output-folder: true +``` + +```yaml $(python) +python: + no-namespace-folders: true + output-folder: $(python-sdks-folder)/azure-mgmt/azuredata +``` diff --git a/specification/azuredata/resource-manager/readme.ruby.md b/specification/azuredata/resource-manager/readme.ruby.md new file mode 100644 index 000000000000..29cb0b76fa8f --- /dev/null +++ b/specification/azuredata/resource-manager/readme.ruby.md @@ -0,0 +1,19 @@ +## Ruby + +These settings apply only when `--ruby` is specified on the command line. + +```yaml +package-name: azure_mgmt_azuredata +package-version: 2017-03-01-preview +azure-arm: true +``` + +### Tag: package-2017-03-01-preview and ruby + +These settings apply only when `--tag=package-2017-03-01-preview --ruby` is specified on the command line. +Please also specify `--ruby-sdks-folder=`. + +```yaml $(tag) == 'package-2017-03-01-preview' && $(ruby) +namespace: Microsoft.AzureData +output-folder: $(ruby-sdks-folder)/azuredata +``` diff --git a/specification/azuredata/resource-manager/readme.typescript.md b/specification/azuredata/resource-manager/readme.typescript.md new file mode 100644 index 000000000000..c1e4a949375e --- /dev/null +++ b/specification/azuredata/resource-manager/readme.typescript.md @@ -0,0 +1,13 @@ +## TypeScript + +These settings apply only when `--typescript` is specified on the command line. +Please also specify `--typescript-sdks-folder=`. + +```yaml $(typescript) +typescript: + azure-arm: true + package-name: "azuredata" + output-folder: "$(typescript-sdks-folder)/packages/azuredata" + payload-flattening-threshold: 1 + generate-metadata: true +```