-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create dev branch dev-sql-Microsoft.Sql-2022-05-01-preview (#19915)
* Adds base for updating Microsoft.Sql from version preview/2022-02-01-preview to version 2022-05-01-preview * Updates readme * Updates API version in new specs and examples * revert the default tag
- Loading branch information
Showing
730 changed files
with
83,749 additions
and
2 deletions.
There are no files selected for viewing
345 changes: 345 additions & 0 deletions
345
...ce-manager/Microsoft.Sql/preview/2022-05-01-preview/BackupShortTermRetentionPolicies.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,345 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"version": "2022-05-01-preview", | ||
"title": "SqlManagementClient", | ||
"description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." | ||
}, | ||
"host": "management.azure.com", | ||
"schemes": [ | ||
"https" | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"paths": { | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies": { | ||
"get": { | ||
"tags": [ | ||
"BackupShortTermRetentionPolicies" | ||
], | ||
"description": "Gets a database's short term retention policy.", | ||
"operationId": "BackupShortTermRetentionPolicies_ListByDatabase", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/ServerNameParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/DatabaseNameParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Successfully retrieved the policy.", | ||
"schema": { | ||
"$ref": "#/definitions/BackupShortTermRetentionPolicyListResult" | ||
} | ||
}, | ||
"default": { | ||
"description": "*** Error Responses: ***\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 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." | ||
} | ||
}, | ||
"x-ms-pageable": { | ||
"nextLinkName": "nextLink" | ||
}, | ||
"x-ms-examples": { | ||
"Get the short term retention policy for the database.": { | ||
"$ref": "./examples/ListShortTermRetentionPoliciesByDatabase.json" | ||
} | ||
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}": { | ||
"get": { | ||
"tags": [ | ||
"BackupShortTermRetentionPolicies" | ||
], | ||
"description": "Gets a database's short term retention policy.", | ||
"operationId": "BackupShortTermRetentionPolicies_Get", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../common/v1/types.json#/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": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Successfully retrieved the policy.", | ||
"schema": { | ||
"$ref": "#/definitions/BackupShortTermRetentionPolicy" | ||
} | ||
}, | ||
"default": { | ||
"description": "*** Error Responses: ***\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 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\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": [ | ||
"BackupShortTermRetentionPolicies" | ||
], | ||
"description": "Updates a database's short term retention policy.", | ||
"operationId": "BackupShortTermRetentionPolicies_CreateOrUpdate", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../common/v1/types.json#/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/BackupShortTermRetentionPolicy" | ||
} | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Successfully updated the policy.", | ||
"schema": { | ||
"$ref": "#/definitions/BackupShortTermRetentionPolicy" | ||
} | ||
}, | ||
"default": { | ||
"description": "*** Error Responses: ***\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 * 400 InvalidDiffBackupIntervalHours - The differential backup interval hours of {0} is not a valid configuration. Valid differential backup interval must be {1} hours.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 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": [ | ||
"BackupShortTermRetentionPolicies" | ||
], | ||
"description": "Updates a database's short term retention policy.", | ||
"operationId": "BackupShortTermRetentionPolicies_Update", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../common/v1/types.json#/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/BackupShortTermRetentionPolicy" | ||
} | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Successfully updated the policy.", | ||
"schema": { | ||
"$ref": "#/definitions/BackupShortTermRetentionPolicy" | ||
} | ||
}, | ||
"default": { | ||
"description": "*** Error Responses: ***\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 * 400 InvalidDiffBackupIntervalHours - The differential backup interval hours of {0} is not a valid configuration. Valid differential backup interval must be {1} hours.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 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" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"BackupShortTermRetentionPolicy": { | ||
"description": "A short term retention policy.", | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "../../../common/v1/types.json#/definitions/ProxyResource" | ||
} | ||
], | ||
"properties": { | ||
"properties": { | ||
"$ref": "#/definitions/BackupShortTermRetentionPolicyProperties", | ||
"description": "Resource properties.", | ||
"x-ms-client-flatten": true | ||
} | ||
} | ||
}, | ||
"BackupShortTermRetentionPolicyListResult": { | ||
"description": "A list of short term retention policies.", | ||
"type": "object", | ||
"properties": { | ||
"value": { | ||
"description": "Array of results.", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/BackupShortTermRetentionPolicy" | ||
}, | ||
"readOnly": true | ||
}, | ||
"nextLink": { | ||
"description": "Link to retrieve next page of results.", | ||
"type": "string", | ||
"readOnly": true | ||
} | ||
} | ||
}, | ||
"BackupShortTermRetentionPolicyProperties": { | ||
"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" | ||
}, | ||
"diffBackupIntervalInHours": { | ||
"format": "int32", | ||
"description": "The differential backup interval in hours. This is how many interval hours between each differential backup will be supported. This is only applicable to live databases but not dropped databases.", | ||
"enum": [ | ||
"12", | ||
"24" | ||
], | ||
"type": "integer", | ||
"x-ms-enum": { | ||
"name": "DiffBackupIntervalInHours", | ||
"modelAsString": true | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"parameters": { | ||
"DatabaseNameParameter": { | ||
"name": "databaseName", | ||
"in": "path", | ||
"description": "The name of the database.", | ||
"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" | ||
} | ||
}, | ||
"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" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.