GeoBackupPoliciesOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:geo_backup_policies> attribute.
Constructor
GeoBackupPoliciesOperations(*args, **kwargs)
Methods
| create_or_update |
Updates a database geo backup policy. |
| get |
Gets a geo backup policy. |
| list_by_database |
Returns a list of geo backup policies. |
create_or_update
Updates a database geo backup policy.
async create_or_update(resource_group_name: str, server_name: str, database_name: str, geo_backup_policy_name: str | _models.GeoBackupPolicyName, parameters: _models.GeoBackupPolicy, *, content_type: str = 'application/json', **kwargs: Any) -> _models.GeoBackupPolicy
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. |
|
geo_backup_policy_name
Required
|
The name of the geo backup policy. "Default" Required. |
|
parameters
Required
|
The required parameters for creating or updating the geo backup policy. Is either a GeoBackupPolicy type or a IO[bytes] type. Required. |
Returns
| Type | Description |
|---|---|
|
GeoBackupPolicy or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
get
Gets a geo backup policy.
async get(resource_group_name: str, server_name: str, database_name: str, geo_backup_policy_name: str | GeoBackupPolicyName, **kwargs: Any) -> GeoBackupPolicy
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. |
|
geo_backup_policy_name
Required
|
The name of the geo backup policy. "Default" Required. |
Returns
| Type | Description |
|---|---|
|
GeoBackupPolicy or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
list_by_database
Returns a list of geo backup policies.
list_by_database(resource_group_name: str, server_name: str, database_name: str, **kwargs: Any) -> AsyncItemPaged[GeoBackupPolicy]
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 GeoBackupPolicy 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'>