ManagedBackupShortTermRetentionPoliciesOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:managed_backup_short_term_retention_policies> attribute.
Constructor
ManagedBackupShortTermRetentionPoliciesOperations(*args, **kwargs)
Methods
| begin_create_or_update |
Updates a managed database's short term retention policy. |
| begin_update |
Updates a managed database's short term retention policy. |
| get |
Gets a managed database's short term retention policy. |
| list_by_database |
Gets a managed database's short term retention policy list. |
begin_create_or_update
Updates a managed database's short term retention policy.
begin_create_or_update(resource_group_name: str, managed_instance_name: str, database_name: str, policy_name: str | _models.ManagedShortTermRetentionPolicyName, parameters: _models.ManagedBackupShortTermRetentionPolicy, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.ManagedBackupShortTermRetentionPolicy]
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. |
|
managed_instance_name
Required
|
The name of the managed instance. 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 ManagedBackupShortTermRetentionPolicy type or a IO[bytes] type. Required. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns either ManagedBackupShortTermRetentionPolicy or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
begin_update
Updates a managed database's short term retention policy.
begin_update(resource_group_name: str, managed_instance_name: str, database_name: str, policy_name: str | _models.ManagedShortTermRetentionPolicyName, parameters: _models.ManagedBackupShortTermRetentionPolicy, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.ManagedBackupShortTermRetentionPolicy]
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. |
|
managed_instance_name
Required
|
The name of the managed instance. 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 ManagedBackupShortTermRetentionPolicy type or a IO[bytes] type. Required. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns either ManagedBackupShortTermRetentionPolicy or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
get
Gets a managed database's short term retention policy.
get(resource_group_name: str, managed_instance_name: str, database_name: str, policy_name: str | ManagedShortTermRetentionPolicyName, **kwargs: Any) -> ManagedBackupShortTermRetentionPolicy
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. |
|
managed_instance_name
Required
|
The name of the managed instance. Required. |
|
database_name
Required
|
The name of the database. Required. |
|
policy_name
Required
|
The policy name. "default" Required. |
Returns
| Type | Description |
|---|---|
|
ManagedBackupShortTermRetentionPolicy or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
list_by_database
Gets a managed database's short term retention policy list.
list_by_database(resource_group_name: str, managed_instance_name: str, database_name: str, **kwargs: Any) -> ItemPaged[ManagedBackupShortTermRetentionPolicy]
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. |
|
managed_instance_name
Required
|
The name of the managed instance. Required. |
|
database_name
Required
|
The name of the database. Required. |
Returns
| Type | Description |
|---|---|
|
An iterator like instance of either ManagedBackupShortTermRetentionPolicy 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'>