From cd82e8338d458bade1392430b3e229906506628b Mon Sep 17 00:00:00 2001 From: Austin Deal Date: Thu, 12 Apr 2018 11:23:56 -0700 Subject: [PATCH 1/5] Add short term retention policies specifications --- .../examples/GetShortTermRetentionPolicy.json | 22 + ...tTermRetentionPolicyRestorableDropped.json | 22 + .../UpdateShortTermRetentionPolicy.json | 25 + ...tTermRetentionPolicyRestorableDropped.json | 25 + .../shortTermRetentionPolicies.json | 653 ++++++++++++++++++ 5 files changed, 747 insertions(+) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/GetShortTermRetentionPolicy.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/GetShortTermRetentionPolicyRestorableDropped.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/UpdateShortTermRetentionPolicy.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/UpdateShortTermRetentionPolicyRestorableDropped.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/GetShortTermRetentionPolicy.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/GetShortTermRetentionPolicy.json new file mode 100644 index 000000000000..d2188d3febc5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/GetShortTermRetentionPolicy.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "policyName": "default", + "api-version": "2017-10-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/locations/servers/databases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 14 + } + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/GetShortTermRetentionPolicyRestorableDropped.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/GetShortTermRetentionPolicyRestorableDropped.json new file mode 100644 index 000000000000..2d8a60806c4c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/GetShortTermRetentionPolicyRestorableDropped.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "restorableDroppedDatabaseId": "testdb,131403269876900000", + "policyName": "default", + "api-version": "2017-10-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/restorableDroppedDatabases/testdb,131403269876900000/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/locations/servers/restorableDroppedDatabases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 14 + } + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/UpdateShortTermRetentionPolicy.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/UpdateShortTermRetentionPolicy.json new file mode 100644 index 000000000000..0bb81b1721f6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/UpdateShortTermRetentionPolicy.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "resourceGroup", + "serverName": "testsvr", + "databaseName": "testdb", + "policyName" : "default", + "api-version": "2017-10-01-preview", + "properties" : { + "retentionDays": 14 + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testsvr/databases/testdb/backupLongTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/locations/servers/databases/backupShortTermRetentionPolicies", + "properties" : { + "retentionDays": 14 + } + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/UpdateShortTermRetentionPolicyRestorableDropped.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/UpdateShortTermRetentionPolicyRestorableDropped.json new file mode 100644 index 000000000000..9226790ee5c1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/UpdateShortTermRetentionPolicyRestorableDropped.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "resourceGroup", + "serverName": "testsvr", + "restorableDroppedDatabaseId": "testdb", + "policyName" : "default", + "api-version": "2017-10-01-preview", + "properties" : { + "retentionDays": 14 + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testsvr/restorableDroppedDatabases/restorableDroppedDatabaseId/backupLongTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/locations/servers/restorableDroppedDatabases/backupShortTermRetentionPolicies", + "properties" : { + "retentionDays": 14 + } + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json new file mode 100644 index 000000000000..00e08071707b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json @@ -0,0 +1,653 @@ +{ + "swagger": "2.0", + "info": { + "version": "2017-10-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}": { + "get": { + "tags": [ + "RestorableDroppedDatabaseShortTermRetentionPolicies" + ], + "description": "Gets a dropped database's short term retention policy.", + "operationId": "RestorableDroppedDatabaseShortTermRetentionPolicies_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "restorableDroppedDatabaseId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be \"default\".", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the policies.", + "schema": { + "$ref": "#/definitions/ShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the short term retention policy for the database.": { + "$ref": "./examples/GetShortTermRetentionPolicyRestorableDropped.json" + } + } + }, + "put": { + "tags": [ + "RestorableDroppedDatabaseShortTermRetentionPolicies" + ], + "description": "Sets a database's long term retention policy.", + "operationId": "RestorableDroppedDatabaseShortTermRetentionPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "restorableDroppedDatabaseId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be \"default\".", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The long term retention policy info.", + "required": true, + "schema": { + "$ref": "#/definitions/ShortTermRetentionPolicy" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the policy.", + "schema": { + "$ref": "#/definitions/ShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 403 UpdateShortTermRetentionFeatureNotSupportedForEdition - This feature is not available for the selected database's edition {0}.\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 SourceDatabaseNotFound - The source database does not exist.\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 * 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" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the short term retention policy for the restorable dropped database.": { + "$ref": "./examples/UpdateShortTermRetentionPolicyRestorableDropped.json" + } + } + }, + "patch": { + "tags": [ + "RestorableDroppedDatabaseShortTermRetentionPolicies" + ], + "description": "Sets a database's long term retention policy.", + "operationId": "RestorableDroppedDatabaseShortTermRetentionPolicies_Update", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "restorableDroppedDatabaseId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be \"default\".", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The long term retention policy info.", + "required": true, + "schema": { + "$ref": "#/definitions/ShortTermRetentionPolicy" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the policy.", + "schema": { + "$ref": "#/definitions/ShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 403 UpdateShortTermRetentionFeatureNotSupportedForEdition - This feature is not available for the selected database's edition {0}.\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 SourceDatabaseNotFound - The source database does not exist.\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 * 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" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the short term retention policy for the restorable dropped database.": { + "$ref": "./examples/UpdateShortTermRetentionPolicyRestorableDropped.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies": { + "get": { + "tags": [ + "RestorableDroppedDatabaseShortTermRetentionPolicies" + ], + "description": "Gets a dropped database's short term retention policy.", + "operationId": "RestorableDroppedDatabaseShortTermRetentionPolicies_ListByRestorableDroppedDatabase", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "restorableDroppedDatabaseId", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the policies.", + "schema": { + "$ref": "#/definitions/ShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the short term retention policy for the database.": { + "$ref": "./examples/GetShortTermRetentionPolicyRestorableDropped.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}": { + "get": { + "tags": [ + "ShortTermRetentionPolicies" + ], + "description": "Gets a database's short term retention policy.", + "operationId": "ShortTermRetentionPolicies_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be \"default\".", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the policy.", + "schema": { + "$ref": "#/definitions/ShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the short term retention policy for the database.": { + "$ref": "./examples/GetShortTermRetentionPolicy.json" + } + } + }, + "put": { + "tags": [ + "ShortTermRetentionPolicies" + ], + "description": "Updates a database's short term retention policy.", + "operationId": "ShortTermRetentionPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be \"default\".", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The short term retention policy info.", + "required": true, + "schema": { + "$ref": "#/definitions/ShortTermRetentionPolicy" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the policy.", + "schema": { + "$ref": "#/definitions/ShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 403 UpdateShortTermRetentionFeatureNotSupportedForEdition - This feature is not available for the selected database's edition {0}.\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 SourceDatabaseNotFound - The source database does not exist.\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 * 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" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the short term retention policy for the database.": { + "$ref": "./examples/UpdateShortTermRetentionPolicy.json" + } + } + }, + "patch": { + "tags": [ + "ShortTermRetentionPolicies" + ], + "description": "Updates a database's short term retention policy.", + "operationId": "ShortTermRetentionPolicies_Update", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be \"default\".", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The short term retention policy info.", + "required": true, + "schema": { + "$ref": "#/definitions/ShortTermRetentionPolicy" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the policy.", + "schema": { + "$ref": "#/definitions/ShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 403 UpdateShortTermRetentionFeatureNotSupportedForEdition - This feature is not available for the selected database's edition {0}.\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 SourceDatabaseNotFound - The source database does not exist.\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 * 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" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the short term retention policy for the database.": { + "$ref": "./examples/UpdateShortTermRetentionPolicy.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies": { + "get": { + "tags": [ + "ShortTermRetentionPolicies" + ], + "description": "Gets a database's short term retention policy.", + "operationId": "ShortTermRetentionPolicies_ListByDatabase", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the policy.", + "schema": { + "$ref": "#/definitions/ShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the short term retention policy for the database.": { + "$ref": "./examples/GetShortTermRetentionPolicy.json" + } + } + } + } + }, + "definitions": { + "ShortTermRetentionPolicyProperties": { + "description": "Properties of a short term retention policy", + "type": "object", + "properties": { + "retentionDays": { + "format": "int32", + "description": "The backup retention period in days. This is how many days Point-in-Time Restore will be supported.", + "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 + }, + "ProxyResource": { + "description": "ARM proxy resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": {} + }, + "ShortTermRetentionPolicy": { + "description": "A short term retention policy resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ShortTermRetentionPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "The subscription ID that identifies an Azure subscription.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for the request.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "ResourceGroupParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "BlobAuditingPolicyNameParameter": { + "name": "blobAuditingPolicyName", + "in": "path", + "description": "The name of the blob auditing policy.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-parameter-location": "method" + }, + "SqlVirtualMachineInstanceNameParameter": { + "name": "sqlVirtualMachineInstanceName", + "in": "path", + "description": "The name of the SqlVirtualMachineInstance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "SqlVirtualMachineContainerNameParameter": { + "name": "sqlVirtualMachineContainerName", + "in": "path", + "description": "The name of the SqlVirtualMachineContainer.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "VirtualClusterNameParameter": { + "name": "virtualClusterName", + "in": "path", + "description": "The name of the virtual cluster.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} \ No newline at end of file From bf8a37f0d298b097a95995bb5d8bc0cf49f58165 Mon Sep 17 00:00:00 2001 From: Austin Deal Date: Fri, 13 Apr 2018 15:41:36 -0700 Subject: [PATCH 2/5] Edit readme to add v4 and include new swagger --- specification/sql/resource-manager/readme.md | 57 +++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index fe77432eee52..430a08196199 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -31,6 +31,60 @@ tag: package-composite-v3 The following packages may be composed from multiple api-versions. +### Tag: package-composite-v4 + +These settings apply only when `--tag=package-composite-v4` is specified on the command line. + +This section contains the "composite-v4" set of APIs, which is composed from a selection of api-versions that will remain backwards compatible with "v4" clients such as .NET SDK Microsoft.Azure.Management.Sql version 1.15.0-preview. + +APIs must only be added to this section when the API is publicly available in at least 1 production region and at least 1 generated client has been tested end-to-end. + +``` yaml $(tag) == 'package-composite-v4' +input-file: +- Microsoft.Sql/stable/2014-04-01/backups.json +- Microsoft.Sql/stable/2014-04-01/checkNameAvailability.json +- Microsoft.Sql/stable/2014-04-01/connectionPolicies.json +- Microsoft.Sql/stable/2014-04-01/databaseSecurityAlertPolicies.json +- Microsoft.Sql/stable/2014-04-01/dataMasking.json +- Microsoft.Sql/stable/2014-04-01/firewallRules.json +- Microsoft.Sql/stable/2014-04-01/geoBackupPolicies.json +- Microsoft.Sql/stable/2014-04-01/importExport.json +- Microsoft.Sql/stable/2014-04-01/metrics.json +- Microsoft.Sql/stable/2014-04-01/recommendedElasticPoolsDecoupled.json +- Microsoft.Sql/stable/2014-04-01/replicationLinks.json +- Microsoft.Sql/stable/2014-04-01/serverAzureADAdministrators.json +- Microsoft.Sql/stable/2014-04-01/serverCommunicationLinks.json +- Microsoft.Sql/stable/2014-04-01/serviceObjectives.json +- Microsoft.Sql/stable/2014-04-01/sql.core.json +- Microsoft.Sql/stable/2014-04-01/usages.json +- Microsoft.Sql/preview/2015-05-01-preview/blobAuditingPolicies.json +- 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/operations.json +- Microsoft.Sql/preview/2015-05-01-preview/serverKeys.json +- Microsoft.Sql/preview/2015-05-01-preview/servers.json +- Microsoft.Sql/preview/2015-05-01-preview/syncAgents.json +- Microsoft.Sql/preview/2015-05-01-preview/syncGroups.json +- 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/longTermRetention.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/capabilities.json +- Microsoft.Sql/preview/2017-10-01-preview/databases.json +- Microsoft.Sql/preview/2017-10-01-preview/elasticPools.json +- Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json + +# Needed when there is more than one input file +override-info: + title: SqlManagementClient +``` + ### Tag: package-composite-v3 These settings apply only when `--tag=package-composite-v3` is specified on the command line. @@ -336,6 +390,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/shortTermRetentionPolicies.json # Needed when there is more than one input file override-info: @@ -586,4 +641,4 @@ directive: reason: This warning gives many positives for existing APIs that cannot be changed. - suppress: EnumInsteadOfBoolean reason: This warning gives many positives for existing APIs that cannot be changed. -``` +``` \ No newline at end of file From e76a5131adbb5ecbdee1e20f7df460d81ac8ba32 Mon Sep 17 00:00:00 2001 From: Austin Deal Date: Mon, 16 Apr 2018 15:15:53 -0700 Subject: [PATCH 3/5] Removing restorable dropped database swagger --- .../shortTermRetentionPolicies.json | 244 ------------------ 1 file changed, 244 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json index 00e08071707b..ec814983b5a7 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json @@ -16,250 +16,6 @@ "application/json" ], "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}": { - "get": { - "tags": [ - "RestorableDroppedDatabaseShortTermRetentionPolicies" - ], - "description": "Gets a dropped database's short term retention policy.", - "operationId": "RestorableDroppedDatabaseShortTermRetentionPolicies_Get", - "parameters": [ - { - "$ref": "#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ServerNameParameter" - }, - { - "name": "restorableDroppedDatabaseId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "policyName", - "in": "path", - "description": "The policy name. Should always be \"default\".", - "required": true, - "type": "string", - "enum": [ - "default" - ], - "x-ms-enum": { - "name": "ShortTermRetentionPolicyName", - "modelAsString": true - } - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully retrieved the policies.", - "schema": { - "$ref": "#/definitions/ShortTermRetentionPolicy" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." - } - }, - "x-ms-examples": { - "Get the short term retention policy for the database.": { - "$ref": "./examples/GetShortTermRetentionPolicyRestorableDropped.json" - } - } - }, - "put": { - "tags": [ - "RestorableDroppedDatabaseShortTermRetentionPolicies" - ], - "description": "Sets a database's long term retention policy.", - "operationId": "RestorableDroppedDatabaseShortTermRetentionPolicies_CreateOrUpdate", - "parameters": [ - { - "$ref": "#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ServerNameParameter" - }, - { - "name": "restorableDroppedDatabaseId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "policyName", - "in": "path", - "description": "The policy name. Should always be \"default\".", - "required": true, - "type": "string", - "enum": [ - "default" - ], - "x-ms-enum": { - "name": "ShortTermRetentionPolicyName", - "modelAsString": true - } - }, - { - "name": "parameters", - "in": "body", - "description": "The long term retention policy info.", - "required": true, - "schema": { - "$ref": "#/definitions/ShortTermRetentionPolicy" - } - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully updated the policy.", - "schema": { - "$ref": "#/definitions/ShortTermRetentionPolicy" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 403 UpdateShortTermRetentionFeatureNotSupportedForEdition - This feature is not available for the selected database's edition {0}.\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 SourceDatabaseNotFound - The source database does not exist.\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 * 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" - } - }, - "x-ms-long-running-operation": true, - "x-ms-examples": { - "Update the short term retention policy for the restorable dropped database.": { - "$ref": "./examples/UpdateShortTermRetentionPolicyRestorableDropped.json" - } - } - }, - "patch": { - "tags": [ - "RestorableDroppedDatabaseShortTermRetentionPolicies" - ], - "description": "Sets a database's long term retention policy.", - "operationId": "RestorableDroppedDatabaseShortTermRetentionPolicies_Update", - "parameters": [ - { - "$ref": "#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ServerNameParameter" - }, - { - "name": "restorableDroppedDatabaseId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "policyName", - "in": "path", - "description": "The policy name. Should always be \"default\".", - "required": true, - "type": "string", - "enum": [ - "default" - ], - "x-ms-enum": { - "name": "ShortTermRetentionPolicyName", - "modelAsString": true - } - }, - { - "name": "parameters", - "in": "body", - "description": "The long term retention policy info.", - "required": true, - "schema": { - "$ref": "#/definitions/ShortTermRetentionPolicy" - } - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully updated the policy.", - "schema": { - "$ref": "#/definitions/ShortTermRetentionPolicy" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 403 UpdateShortTermRetentionFeatureNotSupportedForEdition - This feature is not available for the selected database's edition {0}.\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 SourceDatabaseNotFound - The source database does not exist.\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 * 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" - } - }, - "x-ms-long-running-operation": true, - "x-ms-examples": { - "Update the short term retention policy for the restorable dropped database.": { - "$ref": "./examples/UpdateShortTermRetentionPolicyRestorableDropped.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies": { - "get": { - "tags": [ - "RestorableDroppedDatabaseShortTermRetentionPolicies" - ], - "description": "Gets a dropped database's short term retention policy.", - "operationId": "RestorableDroppedDatabaseShortTermRetentionPolicies_ListByRestorableDroppedDatabase", - "parameters": [ - { - "$ref": "#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ServerNameParameter" - }, - { - "name": "restorableDroppedDatabaseId", - "in": "path", - "required": true, - "type": "string" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully retrieved the policies.", - "schema": { - "$ref": "#/definitions/ShortTermRetentionPolicy" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." - } - }, - "x-ms-examples": { - "Get the short term retention policy for the database.": { - "$ref": "./examples/GetShortTermRetentionPolicyRestorableDropped.json" - } - } - } - }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}": { "get": { "tags": [ From 4db40480941c8d1f1b111603579aed86753e50b4 Mon Sep 17 00:00:00 2001 From: Austin Deal Date: Mon, 16 Apr 2018 16:31:35 -0700 Subject: [PATCH 4/5] remove restorable dropped database examples --- ...tTermRetentionPolicyRestorableDropped.json | 22 ---------------- ...tTermRetentionPolicyRestorableDropped.json | 25 ------------------- 2 files changed, 47 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/GetShortTermRetentionPolicyRestorableDropped.json delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/UpdateShortTermRetentionPolicyRestorableDropped.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/GetShortTermRetentionPolicyRestorableDropped.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/GetShortTermRetentionPolicyRestorableDropped.json deleted file mode 100644 index 2d8a60806c4c..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/GetShortTermRetentionPolicyRestorableDropped.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "Default-SQL-SouthEastAsia", - "serverName": "testsvr", - "restorableDroppedDatabaseId": "testdb,131403269876900000", - "policyName": "default", - "api-version": "2017-10-01-preview" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/restorableDroppedDatabases/testdb,131403269876900000/backupShortTermRetentionPolicies/default", - "name": "default", - "type": "Microsoft.Sql/locations/servers/restorableDroppedDatabases/backupShortTermRetentionPolicies", - "properties": { - "retentionDays": 14 - } - } - } - } -} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/UpdateShortTermRetentionPolicyRestorableDropped.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/UpdateShortTermRetentionPolicyRestorableDropped.json deleted file mode 100644 index 9226790ee5c1..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/UpdateShortTermRetentionPolicyRestorableDropped.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "resourceGroup", - "serverName": "testsvr", - "restorableDroppedDatabaseId": "testdb", - "policyName" : "default", - "api-version": "2017-10-01-preview", - "properties" : { - "retentionDays": 14 - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testsvr/restorableDroppedDatabases/restorableDroppedDatabaseId/backupLongTermRetentionPolicies/default", - "name": "default", - "type": "Microsoft.Sql/locations/servers/restorableDroppedDatabases/backupShortTermRetentionPolicies", - "properties" : { - "retentionDays": 14 - } - } - } - } -} \ No newline at end of file From 15e066396a2791da1195f7d902ec6cdd27dc99aa Mon Sep 17 00:00:00 2001 From: Austin Deal Date: Thu, 19 Apr 2018 18:02:54 -0700 Subject: [PATCH 5/5] Removed ShortTermRetentionPolicies_ListByDatabase until it is fixed to return array --- .../shortTermRetentionPolicies.json | 42 ------------------- 1 file changed, 42 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json index ec814983b5a7..e7b9d6c994ea 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json @@ -205,48 +205,6 @@ } } } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies": { - "get": { - "tags": [ - "ShortTermRetentionPolicies" - ], - "description": "Gets a database's short term retention policy.", - "operationId": "ShortTermRetentionPolicies_ListByDatabase", - "parameters": [ - { - "$ref": "#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ServerNameParameter" - }, - { - "$ref": "#/parameters/DatabaseNameParameter" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully retrieved the policy.", - "schema": { - "$ref": "#/definitions/ShortTermRetentionPolicy" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." - } - }, - "x-ms-examples": { - "Get the short term retention policy for the database.": { - "$ref": "./examples/GetShortTermRetentionPolicy.json" - } - } - } } }, "definitions": {