BackupShortTermRetentionPoliciesOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:backup_short_term_retention_policies> attribute.
Constructor
BackupShortTermRetentionPoliciesOperations(*args, **kwargs)
Methods
| begin_create_or_update |
Updates a database's short term retention policy. |
| begin_update |
Updates a database's short term retention policy. |
| get |
Gets a database's short term retention policy. |
| list_by_database |
Gets a database's short term retention policy. |
begin_create_or_update
Updates a database's short term retention policy.
begin_create_or_update(resource_group_name: str, server_name: str, database_name: str, policy_name: str | _models.ShortTermRetentionPolicyName, parameters: _models.BackupShortTermRetentionPolicy, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.BackupShortTermRetentionPolicy]
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. Required. |
|
server_name
Required
|
The name of the server. Required. |
|
database_name
Required
|
The name of the database. Required. |
|
policy_name
Required
|
The policy name. Should always be "default". "default" Required. |
|
parameters
Required
|
The short term retention policy info. Is either a BackupShortTermRetentionPolicy type or a IO[bytes] type. Required. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns either BackupShortTermRetentionPolicy or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
begin_update
Updates a database's short term retention policy.
begin_update(resource_group_name: str, server_name: str, database_name: str, policy_name: str | _models.ShortTermRetentionPolicyName, parameters: _models.BackupShortTermRetentionPolicy, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.BackupShortTermRetentionPolicy]
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. Required. |
|
server_name
Required
|
The name of the server. Required. |
|
database_name
Required
|
The name of the database. Required. |
|
policy_name
Required
|
The policy name. Should always be "default". "default" Required. |
|
parameters
Required
|
The short term retention policy info. Is either a BackupShortTermRetentionPolicy type or a IO[bytes] type. Required. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns either BackupShortTermRetentionPolicy or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
get
Gets a database's short term retention policy.
get(resource_group_name: str, server_name: str, database_name: str, policy_name: str | ShortTermRetentionPolicyName, **kwargs: Any) -> BackupShortTermRetentionPolicy
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. Required. |
|
server_name
Required
|
The name of the server. Required. |
|
database_name
Required
|
The name of the database. Required. |
|
policy_name
Required
|
The policy name. Should always be "default". "default" Required. |
Returns
| Type | Description |
|---|---|
|
BackupShortTermRetentionPolicy or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
list_by_database
Gets a database's short term retention policy.
list_by_database(resource_group_name: str, server_name: str, database_name: str, **kwargs: Any) -> ItemPaged[BackupShortTermRetentionPolicy]
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. Required. |
|
server_name
Required
|
The name of the server. Required. |
|
database_name
Required
|
The name of the database. Required. |
Returns
| Type | Description |
|---|---|
|
An iterator like instance of either BackupShortTermRetentionPolicy or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
Attributes
models
models = <module 'azure.mgmt.sql.models' from 'C:\\ToolCache\\Python\\3.12.10\\x64\\Lib\\site-packages\\py2docfx\\venv\\venv268\\Lib\\site-packages\\azure\\mgmt\\sql\\models\\__init__.py'>