Skip to content

Commit

Permalink
Generated from 04ca3a88d31b7bda6982e2281216993545e61ff8 (#8572)
Browse files Browse the repository at this point in the history
Sql auditing swagger- update examples
  • Loading branch information
AutorestCI authored Nov 13, 2019
1 parent dc40812 commit cc97535
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 12 deletions.
36 changes: 32 additions & 4 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ class DatabaseBlobAuditingPolicy(ProxyResource):
:type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState
:param storage_endpoint: Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). If state is Enabled,
storageEndpoint is required.
storageEndpoint or isAzureMonitorTargetEnabled is required.
:type storage_endpoint: str
:param storage_account_access_key: Specifies the identifier key of the
auditing storage account. If state is Enabled and storageEndpoint is
Expand Down Expand Up @@ -843,6 +843,11 @@ class DatabaseBlobAuditingPolicy(ProxyResource):
or [Diagnostic Settings
PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
:type is_azure_monitor_target_enabled: bool
:param queue_delay_ms: Specifies the amount of time in milliseconds that
can elapse before audit actions are forced to be processed.
The default minimum value is 1000 (1 second). The maximum is
2,147,483,647.
:type queue_delay_ms: int
"""

_validation = {
Expand All @@ -866,6 +871,7 @@ class DatabaseBlobAuditingPolicy(ProxyResource):
'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'},
'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'},
'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'},
'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'},
}

def __init__(self, **kwargs):
Expand All @@ -879,6 +885,7 @@ def __init__(self, **kwargs):
self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None)
self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None)
self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None)
self.queue_delay_ms = kwargs.get('queue_delay_ms', None)


class DatabaseOperation(ProxyResource):
Expand Down Expand Up @@ -2594,7 +2601,7 @@ class ExtendedDatabaseBlobAuditingPolicy(ProxyResource):
:type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState
:param storage_endpoint: Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). If state is Enabled,
storageEndpoint is required.
storageEndpoint or isAzureMonitorTargetEnabled is required.
:type storage_endpoint: str
:param storage_account_access_key: Specifies the identifier key of the
auditing storage account. If state is Enabled and storageEndpoint is
Expand Down Expand Up @@ -2687,6 +2694,11 @@ class ExtendedDatabaseBlobAuditingPolicy(ProxyResource):
or [Diagnostic Settings
PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
:type is_azure_monitor_target_enabled: bool
:param queue_delay_ms: Specifies the amount of time in milliseconds that
can elapse before audit actions are forced to be processed.
The default minimum value is 1000 (1 second). The maximum is
2,147,483,647.
:type queue_delay_ms: int
"""

_validation = {
Expand All @@ -2709,6 +2721,7 @@ class ExtendedDatabaseBlobAuditingPolicy(ProxyResource):
'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'},
'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'},
'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'},
'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'},
}

def __init__(self, **kwargs):
Expand All @@ -2722,6 +2735,7 @@ def __init__(self, **kwargs):
self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None)
self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None)
self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None)
self.queue_delay_ms = kwargs.get('queue_delay_ms', None)


class ExtendedServerBlobAuditingPolicy(ProxyResource):
Expand All @@ -2747,7 +2761,7 @@ class ExtendedServerBlobAuditingPolicy(ProxyResource):
:type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState
:param storage_endpoint: Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). If state is Enabled,
storageEndpoint is required.
storageEndpoint or isAzureMonitorTargetEnabled is required.
:type storage_endpoint: str
:param storage_account_access_key: Specifies the identifier key of the
auditing storage account. If state is Enabled and storageEndpoint is
Expand Down Expand Up @@ -2840,6 +2854,11 @@ class ExtendedServerBlobAuditingPolicy(ProxyResource):
or [Diagnostic Settings
PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
:type is_azure_monitor_target_enabled: bool
:param queue_delay_ms: Specifies the amount of time in milliseconds that
can elapse before audit actions are forced to be processed.
The default minimum value is 1000 (1 second). The maximum is
2,147,483,647.
:type queue_delay_ms: int
"""

_validation = {
Expand All @@ -2862,6 +2881,7 @@ class ExtendedServerBlobAuditingPolicy(ProxyResource):
'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'},
'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'},
'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'},
'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'},
}

def __init__(self, **kwargs):
Expand All @@ -2875,6 +2895,7 @@ def __init__(self, **kwargs):
self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None)
self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None)
self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None)
self.queue_delay_ms = kwargs.get('queue_delay_ms', None)


class FailoverGroup(ProxyResource):
Expand Down Expand Up @@ -7176,7 +7197,7 @@ class ServerBlobAuditingPolicy(ProxyResource):
:type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState
:param storage_endpoint: Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). If state is Enabled,
storageEndpoint is required.
storageEndpoint or isAzureMonitorTargetEnabled is required.
:type storage_endpoint: str
:param storage_account_access_key: Specifies the identifier key of the
auditing storage account. If state is Enabled and storageEndpoint is
Expand Down Expand Up @@ -7269,6 +7290,11 @@ class ServerBlobAuditingPolicy(ProxyResource):
or [Diagnostic Settings
PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
:type is_azure_monitor_target_enabled: bool
:param queue_delay_ms: Specifies the amount of time in milliseconds that
can elapse before audit actions are forced to be processed.
The default minimum value is 1000 (1 second). The maximum is
2,147,483,647.
:type queue_delay_ms: int
"""

_validation = {
Expand All @@ -7290,6 +7316,7 @@ class ServerBlobAuditingPolicy(ProxyResource):
'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'},
'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'},
'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'},
'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'},
}

def __init__(self, **kwargs):
Expand All @@ -7302,6 +7329,7 @@ def __init__(self, **kwargs):
self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None)
self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None)
self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None)
self.queue_delay_ms = kwargs.get('queue_delay_ms', None)


class ServerCommunicationLink(ProxyResource):
Expand Down
44 changes: 36 additions & 8 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ class DatabaseBlobAuditingPolicy(ProxyResource):
:type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState
:param storage_endpoint: Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). If state is Enabled,
storageEndpoint is required.
storageEndpoint or isAzureMonitorTargetEnabled is required.
:type storage_endpoint: str
:param storage_account_access_key: Specifies the identifier key of the
auditing storage account. If state is Enabled and storageEndpoint is
Expand Down Expand Up @@ -843,6 +843,11 @@ class DatabaseBlobAuditingPolicy(ProxyResource):
or [Diagnostic Settings
PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
:type is_azure_monitor_target_enabled: bool
:param queue_delay_ms: Specifies the amount of time in milliseconds that
can elapse before audit actions are forced to be processed.
The default minimum value is 1000 (1 second). The maximum is
2,147,483,647.
:type queue_delay_ms: int
"""

_validation = {
Expand All @@ -866,9 +871,10 @@ class DatabaseBlobAuditingPolicy(ProxyResource):
'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'},
'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'},
'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'},
'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'},
}

def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None:
def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, queue_delay_ms: int=None, **kwargs) -> None:
super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs)
self.kind = None
self.state = state
Expand All @@ -879,6 +885,7 @@ def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_
self.storage_account_subscription_id = storage_account_subscription_id
self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use
self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled
self.queue_delay_ms = queue_delay_ms


class DatabaseOperation(ProxyResource):
Expand Down Expand Up @@ -2594,7 +2601,7 @@ class ExtendedDatabaseBlobAuditingPolicy(ProxyResource):
:type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState
:param storage_endpoint: Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). If state is Enabled,
storageEndpoint is required.
storageEndpoint or isAzureMonitorTargetEnabled is required.
:type storage_endpoint: str
:param storage_account_access_key: Specifies the identifier key of the
auditing storage account. If state is Enabled and storageEndpoint is
Expand Down Expand Up @@ -2687,6 +2694,11 @@ class ExtendedDatabaseBlobAuditingPolicy(ProxyResource):
or [Diagnostic Settings
PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
:type is_azure_monitor_target_enabled: bool
:param queue_delay_ms: Specifies the amount of time in milliseconds that
can elapse before audit actions are forced to be processed.
The default minimum value is 1000 (1 second). The maximum is
2,147,483,647.
:type queue_delay_ms: int
"""

_validation = {
Expand All @@ -2709,9 +2721,10 @@ class ExtendedDatabaseBlobAuditingPolicy(ProxyResource):
'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'},
'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'},
'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'},
'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'},
}

def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None:
def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, queue_delay_ms: int=None, **kwargs) -> None:
super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs)
self.predicate_expression = predicate_expression
self.state = state
Expand All @@ -2722,6 +2735,7 @@ def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: s
self.storage_account_subscription_id = storage_account_subscription_id
self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use
self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled
self.queue_delay_ms = queue_delay_ms


class ExtendedServerBlobAuditingPolicy(ProxyResource):
Expand All @@ -2747,7 +2761,7 @@ class ExtendedServerBlobAuditingPolicy(ProxyResource):
:type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState
:param storage_endpoint: Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). If state is Enabled,
storageEndpoint is required.
storageEndpoint or isAzureMonitorTargetEnabled is required.
:type storage_endpoint: str
:param storage_account_access_key: Specifies the identifier key of the
auditing storage account. If state is Enabled and storageEndpoint is
Expand Down Expand Up @@ -2840,6 +2854,11 @@ class ExtendedServerBlobAuditingPolicy(ProxyResource):
or [Diagnostic Settings
PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
:type is_azure_monitor_target_enabled: bool
:param queue_delay_ms: Specifies the amount of time in milliseconds that
can elapse before audit actions are forced to be processed.
The default minimum value is 1000 (1 second). The maximum is
2,147,483,647.
:type queue_delay_ms: int
"""

_validation = {
Expand All @@ -2862,9 +2881,10 @@ class ExtendedServerBlobAuditingPolicy(ProxyResource):
'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'},
'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'},
'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'},
'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'},
}

def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None:
def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, queue_delay_ms: int=None, **kwargs) -> None:
super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs)
self.predicate_expression = predicate_expression
self.state = state
Expand All @@ -2875,6 +2895,7 @@ def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: s
self.storage_account_subscription_id = storage_account_subscription_id
self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use
self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled
self.queue_delay_ms = queue_delay_ms


class FailoverGroup(ProxyResource):
Expand Down Expand Up @@ -7176,7 +7197,7 @@ class ServerBlobAuditingPolicy(ProxyResource):
:type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState
:param storage_endpoint: Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). If state is Enabled,
storageEndpoint is required.
storageEndpoint or isAzureMonitorTargetEnabled is required.
:type storage_endpoint: str
:param storage_account_access_key: Specifies the identifier key of the
auditing storage account. If state is Enabled and storageEndpoint is
Expand Down Expand Up @@ -7269,6 +7290,11 @@ class ServerBlobAuditingPolicy(ProxyResource):
or [Diagnostic Settings
PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
:type is_azure_monitor_target_enabled: bool
:param queue_delay_ms: Specifies the amount of time in milliseconds that
can elapse before audit actions are forced to be processed.
The default minimum value is 1000 (1 second). The maximum is
2,147,483,647.
:type queue_delay_ms: int
"""

_validation = {
Expand All @@ -7290,9 +7316,10 @@ class ServerBlobAuditingPolicy(ProxyResource):
'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'},
'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'},
'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'},
'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'},
}

def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None:
def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, queue_delay_ms: int=None, **kwargs) -> None:
super(ServerBlobAuditingPolicy, self).__init__(**kwargs)
self.state = state
self.storage_endpoint = storage_endpoint
Expand All @@ -7302,6 +7329,7 @@ def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_
self.storage_account_subscription_id = storage_account_subscription_id
self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use
self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled
self.queue_delay_ms = queue_delay_ms


class ServerCommunicationLink(ProxyResource):
Expand Down

0 comments on commit cc97535

Please sign in to comment.