Skip to content

Commit

Permalink
[AutoPR sql/resource-manager] Managed Instance short term retention (#…
Browse files Browse the repository at this point in the history
…3691)

* Generated from 258f894ffb8a75a74b243ba85ceec5e9b8a5b15e

Readme.md change

* Generated from ef601ecdc1fe5ad6fca6074ad521f097e99ac8a5

Merge remote-tracking branch 'origin' into readme

* Generated from ef601ecdc1fe5ad6fca6074ad521f097e99ac8a5

Merge remote-tracking branch 'origin' into readme
  • Loading branch information
AutorestCI authored Nov 7, 2018
1 parent f63e399 commit f314648
Show file tree
Hide file tree
Showing 7 changed files with 542 additions and 0 deletions.
5 changes: 5 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
from .job_version_py3 import JobVersion
from .long_term_retention_backup_py3 import LongTermRetentionBackup
from .backup_long_term_retention_policy_py3 import BackupLongTermRetentionPolicy
from .managed_backup_short_term_retention_policy_py3 import ManagedBackupShortTermRetentionPolicy
from .complete_database_restore_definition_py3 import CompleteDatabaseRestoreDefinition
from .managed_database_py3 import ManagedDatabase
from .managed_database_update_py3 import ManagedDatabaseUpdate
Expand Down Expand Up @@ -246,6 +247,7 @@
from .job_version import JobVersion
from .long_term_retention_backup import LongTermRetentionBackup
from .backup_long_term_retention_policy import BackupLongTermRetentionPolicy
from .managed_backup_short_term_retention_policy import ManagedBackupShortTermRetentionPolicy
from .complete_database_restore_definition import CompleteDatabaseRestoreDefinition
from .managed_database import ManagedDatabase
from .managed_database_update import ManagedDatabaseUpdate
Expand Down Expand Up @@ -338,6 +340,7 @@
from .job_target_group_paged import JobTargetGroupPaged
from .job_version_paged import JobVersionPaged
from .long_term_retention_backup_paged import LongTermRetentionBackupPaged
from .managed_backup_short_term_retention_policy_paged import ManagedBackupShortTermRetentionPolicyPaged
from .managed_database_paged import ManagedDatabasePaged
from .server_dns_alias_paged import ServerDnsAliasPaged
from .restore_point_paged import RestorePointPaged
Expand Down Expand Up @@ -522,6 +525,7 @@
'JobVersion',
'LongTermRetentionBackup',
'BackupLongTermRetentionPolicy',
'ManagedBackupShortTermRetentionPolicy',
'CompleteDatabaseRestoreDefinition',
'ManagedDatabase',
'ManagedDatabaseUpdate',
Expand Down Expand Up @@ -614,6 +618,7 @@
'JobTargetGroupPaged',
'JobVersionPaged',
'LongTermRetentionBackupPaged',
'ManagedBackupShortTermRetentionPolicyPaged',
'ManagedDatabasePaged',
'ServerDnsAliasPaged',
'RestorePointPaged',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .proxy_resource import ProxyResource


class ManagedBackupShortTermRetentionPolicy(ProxyResource):
"""A short term retention policy.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param retention_days: The backup retention period in days. This is how
many days Point-in-Time Restore will be supported.
:type retention_days: int
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'retention_days': {'key': 'properties.retentionDays', 'type': 'int'},
}

def __init__(self, **kwargs):
super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs)
self.retention_days = kwargs.get('retention_days', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.paging import Paged


class ManagedBackupShortTermRetentionPolicyPaged(Paged):
"""
A paging container for iterating over a list of :class:`ManagedBackupShortTermRetentionPolicy <azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicy>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[ManagedBackupShortTermRetentionPolicy]'}
}

def __init__(self, *args, **kwargs):

super(ManagedBackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .proxy_resource_py3 import ProxyResource


class ManagedBackupShortTermRetentionPolicy(ProxyResource):
"""A short term retention policy.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param retention_days: The backup retention period in days. This is how
many days Point-in-Time Restore will be supported.
:type retention_days: int
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'retention_days': {'key': 'properties.retentionDays', 'type': 'int'},
}

def __init__(self, *, retention_days: int=None, **kwargs) -> None:
super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs)
self.retention_days = retention_days
2 changes: 2 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
from .job_versions_operations import JobVersionsOperations
from .long_term_retention_backups_operations import LongTermRetentionBackupsOperations
from .backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations
from .managed_backup_short_term_retention_policies_operations import ManagedBackupShortTermRetentionPoliciesOperations
from .managed_databases_operations import ManagedDatabasesOperations
from .server_automatic_tuning_operations import ServerAutomaticTuningOperations
from .server_dns_aliases_operations import ServerDnsAliasesOperations
Expand Down Expand Up @@ -131,6 +132,7 @@
'JobVersionsOperations',
'LongTermRetentionBackupsOperations',
'BackupLongTermRetentionPoliciesOperations',
'ManagedBackupShortTermRetentionPoliciesOperations',
'ManagedDatabasesOperations',
'ServerAutomaticTuningOperations',
'ServerDnsAliasesOperations',
Expand Down
Loading

0 comments on commit f314648

Please sign in to comment.