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
8 changes: 5 additions & 3 deletions azure-mgmt-security/azure/mgmt/security/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from .advanced_threat_protection_setting_py3 import AdvancedThreatProtectionSetting
from .setting_py3 import Setting
from .data_export_setting_py3 import DataExportSetting
from .setting_kind1_py3 import SettingKind1
from .setting_resource_py3 import SettingResource
from .sensitivity_label_py3 import SensitivityLabel
from .information_protection_keyword_py3 import InformationProtectionKeyword
from .information_type_py3 import InformationType
Expand Down Expand Up @@ -75,7 +75,7 @@
from .advanced_threat_protection_setting import AdvancedThreatProtectionSetting
from .setting import Setting
from .data_export_setting import DataExportSetting
from .setting_kind1 import SettingKind1
from .setting_resource import SettingResource
from .sensitivity_label import SensitivityLabel
from .information_protection_keyword import InformationProtectionKeyword
from .information_type import InformationType
Expand Down Expand Up @@ -139,6 +139,7 @@
PricingTier,
AutoProvision,
SettingKind,
ReportedSeverity,
SecurityFamily,
Protocol,
Status,
Expand All @@ -160,7 +161,7 @@
'AdvancedThreatProtectionSetting',
'Setting',
'DataExportSetting',
'SettingKind1',
'SettingResource',
'SensitivityLabel',
'InformationProtectionKeyword',
'InformationType',
Expand Down Expand Up @@ -223,6 +224,7 @@
'PricingTier',
'AutoProvision',
'SettingKind',
'ReportedSeverity',
'SecurityFamily',
'Protocol',
'Status',
Expand Down
12 changes: 10 additions & 2 deletions azure-mgmt-security/azure/mgmt/security/models/alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ class Alert(Resource):
:ivar action_taken: The action that was taken as a response to the alert
(Active, Blocked etc.)
:vartype action_taken: str
:ivar reported_severity: Estimated severity of this alert
:vartype reported_severity: str
:ivar reported_severity: Estimated severity of this alert. Possible values
include: 'Silent', 'Information', 'Low', 'High'
:vartype reported_severity: str or
~azure.mgmt.security.models.ReportedSeverity
:ivar compromised_entity: The entity that the incident happened on
:vartype compromised_entity: str
:ivar associated_resource: Azure resource ID of the associated resource
Expand All @@ -57,6 +59,9 @@ class Alert(Resource):
:ivar can_be_investigated: Whether this alert can be investigated with
Azure Security Center
:vartype can_be_investigated: bool
:ivar is_incident: Whether this alert is for incident type or not
(otherwise - single alert)
:vartype is_incident: bool
:param entities: objects that are related to this alerts
:type entities: list[~azure.mgmt.security.models.AlertEntity]
:ivar confidence_score: level of confidence we have on the alert
Expand Down Expand Up @@ -93,6 +98,7 @@ class Alert(Resource):
'associated_resource': {'readonly': True},
'system_source': {'readonly': True},
'can_be_investigated': {'readonly': True},
'is_incident': {'readonly': True},
'confidence_score': {'readonly': True, 'maximum': 1, 'minimum': 0},
'subscription_id': {'readonly': True},
'instance_id': {'readonly': True},
Expand All @@ -118,6 +124,7 @@ class Alert(Resource):
'extended_properties': {'key': 'properties.extendedProperties', 'type': '{object}'},
'system_source': {'key': 'properties.systemSource', 'type': 'str'},
'can_be_investigated': {'key': 'properties.canBeInvestigated', 'type': 'bool'},
'is_incident': {'key': 'properties.isIncident', 'type': 'bool'},
'entities': {'key': 'properties.entities', 'type': '[AlertEntity]'},
'confidence_score': {'key': 'properties.confidenceScore', 'type': 'float'},
'confidence_reasons': {'key': 'properties.confidenceReasons', 'type': '[AlertConfidenceReason]'},
Expand All @@ -143,6 +150,7 @@ def __init__(self, **kwargs):
self.extended_properties = kwargs.get('extended_properties', None)
self.system_source = None
self.can_be_investigated = None
self.is_incident = None
self.entities = kwargs.get('entities', None)
self.confidence_score = None
self.confidence_reasons = kwargs.get('confidence_reasons', None)
Expand Down
12 changes: 10 additions & 2 deletions azure-mgmt-security/azure/mgmt/security/models/alert_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ class Alert(Resource):
:ivar action_taken: The action that was taken as a response to the alert
(Active, Blocked etc.)
:vartype action_taken: str
:ivar reported_severity: Estimated severity of this alert
:vartype reported_severity: str
:ivar reported_severity: Estimated severity of this alert. Possible values
include: 'Silent', 'Information', 'Low', 'High'
:vartype reported_severity: str or
~azure.mgmt.security.models.ReportedSeverity
:ivar compromised_entity: The entity that the incident happened on
:vartype compromised_entity: str
:ivar associated_resource: Azure resource ID of the associated resource
Expand All @@ -57,6 +59,9 @@ class Alert(Resource):
:ivar can_be_investigated: Whether this alert can be investigated with
Azure Security Center
:vartype can_be_investigated: bool
:ivar is_incident: Whether this alert is for incident type or not
(otherwise - single alert)
:vartype is_incident: bool
:param entities: objects that are related to this alerts
:type entities: list[~azure.mgmt.security.models.AlertEntity]
:ivar confidence_score: level of confidence we have on the alert
Expand Down Expand Up @@ -93,6 +98,7 @@ class Alert(Resource):
'associated_resource': {'readonly': True},
'system_source': {'readonly': True},
'can_be_investigated': {'readonly': True},
'is_incident': {'readonly': True},
'confidence_score': {'readonly': True, 'maximum': 1, 'minimum': 0},
'subscription_id': {'readonly': True},
'instance_id': {'readonly': True},
Expand All @@ -118,6 +124,7 @@ class Alert(Resource):
'extended_properties': {'key': 'properties.extendedProperties', 'type': '{object}'},
'system_source': {'key': 'properties.systemSource', 'type': 'str'},
'can_be_investigated': {'key': 'properties.canBeInvestigated', 'type': 'bool'},
'is_incident': {'key': 'properties.isIncident', 'type': 'bool'},
'entities': {'key': 'properties.entities', 'type': '[AlertEntity]'},
'confidence_score': {'key': 'properties.confidenceScore', 'type': 'float'},
'confidence_reasons': {'key': 'properties.confidenceReasons', 'type': '[AlertConfidenceReason]'},
Expand All @@ -143,6 +150,7 @@ def __init__(self, *, extended_properties=None, entities=None, confidence_reason
self.extended_properties = extended_properties
self.system_source = None
self.can_be_investigated = None
self.is_incident = None
self.entities = entities
self.confidence_score = None
self.confidence_reasons = confidence_reasons
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ class DataExportSetting(Setting):
:vartype name: str
:ivar type: Resource type
:vartype type: str
:param kind: Required. Constant filled by server.
:type kind: str
:param kind: Required. the kind of the settings string
(DataExportSetting). Possible values include: 'DataExportSetting',
'AlertSuppressionSetting'
:type kind: str or ~azure.mgmt.security.models.SettingKind
:param enabled: Required. Is the data export setting is enabled
:type enabled: bool
"""
Expand All @@ -51,4 +53,3 @@ class DataExportSetting(Setting):
def __init__(self, **kwargs):
super(DataExportSetting, self).__init__(**kwargs)
self.enabled = kwargs.get('enabled', None)
self.kind = 'DataExportSetting'
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ class DataExportSetting(Setting):
:vartype name: str
:ivar type: Resource type
:vartype type: str
:param kind: Required. Constant filled by server.
:type kind: str
:param kind: Required. the kind of the settings string
(DataExportSetting). Possible values include: 'DataExportSetting',
'AlertSuppressionSetting'
:type kind: str or ~azure.mgmt.security.models.SettingKind
:param enabled: Required. Is the data export setting is enabled
:type enabled: bool
"""
Expand All @@ -48,7 +50,6 @@ class DataExportSetting(Setting):
'enabled': {'key': 'properties.enabled', 'type': 'bool'},
}

def __init__(self, *, enabled: bool, **kwargs) -> None:
super(DataExportSetting, self).__init__(**kwargs)
def __init__(self, *, kind, enabled: bool, **kwargs) -> None:
super(DataExportSetting, self).__init__(kind=kind, **kwargs)
self.enabled = enabled
self.kind = 'DataExportSetting'
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ class AutoProvision(str, Enum):
class SettingKind(str, Enum):

data_export_setting = "DataExportSetting"
alert_suppression_setting = "AlertSuppressionSetting"


class ReportedSeverity(str, Enum):

silent = "Silent"
information = "Information"
low = "Low"
high = "High"


class SecurityFamily(str, Enum):
Expand Down
21 changes: 6 additions & 15 deletions azure-mgmt-security/azure/mgmt/security/models/setting.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model
from .setting_resource import SettingResource


class Setting(Model):
class Setting(SettingResource):
"""Represents a security setting in Azure Security Center.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: DataExportSetting

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

Expand All @@ -29,8 +26,10 @@ class Setting(Model):
:vartype name: str
:ivar type: Resource type
:vartype type: str
:param kind: Required. Constant filled by server.
:type kind: str
:param kind: Required. the kind of the settings string
(DataExportSetting). Possible values include: 'DataExportSetting',
'AlertSuppressionSetting'
:type kind: str or ~azure.mgmt.security.models.SettingKind
"""

_validation = {
Expand All @@ -47,13 +46,5 @@ class Setting(Model):
'kind': {'key': 'kind', 'type': 'str'},
}

_subtype_map = {
'kind': {'DataExportSetting': 'DataExportSetting'}
}

def __init__(self, **kwargs):
super(Setting, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
self.kind = None
29 changes: 0 additions & 29 deletions azure-mgmt-security/azure/mgmt/security/models/setting_kind1.py

This file was deleted.

This file was deleted.

25 changes: 8 additions & 17 deletions azure-mgmt-security/azure/mgmt/security/models/setting_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model
from .setting_resource_py3 import SettingResource


class Setting(Model):
class Setting(SettingResource):
"""Represents a security setting in Azure Security Center.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: DataExportSetting

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

Expand All @@ -29,8 +26,10 @@ class Setting(Model):
:vartype name: str
:ivar type: Resource type
:vartype type: str
:param kind: Required. Constant filled by server.
:type kind: str
:param kind: Required. the kind of the settings string
(DataExportSetting). Possible values include: 'DataExportSetting',
'AlertSuppressionSetting'
:type kind: str or ~azure.mgmt.security.models.SettingKind
"""

_validation = {
Expand All @@ -47,13 +46,5 @@ class Setting(Model):
'kind': {'key': 'kind', 'type': 'str'},
}

_subtype_map = {
'kind': {'DataExportSetting': 'DataExportSetting'}
}

def __init__(self, **kwargs) -> None:
super(Setting, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
self.kind = None
def __init__(self, *, kind, **kwargs) -> None:
super(Setting, self).__init__(kind=kind, **kwargs)
51 changes: 51 additions & 0 deletions azure-mgmt-security/azure/mgmt/security/models/setting_resource.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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 .resource import Resource


class SettingResource(Resource):
"""The kind of the security setting.

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 kind: Required. the kind of the settings string
(DataExportSetting). Possible values include: 'DataExportSetting',
'AlertSuppressionSetting'
:type kind: str or ~azure.mgmt.security.models.SettingKind
"""

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

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'kind': {'key': 'kind', 'type': 'str'},
}

def __init__(self, **kwargs):
super(SettingResource, self).__init__(**kwargs)
self.kind = kwargs.get('kind', None)
Loading