LongTermRetentionManagedInstanceBackupsOperations Class

LongTermRetentionManagedInstanceBackupsOperations 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.object
LongTermRetentionManagedInstanceBackupsOperations

Constructor

LongTermRetentionManagedInstanceBackupsOperations(client, config, serializer, deserializer)

Parameters

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

models

Alias to model classes used in this operation group.

Methods

begin_delete

Deletes a long term retention backup.

begin_delete_by_resource_group

Deletes a long term retention backup.

get

Gets a long term retention backup for a managed database.

get_by_resource_group

Gets a long term retention backup for a managed database.

list_by_database

Lists all long term retention backups for a managed database.

list_by_instance

Lists the long term retention backups for a given managed instance.

list_by_location

Lists the long term retention backups for managed databases in a given location.

list_by_resource_group_database

Lists all long term retention backups for a managed database.

list_by_resource_group_instance

Lists the long term retention backups for a given managed instance.

list_by_resource_group_location

Lists the long term retention backups for managed databases in a given location.

begin_delete

Deletes a long term retention backup.

begin_delete(location_name: str, managed_instance_name: str, database_name: str, backup_name: str, **kwargs: Any) -> LROPoller[None]

Parameters

location_name
str
Required

The location of the database.

managed_instance_name
str
Required

The name of the managed instance.

database_name
str
Required

The name of the managed database.

backup_name
str
Required

The backup name.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns either None or the result of cls(response)

Return type

Exceptions

begin_delete_by_resource_group

Deletes a long term retention backup.

begin_delete_by_resource_group(resource_group_name: str, location_name: str, managed_instance_name: str, database_name: str, backup_name: str, **kwargs: Any) -> LROPoller[None]

Parameters

resource_group_name
str
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
str
Required

The location of the database.

managed_instance_name
str
Required

The name of the managed instance.

database_name
str
Required

The name of the managed database.

backup_name
str
Required

The backup name.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns either None or the result of cls(response)

Return type

Exceptions

get

Gets a long term retention backup for a managed database.

get(location_name: str, managed_instance_name: str, database_name: str, backup_name: str, **kwargs: Any) -> _models.ManagedInstanceLongTermRetentionBackup

Parameters

location_name
str
Required

The location of the database.

managed_instance_name
str
Required

The name of the managed instance.

database_name
str
Required

The name of the managed database.

backup_name
str
Required

The backup name.

cls
callable

A custom type or function that will be passed the direct response

Returns

ManagedInstanceLongTermRetentionBackup, or the result of cls(response)

Return type

Exceptions

get_by_resource_group

Gets a long term retention backup for a managed database.

get_by_resource_group(resource_group_name: str, location_name: str, managed_instance_name: str, database_name: str, backup_name: str, **kwargs: Any) -> _models.ManagedInstanceLongTermRetentionBackup

Parameters

resource_group_name
str
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
str
Required

The location of the database.

managed_instance_name
str
Required

The name of the managed instance.

database_name
str
Required

The name of the managed database.

backup_name
str
Required

The backup name.

cls
callable

A custom type or function that will be passed the direct response

Returns

ManagedInstanceLongTermRetentionBackup, or the result of cls(response)

Return type

Exceptions

list_by_database

Lists all long term retention backups for a managed database.

list_by_database(location_name: str, managed_instance_name: str, database_name: str, only_latest_per_database: Optional[bool] = None, database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any) -> Iterable[_models.ManagedInstanceLongTermRetentionBackupListResult]

Parameters

location_name
str
Required

The location of the database.

managed_instance_name
str
Required

The name of the managed instance.

database_name
str
Required

The name of the managed database.

only_latest_per_database
bool
default value: None

Whether or not to only get the latest backup for each database.

database_state
str or DatabaseState
default value: None

Whether to query against just live databases, just deleted databases, or all databases.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either ManagedInstanceLongTermRetentionBackupListResult or the result of cls(response)

Return type

Exceptions

list_by_instance

Lists the long term retention backups for a given managed instance.

list_by_instance(location_name: str, managed_instance_name: str, only_latest_per_database: Optional[bool] = None, database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any) -> Iterable[_models.ManagedInstanceLongTermRetentionBackupListResult]

Parameters

location_name
str
Required

The location of the database.

managed_instance_name
str
Required

The name of the managed instance.

only_latest_per_database
bool
default value: None

Whether or not to only get the latest backup for each database.

database_state
str or DatabaseState
default value: None

Whether to query against just live databases, just deleted databases, or all databases.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either ManagedInstanceLongTermRetentionBackupListResult or the result of cls(response)

Return type

Exceptions

list_by_location

Lists the long term retention backups for managed databases in a given location.

list_by_location(location_name: str, only_latest_per_database: Optional[bool] = None, database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any) -> Iterable[_models.ManagedInstanceLongTermRetentionBackupListResult]

Parameters

location_name
str
Required

The location of the database.

only_latest_per_database
bool
default value: None

Whether or not to only get the latest backup for each database.

database_state
str or DatabaseState
default value: None

Whether to query against just live databases, just deleted databases, or all databases.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either ManagedInstanceLongTermRetentionBackupListResult or the result of cls(response)

Return type

Exceptions

list_by_resource_group_database

Lists all long term retention backups for a managed database.

list_by_resource_group_database(resource_group_name: str, location_name: str, managed_instance_name: str, database_name: str, only_latest_per_database: Optional[bool] = None, database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any) -> Iterable[_models.ManagedInstanceLongTermRetentionBackupListResult]

Parameters

resource_group_name
str
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
str
Required

The location of the database.

managed_instance_name
str
Required

The name of the managed instance.

database_name
str
Required

The name of the managed database.

only_latest_per_database
bool
default value: None

Whether or not to only get the latest backup for each database.

database_state
str or DatabaseState
default value: None

Whether to query against just live databases, just deleted databases, or all databases.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either ManagedInstanceLongTermRetentionBackupListResult or the result of cls(response)

Return type

Exceptions

list_by_resource_group_instance

Lists the long term retention backups for a given managed instance.

list_by_resource_group_instance(resource_group_name: str, location_name: str, managed_instance_name: str, only_latest_per_database: Optional[bool] = None, database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any) -> Iterable[_models.ManagedInstanceLongTermRetentionBackupListResult]

Parameters

resource_group_name
str
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
str
Required

The location of the database.

managed_instance_name
str
Required

The name of the managed instance.

only_latest_per_database
bool
default value: None

Whether or not to only get the latest backup for each database.

database_state
str or DatabaseState
default value: None

Whether to query against just live databases, just deleted databases, or all databases.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either ManagedInstanceLongTermRetentionBackupListResult or the result of cls(response)

Return type

Exceptions

list_by_resource_group_location

Lists the long term retention backups for managed databases in a given location.

list_by_resource_group_location(resource_group_name: str, location_name: str, only_latest_per_database: Optional[bool] = None, database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any) -> Iterable[_models.ManagedInstanceLongTermRetentionBackupListResult]

Parameters

resource_group_name
str
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
str
Required

The location of the database.

only_latest_per_database
bool
default value: None

Whether or not to only get the latest backup for each database.

database_state
str or DatabaseState
default value: None

Whether to query against just live databases, just deleted databases, or all databases.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either ManagedInstanceLongTermRetentionBackupListResult or the result of cls(response)

Return type

Exceptions

Attributes

models

models = <module 'azure.mgmt.sql.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\sql\\models\\__init__.py'>