Skip to content

Commit b19e1bc

Browse files
authored
[AutoPR security/resource-manager] Security: 2017-08-01-preview - Introduce IoT security groups resource (#4112)
* Generated from c55343d67df9f202ebbfdc2670f167350fe265ea Some fixes after validation * Generated from d6824620292538df997c2da42c9deda14ee9a90f Change resource name, add x-ms-pagable * Generated from 0cfbd83907e23a9364669f804e9442d771ad088b Sync with master (split files by resource type), add value type * Packaging update of azure-mgmt-security * Generated from 45af2dd2143cc9b695ea876a68496401cb37acb9 Fix readme file * Generated from 67d905e193967e7a8c35511c87239b4f052314a1 delete unreferenced example file
1 parent 7619ab8 commit b19e1bc

20 files changed

+1187
-0
lines changed

azure-mgmt-security/azure/mgmt/security/models/__init__.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323
from .compliance_segment_py3 import ComplianceSegment
2424
from .compliance_py3 import Compliance
2525
from .advanced_threat_protection_setting_py3 import AdvancedThreatProtectionSetting
26+
from .threshold_custom_alert_rule_py3 import ThresholdCustomAlertRule
27+
from .time_window_custom_alert_rule_py3 import TimeWindowCustomAlertRule
28+
from .allowlist_custom_alert_rule_py3 import AllowlistCustomAlertRule
29+
from .denylist_custom_alert_rule_py3 import DenylistCustomAlertRule
30+
from .device_security_group_py3 import DeviceSecurityGroup
31+
from .custom_alert_rule_py3 import CustomAlertRule
32+
from .list_custom_alert_rule_py3 import ListCustomAlertRule
2633
from .setting_py3 import Setting
2734
from .data_export_setting_py3 import DataExportSetting
2835
from .setting_resource_py3 import SettingResource
@@ -81,6 +88,13 @@
8188
from .compliance_segment import ComplianceSegment
8289
from .compliance import Compliance
8390
from .advanced_threat_protection_setting import AdvancedThreatProtectionSetting
91+
from .threshold_custom_alert_rule import ThresholdCustomAlertRule
92+
from .time_window_custom_alert_rule import TimeWindowCustomAlertRule
93+
from .allowlist_custom_alert_rule import AllowlistCustomAlertRule
94+
from .denylist_custom_alert_rule import DenylistCustomAlertRule
95+
from .device_security_group import DeviceSecurityGroup
96+
from .custom_alert_rule import CustomAlertRule
97+
from .list_custom_alert_rule import ListCustomAlertRule
8498
from .setting import Setting
8599
from .data_export_setting import DataExportSetting
86100
from .setting_resource import SettingResource
@@ -132,6 +146,7 @@
132146
from .workspace_setting_paged import WorkspaceSettingPaged
133147
from .auto_provisioning_setting_paged import AutoProvisioningSettingPaged
134148
from .compliance_paged import CompliancePaged
149+
from .device_security_group_paged import DeviceSecurityGroupPaged
135150
from .setting_paged import SettingPaged
136151
from .information_protection_policy_paged import InformationProtectionPolicyPaged
137152
from .operation_paged import OperationPaged
@@ -149,6 +164,7 @@
149164
AlertNotifications,
150165
AlertsToAdmins,
151166
AutoProvision,
167+
ValueType,
152168
SettingKind,
153169
ReportedSeverity,
154170
SecurityFamily,
@@ -174,6 +190,13 @@
174190
'ComplianceSegment',
175191
'Compliance',
176192
'AdvancedThreatProtectionSetting',
193+
'ThresholdCustomAlertRule',
194+
'TimeWindowCustomAlertRule',
195+
'AllowlistCustomAlertRule',
196+
'DenylistCustomAlertRule',
197+
'DeviceSecurityGroup',
198+
'CustomAlertRule',
199+
'ListCustomAlertRule',
177200
'Setting',
178201
'DataExportSetting',
179202
'SettingResource',
@@ -225,6 +248,7 @@
225248
'WorkspaceSettingPaged',
226249
'AutoProvisioningSettingPaged',
227250
'CompliancePaged',
251+
'DeviceSecurityGroupPaged',
228252
'SettingPaged',
229253
'InformationProtectionPolicyPaged',
230254
'OperationPaged',
@@ -241,6 +265,7 @@
241265
'AlertNotifications',
242266
'AlertsToAdmins',
243267
'AutoProvision',
268+
'ValueType',
244269
'SettingKind',
245270
'ReportedSeverity',
246271
'SecurityFamily',
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .list_custom_alert_rule import ListCustomAlertRule
13+
14+
15+
class AllowlistCustomAlertRule(ListCustomAlertRule):
16+
"""A custom alert rule that checks if a value (depends on the custom alert
17+
type) is allowed.
18+
19+
Variables are only populated by the server, and will be ignored when
20+
sending a request.
21+
22+
All required parameters must be populated in order to send to Azure.
23+
24+
:ivar display_name: The display name of the custom alert.
25+
:vartype display_name: str
26+
:ivar description: The description of the custom alert.
27+
:vartype description: str
28+
:param is_enabled: Required. Whether the custom alert is enabled.
29+
:type is_enabled: bool
30+
:param rule_type: Required. The type of the custom alert rule.
31+
:type rule_type: str
32+
:ivar value_type: The value type of the items in the list. Possible values
33+
include: 'IpCidr', 'String'
34+
:vartype value_type: str or ~azure.mgmt.security.models.ValueType
35+
:param allowlist_values: Required. The values to allow. The format of the
36+
values depends on the rule type.
37+
:type allowlist_values: list[str]
38+
"""
39+
40+
_validation = {
41+
'display_name': {'readonly': True},
42+
'description': {'readonly': True},
43+
'is_enabled': {'required': True},
44+
'rule_type': {'required': True},
45+
'value_type': {'readonly': True},
46+
'allowlist_values': {'required': True},
47+
}
48+
49+
_attribute_map = {
50+
'display_name': {'key': 'displayName', 'type': 'str'},
51+
'description': {'key': 'description', 'type': 'str'},
52+
'is_enabled': {'key': 'isEnabled', 'type': 'bool'},
53+
'rule_type': {'key': 'ruleType', 'type': 'str'},
54+
'value_type': {'key': 'valueType', 'type': 'str'},
55+
'allowlist_values': {'key': 'allowlistValues', 'type': '[str]'},
56+
}
57+
58+
def __init__(self, **kwargs):
59+
super(AllowlistCustomAlertRule, self).__init__(**kwargs)
60+
self.allowlist_values = kwargs.get('allowlist_values', None)
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .list_custom_alert_rule_py3 import ListCustomAlertRule
13+
14+
15+
class AllowlistCustomAlertRule(ListCustomAlertRule):
16+
"""A custom alert rule that checks if a value (depends on the custom alert
17+
type) is allowed.
18+
19+
Variables are only populated by the server, and will be ignored when
20+
sending a request.
21+
22+
All required parameters must be populated in order to send to Azure.
23+
24+
:ivar display_name: The display name of the custom alert.
25+
:vartype display_name: str
26+
:ivar description: The description of the custom alert.
27+
:vartype description: str
28+
:param is_enabled: Required. Whether the custom alert is enabled.
29+
:type is_enabled: bool
30+
:param rule_type: Required. The type of the custom alert rule.
31+
:type rule_type: str
32+
:ivar value_type: The value type of the items in the list. Possible values
33+
include: 'IpCidr', 'String'
34+
:vartype value_type: str or ~azure.mgmt.security.models.ValueType
35+
:param allowlist_values: Required. The values to allow. The format of the
36+
values depends on the rule type.
37+
:type allowlist_values: list[str]
38+
"""
39+
40+
_validation = {
41+
'display_name': {'readonly': True},
42+
'description': {'readonly': True},
43+
'is_enabled': {'required': True},
44+
'rule_type': {'required': True},
45+
'value_type': {'readonly': True},
46+
'allowlist_values': {'required': True},
47+
}
48+
49+
_attribute_map = {
50+
'display_name': {'key': 'displayName', 'type': 'str'},
51+
'description': {'key': 'description', 'type': 'str'},
52+
'is_enabled': {'key': 'isEnabled', 'type': 'bool'},
53+
'rule_type': {'key': 'ruleType', 'type': 'str'},
54+
'value_type': {'key': 'valueType', 'type': 'str'},
55+
'allowlist_values': {'key': 'allowlistValues', 'type': '[str]'},
56+
}
57+
58+
def __init__(self, *, is_enabled: bool, rule_type: str, allowlist_values, **kwargs) -> None:
59+
super(AllowlistCustomAlertRule, self).__init__(is_enabled=is_enabled, rule_type=rule_type, **kwargs)
60+
self.allowlist_values = allowlist_values
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class CustomAlertRule(Model):
16+
"""A custom alert rule.
17+
18+
Variables are only populated by the server, and will be ignored when
19+
sending a request.
20+
21+
All required parameters must be populated in order to send to Azure.
22+
23+
:ivar display_name: The display name of the custom alert.
24+
:vartype display_name: str
25+
:ivar description: The description of the custom alert.
26+
:vartype description: str
27+
:param is_enabled: Required. Whether the custom alert is enabled.
28+
:type is_enabled: bool
29+
:param rule_type: Required. The type of the custom alert rule.
30+
:type rule_type: str
31+
"""
32+
33+
_validation = {
34+
'display_name': {'readonly': True},
35+
'description': {'readonly': True},
36+
'is_enabled': {'required': True},
37+
'rule_type': {'required': True},
38+
}
39+
40+
_attribute_map = {
41+
'display_name': {'key': 'displayName', 'type': 'str'},
42+
'description': {'key': 'description', 'type': 'str'},
43+
'is_enabled': {'key': 'isEnabled', 'type': 'bool'},
44+
'rule_type': {'key': 'ruleType', 'type': 'str'},
45+
}
46+
47+
def __init__(self, **kwargs):
48+
super(CustomAlertRule, self).__init__(**kwargs)
49+
self.display_name = None
50+
self.description = None
51+
self.is_enabled = kwargs.get('is_enabled', None)
52+
self.rule_type = kwargs.get('rule_type', None)
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class CustomAlertRule(Model):
16+
"""A custom alert rule.
17+
18+
Variables are only populated by the server, and will be ignored when
19+
sending a request.
20+
21+
All required parameters must be populated in order to send to Azure.
22+
23+
:ivar display_name: The display name of the custom alert.
24+
:vartype display_name: str
25+
:ivar description: The description of the custom alert.
26+
:vartype description: str
27+
:param is_enabled: Required. Whether the custom alert is enabled.
28+
:type is_enabled: bool
29+
:param rule_type: Required. The type of the custom alert rule.
30+
:type rule_type: str
31+
"""
32+
33+
_validation = {
34+
'display_name': {'readonly': True},
35+
'description': {'readonly': True},
36+
'is_enabled': {'required': True},
37+
'rule_type': {'required': True},
38+
}
39+
40+
_attribute_map = {
41+
'display_name': {'key': 'displayName', 'type': 'str'},
42+
'description': {'key': 'description', 'type': 'str'},
43+
'is_enabled': {'key': 'isEnabled', 'type': 'bool'},
44+
'rule_type': {'key': 'ruleType', 'type': 'str'},
45+
}
46+
47+
def __init__(self, *, is_enabled: bool, rule_type: str, **kwargs) -> None:
48+
super(CustomAlertRule, self).__init__(**kwargs)
49+
self.display_name = None
50+
self.description = None
51+
self.is_enabled = is_enabled
52+
self.rule_type = rule_type
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .list_custom_alert_rule import ListCustomAlertRule
13+
14+
15+
class DenylistCustomAlertRule(ListCustomAlertRule):
16+
"""A custom alert rule that checks if a value (depends on the custom alert
17+
type) is denied.
18+
19+
Variables are only populated by the server, and will be ignored when
20+
sending a request.
21+
22+
All required parameters must be populated in order to send to Azure.
23+
24+
:ivar display_name: The display name of the custom alert.
25+
:vartype display_name: str
26+
:ivar description: The description of the custom alert.
27+
:vartype description: str
28+
:param is_enabled: Required. Whether the custom alert is enabled.
29+
:type is_enabled: bool
30+
:param rule_type: Required. The type of the custom alert rule.
31+
:type rule_type: str
32+
:ivar value_type: The value type of the items in the list. Possible values
33+
include: 'IpCidr', 'String'
34+
:vartype value_type: str or ~azure.mgmt.security.models.ValueType
35+
:param denylist_values: Required. The values to deny. The format of the
36+
values depends on the rule type.
37+
:type denylist_values: list[str]
38+
"""
39+
40+
_validation = {
41+
'display_name': {'readonly': True},
42+
'description': {'readonly': True},
43+
'is_enabled': {'required': True},
44+
'rule_type': {'required': True},
45+
'value_type': {'readonly': True},
46+
'denylist_values': {'required': True},
47+
}
48+
49+
_attribute_map = {
50+
'display_name': {'key': 'displayName', 'type': 'str'},
51+
'description': {'key': 'description', 'type': 'str'},
52+
'is_enabled': {'key': 'isEnabled', 'type': 'bool'},
53+
'rule_type': {'key': 'ruleType', 'type': 'str'},
54+
'value_type': {'key': 'valueType', 'type': 'str'},
55+
'denylist_values': {'key': 'denylistValues', 'type': '[str]'},
56+
}
57+
58+
def __init__(self, **kwargs):
59+
super(DenylistCustomAlertRule, self).__init__(**kwargs)
60+
self.denylist_values = kwargs.get('denylist_values', None)

0 commit comments

Comments
 (0)