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] [DO NOT MERGE] VA List Api version edit #3678

Merged
merged 2 commits into from
Oct 31, 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
2 changes: 2 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@
from .sync_member_paged import SyncMemberPaged
from .subscription_usage_paged import SubscriptionUsagePaged
from .virtual_network_rule_paged import VirtualNetworkRulePaged
from .database_vulnerability_assessment_paged import DatabaseVulnerabilityAssessmentPaged
from .job_agent_paged import JobAgentPaged
from .job_credential_paged import JobCredentialPaged
from .job_execution_paged import JobExecutionPaged
Expand Down Expand Up @@ -604,6 +605,7 @@
'SyncMemberPaged',
'SubscriptionUsagePaged',
'VirtualNetworkRulePaged',
'DatabaseVulnerabilityAssessmentPaged',
'JobAgentPaged',
'JobCredentialPaged',
'JobExecutionPaged',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class BackupLongTermRetentionPolicy(ProxyResource):
:param weekly_retention: The weekly retention policy for an LTR backup in
an ISO 8601 format.
:type weekly_retention: str
:param monthly_retention: The montly retention policy for an LTR backup in
an ISO 8601 format.
:param monthly_retention: The monthly retention policy for an LTR backup
in an ISO 8601 format.
:type monthly_retention: str
:param yearly_retention: The yearly retention policy for an LTR backup in
an ISO 8601 format.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class BackupLongTermRetentionPolicy(ProxyResource):
:param weekly_retention: The weekly retention policy for an LTR backup in
an ISO 8601 format.
:type weekly_retention: str
:param monthly_retention: The montly retention policy for an LTR backup in
an ISO 8601 format.
:param monthly_retention: The monthly retention policy for an LTR backup
in an ISO 8601 format.
:type monthly_retention: str
:param yearly_retention: The yearly retention policy for an LTR backup in
an ISO 8601 format.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ class DatabaseBlobAuditingPolicy(ProxyResource):
:ivar kind: Resource kind.
:vartype kind: str
:param state: Required. Specifies the state of the policy. If state is
Enabled, storageEndpoint and storageAccountAccessKey are required.
Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.
Possible values include: 'Enabled', 'Disabled'
: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.
:type storage_endpoint: str
:param storage_account_access_key: Specifies the identifier key of the
auditing storage account. If state is Enabled, storageAccountAccessKey is
required.
auditing storage account. If state is Enabled and storageEndpoint is
specified, storageAccountAccessKey is required.
:type storage_account_access_key: str
:param retention_days: Specifies the number of days to keep in the audit
logs.
logs in the storage account.
:type retention_days: int
:param audit_actions_and_groups: Specifies the Actions-Groups and Actions
to audit.
Expand Down Expand Up @@ -110,6 +110,23 @@ class DatabaseBlobAuditingPolicy(ProxyResource):
:param is_storage_secondary_key_in_use: Specifies whether
storageAccountAccessKey value is the storage's secondary key.
:type is_storage_secondary_key_in_use: bool
:param is_azure_monitor_target_enabled: Specifies whether audit events are
sent to Azure Monitor.
In order to send the events to Azure Monitor, specify 'State' as 'Enabled'
and 'IsAzureMonitorTargetEnabled' as true.
When using REST API to configure auditing, Diagnostic Settings with
'SQLSecurityAuditEvents' diagnostic logs category on the database should
be also created.
Note that for server level audit you should use the 'master' database as
<databaseName>.
Diagnostic Settings URI format:
PUT
https://management.azure.com/subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/Microsoft.Sql/servers/<serverName>/databases/<databaseName>/providers/microsoft.insights/diagnosticSettings/<settingsName>?api-version=2017-05-01-preview
For more information, see [Diagnostic Settings REST
API](https://go.microsoft.com/fwlink/?linkid=2033207)
or [Diagnostic Settings
PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
:type is_azure_monitor_target_enabled: bool
"""

_validation = {
Expand All @@ -132,6 +149,7 @@ class DatabaseBlobAuditingPolicy(ProxyResource):
'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'},
'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'},
}

def __init__(self, **kwargs):
Expand All @@ -144,3 +162,4 @@ def __init__(self, **kwargs):
self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None)
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)
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ class DatabaseBlobAuditingPolicy(ProxyResource):
:ivar kind: Resource kind.
:vartype kind: str
:param state: Required. Specifies the state of the policy. If state is
Enabled, storageEndpoint and storageAccountAccessKey are required.
Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.
Possible values include: 'Enabled', 'Disabled'
: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.
:type storage_endpoint: str
:param storage_account_access_key: Specifies the identifier key of the
auditing storage account. If state is Enabled, storageAccountAccessKey is
required.
auditing storage account. If state is Enabled and storageEndpoint is
specified, storageAccountAccessKey is required.
:type storage_account_access_key: str
:param retention_days: Specifies the number of days to keep in the audit
logs.
logs in the storage account.
:type retention_days: int
:param audit_actions_and_groups: Specifies the Actions-Groups and Actions
to audit.
Expand Down Expand Up @@ -110,6 +110,23 @@ class DatabaseBlobAuditingPolicy(ProxyResource):
:param is_storage_secondary_key_in_use: Specifies whether
storageAccountAccessKey value is the storage's secondary key.
:type is_storage_secondary_key_in_use: bool
:param is_azure_monitor_target_enabled: Specifies whether audit events are
sent to Azure Monitor.
In order to send the events to Azure Monitor, specify 'State' as 'Enabled'
and 'IsAzureMonitorTargetEnabled' as true.
When using REST API to configure auditing, Diagnostic Settings with
'SQLSecurityAuditEvents' diagnostic logs category on the database should
be also created.
Note that for server level audit you should use the 'master' database as
<databaseName>.
Diagnostic Settings URI format:
PUT
https://management.azure.com/subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/Microsoft.Sql/servers/<serverName>/databases/<databaseName>/providers/microsoft.insights/diagnosticSettings/<settingsName>?api-version=2017-05-01-preview
For more information, see [Diagnostic Settings REST
API](https://go.microsoft.com/fwlink/?linkid=2033207)
or [Diagnostic Settings
PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
:type is_azure_monitor_target_enabled: bool
"""

_validation = {
Expand All @@ -132,9 +149,10 @@ class DatabaseBlobAuditingPolicy(ProxyResource):
'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'},
'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'},
}

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, **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, **kwargs) -> None:
super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs)
self.kind = None
self.state = state
Expand All @@ -144,3 +162,4 @@ def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_
self.audit_actions_and_groups = audit_actions_and_groups
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,25 @@ class DatabaseVulnerabilityAssessment(ProxyResource):
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 storage_container_path: Required. A blob storage container path to
hold the scan results (e.g.
https://myStorage.blob.core.windows.net/VaScans/).
:param storage_container_path: A blob storage container path to hold the
scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It
is required if server level vulnerability assessment policy doesn't set
:type storage_container_path: str
:param storage_container_sas_key: A shared access signature (SAS Key) that
has write access to the blob container specified in 'storageContainerPath'
parameter. If 'storageAccountAccessKey' isn't specified,
StorageContainerSasKey is required.
:type storage_container_sas_key: str
:param storage_account_access_key: Specifies the identifier key of the
vulnerability assessment storage account. If 'StorageContainerSasKey'
isn't specified, storageAccountAccessKey is required.
storage account for vulnerability assessment scan results. If
'StorageContainerSasKey' isn't specified, storageAccountAccessKey is
required.
:type storage_account_access_key: str
:param recurring_scans: The recurring scans settings
:type recurring_scans:
Expand All @@ -48,7 +47,6 @@ class DatabaseVulnerabilityAssessment(ProxyResource):
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'storage_container_path': {'required': True},
}

_attribute_map = {
Expand Down
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 DatabaseVulnerabilityAssessmentPaged(Paged):
"""
A paging container for iterating over a list of :class:`DatabaseVulnerabilityAssessment <azure.mgmt.sql.models.DatabaseVulnerabilityAssessment>` object
"""

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

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

super(DatabaseVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,25 @@ class DatabaseVulnerabilityAssessment(ProxyResource):
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 storage_container_path: Required. A blob storage container path to
hold the scan results (e.g.
https://myStorage.blob.core.windows.net/VaScans/).
:param storage_container_path: A blob storage container path to hold the
scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It
is required if server level vulnerability assessment policy doesn't set
:type storage_container_path: str
:param storage_container_sas_key: A shared access signature (SAS Key) that
has write access to the blob container specified in 'storageContainerPath'
parameter. If 'storageAccountAccessKey' isn't specified,
StorageContainerSasKey is required.
:type storage_container_sas_key: str
:param storage_account_access_key: Specifies the identifier key of the
vulnerability assessment storage account. If 'StorageContainerSasKey'
isn't specified, storageAccountAccessKey is required.
storage account for vulnerability assessment scan results. If
'StorageContainerSasKey' isn't specified, storageAccountAccessKey is
required.
:type storage_account_access_key: str
:param recurring_scans: The recurring scans settings
:type recurring_scans:
Expand All @@ -48,7 +47,6 @@ class DatabaseVulnerabilityAssessment(ProxyResource):
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'storage_container_path': {'required': True},
}

_attribute_map = {
Expand All @@ -61,7 +59,7 @@ class DatabaseVulnerabilityAssessment(ProxyResource):
'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'},
}

def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None:
def __init__(self, *, storage_container_path: str=None, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None:
super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs)
self.storage_container_path = storage_container_path
self.storage_container_sas_key = storage_container_sas_key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ class ExtendedDatabaseBlobAuditingPolicy(ProxyResource):
creating an audit.
:type predicate_expression: str
:param state: Required. Specifies the state of the policy. If state is
Enabled, storageEndpoint and storageAccountAccessKey are required.
Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.
Possible values include: 'Enabled', 'Disabled'
: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.
:type storage_endpoint: str
:param storage_account_access_key: Specifies the identifier key of the
auditing storage account. If state is Enabled, storageAccountAccessKey is
required.
auditing storage account. If state is Enabled and storageEndpoint is
specified, storageAccountAccessKey is required.
:type storage_account_access_key: str
:param retention_days: Specifies the number of days to keep in the audit
logs.
logs in the storage account.
:type retention_days: int
:param audit_actions_and_groups: Specifies the Actions-Groups and Actions
to audit.
Expand Down Expand Up @@ -111,6 +111,23 @@ class ExtendedDatabaseBlobAuditingPolicy(ProxyResource):
:param is_storage_secondary_key_in_use: Specifies whether
storageAccountAccessKey value is the storage's secondary key.
:type is_storage_secondary_key_in_use: bool
:param is_azure_monitor_target_enabled: Specifies whether audit events are
sent to Azure Monitor.
In order to send the events to Azure Monitor, specify 'State' as 'Enabled'
and 'IsAzureMonitorTargetEnabled' as true.
When using REST API to configure auditing, Diagnostic Settings with
'SQLSecurityAuditEvents' diagnostic logs category on the database should
be also created.
Note that for server level audit you should use the 'master' database as
<databaseName>.
Diagnostic Settings URI format:
PUT
https://management.azure.com/subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/Microsoft.Sql/servers/<serverName>/databases/<databaseName>/providers/microsoft.insights/diagnosticSettings/<settingsName>?api-version=2017-05-01-preview
For more information, see [Diagnostic Settings REST
API](https://go.microsoft.com/fwlink/?linkid=2033207)
or [Diagnostic Settings
PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
:type is_azure_monitor_target_enabled: bool
"""

_validation = {
Expand All @@ -132,6 +149,7 @@ class ExtendedDatabaseBlobAuditingPolicy(ProxyResource):
'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'},
'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'},
}

def __init__(self, **kwargs):
Expand All @@ -144,3 +162,4 @@ def __init__(self, **kwargs):
self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None)
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)
Loading