Skip to content
Closed
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
21 changes: 21 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@
from .elastic_pool_per_database_settings_py3 import ElasticPoolPerDatabaseSettings
from .elastic_pool_py3 import ElasticPool
from .elastic_pool_update_py3 import ElasticPoolUpdate
from .vulnerability_assessment_recurring_scans_properties_py3 import VulnerabilityAssessmentRecurringScansProperties
from .database_vulnerability_assessment_py3 import DatabaseVulnerabilityAssessment
from .vulnerability_assessment_scan_error_py3 import VulnerabilityAssessmentScanError
from .vulnerability_assessment_scan_record_py3 import VulnerabilityAssessmentScanRecord
from .database_vulnerability_assessment_scans_export_py3 import DatabaseVulnerabilityAssessmentScansExport
from .instance_failover_group_read_write_endpoint_py3 import InstanceFailoverGroupReadWriteEndpoint
from .instance_failover_group_read_only_endpoint_py3 import InstanceFailoverGroupReadOnlyEndpoint
from .partner_region_info_py3 import PartnerRegionInfo
Expand Down Expand Up @@ -231,6 +236,11 @@
from .elastic_pool_per_database_settings import ElasticPoolPerDatabaseSettings
from .elastic_pool import ElasticPool
from .elastic_pool_update import ElasticPoolUpdate
from .vulnerability_assessment_recurring_scans_properties import VulnerabilityAssessmentRecurringScansProperties
from .database_vulnerability_assessment import DatabaseVulnerabilityAssessment
from .vulnerability_assessment_scan_error import VulnerabilityAssessmentScanError
from .vulnerability_assessment_scan_record import VulnerabilityAssessmentScanRecord
from .database_vulnerability_assessment_scans_export import DatabaseVulnerabilityAssessmentScansExport
from .instance_failover_group_read_write_endpoint import InstanceFailoverGroupReadWriteEndpoint
from .instance_failover_group_read_only_endpoint import InstanceFailoverGroupReadOnlyEndpoint
from .partner_region_info import PartnerRegionInfo
Expand Down Expand Up @@ -279,6 +289,7 @@
from .restore_point_paged import RestorePointPaged
from .database_operation_paged import DatabaseOperationPaged
from .elastic_pool_operation_paged import ElasticPoolOperationPaged
from .vulnerability_assessment_scan_record_paged import VulnerabilityAssessmentScanRecordPaged
from .instance_failover_group_paged import InstanceFailoverGroupPaged
from .sql_management_client_enums import (
CheckNameAvailabilityReason,
Expand Down Expand Up @@ -342,6 +353,8 @@
DatabaseReadScale,
ElasticPoolState,
ElasticPoolLicenseType,
VulnerabilityAssessmentScanTriggerType,
VulnerabilityAssessmentScanState,
InstanceFailoverGroupReplicationRole,
LongTermRetentionDatabaseState,
CapabilityGroup,
Expand Down Expand Up @@ -455,6 +468,11 @@
'ElasticPoolPerDatabaseSettings',
'ElasticPool',
'ElasticPoolUpdate',
'VulnerabilityAssessmentRecurringScansProperties',
'DatabaseVulnerabilityAssessment',
'VulnerabilityAssessmentScanError',
'VulnerabilityAssessmentScanRecord',
'DatabaseVulnerabilityAssessmentScansExport',
'InstanceFailoverGroupReadWriteEndpoint',
'InstanceFailoverGroupReadOnlyEndpoint',
'PartnerRegionInfo',
Expand Down Expand Up @@ -503,6 +521,7 @@
'RestorePointPaged',
'DatabaseOperationPaged',
'ElasticPoolOperationPaged',
'VulnerabilityAssessmentScanRecordPaged',
'InstanceFailoverGroupPaged',
'CheckNameAvailabilityReason',
'ServerConnectionType',
Expand Down Expand Up @@ -565,6 +584,8 @@
'DatabaseReadScale',
'ElasticPoolState',
'ElasticPoolLicenseType',
'VulnerabilityAssessmentScanTriggerType',
'VulnerabilityAssessmentScanState',
'InstanceFailoverGroupReplicationRole',
'LongTermRetentionDatabaseState',
'CapabilityGroup',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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 DatabaseVulnerabilityAssessment(ProxyResource):
"""A database vulnerability assessment.

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 storage_container_path: A blob storage container path to hold the
scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
: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.
:type storage_container_sas_key: str
:param recurring_scans: The recurring scans settings
:type recurring_scans:
~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties
"""

_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'},
'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'},
'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'},
'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'},
}

def __init__(self, **kwargs):
super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs)
self.storage_container_path = kwargs.get('storage_container_path', None)
self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None)
self.recurring_scans = kwargs.get('recurring_scans', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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 DatabaseVulnerabilityAssessment(ProxyResource):
"""A database vulnerability assessment.

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 storage_container_path: A blob storage container path to hold the
scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
: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.
:type storage_container_sas_key: str
:param recurring_scans: The recurring scans settings
:type recurring_scans:
~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties
"""

_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'},
'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'},
'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'},
'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'},
}

def __init__(self, *, storage_container_path: str=None, storage_container_sas_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
self.recurring_scans = recurring_scans
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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 DatabaseVulnerabilityAssessmentScansExport(ProxyResource):
"""A database Vulnerability Assessment scan export resource.

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
:ivar exported_report_location: Location of the exported report (e.g.
https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx).
:vartype exported_report_location: str
"""

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

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'},
}

def __init__(self, **kwargs):
super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs)
self.exported_report_location = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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 DatabaseVulnerabilityAssessmentScansExport(ProxyResource):
"""A database Vulnerability Assessment scan export resource.

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
:ivar exported_report_location: Location of the exported report (e.g.
https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx).
:vartype exported_report_location: str
"""

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

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'},
}

def __init__(self, **kwargs) -> None:
super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs)
self.exported_report_location = None
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,20 @@ class ElasticPoolLicenseType(str, Enum):
base_price = "BasePrice"


class VulnerabilityAssessmentScanTriggerType(str, Enum):

on_demand = "OnDemand"
recurring = "Recurring"


class VulnerabilityAssessmentScanState(str, Enum):

passed = "Passed"
failed = "Failed"
failed_to_run = "FailedToRun"
in_progress = "InProgress"


class InstanceFailoverGroupReplicationRole(str, Enum):

primary = "Primary"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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.serialization import Model


class VulnerabilityAssessmentRecurringScansProperties(Model):
"""Properties of a Vulnerability Assessment recurring scans.

:param is_enabled: Recurring scans state.
:type is_enabled: bool
:param email_subscription_admins: Specifies that the schedule scan
notification will be is sent to the subscription administrators. Default
value: True .
:type email_subscription_admins: bool
:param emails: Specifies an array of e-mail addresses to which the scan
notification is sent.
:type emails: list[str]
"""

_attribute_map = {
'is_enabled': {'key': 'isEnabled', 'type': 'bool'},
'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'},
'emails': {'key': 'emails', 'type': '[str]'},
}

def __init__(self, **kwargs):
super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs)
self.is_enabled = kwargs.get('is_enabled', None)
self.email_subscription_admins = kwargs.get('email_subscription_admins', True)
self.emails = kwargs.get('emails', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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.serialization import Model


class VulnerabilityAssessmentRecurringScansProperties(Model):
"""Properties of a Vulnerability Assessment recurring scans.

:param is_enabled: Recurring scans state.
:type is_enabled: bool
:param email_subscription_admins: Specifies that the schedule scan
notification will be is sent to the subscription administrators. Default
value: True .
:type email_subscription_admins: bool
:param emails: Specifies an array of e-mail addresses to which the scan
notification is sent.
:type emails: list[str]
"""

_attribute_map = {
'is_enabled': {'key': 'isEnabled', 'type': 'bool'},
'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'},
'emails': {'key': 'emails', 'type': '[str]'},
}

def __init__(self, *, is_enabled: bool=None, email_subscription_admins: bool=True, emails=None, **kwargs) -> None:
super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs)
self.is_enabled = is_enabled
self.email_subscription_admins = email_subscription_admins
self.emails = emails
Loading