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 security/resource-manager] Adding new api-version to Microsoft.Security Alerts resource #4283

Merged
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
19 changes: 0 additions & 19 deletions azure-mgmt-security/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell

pip freeze

If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell

pip uninstall azure


Usage
=====

Expand Down
2 changes: 2 additions & 0 deletions azure-mgmt-security/azure/mgmt/security/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
PricingTier,
AutoProvision,
SettingKind,
ReportedSeverity,
SecurityFamily,
Protocol,
Status,
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 @@ -42,6 +42,14 @@ class SettingKind(str, Enum):
alert_suppression_setting = "AlertSuppressionSetting"


class ReportedSeverity(str, Enum):

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


class SecurityFamily(str, Enum):

waf = "Waf"
Expand Down