UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 15.1 kB
{"openapi":"3.0.0","info":{"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.","title":"SqlManagementClient","version":"2017-10-01-preview","x-apisguru-categories":["cloud"],"x-logo":{"url":"https://assets.onestore.ms/cdnfiles/onestorerolling-1606-01000/shell/v3/images/logo/microsoft.png"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json","version":"2.0"}],"x-providerName":"azure.com","x-serviceName":"sql-shortTermRetentionPolicies","x-tags":["Azure","Microsoft"]},"paths":{"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies":{"get":{"description":"Gets a database's short term retention policy.","operationId":"BackupShortTermRetentionPolicies_ListByDatabase","parameters":[{"$ref":"#/components/parameters/ResourceGroupParameter"},{"$ref":"#/components/parameters/ServerNameParameter"},{"$ref":"#/components/parameters/DatabaseNameParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"responses":{"200":{"description":"Successfully retrieved the policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupShortTermRetentionPolicyListResult"},"examples":{"Get the short term retention policy for the database.":{"$ref":"#/components/examples/Get_the_short_term_retention_policy_for_the_database."}}}}},"default":{"description":"*** Error Responses: ***\n\n * 400 InvalidBackupRetentionDays - The retention days of {0} is not a valid configuration. Valid backup retention must be in 7-day increments (7, 14, 21, etc.)\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."}},"tags":["BackupShortTermRetentionPolicies"],"x-ms-pageable":{"nextLinkName":"nextLink"}}},"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}":{"get":{"description":"Gets a database's short term retention policy.","operationId":"BackupShortTermRetentionPolicies_Get","parameters":[{"$ref":"#/components/parameters/ResourceGroupParameter"},{"$ref":"#/components/parameters/ServerNameParameter"},{"$ref":"#/components/parameters/DatabaseNameParameter"},{"description":"The policy name. Should always be \"default\".","in":"path","name":"policyName","required":true,"x-ms-enum":{"modelAsString":true,"name":"ShortTermRetentionPolicyName"},"schema":{"type":"string","enum":["default"]},"examples":{"Get the short term retention policy for the database.":{"value":"default"}}},{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"responses":{"200":{"description":"Successfully retrieved the policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupShortTermRetentionPolicy"},"examples":{"Get the short term retention policy for the database.":{"$ref":"#/components/examples/Get_the_short_term_retention_policy_for_the_database."}}}}},"default":{"description":"*** Error Responses: ***\n\n * 400 InvalidBackupRetentionDays - The retention days of {0} is not a valid configuration. Valid backup retention must be in 7-day increments (7, 14, 21, etc.)\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."}},"tags":["BackupShortTermRetentionPolicies"]},"patch":{"description":"Updates a database's short term retention policy.","operationId":"BackupShortTermRetentionPolicies_Update","parameters":[{"$ref":"#/components/parameters/ResourceGroupParameter"},{"$ref":"#/components/parameters/ServerNameParameter"},{"$ref":"#/components/parameters/DatabaseNameParameter"},{"description":"The policy name. Should always be \"default\".","in":"path","name":"policyName","required":true,"x-ms-enum":{"modelAsString":true,"name":"ShortTermRetentionPolicyName"},"schema":{"type":"string","enum":["default"]},"examples":{"Update the short term retention policy for the database.":{"value":"default"}}},{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"requestBody":{"$ref":"#/components/requestBodies/BackupShortTermRetentionPolicy"},"responses":{"200":{"description":"Successfully updated the policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupShortTermRetentionPolicy"},"examples":{"Update the short term retention policy for the database.":{"$ref":"#/components/examples/Update_the_short_term_retention_policy_for_the_database."}}}}},"202":{"description":"Accepted"},"default":{"description":"*** Error Responses: ***\n\n * 400 InvalidBackupRetentionDays - The retention days of {0} is not a valid configuration. Valid backup retention must be in 7-day increments (7, 14, 21, etc.)\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 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."}},"tags":["BackupShortTermRetentionPolicies"],"x-ms-long-running-operation":true},"put":{"description":"Updates a database's short term retention policy.","operationId":"BackupShortTermRetentionPolicies_CreateOrUpdate","parameters":[{"$ref":"#/components/parameters/ResourceGroupParameter"},{"$ref":"#/components/parameters/ServerNameParameter"},{"$ref":"#/components/parameters/DatabaseNameParameter"},{"description":"The policy name. Should always be \"default\".","in":"path","name":"policyName","required":true,"x-ms-enum":{"modelAsString":true,"name":"ShortTermRetentionPolicyName"},"schema":{"type":"string","enum":["default"]},"examples":{"Update the short term retention policy for the database.":{"value":"default"}}},{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"requestBody":{"$ref":"#/components/requestBodies/BackupShortTermRetentionPolicy"},"responses":{"200":{"description":"Successfully updated the policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupShortTermRetentionPolicy"},"examples":{"Update the short term retention policy for the database.":{"$ref":"#/components/examples/Update_the_short_term_retention_policy_for_the_database."}}}}},"202":{"description":"Accepted"},"default":{"description":"*** Error Responses: ***\n\n * 400 InvalidBackupRetentionDays - The retention days of {0} is not a valid configuration. Valid backup retention must be in 7-day increments (7, 14, 21, etc.)\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 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."}},"tags":["BackupShortTermRetentionPolicies"],"x-ms-long-running-operation":true}}},"servers":[{"url":"https://management.azure.com"}],"components":{"examples":{"Get_the_short_term_retention_policy_for_the_database.":{"value":{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/backupShortTermRetentionPolicies/default","name":"default","properties":{"retentionDays":14},"type":"Microsoft.Sql/locations/servers/databases/backupShortTermRetentionPolicies"}},"Update_the_short_term_retention_policy_for_the_database.":{"value":{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testsvr/databases/testdb/backupLongTermRetentionPolicies/default","name":"default","properties":{"retentionDays":14},"type":"Microsoft.Sql/locations/servers/databases/backupShortTermRetentionPolicies"}}},"parameters":{"ApiVersionParameter":{"description":"The API version to use for the request.","in":"query","name":"api-version","required":true,"x-ms-parameter-location":"client","schema":{"type":"string"},"examples":{"Get the short term retention policy for the database.":{"value":"2017-10-01-preview"},"Update the short term retention policy for the database.":{"value":"2017-10-01-preview"}}},"BlobAuditingPolicyNameParameter":{"description":"The name of the blob auditing policy.","in":"path","name":"blobAuditingPolicyName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","enum":["default"]}},"DatabaseNameParameter":{"description":"The name of the database.","in":"path","name":"databaseName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"Get the short term retention policy for the database.":{"value":"testdb"},"Update the short term retention policy for the database.":{"value":"testdb"}}},"ManagedInstanceNameParameter":{"description":"The name of the managed instance.","in":"path","name":"managedInstanceName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"}},"ResourceGroupParameter":{"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.","in":"path","name":"resourceGroupName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"Get the short term retention policy for the database.":{"value":"Default-SQL-SouthEastAsia"},"Update the short term retention policy for the database.":{"value":"resourceGroup"}}},"ServerNameParameter":{"description":"The name of the server.","in":"path","name":"serverName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"Get the short term retention policy for the database.":{"value":"testsvr"},"Update the short term retention policy for the database.":{"value":"testsvr"}}},"SqlVirtualMachineContainerNameParameter":{"description":"The name of the SqlVirtualMachineContainer.","in":"path","name":"sqlVirtualMachineContainerName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"}},"SqlVirtualMachineInstanceNameParameter":{"description":"The name of the SqlVirtualMachineInstance.","in":"path","name":"sqlVirtualMachineInstanceName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"}},"SubscriptionIdParameter":{"description":"The subscription ID that identifies an Azure subscription.","in":"path","name":"subscriptionId","required":true,"x-ms-parameter-location":"client","schema":{"type":"string"},"examples":{"Get the short term retention policy for the database.":{"value":"00000000-1111-2222-3333-444444444444"},"Update the short term retention policy for the database.":{"value":"00000000-1111-2222-3333-444444444444"}}},"VirtualClusterNameParameter":{"description":"The name of the virtual cluster.","in":"path","name":"virtualClusterName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"}}},"requestBodies":{"BackupShortTermRetentionPolicy":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupShortTermRetentionPolicy"}}},"description":"The short term retention policy info.","required":true}},"securitySchemes":{"azure_auth":{"description":"Azure Active Directory OAuth2 Flow","type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://login.microsoftonline.com/common/oauth2/authorize","scopes":{"user_impersonation":"impersonate your user account"}}}}},"schemas":{"BackupShortTermRetentionPolicy":{"allOf":[{"allOf":[{"description":"ARM resource.","properties":{"id":{"description":"Resource ID.","readOnly":true,"type":"string"},"name":{"description":"Resource name.","readOnly":true,"type":"string"},"type":{"description":"Resource type.","readOnly":true,"type":"string"}},"type":"object","x-ms-azure-resource":true}],"description":"ARM proxy resource.","properties":{},"type":"object"}],"description":"A short term retention policy.","properties":{"properties":{"$ref":"#/components/schemas/BackupShortTermRetentionPolicyProperties"}},"type":"object"},"BackupShortTermRetentionPolicyListResult":{"description":"A list of short term retention policies.","properties":{"nextLink":{"description":"Link to retrieve next page of results.","readOnly":true,"type":"string"},"value":{"description":"Array of results.","items":{"$ref":"#/components/schemas/BackupShortTermRetentionPolicy"},"readOnly":true,"type":"array"}},"type":"object"},"BackupShortTermRetentionPolicyProperties":{"description":"Properties of a short term retention policy","properties":{"retentionDays":{"description":"The backup retention period in days. This is how many days Point-in-Time Restore will be supported.","format":"int32","type":"integer"}},"type":"object"}}}}