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
18 changes: 18 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@
from .create_database_restore_point_definition import CreateDatabaseRestorePointDefinition
from .database_operation import DatabaseOperation
from .elastic_pool_operation import ElasticPoolOperation
from .sku import Sku
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 .recoverable_database_paged import RecoverableDatabasePaged
from .restorable_dropped_database_paged import RestorableDroppedDatabasePaged
from .server_paged import ServerPaged
Expand Down Expand Up @@ -141,6 +147,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 .sql_management_client_enums import (
CapabilityStatus,
MaxSizeUnits,
Expand Down Expand Up @@ -196,6 +203,8 @@
AutomaticTuningServerReason,
RestorePointType,
ManagementOperationState,
VulnerabilityAssessmentScanTriggerType,
VulnerabilityAssessmentScanState,
LongTermRetentionDatabaseState,
)

Expand Down Expand Up @@ -292,6 +301,12 @@
'CreateDatabaseRestorePointDefinition',
'DatabaseOperation',
'ElasticPoolOperation',
'Sku',
'VulnerabilityAssessmentRecurringScansProperties',
'DatabaseVulnerabilityAssessment',
'VulnerabilityAssessmentScanError',
'VulnerabilityAssessmentScanRecord',
'DatabaseVulnerabilityAssessmentScansExport',
'RecoverableDatabasePaged',
'RestorableDroppedDatabasePaged',
'ServerPaged',
Expand Down Expand Up @@ -332,6 +347,7 @@
'RestorePointPaged',
'DatabaseOperationPaged',
'ElasticPoolOperationPaged',
'VulnerabilityAssessmentScanRecordPaged',
'CapabilityStatus',
'MaxSizeUnits',
'PerformanceLevelUnit',
Expand Down Expand Up @@ -386,5 +402,7 @@
'AutomaticTuningServerReason',
'RestorePointType',
'ManagementOperationState',
'VulnerabilityAssessmentScanTriggerType',
'VulnerabilityAssessmentScanState',
'LongTermRetentionDatabaseState',
]
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=None, storage_container_sas_key=None, recurring_scans=None):
super(DatabaseVulnerabilityAssessment, self).__init__()
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):
super(DatabaseVulnerabilityAssessmentScansExport, self).__init__()
self.exported_report_location = None
46 changes: 46 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/sku.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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 Sku(Model):
"""An ARM Resource SKU.

:param name: The name of the SKU, typically, a letter + Number code, e.g.
P3.
:type name: str
:param tier: The tier of the particular SKU, e.g. Basic, Premium.
:type tier: str
:param size: Size of the particular SKU
:type size: str
:param family: If the service has different generations of hardware, for
the same SKU, then that can be captured here.
:type family: str
:param capacity: Capacity of the particular SKU.
:type capacity: int
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'tier': {'key': 'tier', 'type': 'str'},
'size': {'key': 'size', 'type': 'str'},
'family': {'key': 'family', 'type': 'str'},
'capacity': {'key': 'capacity', 'type': 'int'},
}

def __init__(self, name=None, tier=None, size=None, family=None, capacity=None):
super(Sku, self).__init__()
self.name = name
self.tier = tier
self.size = size
self.family = family
self.capacity = capacity
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,20 @@ class ManagementOperationState(Enum):
cancelled = "Cancelled"


class VulnerabilityAssessmentScanTriggerType(Enum):

on_demand = "OnDemand"
recurring = "Recurring"


class VulnerabilityAssessmentScanState(Enum):

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


class LongTermRetentionDatabaseState(Enum):

all = "All"
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, is_enabled=None, email_subscription_admins=True, emails=None):
super(VulnerabilityAssessmentRecurringScansProperties, self).__init__()
self.is_enabled = is_enabled
self.email_subscription_admins = email_subscription_admins
self.emails = emails
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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 VulnerabilityAssessmentScanError(Model):
"""Properties of a vulnerability assessment scan error.

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

:ivar code: The error code.
:vartype code: str
:ivar message: The error message.
:vartype message: str
"""

_validation = {
'code': {'readonly': True},
'message': {'readonly': True},
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
}

def __init__(self):
super(VulnerabilityAssessmentScanError, self).__init__()
self.code = None
self.message = None
Loading