Skip to content

Commit 2e96558

Browse files
authored
[AutoPR securityinsights/resource-manager] Adding all ASI RP APIs (#4342)
* Generated from 36b0f2d1546045298331a242d98069c0e6af3c0c fixed the CloseReason x-ms-enum name * Generated from ceed8746e2edeaf5c211e6490bc89c52712b0f34 Fixing comments from PR * Generated from 04b7d638ff87ca0ade886655d1965ba363ce0dc7 Change in dataConnectors from contextId to the relevant ID * Generated from 8af921b0a21d3980f99401044c4f84d4467dc5a8 Fixing the code according to discussion. Actions will be only nested resource at the moment, so ruleId is not needed currently. Patterns will be removed so Guid will not be mandatory as parameter. ruleName will be cahanged to displayName in AlertRules * Generated from 455c9b456a849ede16da071ad6da7bb3ed0bfd4e Fixing validation error * Generated from 22bf30282758b6cd3f4ebb2bf535946a1851bec0 updating the operationIds to be more precise
1 parent 9a6449e commit 2e96558

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+3725
-176
lines changed

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

+80-14
Original file line numberDiff line numberDiff line change
@@ -15,57 +15,97 @@
1515
from .alert_rule_py3 import AlertRule
1616
from .alert_rule_kind1_py3 import AlertRuleKind1
1717
from .scheduled_alert_rule_py3 import ScheduledAlertRule
18+
from .action_py3 import Action
19+
from .user_info_py3 import UserInfo
20+
from .case_py3 import Case
21+
from .bookmark_py3 import Bookmark
1822
from .data_connector_py3 import DataConnector
1923
from .data_connector_kind1_py3 import DataConnectorKind1
20-
from .data_connector_context_id_py3 import DataConnectorContextId
24+
from .data_connector_tenant_id_py3 import DataConnectorTenantId
2125
from .office_data_connector_data_types_share_point_py3 import OfficeDataConnectorDataTypesSharePoint
2226
from .office_data_connector_data_types_exchange_py3 import OfficeDataConnectorDataTypesExchange
2327
from .office_data_connector_data_types_py3 import OfficeDataConnectorDataTypes
2428
from .office_data_connector_py3 import OfficeDataConnector
2529
from .ti_data_connector_data_types_indicators_py3 import TIDataConnectorDataTypesIndicators
2630
from .ti_data_connector_data_types_py3 import TIDataConnectorDataTypes
2731
from .ti_data_connector_py3 import TIDataConnector
32+
from .alerts_data_type_of_data_connector_alerts_py3 import AlertsDataTypeOfDataConnectorAlerts
33+
from .alerts_data_type_of_data_connector_py3 import AlertsDataTypeOfDataConnector
2834
from .aad_data_connector_py3 import AADDataConnector
2935
from .asc_data_connector_py3 import ASCDataConnector
3036
from .mcas_data_connector_py3 import MCASDataConnector
31-
from .alerts_data_type_of_data_connector_alerts_py3 import AlertsDataTypeOfDataConnectorAlerts
32-
from .alerts_data_type_of_data_connector_py3 import AlertsDataTypeOfDataConnector
33-
from .data_connector_with_alerts_py3 import DataConnectorWithAlerts
37+
from .data_connector_with_alerts_properties_py3 import DataConnectorWithAlertsProperties
3438
from .data_connector_data_type_common_py3 import DataConnectorDataTypeCommon
39+
from .entity_py3 import Entity
40+
from .entity_kind1_py3 import EntityKind1
41+
from .account_entity_py3 import AccountEntity
42+
from .host_entity_py3 import HostEntity
43+
from .file_entity_py3 import FileEntity
44+
from .office_consent_py3 import OfficeConsent
3545
from .resource_py3 import Resource
46+
from .settings_py3 import Settings
47+
from .settings_kind_py3 import SettingsKind
48+
from .ueba_settings_py3 import UebaSettings
49+
from .toggle_settings_py3 import ToggleSettings
3650
except (SyntaxError, ImportError):
3751
from .operation_display import OperationDisplay
3852
from .operation import Operation
3953
from .alert_rule import AlertRule
4054
from .alert_rule_kind1 import AlertRuleKind1
4155
from .scheduled_alert_rule import ScheduledAlertRule
56+
from .action import Action
57+
from .user_info import UserInfo
58+
from .case import Case
59+
from .bookmark import Bookmark
4260
from .data_connector import DataConnector
4361
from .data_connector_kind1 import DataConnectorKind1
44-
from .data_connector_context_id import DataConnectorContextId
62+
from .data_connector_tenant_id import DataConnectorTenantId
4563
from .office_data_connector_data_types_share_point import OfficeDataConnectorDataTypesSharePoint
4664
from .office_data_connector_data_types_exchange import OfficeDataConnectorDataTypesExchange
4765
from .office_data_connector_data_types import OfficeDataConnectorDataTypes
4866
from .office_data_connector import OfficeDataConnector
4967
from .ti_data_connector_data_types_indicators import TIDataConnectorDataTypesIndicators
5068
from .ti_data_connector_data_types import TIDataConnectorDataTypes
5169
from .ti_data_connector import TIDataConnector
70+
from .alerts_data_type_of_data_connector_alerts import AlertsDataTypeOfDataConnectorAlerts
71+
from .alerts_data_type_of_data_connector import AlertsDataTypeOfDataConnector
5272
from .aad_data_connector import AADDataConnector
5373
from .asc_data_connector import ASCDataConnector
5474
from .mcas_data_connector import MCASDataConnector
55-
from .alerts_data_type_of_data_connector_alerts import AlertsDataTypeOfDataConnectorAlerts
56-
from .alerts_data_type_of_data_connector import AlertsDataTypeOfDataConnector
57-
from .data_connector_with_alerts import DataConnectorWithAlerts
75+
from .data_connector_with_alerts_properties import DataConnectorWithAlertsProperties
5876
from .data_connector_data_type_common import DataConnectorDataTypeCommon
77+
from .entity import Entity
78+
from .entity_kind1 import EntityKind1
79+
from .account_entity import AccountEntity
80+
from .host_entity import HostEntity
81+
from .file_entity import FileEntity
82+
from .office_consent import OfficeConsent
5983
from .resource import Resource
84+
from .settings import Settings
85+
from .settings_kind import SettingsKind
86+
from .ueba_settings import UebaSettings
87+
from .toggle_settings import ToggleSettings
6088
from .operation_paged import OperationPaged
6189
from .alert_rule_paged import AlertRulePaged
90+
from .action_paged import ActionPaged
91+
from .case_paged import CasePaged
92+
from .bookmark_paged import BookmarkPaged
6293
from .data_connector_paged import DataConnectorPaged
94+
from .entity_paged import EntityPaged
95+
from .office_consent_paged import OfficeConsentPaged
6396
from .security_insights_enums import (
6497
AlertRuleKind,
65-
Severity,
98+
AlertSeverity,
6699
TriggerOperator,
100+
CaseSeverity,
101+
CaseStatus,
102+
CloseReason,
67103
DataConnectorKind,
68104
DataTypeState,
105+
EntityKind,
106+
OSFamily,
107+
SettingKind,
108+
StatusInMcas,
69109
)
70110

71111
__all__ = [
@@ -74,30 +114,56 @@
74114
'AlertRule',
75115
'AlertRuleKind1',
76116
'ScheduledAlertRule',
117+
'Action',
118+
'UserInfo',
119+
'Case',
120+
'Bookmark',
77121
'DataConnector',
78122
'DataConnectorKind1',
79-
'DataConnectorContextId',
123+
'DataConnectorTenantId',
80124
'OfficeDataConnectorDataTypesSharePoint',
81125
'OfficeDataConnectorDataTypesExchange',
82126
'OfficeDataConnectorDataTypes',
83127
'OfficeDataConnector',
84128
'TIDataConnectorDataTypesIndicators',
85129
'TIDataConnectorDataTypes',
86130
'TIDataConnector',
131+
'AlertsDataTypeOfDataConnectorAlerts',
132+
'AlertsDataTypeOfDataConnector',
87133
'AADDataConnector',
88134
'ASCDataConnector',
89135
'MCASDataConnector',
90-
'AlertsDataTypeOfDataConnectorAlerts',
91-
'AlertsDataTypeOfDataConnector',
92-
'DataConnectorWithAlerts',
136+
'DataConnectorWithAlertsProperties',
93137
'DataConnectorDataTypeCommon',
138+
'Entity',
139+
'EntityKind1',
140+
'AccountEntity',
141+
'HostEntity',
142+
'FileEntity',
143+
'OfficeConsent',
94144
'Resource',
145+
'Settings',
146+
'SettingsKind',
147+
'UebaSettings',
148+
'ToggleSettings',
95149
'OperationPaged',
96150
'AlertRulePaged',
151+
'ActionPaged',
152+
'CasePaged',
153+
'BookmarkPaged',
97154
'DataConnectorPaged',
155+
'EntityPaged',
156+
'OfficeConsentPaged',
98157
'AlertRuleKind',
99-
'Severity',
158+
'AlertSeverity',
100159
'TriggerOperator',
160+
'CaseSeverity',
161+
'CaseStatus',
162+
'CloseReason',
101163
'DataConnectorKind',
102164
'DataTypeState',
165+
'EntityKind',
166+
'OSFamily',
167+
'SettingKind',
168+
'StatusInMcas',
103169
]

azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from .data_connector_with_alerts import DataConnectorWithAlerts
12+
from .data_connector import DataConnector
1313

1414

15-
class AADDataConnector(DataConnectorWithAlerts):
15+
class AADDataConnector(DataConnector):
1616
"""Represents AAD (Azure Active Directory) data connector.
1717
1818
Variables are only populated by the server, and will be ignored when
@@ -30,9 +30,8 @@ class AADDataConnector(DataConnectorWithAlerts):
3030
:type etag: str
3131
:param kind: Required. Constant filled by server.
3232
:type kind: str
33-
:param context_id: The context id of the origin data source (Like
34-
tenantID, SubscriptionID etc.).
35-
:type context_id: str
33+
:param tenant_id: The tenant id to connect to, and get the data from.
34+
:type tenant_id: str
3635
:param data_types: The available data types for the connector.
3736
:type data_types:
3837
~azure.mgmt.securityinsight.models.AlertsDataTypeOfDataConnector
@@ -51,10 +50,12 @@ class AADDataConnector(DataConnectorWithAlerts):
5150
'name': {'key': 'name', 'type': 'str'},
5251
'etag': {'key': 'etag', 'type': 'str'},
5352
'kind': {'key': 'kind', 'type': 'str'},
54-
'context_id': {'key': 'properties.contextId', 'type': 'str'},
53+
'tenant_id': {'key': 'properties.tenantId', 'type': 'str'},
5554
'data_types': {'key': 'properties.dataTypes', 'type': 'AlertsDataTypeOfDataConnector'},
5655
}
5756

5857
def __init__(self, **kwargs):
5958
super(AADDataConnector, self).__init__(**kwargs)
59+
self.tenant_id = kwargs.get('tenant_id', None)
60+
self.data_types = kwargs.get('data_types', None)
6061
self.kind = 'AzureActiveDirectory'

azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector_py3.py

+9-8
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from .data_connector_with_alerts_py3 import DataConnectorWithAlerts
12+
from .data_connector_py3 import DataConnector
1313

1414

15-
class AADDataConnector(DataConnectorWithAlerts):
15+
class AADDataConnector(DataConnector):
1616
"""Represents AAD (Azure Active Directory) data connector.
1717
1818
Variables are only populated by the server, and will be ignored when
@@ -30,9 +30,8 @@ class AADDataConnector(DataConnectorWithAlerts):
3030
:type etag: str
3131
:param kind: Required. Constant filled by server.
3232
:type kind: str
33-
:param context_id: The context id of the origin data source (Like
34-
tenantID, SubscriptionID etc.).
35-
:type context_id: str
33+
:param tenant_id: The tenant id to connect to, and get the data from.
34+
:type tenant_id: str
3635
:param data_types: The available data types for the connector.
3736
:type data_types:
3837
~azure.mgmt.securityinsight.models.AlertsDataTypeOfDataConnector
@@ -51,10 +50,12 @@ class AADDataConnector(DataConnectorWithAlerts):
5150
'name': {'key': 'name', 'type': 'str'},
5251
'etag': {'key': 'etag', 'type': 'str'},
5352
'kind': {'key': 'kind', 'type': 'str'},
54-
'context_id': {'key': 'properties.contextId', 'type': 'str'},
53+
'tenant_id': {'key': 'properties.tenantId', 'type': 'str'},
5554
'data_types': {'key': 'properties.dataTypes', 'type': 'AlertsDataTypeOfDataConnector'},
5655
}
5756

58-
def __init__(self, *, etag: str=None, context_id: str=None, data_types=None, **kwargs) -> None:
59-
super(AADDataConnector, self).__init__(etag=etag, context_id=context_id, data_types=data_types, **kwargs)
57+
def __init__(self, *, etag: str=None, tenant_id: str=None, data_types=None, **kwargs) -> None:
58+
super(AADDataConnector, self).__init__(etag=etag, **kwargs)
59+
self.tenant_id = tenant_id
60+
self.data_types = data_types
6061
self.kind = 'AzureActiveDirectory'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
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 .entity import Entity
13+
14+
15+
class AccountEntity(Entity):
16+
"""Represents an account entity.
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 id: Azure resource Id
24+
:vartype id: str
25+
:ivar type: Azure resource type
26+
:vartype type: str
27+
:ivar name: Azure resource name
28+
:vartype name: str
29+
:param kind: Required. Constant filled by server.
30+
:type kind: str
31+
:ivar account_name: The name of the account. This field should hold only
32+
the name without any domain added to it, i.e. administrator.
33+
:vartype account_name: str
34+
:ivar nt_domain: The NETBIOS domain name as it appears in the alert format
35+
– domain\\username. Examples: NT AUTHORITY.
36+
:vartype nt_domain: str
37+
:ivar upn_suffix: The user principal name suffix for the account, in some
38+
cases it is also the domain name. Examples: contoso.com.
39+
:vartype upn_suffix: str
40+
:ivar sid: The account security identifier, e.g. S-1-5-18.
41+
:vartype sid: str
42+
:ivar aad_tenant_id: The Azure Active Directory tenant id.
43+
:vartype aad_tenant_id: str
44+
:ivar aad_user_id: The Azure Active Directory user id.
45+
:vartype aad_user_id: str
46+
:ivar puid: The Azure Active Directory Passport User ID.
47+
:vartype puid: str
48+
:ivar is_domain_joined: Determines whether this is a domain account.
49+
:vartype is_domain_joined: bool
50+
:ivar object_guid: The objectGUID attribute is a single-value attribute
51+
that is the unique identifier for the object, assigned by active
52+
directory.
53+
:vartype object_guid: str
54+
"""
55+
56+
_validation = {
57+
'id': {'readonly': True},
58+
'type': {'readonly': True},
59+
'name': {'readonly': True},
60+
'kind': {'required': True},
61+
'account_name': {'readonly': True},
62+
'nt_domain': {'readonly': True},
63+
'upn_suffix': {'readonly': True},
64+
'sid': {'readonly': True},
65+
'aad_tenant_id': {'readonly': True},
66+
'aad_user_id': {'readonly': True},
67+
'puid': {'readonly': True},
68+
'is_domain_joined': {'readonly': True},
69+
'object_guid': {'readonly': True},
70+
}
71+
72+
_attribute_map = {
73+
'id': {'key': 'id', 'type': 'str'},
74+
'type': {'key': 'type', 'type': 'str'},
75+
'name': {'key': 'name', 'type': 'str'},
76+
'kind': {'key': 'kind', 'type': 'str'},
77+
'account_name': {'key': 'properties.accountName', 'type': 'str'},
78+
'nt_domain': {'key': 'properties.ntDomain', 'type': 'str'},
79+
'upn_suffix': {'key': 'properties.upnSuffix', 'type': 'str'},
80+
'sid': {'key': 'properties.sid', 'type': 'str'},
81+
'aad_tenant_id': {'key': 'properties.aadTenantId', 'type': 'str'},
82+
'aad_user_id': {'key': 'properties.aadUserId', 'type': 'str'},
83+
'puid': {'key': 'properties.puid', 'type': 'str'},
84+
'is_domain_joined': {'key': 'properties.isDomainJoined', 'type': 'bool'},
85+
'object_guid': {'key': 'properties.objectGuid', 'type': 'str'},
86+
}
87+
88+
def __init__(self, **kwargs):
89+
super(AccountEntity, self).__init__(**kwargs)
90+
self.account_name = None
91+
self.nt_domain = None
92+
self.upn_suffix = None
93+
self.sid = None
94+
self.aad_tenant_id = None
95+
self.aad_user_id = None
96+
self.puid = None
97+
self.is_domain_joined = None
98+
self.object_guid = None
99+
self.kind = 'Account'

0 commit comments

Comments
 (0)