Skip to content

[AutoPR security/resource-manager] Security: 2017-08-01-preview - Introduce IoT security groups resource #4112

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

Merged
merged 6 commits into from
Mar 25, 2019
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
1 change: 1 addition & 0 deletions azure-mgmt-security/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py
Expand Down
22 changes: 3 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 All @@ -47,3 +28,6 @@ Provide Feedback
If you encounter any bugs or have suggestions, please file an issue in the
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
section of the project.


.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-security%2FREADME.png
107 changes: 76 additions & 31 deletions azure-mgmt-security/azure/mgmt/security/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,42 @@
# --------------------------------------------------------------------------

try:
from .regulatory_compliance_standard_py3 import RegulatoryComplianceStandard
from .regulatory_compliance_control_py3 import RegulatoryComplianceControl
from .regulatory_compliance_assessment_py3 import RegulatoryComplianceAssessment
from .asc_location_py3 import AscLocation
from .resource_py3 import Resource
from .kind_py3 import Kind
from .security_contact_py3 import SecurityContact
from .pricing_py3 import Pricing
from .pricing_list_py3 import PricingList
from .security_contact_py3 import SecurityContact
from .workspace_setting_py3 import WorkspaceSetting
from .auto_provisioning_setting_py3 import AutoProvisioningSetting
from .compliance_segment_py3 import ComplianceSegment
from .compliance_py3 import Compliance
from .advanced_threat_protection_setting_py3 import AdvancedThreatProtectionSetting
from .threshold_custom_alert_rule_py3 import ThresholdCustomAlertRule
from .time_window_custom_alert_rule_py3 import TimeWindowCustomAlertRule
from .allowlist_custom_alert_rule_py3 import AllowlistCustomAlertRule
from .denylist_custom_alert_rule_py3 import DenylistCustomAlertRule
from .device_security_group_py3 import DeviceSecurityGroup
from .custom_alert_rule_py3 import CustomAlertRule
from .list_custom_alert_rule_py3 import ListCustomAlertRule
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
from .information_protection_policy_py3 import InformationProtectionPolicy
from .location_py3 import Location
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .security_task_parameters_py3 import SecurityTaskParameters
from .security_task_py3 import SecurityTask
from .asc_location_py3 import AscLocation
from .alert_entity_py3 import AlertEntity
from .alert_confidence_reason_py3 import AlertConfidenceReason
from .alert_py3 import Alert
from .discovered_security_solution_py3 import DiscoveredSecuritySolution
from .topology_single_resource_parent_py3 import TopologySingleResourceParent
from .topology_single_resource_child_py3 import TopologySingleResourceChild
from .topology_single_resource_py3 import TopologySingleResource
from .topology_resource_py3 import TopologyResource
from .location_py3 import Location
from .jit_network_access_port_rule_py3 import JitNetworkAccessPortRule
from .jit_network_access_policy_virtual_machine_py3 import JitNetworkAccessPolicyVirtualMachine
from .jit_network_access_request_port_py3 import JitNetworkAccessRequestPort
Expand All @@ -49,6 +55,7 @@
from .jit_network_access_policy_initiate_port_py3 import JitNetworkAccessPolicyInitiatePort
from .jit_network_access_policy_initiate_virtual_machine_py3 import JitNetworkAccessPolicyInitiateVirtualMachine
from .jit_network_access_policy_initiate_request_py3 import JitNetworkAccessPolicyInitiateRequest
from .kind_py3 import Kind
from .external_security_solution_py3 import ExternalSecuritySolution
from .cef_solution_properties_py3 import CefSolutionProperties
from .cef_external_security_solution_py3 import CefExternalSecuritySolution
Expand All @@ -60,40 +67,50 @@
from .external_security_solution_kind1_py3 import ExternalSecuritySolutionKind1
from .external_security_solution_properties_py3 import ExternalSecuritySolutionProperties
from .aad_connectivity_state1_py3 import AadConnectivityState1
from .topology_single_resource_parent_py3 import TopologySingleResourceParent
from .topology_single_resource_child_py3 import TopologySingleResourceChild
from .topology_single_resource_py3 import TopologySingleResource
from .topology_resource_py3 import TopologyResource
from .connected_resource_py3 import ConnectedResource
from .connectable_resource_py3 import ConnectableResource
from .allowed_connections_resource_py3 import AllowedConnectionsResource
except (SyntaxError, ImportError):
from .regulatory_compliance_standard import RegulatoryComplianceStandard
from .regulatory_compliance_control import RegulatoryComplianceControl
from .regulatory_compliance_assessment import RegulatoryComplianceAssessment
from .asc_location import AscLocation
from .resource import Resource
from .kind import Kind
from .security_contact import SecurityContact
from .pricing import Pricing
from .pricing_list import PricingList
from .security_contact import SecurityContact
from .workspace_setting import WorkspaceSetting
from .auto_provisioning_setting import AutoProvisioningSetting
from .compliance_segment import ComplianceSegment
from .compliance import Compliance
from .advanced_threat_protection_setting import AdvancedThreatProtectionSetting
from .threshold_custom_alert_rule import ThresholdCustomAlertRule
from .time_window_custom_alert_rule import TimeWindowCustomAlertRule
from .allowlist_custom_alert_rule import AllowlistCustomAlertRule
from .denylist_custom_alert_rule import DenylistCustomAlertRule
from .device_security_group import DeviceSecurityGroup
from .custom_alert_rule import CustomAlertRule
from .list_custom_alert_rule import ListCustomAlertRule
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
from .information_protection_policy import InformationProtectionPolicy
from .location import Location
from .operation_display import OperationDisplay
from .operation import Operation
from .security_task_parameters import SecurityTaskParameters
from .security_task import SecurityTask
from .asc_location import AscLocation
from .alert_entity import AlertEntity
from .alert_confidence_reason import AlertConfidenceReason
from .alert import Alert
from .discovered_security_solution import DiscoveredSecuritySolution
from .topology_single_resource_parent import TopologySingleResourceParent
from .topology_single_resource_child import TopologySingleResourceChild
from .topology_single_resource import TopologySingleResource
from .topology_resource import TopologyResource
from .location import Location
from .jit_network_access_port_rule import JitNetworkAccessPortRule
from .jit_network_access_policy_virtual_machine import JitNetworkAccessPolicyVirtualMachine
from .jit_network_access_request_port import JitNetworkAccessRequestPort
Expand All @@ -103,6 +120,7 @@
from .jit_network_access_policy_initiate_port import JitNetworkAccessPolicyInitiatePort
from .jit_network_access_policy_initiate_virtual_machine import JitNetworkAccessPolicyInitiateVirtualMachine
from .jit_network_access_policy_initiate_request import JitNetworkAccessPolicyInitiateRequest
from .kind import Kind
from .external_security_solution import ExternalSecuritySolution
from .cef_solution_properties import CefSolutionProperties
from .cef_external_security_solution import CefExternalSecuritySolution
Expand All @@ -114,14 +132,21 @@
from .external_security_solution_kind1 import ExternalSecuritySolutionKind1
from .external_security_solution_properties import ExternalSecuritySolutionProperties
from .aad_connectivity_state1 import AadConnectivityState1
from .topology_single_resource_parent import TopologySingleResourceParent
from .topology_single_resource_child import TopologySingleResourceChild
from .topology_single_resource import TopologySingleResource
from .topology_resource import TopologyResource
from .connected_resource import ConnectedResource
from .connectable_resource import ConnectableResource
from .allowed_connections_resource import AllowedConnectionsResource
from .pricing_paged import PricingPaged
from .regulatory_compliance_standard_paged import RegulatoryComplianceStandardPaged
from .regulatory_compliance_control_paged import RegulatoryComplianceControlPaged
from .regulatory_compliance_assessment_paged import RegulatoryComplianceAssessmentPaged
from .security_contact_paged import SecurityContactPaged
from .workspace_setting_paged import WorkspaceSettingPaged
from .auto_provisioning_setting_paged import AutoProvisioningSettingPaged
from .compliance_paged import CompliancePaged
from .device_security_group_paged import DeviceSecurityGroupPaged
from .setting_paged import SettingPaged
from .information_protection_policy_paged import InformationProtectionPolicyPaged
from .operation_paged import OperationPaged
Expand All @@ -134,11 +159,14 @@
from .topology_resource_paged import TopologyResourcePaged
from .allowed_connections_resource_paged import AllowedConnectionsResourcePaged
from .security_center_enums import (
State,
PricingTier,
AlertNotifications,
AlertsToAdmins,
PricingTier,
AutoProvision,
ValueType,
SettingKind,
ReportedSeverity,
SecurityFamily,
Protocol,
Status,
Expand All @@ -149,36 +177,42 @@
)

__all__ = [
'RegulatoryComplianceStandard',
'RegulatoryComplianceControl',
'RegulatoryComplianceAssessment',
'AscLocation',
'Resource',
'Kind',
'SecurityContact',
'Pricing',
'PricingList',
'SecurityContact',
'WorkspaceSetting',
'AutoProvisioningSetting',
'ComplianceSegment',
'Compliance',
'AdvancedThreatProtectionSetting',
'ThresholdCustomAlertRule',
'TimeWindowCustomAlertRule',
'AllowlistCustomAlertRule',
'DenylistCustomAlertRule',
'DeviceSecurityGroup',
'CustomAlertRule',
'ListCustomAlertRule',
'Setting',
'DataExportSetting',
'SettingKind1',
'SettingResource',
'SensitivityLabel',
'InformationProtectionKeyword',
'InformationType',
'InformationProtectionPolicy',
'Location',
'OperationDisplay',
'Operation',
'SecurityTaskParameters',
'SecurityTask',
'AscLocation',
'AlertEntity',
'AlertConfidenceReason',
'Alert',
'DiscoveredSecuritySolution',
'TopologySingleResourceParent',
'TopologySingleResourceChild',
'TopologySingleResource',
'TopologyResource',
'Location',
'JitNetworkAccessPortRule',
'JitNetworkAccessPolicyVirtualMachine',
'JitNetworkAccessRequestPort',
Expand All @@ -188,6 +222,7 @@
'JitNetworkAccessPolicyInitiatePort',
'JitNetworkAccessPolicyInitiateVirtualMachine',
'JitNetworkAccessPolicyInitiateRequest',
'Kind',
'ExternalSecuritySolution',
'CefSolutionProperties',
'CefExternalSecuritySolution',
Expand All @@ -199,14 +234,21 @@
'ExternalSecuritySolutionKind1',
'ExternalSecuritySolutionProperties',
'AadConnectivityState1',
'TopologySingleResourceParent',
'TopologySingleResourceChild',
'TopologySingleResource',
'TopologyResource',
'ConnectedResource',
'ConnectableResource',
'AllowedConnectionsResource',
'PricingPaged',
'RegulatoryComplianceStandardPaged',
'RegulatoryComplianceControlPaged',
'RegulatoryComplianceAssessmentPaged',
'SecurityContactPaged',
'WorkspaceSettingPaged',
'AutoProvisioningSettingPaged',
'CompliancePaged',
'DeviceSecurityGroupPaged',
'SettingPaged',
'InformationProtectionPolicyPaged',
'OperationPaged',
Expand All @@ -218,11 +260,14 @@
'ExternalSecuritySolutionPaged',
'TopologyResourcePaged',
'AllowedConnectionsResourcePaged',
'State',
'PricingTier',
'AlertNotifications',
'AlertsToAdmins',
'PricingTier',
'AutoProvision',
'ValueType',
'SettingKind',
'ReportedSeverity',
'SecurityFamily',
'Protocol',
'Status',
Expand Down
18 changes: 16 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: 'Informational', 'Low', 'Medium', '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 All @@ -73,6 +78,9 @@ class Alert(Resource):
:ivar workspace_arm_id: Azure resource ID of the workspace that the alert
was reported to.
:vartype workspace_arm_id: str
:ivar correlation_key: Alerts with the same CorrelationKey will be grouped
together in Ibiza.
:vartype correlation_key: str
"""

_validation = {
Expand All @@ -93,10 +101,12 @@ 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},
'workspace_arm_id': {'readonly': True},
'correlation_key': {'readonly': True},
}

_attribute_map = {
Expand All @@ -118,12 +128,14 @@ 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]'},
'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'},
'instance_id': {'key': 'properties.instanceId', 'type': 'str'},
'workspace_arm_id': {'key': 'properties.workspaceArmId', 'type': 'str'},
'correlation_key': {'key': 'properties.correlationKey', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -143,9 +155,11 @@ 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)
self.subscription_id = None
self.instance_id = None
self.workspace_arm_id = None
self.correlation_key = None
Loading