Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR sql/resource-manager] typo: sql/resource-manager/Microsoft.Sql #4004

Merged
merged 2 commits into from
Dec 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@
from .server_security_alert_policy_py3 import ServerSecurityAlertPolicy
from .restore_point_py3 import RestorePoint
from .create_database_restore_point_definition_py3 import CreateDatabaseRestorePointDefinition
from .managed_database_security_alert_policy_py3 import ManagedDatabaseSecurityAlertPolicy
from .managed_server_security_alert_policy_py3 import ManagedServerSecurityAlertPolicy
from .database_operation_py3 import DatabaseOperation
from .elastic_pool_operation_py3 import ElasticPoolOperation
from .max_size_capability_py3 import MaxSizeCapability
Expand Down Expand Up @@ -260,6 +262,8 @@
from .server_security_alert_policy import ServerSecurityAlertPolicy
from .restore_point import RestorePoint
from .create_database_restore_point_definition import CreateDatabaseRestorePointDefinition
from .managed_database_security_alert_policy import ManagedDatabaseSecurityAlertPolicy
from .managed_server_security_alert_policy import ManagedServerSecurityAlertPolicy
from .database_operation import DatabaseOperation
from .elastic_pool_operation import ElasticPoolOperation
from .max_size_capability import MaxSizeCapability
Expand Down Expand Up @@ -542,6 +546,8 @@
'ServerSecurityAlertPolicy',
'RestorePoint',
'CreateDatabaseRestorePointDefinition',
'ManagedDatabaseSecurityAlertPolicy',
'ManagedServerSecurityAlertPolicy',
'DatabaseOperation',
'ElasticPoolOperation',
'MaxSizeCapability',
Expand Down
2 changes: 1 addition & 1 deletion azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class JobSchedule(Model):
:param enabled: Whether or not the schedule is enabled.
:type enabled: bool
:param interval: Value of the schedule's recurring interval, if the
scheduletype is recurring. ISO8601 duration format.
schedule type is recurring. ISO8601 duration format.
:type interval: str
"""

Expand Down
2 changes: 1 addition & 1 deletion azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class JobSchedule(Model):
:param enabled: Whether or not the schedule is enabled.
:type enabled: bool
:param interval: Value of the schedule's recurring interval, if the
scheduletype is recurring. ISO8601 duration format.
schedule type is recurring. ISO8601 duration format.
:type interval: str
"""

Expand Down
21 changes: 17 additions & 4 deletions azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class ManagedDatabase(TrackedResource):
:type tags: dict[str, str]
:param collation: Collation of the managed database.
:type collation: str
:ivar status: Status for the database. Possible values include: 'Online',
'Offline', 'Shutdown', 'Creating', 'Inaccessible'
:ivar status: Status of the database. Possible values include: 'Online',
'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating'
:vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus
:ivar creation_date: Creation date of the database.
:vartype creation_date: datetime
Expand All @@ -56,8 +56,11 @@ class ManagedDatabase(TrackedResource):
database. SourceDatabaseName, SourceManagedInstanceName and PointInTime
must be specified. RestoreExternalBackup: Create a database by restoring
from external backup files. Collation, StorageContainerUri and
StorageContainerSasToken must be specified. Possible values include:
'Default', 'RestoreExternalBackup', 'PointInTimeRestore'
StorageContainerSasToken must be specified. Recovery: Creates a database
by restoring a geo-replicated backup. RecoverableDatabaseId must be
specified as the recoverable database resource ID to restore. Possible
values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore',
'Recovery'
:type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode
:param storage_container_uri: Conditional. If createMode is
RestoreExternalBackup, this value is required. Specifies the uri of the
Expand All @@ -66,13 +69,19 @@ class ManagedDatabase(TrackedResource):
:param source_database_id: The resource identifier of the source database
associated with create operation of this database.
:type source_database_id: str
:param restorable_dropped_database_id: The restorable dropped database
resource id to restore when creating this database.
:type restorable_dropped_database_id: str
:param storage_container_sas_token: Conditional. If createMode is
RestoreExternalBackup, this value is required. Specifies the storage
container sas token.
:type storage_container_sas_token: str
:ivar failover_group_id: Instance Failover Group resource identifier that
this managed database belongs to.
:vartype failover_group_id: str
:param recoverable_database_id: The resource identifier of the recoverable
database associated with create operation of this database.
:type recoverable_database_id: str
"""

_validation = {
Expand Down Expand Up @@ -103,8 +112,10 @@ class ManagedDatabase(TrackedResource):
'create_mode': {'key': 'properties.createMode', 'type': 'str'},
'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'},
'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'},
'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'},
'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'},
'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'},
'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -119,5 +130,7 @@ def __init__(self, **kwargs):
self.create_mode = kwargs.get('create_mode', None)
self.storage_container_uri = kwargs.get('storage_container_uri', None)
self.source_database_id = kwargs.get('source_database_id', None)
self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None)
self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None)
self.failover_group_id = None
self.recoverable_database_id = kwargs.get('recoverable_database_id', None)
23 changes: 18 additions & 5 deletions azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class ManagedDatabase(TrackedResource):
:type tags: dict[str, str]
:param collation: Collation of the managed database.
:type collation: str
:ivar status: Status for the database. Possible values include: 'Online',
'Offline', 'Shutdown', 'Creating', 'Inaccessible'
:ivar status: Status of the database. Possible values include: 'Online',
'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating'
:vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus
:ivar creation_date: Creation date of the database.
:vartype creation_date: datetime
Expand All @@ -56,8 +56,11 @@ class ManagedDatabase(TrackedResource):
database. SourceDatabaseName, SourceManagedInstanceName and PointInTime
must be specified. RestoreExternalBackup: Create a database by restoring
from external backup files. Collation, StorageContainerUri and
StorageContainerSasToken must be specified. Possible values include:
'Default', 'RestoreExternalBackup', 'PointInTimeRestore'
StorageContainerSasToken must be specified. Recovery: Creates a database
by restoring a geo-replicated backup. RecoverableDatabaseId must be
specified as the recoverable database resource ID to restore. Possible
values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore',
'Recovery'
:type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode
:param storage_container_uri: Conditional. If createMode is
RestoreExternalBackup, this value is required. Specifies the uri of the
Expand All @@ -66,13 +69,19 @@ class ManagedDatabase(TrackedResource):
:param source_database_id: The resource identifier of the source database
associated with create operation of this database.
:type source_database_id: str
:param restorable_dropped_database_id: The restorable dropped database
resource id to restore when creating this database.
:type restorable_dropped_database_id: str
:param storage_container_sas_token: Conditional. If createMode is
RestoreExternalBackup, this value is required. Specifies the storage
container sas token.
:type storage_container_sas_token: str
:ivar failover_group_id: Instance Failover Group resource identifier that
this managed database belongs to.
:vartype failover_group_id: str
:param recoverable_database_id: The resource identifier of the recoverable
database associated with create operation of this database.
:type recoverable_database_id: str
"""

_validation = {
Expand Down Expand Up @@ -103,11 +112,13 @@ class ManagedDatabase(TrackedResource):
'create_mode': {'key': 'properties.createMode', 'type': 'str'},
'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'},
'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'},
'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'},
'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'},
'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'},
'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'},
}

def __init__(self, *, location: str, tags=None, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, storage_container_sas_token: str=None, **kwargs) -> None:
def __init__(self, *, location: str, tags=None, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, **kwargs) -> None:
super(ManagedDatabase, self).__init__(location=location, tags=tags, **kwargs)
self.collation = collation
self.status = None
Expand All @@ -119,5 +130,7 @@ def __init__(self, *, location: str, tags=None, collation: str=None, restore_poi
self.create_mode = create_mode
self.storage_container_uri = storage_container_uri
self.source_database_id = source_database_id
self.restorable_dropped_database_id = restorable_dropped_database_id
self.storage_container_sas_token = storage_container_sas_token
self.failover_group_id = None
self.recoverable_database_id = recoverable_database_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# 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 ManagedDatabaseSecurityAlertPolicy(ProxyResource):
"""A managed database security alert policy.

Variables are only populated by the server, and will be ignored when
sending a request.

All required parameters must be populated in order to send to Azure.

:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param state: Required. Specifies the state of the policy, whether it is
enabled or disabled. Possible values include: 'New', 'Enabled', 'Disabled'
:type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState
:param disabled_alerts: Specifies an array of alerts that are disabled.
Allowed values are: Sql_Injection, Sql_Injection_Vulnerability,
Access_Anomaly, Data_Exfiltration, Unsafe_Action
:type disabled_alerts: list[str]
:param email_addresses: Specifies an array of e-mail addresses to which
the alert is sent.
:type email_addresses: list[str]
:param email_account_admins: Specifies that the alert is sent to the
account administrators.
:type email_account_admins: bool
:param storage_endpoint: Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). This blob storage will hold all
Threat Detection audit logs.
:type storage_endpoint: str
:param storage_account_access_key: Specifies the identifier key of the
Threat Detection audit storage account.
:type storage_account_access_key: str
:param retention_days: Specifies the number of days to keep in the Threat
Detection audit logs.
:type retention_days: int
:ivar creation_time: Specifies the UTC creation time of the policy.
:vartype creation_time: datetime
"""

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

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'},
'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'},
'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'},
'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'},
'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'},
'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'},
'retention_days': {'key': 'properties.retentionDays', 'type': 'int'},
'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'},
}

def __init__(self, **kwargs):
super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs)
self.state = kwargs.get('state', None)
self.disabled_alerts = kwargs.get('disabled_alerts', None)
self.email_addresses = kwargs.get('email_addresses', None)
self.email_account_admins = kwargs.get('email_account_admins', None)
self.storage_endpoint = kwargs.get('storage_endpoint', None)
self.storage_account_access_key = kwargs.get('storage_account_access_key', None)
self.retention_days = kwargs.get('retention_days', None)
self.creation_time = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# 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 ManagedDatabaseSecurityAlertPolicy(ProxyResource):
"""A managed database security alert policy.

Variables are only populated by the server, and will be ignored when
sending a request.

All required parameters must be populated in order to send to Azure.

:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param state: Required. Specifies the state of the policy, whether it is
enabled or disabled. Possible values include: 'New', 'Enabled', 'Disabled'
:type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState
:param disabled_alerts: Specifies an array of alerts that are disabled.
Allowed values are: Sql_Injection, Sql_Injection_Vulnerability,
Access_Anomaly, Data_Exfiltration, Unsafe_Action
:type disabled_alerts: list[str]
:param email_addresses: Specifies an array of e-mail addresses to which
the alert is sent.
:type email_addresses: list[str]
:param email_account_admins: Specifies that the alert is sent to the
account administrators.
:type email_account_admins: bool
:param storage_endpoint: Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). This blob storage will hold all
Threat Detection audit logs.
:type storage_endpoint: str
:param storage_account_access_key: Specifies the identifier key of the
Threat Detection audit storage account.
:type storage_account_access_key: str
:param retention_days: Specifies the number of days to keep in the Threat
Detection audit logs.
:type retention_days: int
:ivar creation_time: Specifies the UTC creation time of the policy.
:vartype creation_time: datetime
"""

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

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'},
'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'},
'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'},
'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'},
'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'},
'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'},
'retention_days': {'key': 'properties.retentionDays', 'type': 'int'},
'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'},
}

def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None:
super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs)
self.state = state
self.disabled_alerts = disabled_alerts
self.email_addresses = email_addresses
self.email_account_admins = email_account_admins
self.storage_endpoint = storage_endpoint
self.storage_account_access_key = storage_account_access_key
self.retention_days = retention_days
self.creation_time = None
Loading