LongTermRetentionBackupsOperations Class
LongTermRetentionBackupsOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
- Inheritance
-
builtins.objectLongTermRetentionBackupsOperations
Constructor
LongTermRetentionBackupsOperations(client, config, serializer, deserializer)
Parameters
Name | Description |
---|---|
client
Required
|
Client for service requests. |
config
Required
|
Configuration of service client. |
serializer
Required
|
An object model serializer. |
deserializer
Required
|
An object model deserializer. |
Variables
Name | Description |
---|---|
models
|
Alias to model classes used in this operation group. |
Methods
begin_copy |
Copy an existing long term retention backup. |
begin_copy_by_resource_group |
Copy an existing long term retention backup to a different server. |
begin_delete |
Deletes a long term retention backup. |
begin_delete_by_resource_group |
Deletes a long term retention backup. |
begin_update |
Updates an existing long term retention backup. |
begin_update_by_resource_group |
Updates an existing long term retention backup. |
get |
Gets a long term retention backup. |
get_by_resource_group |
Gets a long term retention backup. |
list_by_database |
Lists all long term retention backups for a database. |
list_by_location |
Lists the long term retention backups for a given location. |
list_by_resource_group_database |
Lists all long term retention backups for a database. |
list_by_resource_group_location |
Lists the long term retention backups for a given location. |
list_by_resource_group_server |
Lists the long term retention backups for a given server. |
list_by_server |
Lists the long term retention backups for a given server. |
begin_copy
Copy an existing long term retention backup.
async begin_copy(location_name: str, long_term_retention_server_name: str, long_term_retention_database_name: str, backup_name: str, parameters: CopyLongTermRetentionBackupParameters, **kwargs: Any) -> AsyncLROPoller[LongTermRetentionBackupOperationResult]
Parameters
Name | Description |
---|---|
location_name
Required
|
The location of the database. |
long_term_retention_server_name
Required
|
The name of the server. |
long_term_retention_database_name
Required
|
The name of the database. |
backup_name
Required
|
The backup name. |
parameters
Required
|
The parameters needed for long term retention copy request. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
continuation_token
|
A continuation token to restart a poller from a saved state. |
polling
|
By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. |
polling_interval
|
Default waiting time between two polls for LRO operations if no Retry-After header is present. |
Returns
Type | Description |
---|---|
An instance of AsyncLROPoller that returns either LongTermRetentionBackupOperationResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_copy_by_resource_group
Copy an existing long term retention backup to a different server.
async begin_copy_by_resource_group(resource_group_name: str, location_name: str, long_term_retention_server_name: str, long_term_retention_database_name: str, backup_name: str, parameters: CopyLongTermRetentionBackupParameters, **kwargs: Any) -> AsyncLROPoller[LongTermRetentionBackupOperationResult]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
location_name
Required
|
The location of the database. |
long_term_retention_server_name
Required
|
The name of the server. |
long_term_retention_database_name
Required
|
The name of the database. |
backup_name
Required
|
The backup name. |
parameters
Required
|
The parameters needed for long term retention copy request. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
continuation_token
|
A continuation token to restart a poller from a saved state. |
polling
|
By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. |
polling_interval
|
Default waiting time between two polls for LRO operations if no Retry-After header is present. |
Returns
Type | Description |
---|---|
An instance of AsyncLROPoller that returns either LongTermRetentionBackupOperationResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_delete
Deletes a long term retention backup.
async begin_delete(location_name: str, long_term_retention_server_name: str, long_term_retention_database_name: str, backup_name: str, **kwargs: Any) -> AsyncLROPoller[None]
Parameters
Name | Description |
---|---|
location_name
Required
|
The location of the database. |
long_term_retention_server_name
Required
|
The name of the server. |
long_term_retention_database_name
Required
|
The name of the database. |
backup_name
Required
|
The backup name. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
continuation_token
|
A continuation token to restart a poller from a saved state. |
polling
|
By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. |
polling_interval
|
Default waiting time between two polls for LRO operations if no Retry-After header is present. |
Returns
Type | Description |
---|---|
An instance of AsyncLROPoller that returns either None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_delete_by_resource_group
Deletes a long term retention backup.
async begin_delete_by_resource_group(resource_group_name: str, location_name: str, long_term_retention_server_name: str, long_term_retention_database_name: str, backup_name: str, **kwargs: Any) -> AsyncLROPoller[None]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
location_name
Required
|
The location of the database. |
long_term_retention_server_name
Required
|
The name of the server. |
long_term_retention_database_name
Required
|
The name of the database. |
backup_name
Required
|
The backup name. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
continuation_token
|
A continuation token to restart a poller from a saved state. |
polling
|
By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. |
polling_interval
|
Default waiting time between two polls for LRO operations if no Retry-After header is present. |
Returns
Type | Description |
---|---|
An instance of AsyncLROPoller that returns either None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_update
Updates an existing long term retention backup.
async begin_update(location_name: str, long_term_retention_server_name: str, long_term_retention_database_name: str, backup_name: str, parameters: UpdateLongTermRetentionBackupParameters, **kwargs: Any) -> AsyncLROPoller[LongTermRetentionBackupOperationResult]
Parameters
Name | Description |
---|---|
location_name
Required
|
The location of the database. |
long_term_retention_server_name
Required
|
The name of the server. |
long_term_retention_database_name
Required
|
The name of the database. |
backup_name
Required
|
The backup name. |
parameters
Required
|
The requested backup resource state. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
continuation_token
|
A continuation token to restart a poller from a saved state. |
polling
|
By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. |
polling_interval
|
Default waiting time between two polls for LRO operations if no Retry-After header is present. |
Returns
Type | Description |
---|---|
An instance of AsyncLROPoller that returns either LongTermRetentionBackupOperationResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_update_by_resource_group
Updates an existing long term retention backup.
async begin_update_by_resource_group(resource_group_name: str, location_name: str, long_term_retention_server_name: str, long_term_retention_database_name: str, backup_name: str, parameters: UpdateLongTermRetentionBackupParameters, **kwargs: Any) -> AsyncLROPoller[LongTermRetentionBackupOperationResult]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
location_name
Required
|
The location of the database. |
long_term_retention_server_name
Required
|
The name of the server. |
long_term_retention_database_name
Required
|
The name of the database. |
backup_name
Required
|
The backup name. |
parameters
Required
|
The requested backup resource state. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
continuation_token
|
A continuation token to restart a poller from a saved state. |
polling
|
By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. |
polling_interval
|
Default waiting time between two polls for LRO operations if no Retry-After header is present. |
Returns
Type | Description |
---|---|
An instance of AsyncLROPoller that returns either LongTermRetentionBackupOperationResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get
Gets a long term retention backup.
async get(location_name: str, long_term_retention_server_name: str, long_term_retention_database_name: str, backup_name: str, **kwargs: Any) -> LongTermRetentionBackup
Parameters
Name | Description |
---|---|
location_name
Required
|
The location of the database. |
long_term_retention_server_name
Required
|
The name of the server. |
long_term_retention_database_name
Required
|
The name of the database. |
backup_name
Required
|
The backup name. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
LongTermRetentionBackup, or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get_by_resource_group
Gets a long term retention backup.
async get_by_resource_group(resource_group_name: str, location_name: str, long_term_retention_server_name: str, long_term_retention_database_name: str, backup_name: str, **kwargs: Any) -> LongTermRetentionBackup
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
location_name
Required
|
The location of the database. |
long_term_retention_server_name
Required
|
The name of the server. |
long_term_retention_database_name
Required
|
The name of the database. |
backup_name
Required
|
The backup name. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
LongTermRetentionBackup, or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_by_database
Lists all long term retention backups for a database.
list_by_database(location_name: str, long_term_retention_server_name: str, long_term_retention_database_name: str, only_latest_per_database: bool | None = None, database_state: str | DatabaseState | None = None, **kwargs: Any) -> AsyncIterable[LongTermRetentionBackupListResult]
Parameters
Name | Description |
---|---|
location_name
Required
|
The location of the database. |
long_term_retention_server_name
Required
|
The name of the server. |
long_term_retention_database_name
Required
|
The name of the database. |
only_latest_per_database
|
Whether or not to only get the latest backup for each database. Default value: None
|
database_state
|
str or
DatabaseState
Whether to query against just live databases, just deleted databases, or all databases. Default value: None
|
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either LongTermRetentionBackupListResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_by_location
Lists the long term retention backups for a given location.
list_by_location(location_name: str, only_latest_per_database: bool | None = None, database_state: str | DatabaseState | None = None, **kwargs: Any) -> AsyncIterable[LongTermRetentionBackupListResult]
Parameters
Name | Description |
---|---|
location_name
Required
|
The location of the database. |
only_latest_per_database
|
Whether or not to only get the latest backup for each database. Default value: None
|
database_state
|
str or
DatabaseState
Whether to query against just live databases, just deleted databases, or all databases. Default value: None
|
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either LongTermRetentionBackupListResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_by_resource_group_database
Lists all long term retention backups for a database.
list_by_resource_group_database(resource_group_name: str, location_name: str, long_term_retention_server_name: str, long_term_retention_database_name: str, only_latest_per_database: bool | None = None, database_state: str | DatabaseState | None = None, **kwargs: Any) -> AsyncIterable[LongTermRetentionBackupListResult]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
location_name
Required
|
The location of the database. |
long_term_retention_server_name
Required
|
The name of the server. |
long_term_retention_database_name
Required
|
The name of the database. |
only_latest_per_database
|
Whether or not to only get the latest backup for each database. Default value: None
|
database_state
|
str or
DatabaseState
Whether to query against just live databases, just deleted databases, or all databases. Default value: None
|
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either LongTermRetentionBackupListResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_by_resource_group_location
Lists the long term retention backups for a given location.
list_by_resource_group_location(resource_group_name: str, location_name: str, only_latest_per_database: bool | None = None, database_state: str | DatabaseState | None = None, **kwargs: Any) -> AsyncIterable[LongTermRetentionBackupListResult]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
location_name
Required
|
The location of the database. |
only_latest_per_database
|
Whether or not to only get the latest backup for each database. Default value: None
|
database_state
|
str or
DatabaseState
Whether to query against just live databases, just deleted databases, or all databases. Default value: None
|
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either LongTermRetentionBackupListResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_by_resource_group_server
Lists the long term retention backups for a given server.
list_by_resource_group_server(resource_group_name: str, location_name: str, long_term_retention_server_name: str, only_latest_per_database: bool | None = None, database_state: str | DatabaseState | None = None, **kwargs: Any) -> AsyncIterable[LongTermRetentionBackupListResult]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
location_name
Required
|
The location of the database. |
long_term_retention_server_name
Required
|
The name of the server. |
only_latest_per_database
|
Whether or not to only get the latest backup for each database. Default value: None
|
database_state
|
str or
DatabaseState
Whether to query against just live databases, just deleted databases, or all databases. Default value: None
|
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either LongTermRetentionBackupListResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_by_server
Lists the long term retention backups for a given server.
list_by_server(location_name: str, long_term_retention_server_name: str, only_latest_per_database: bool | None = None, database_state: str | DatabaseState | None = None, **kwargs: Any) -> AsyncIterable[LongTermRetentionBackupListResult]
Parameters
Name | Description |
---|---|
location_name
Required
|
The location of the database. |
long_term_retention_server_name
Required
|
The name of the server. |
only_latest_per_database
|
Whether or not to only get the latest backup for each database. Default value: None
|
database_state
|
str or
DatabaseState
Whether to query against just live databases, just deleted databases, or all databases. Default value: None
|
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either LongTermRetentionBackupListResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.sql.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\sql\\models\\__init__.py'>
Azure SDK for Python