Skip to content

Commit

Permalink
[AutoPR security/resource-manager] Adding new api-version to Microsof…
Browse files Browse the repository at this point in the history
…t.Security Alerts resource (#4283)

* Generated from f862d11a6a08b6c7243a79c2996690518313ac9a

Rollback readme change

* Packaging update of azure-mgmt-security
  • Loading branch information
AutorestCI authored Feb 1, 2019
1 parent 16c67ab commit 5d9275e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 23 deletions.
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

0 comments on commit 5d9275e

Please sign in to comment.