{ "swagger": "2.0", "info": { "title": "SqlManagementClient", "version": "2025-01-01", "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.", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "host": "management.azure.com", "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "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" } } }, "tags": [ { "name": "ManagedBackupShortTermRetentionPolicies" } ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies": { "get": { "operationId": "ManagedBackupShortTermRetentionPolicies_ListByDatabase", "tags": [ "ManagedBackupShortTermRetentionPolicies" ], "description": "Gets a managed database's short term retention policy list.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "databaseName", "in": "path", "description": "The name of the database.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "./common.json#/definitions/ManagedBackupShortTermRetentionPolicyListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get the short term retention policy list for the database.": { "$ref": "./examples/GetListManagedShortTermRetentionPolicy.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}": { "get": { "operationId": "ManagedBackupShortTermRetentionPolicies_Get", "tags": [ "ManagedBackupShortTermRetentionPolicies" ], "description": "Gets a managed database's short term retention policy.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "databaseName", "in": "path", "description": "The name of the database.", "required": true, "type": "string" }, { "name": "policyName", "in": "path", "description": "The policy name.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "ManagedShortTermRetentionPolicyName", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "./common.json#/definitions/ManagedBackupShortTermRetentionPolicy" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get the short term retention policy for the database.": { "$ref": "./examples/GetManagedShortTermRetentionPolicy.json" } } }, "put": { "operationId": "ManagedBackupShortTermRetentionPolicies_CreateOrUpdate", "tags": [ "ManagedBackupShortTermRetentionPolicies" ], "description": "Updates a managed database's short term retention policy.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "databaseName", "in": "path", "description": "The name of the database.", "required": true, "type": "string" }, { "name": "policyName", "in": "path", "description": "The policy name.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "ManagedShortTermRetentionPolicyName", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } }, { "name": "parameters", "in": "body", "description": "The short term retention policy info.", "required": true, "schema": { "$ref": "./common.json#/definitions/ManagedBackupShortTermRetentionPolicy" } } ], "responses": { "200": { "description": "Resource 'ManagedBackupShortTermRetentionPolicy' update operation succeeded", "schema": { "$ref": "./common.json#/definitions/ManagedBackupShortTermRetentionPolicy" } }, "202": { "description": "Resource operation accepted.", "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Update the short term retention policy for the database.": { "$ref": "./examples/CreateManagedShortTermRetentionPolicy.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location", "final-state-schema": "./common.json#/definitions/ManagedBackupShortTermRetentionPolicy" }, "x-ms-long-running-operation": true }, "patch": { "operationId": "ManagedBackupShortTermRetentionPolicies_Update", "tags": [ "ManagedBackupShortTermRetentionPolicies" ], "description": "Updates a managed database's short term retention policy.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "databaseName", "in": "path", "description": "The name of the database.", "required": true, "type": "string" }, { "name": "policyName", "in": "path", "description": "The policy name.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "ManagedShortTermRetentionPolicyName", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } }, { "name": "parameters", "in": "body", "description": "The short term retention policy info.", "required": true, "schema": { "$ref": "./common.json#/definitions/ManagedBackupShortTermRetentionPolicy" } } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "./common.json#/definitions/ManagedBackupShortTermRetentionPolicy" } }, "202": { "description": "Resource update request accepted.", "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Update the short term retention policy for the database.": { "$ref": "./examples/UpdateManagedShortTermRetentionPolicy.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location", "final-state-schema": "./common.json#/definitions/ManagedBackupShortTermRetentionPolicy" }, "x-ms-long-running-operation": true } } }, "definitions": {}, "parameters": {} }