Skip to content

Commit

Permalink
Rebase Microsoft.SQL in Main Branch (#18428)
Browse files Browse the repository at this point in the history
* Adds base for updating Microsoft.Sql from version preview/2021-08-01-preview to version 2021-11-01-preview

* Updates readme

* Updates API version in new specs and examples

* update sql default tag to composite-v5 (#17143)

* Updated Blob Auditing API Files (#17355)

* Updated Blob Auditing API Files

* Fixed new property name case

* fixing x-ms-enum lint warning

Co-authored-by: Mukesh Dogra <[email protected]>

* Adding swagger for endpoint certificates (#17156)

* Adding swagger for endpoint certificates

* Fix the year

* Fix build error on the pull request

* Microsoft.Sql - adding Database and Server AdvancedThreatProtection APIs (#17881)

* Microsoft.Sql - adding Database and Server AdvancedThreatProtection APIs

* Fix to Swagger ModelValidation failures

* Removing the 201 from Database Upsert operation since it is not a long running operation.

* Change the name of the API to AdvancedThreatProtectionSettings

* Fix to the renaming to AdvancedThreatProtectionSettings

* Remove old files

* Adding ManagedServerDnsAliases API endpoints (#18008)

* change

* Update readme.md

* error 201

* Revert "Update readme.md"

This reverts commit ceff39a.

* Revert "error 201"

This reverts commit 759fa4f.

* Fixed bad reverts

Co-authored-by: Ji Wang <[email protected]>

* Add 201 response example so SQL clients can work correctly (#18121)

* Add examples for cross sub restore (#18135)

* Release Microsoft.sql 2021 11 01 preview (#18005)

* update swagger files and example files

* update readme.md

* address the pipeline error.

* update the reference.

* address the pipeline error

* address x-ms-secret comments

* update error message

* revert the deleted legacy files; avoid breaking changes.

* remove example files and reference.

* remove secret

* Adds base for updating Microsoft.Sql from version preview/2021-08-01-preview to version 2021-11-01-preview

* Updates readme

* Updates API version in new specs and examples

* update sql default tag to composite-v5 (#17143)

* Updated Blob Auditing API Files (#17355)

* Updated Blob Auditing API Files

* Fixed new property name case

* fixing x-ms-enum lint warning

Co-authored-by: Mukesh Dogra <[email protected]>

* Adding swagger for endpoint certificates (#17156)

* Adding swagger for endpoint certificates

* Fix the year

* Fix build error on the pull request

* Microsoft.Sql - adding Database and Server AdvancedThreatProtection APIs (#17881)

* Microsoft.Sql - adding Database and Server AdvancedThreatProtection APIs

* Fix to Swagger ModelValidation failures

* Removing the 201 from Database Upsert operation since it is not a long running operation.

* Change the name of the API to AdvancedThreatProtectionSettings

* Fix to the renaming to AdvancedThreatProtectionSettings

* Remove old files

* update swagger files and example files

* update readme.md

* address the pipeline error.

* resolove the conflict

* address the pipeline error

* address x-ms-secret comments

* update error message

* revert the deleted legacy files; avoid breaking changes.

* remove example files and reference.

* remove secret

Co-authored-by: Zhenglai Zhang <[email protected]>
Co-authored-by: msdogra <[email protected]>
Co-authored-by: Mukesh Dogra <[email protected]>
Co-authored-by: srmarkov <[email protected]>
Co-authored-by: Uriel Cohen <[email protected]>
Co-authored-by: Marko Nikolic <[email protected]>
Co-authored-by: Andrija Cicovic <[email protected]>
Co-authored-by: Ishan Rajesh Madan <[email protected]>
  • Loading branch information
9 people authored and visingl committed Mar 30, 2022
1 parent d791154 commit c4f919c
Show file tree
Hide file tree
Showing 648 changed files with 73,966 additions and 49 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,345 @@
{
"swagger": "2.0",
"info": {
"version": "2021-11-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"
}
}
}
}
Loading

0 comments on commit c4f919c

Please sign in to comment.