@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api SqlManagementClient
@base https://management.azure.com
@version 2017-03-01-preview
@auth OAuth2
@common_fields {subscriptionId: any # The subscription ID that identifies an Azure subscription., api-version: any # The API version to use for the request.}
@endpoints 13
@toc subscriptions(13)

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}
@desc Gets a long term retention backup.
@required {resourceGroupName: any # The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal., locationName: any # The location of the database., longTermRetentionServerName: any # The name of the server, longTermRetentionDatabaseName: any # The name of the database, backupName: any # The backup name.}
@returns(200) Successfully retrieved the backup.

@endpoint DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}
@desc Deletes a long term retention backup.
@required {resourceGroupName: any # The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal., locationName: any # The location of the database, longTermRetentionServerName: any # The name of the server, longTermRetentionDatabaseName: any # The name of the database, backupName: any # The backup name.}
@returns(200) Successfully deleted the backup.
@returns(202) Accepted

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups
@desc Lists all long term retention backups for a database.
@required {resourceGroupName: any # The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal., locationName: any # The location of the database, longTermRetentionServerName: any # The name of the server, longTermRetentionDatabaseName: any # The name of the database}
@optional {onlyLatestPerDatabase: any # Whether or not to only get the latest backup for each database., databaseState: any # Whether to query against just live databases, just deleted databases, or all databases.}
@returns(200) Successfully retrieved the list of backups.

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups
@desc Lists the long term retention backups for a given location.
@required {resourceGroupName: any # The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal., locationName: any # The location of the database}
@optional {onlyLatestPerDatabase: any # Whether or not to only get the latest backup for each database., databaseState: any # Whether to query against just live databases, just deleted databases, or all databases.}
@returns(200) Successfully retrieved the list of backups.

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups
@desc Lists the long term retention backups for a given server.
@required {resourceGroupName: any # The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal., locationName: any # The location of the database, longTermRetentionServerName: any # The name of the server}
@optional {onlyLatestPerDatabase: any # Whether or not to only get the latest backup for each database., databaseState: any # Whether to query against just live databases, just deleted databases, or all databases.}
@returns(200) Successfully retrieved the list of backups.

@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}
@desc Gets a long term retention backup.
@required {locationName: any # The location of the database., longTermRetentionServerName: any # The name of the server, longTermRetentionDatabaseName: any # The name of the database, backupName: any # The backup name.}
@returns(200) Successfully retrieved the backup.

@endpoint DELETE /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}
@desc Deletes a long term retention backup.
@required {locationName: any # The location of the database, longTermRetentionServerName: any # The name of the server, longTermRetentionDatabaseName: any # The name of the database, backupName: any # The backup name.}
@returns(200) Successfully deleted the backup.
@returns(202) Accepted

@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups
@desc Lists all long term retention backups for a database.
@required {locationName: any # The location of the database, longTermRetentionServerName: any # The name of the server, longTermRetentionDatabaseName: any # The name of the database}
@optional {onlyLatestPerDatabase: any # Whether or not to only get the latest backup for each database., databaseState: any # Whether to query against just live databases, just deleted databases, or all databases.}
@returns(200) Successfully retrieved the list of backups.

@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups
@desc Lists the long term retention backups for a given location.
@required {locationName: any # The location of the database}
@optional {onlyLatestPerDatabase: any # Whether or not to only get the latest backup for each database., databaseState: any # Whether to query against just live databases, just deleted databases, or all databases.}
@returns(200) Successfully retrieved the list of backups.

@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups
@desc Lists the long term retention backups for a given server.
@required {locationName: any # The location of the database, longTermRetentionServerName: any # The name of the server}
@optional {onlyLatestPerDatabase: any # Whether or not to only get the latest backup for each database., databaseState: any # Whether to query against just live databases, just deleted databases, or all databases.}
@returns(200) Successfully retrieved the list of backups.

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}
@desc Gets a database's long term retention policy.
@required {resourceGroupName: any # The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal., serverName: any # The name of the server., databaseName: any # The name of the database., policyName: any # The policy name. Should always be Default.}
@returns(200) Successfully get the policy.

@endpoint PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}
@desc Sets a database's long term retention policy.
@required {resourceGroupName: any # The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal., serverName: any # The name of the server., databaseName: any # The name of the database., policyName: any # The policy name. Should always be Default., parameters: map # The long term retention policy info.}
@returns(200) Successfully set the policy.
@returns(202) Accepted

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies
@desc Gets a database's long term retention policy.
@required {resourceGroupName: any # The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal., serverName: any # The name of the server., databaseName: any # The name of the database.}
@returns(200) Successfully get the policy.

@end
