From c8ac99e1aa429c6815d0dcb7aacabe3d601113b4 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 11 Feb 2019 17:40:00 +0000 Subject: [PATCH 1/6] Generated from 36b0f2d1546045298331a242d98069c0e6af3c0c fixed the CloseReason x-ms-enum name --- .../mgmt/securityinsight/models/__init__.py | 73 +++- .../securityinsight/models/account_entity.py | 99 ++++++ .../models/account_entity_py3.py | 99 ++++++ .../mgmt/securityinsight/models/action.py | 55 +++ .../securityinsight/models/action_paged.py | 27 ++ .../mgmt/securityinsight/models/action_py3.py | 55 +++ .../mgmt/securityinsight/models/bookmark.py | 82 +++++ .../securityinsight/models/bookmark_paged.py | 27 ++ .../models/bookmark_properties_updated_by.py | 36 ++ .../bookmark_properties_updated_by_py3.py | 36 ++ .../securityinsight/models/bookmark_py3.py | 82 +++++ .../azure/mgmt/securityinsight/models/case.py | 98 ++++++ .../mgmt/securityinsight/models/case_paged.py | 27 ++ .../mgmt/securityinsight/models/case_py3.py | 98 ++++++ .../mgmt/securityinsight/models/entity.py | 59 ++++ .../securityinsight/models/entity_kind1.py | 29 ++ .../models/entity_kind1_py3.py | 29 ++ .../securityinsight/models/entity_paged.py | 27 ++ .../mgmt/securityinsight/models/entity_py3.py | 59 ++++ .../securityinsight/models/file_entity.py | 60 ++++ .../securityinsight/models/file_entity_py3.py | 60 ++++ .../securityinsight/models/host_entity.py | 97 ++++++ .../securityinsight/models/host_entity_py3.py | 97 ++++++ .../securityinsight/models/office_consent.py | 51 +++ .../models/office_consent_paged.py | 27 ++ .../models/office_consent_py3.py | 51 +++ .../models/scheduled_alert_rule.py | 6 +- .../models/scheduled_alert_rule_py3.py | 6 +- .../models/security_insights_enums.py | 61 +++- .../mgmt/securityinsight/models/settings.py | 59 ++++ .../securityinsight/models/settings_kind.py | 29 ++ .../models/settings_kind_py3.py | 29 ++ .../securityinsight/models/settings_py3.py | 59 ++++ .../securityinsight/models/toggle_settings.py | 53 +++ .../models/toggle_settings_py3.py | 53 +++ .../securityinsight/models/ueba_settings.py | 65 ++++ .../models/ueba_settings_py3.py | 65 ++++ .../mgmt/securityinsight/models/user_info.py | 36 ++ .../securityinsight/models/user_info_py3.py | 36 ++ .../securityinsight/operations/__init__.py | 12 + .../operations/actions_operations.py | 191 +++++++++++ .../operations/alert_rules_operations.py | 224 +++++++++++- .../operations/bookmarks_operations.py | 322 ++++++++++++++++++ .../operations/cases_operations.py | 322 ++++++++++++++++++ .../operations/entities_operations.py | 183 ++++++++++ .../operations/office_consents_operations.py | 244 +++++++++++++ .../operations/product_settings_operations.py | 184 ++++++++++ .../mgmt/securityinsight/security_insights.py | 30 ++ 48 files changed, 3795 insertions(+), 14 deletions(-) create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity_py3.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_paged.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_py3.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_paged.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_properties_updated_by.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_properties_updated_by_py3.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_py3.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_paged.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_py3.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_kind1.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_kind1_py3.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_paged.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_py3.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity_py3.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/host_entity.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/host_entity_py3.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent_paged.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent_py3.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_kind.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_kind_py3.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_py3.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings_py3.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings_py3.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/user_info.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/user_info_py3.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/actions_operations.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/bookmarks_operations.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/cases_operations.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/entities_operations.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/office_consents_operations.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/product_settings_operations.py diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py index 394ab63dd677..b881594814cd 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py @@ -15,6 +15,11 @@ from .alert_rule_py3 import AlertRule from .alert_rule_kind1_py3 import AlertRuleKind1 from .scheduled_alert_rule_py3 import ScheduledAlertRule + from .action_py3 import Action + from .user_info_py3 import UserInfo + from .case_py3 import Case + from .bookmark_properties_updated_by_py3 import BookmarkPropertiesUpdatedBy + from .bookmark_py3 import Bookmark from .data_connector_py3 import DataConnector from .data_connector_kind1_py3 import DataConnectorKind1 from .data_connector_context_id_py3 import DataConnectorContextId @@ -32,13 +37,28 @@ from .alerts_data_type_of_data_connector_py3 import AlertsDataTypeOfDataConnector from .data_connector_with_alerts_py3 import DataConnectorWithAlerts from .data_connector_data_type_common_py3 import DataConnectorDataTypeCommon + from .entity_py3 import Entity + from .entity_kind1_py3 import EntityKind1 + from .account_entity_py3 import AccountEntity + from .host_entity_py3 import HostEntity + from .file_entity_py3 import FileEntity + from .office_consent_py3 import OfficeConsent from .resource_py3 import Resource + from .settings_py3 import Settings + from .settings_kind_py3 import SettingsKind + from .ueba_settings_py3 import UebaSettings + from .toggle_settings_py3 import ToggleSettings except (SyntaxError, ImportError): from .operation_display import OperationDisplay from .operation import Operation from .alert_rule import AlertRule from .alert_rule_kind1 import AlertRuleKind1 from .scheduled_alert_rule import ScheduledAlertRule + from .action import Action + from .user_info import UserInfo + from .case import Case + from .bookmark_properties_updated_by import BookmarkPropertiesUpdatedBy + from .bookmark import Bookmark from .data_connector import DataConnector from .data_connector_kind1 import DataConnectorKind1 from .data_connector_context_id import DataConnectorContextId @@ -56,16 +76,38 @@ from .alerts_data_type_of_data_connector import AlertsDataTypeOfDataConnector from .data_connector_with_alerts import DataConnectorWithAlerts from .data_connector_data_type_common import DataConnectorDataTypeCommon + from .entity import Entity + from .entity_kind1 import EntityKind1 + from .account_entity import AccountEntity + from .host_entity import HostEntity + from .file_entity import FileEntity + from .office_consent import OfficeConsent from .resource import Resource + from .settings import Settings + from .settings_kind import SettingsKind + from .ueba_settings import UebaSettings + from .toggle_settings import ToggleSettings from .operation_paged import OperationPaged from .alert_rule_paged import AlertRulePaged +from .action_paged import ActionPaged +from .case_paged import CasePaged +from .bookmark_paged import BookmarkPaged from .data_connector_paged import DataConnectorPaged +from .entity_paged import EntityPaged +from .office_consent_paged import OfficeConsentPaged from .security_insights_enums import ( AlertRuleKind, - Severity, + AlertSeverity, TriggerOperator, + CaseSeverity, + Status, + CloseReason, DataConnectorKind, DataTypeState, + EntityKind, + OSFamily, + SettingKind, + StatusInMcas, ) __all__ = [ @@ -74,6 +116,11 @@ 'AlertRule', 'AlertRuleKind1', 'ScheduledAlertRule', + 'Action', + 'UserInfo', + 'Case', + 'BookmarkPropertiesUpdatedBy', + 'Bookmark', 'DataConnector', 'DataConnectorKind1', 'DataConnectorContextId', @@ -91,13 +138,35 @@ 'AlertsDataTypeOfDataConnector', 'DataConnectorWithAlerts', 'DataConnectorDataTypeCommon', + 'Entity', + 'EntityKind1', + 'AccountEntity', + 'HostEntity', + 'FileEntity', + 'OfficeConsent', 'Resource', + 'Settings', + 'SettingsKind', + 'UebaSettings', + 'ToggleSettings', 'OperationPaged', 'AlertRulePaged', + 'ActionPaged', + 'CasePaged', + 'BookmarkPaged', 'DataConnectorPaged', + 'EntityPaged', + 'OfficeConsentPaged', 'AlertRuleKind', - 'Severity', + 'AlertSeverity', 'TriggerOperator', + 'CaseSeverity', + 'Status', + 'CloseReason', 'DataConnectorKind', 'DataTypeState', + 'EntityKind', + 'OSFamily', + 'SettingKind', + 'StatusInMcas', ] diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity.py new file mode 100644 index 000000000000..3fd34a273f34 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity import Entity + + +class AccountEntity(Entity): + """Represents an account entity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + :ivar account_entity_name: The name of the account. This field should hold + only the name without any domain added to it, i.e. administrator. + :vartype account_entity_name: str + :ivar nt_domain: The NETBIOS domain name as it appears in the alert format + – domain\\username. Examples: NT AUTHORITY. + :vartype nt_domain: str + :ivar upn_suffix: The user principal name suffix for the account, in some + cases it is also the domain name. Examples: contoso.com. + :vartype upn_suffix: str + :ivar sid: The account security identifier, e.g. S-1-5-18. + :vartype sid: str + :ivar aad_tenant_id: The AAD tenant id. + :vartype aad_tenant_id: str + :ivar aad_user_id: The AAD user id. + :vartype aad_user_id: str + :ivar puid: The AAD Passport User ID. + :vartype puid: str + :ivar is_domain_joined: Determines whether this is a domain account. + :vartype is_domain_joined: bool + :ivar object_guid: The objectGUID attribute is a single-value attribute + that is the unique identifier for the object, assigned by active + directory. + :vartype object_guid: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + 'account_entity_name': {'readonly': True}, + 'nt_domain': {'readonly': True}, + 'upn_suffix': {'readonly': True}, + 'sid': {'readonly': True}, + 'aad_tenant_id': {'readonly': True}, + 'aad_user_id': {'readonly': True}, + 'puid': {'readonly': True}, + 'is_domain_joined': {'readonly': True}, + 'object_guid': {'readonly': True, 'pattern': r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'account_entity_name': {'key': 'properties.name', 'type': 'str'}, + 'nt_domain': {'key': 'properties.ntDomain', 'type': 'str'}, + 'upn_suffix': {'key': 'properties.upnSuffix', 'type': 'str'}, + 'sid': {'key': 'properties.sid', 'type': 'str'}, + 'aad_tenant_id': {'key': 'properties.aadTenantId', 'type': 'str'}, + 'aad_user_id': {'key': 'properties.aadUserId', 'type': 'str'}, + 'puid': {'key': 'properties.puid', 'type': 'str'}, + 'is_domain_joined': {'key': 'properties.isDomainJoined', 'type': 'bool'}, + 'object_guid': {'key': 'properties.objectGuid', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AccountEntity, self).__init__(**kwargs) + self.account_entity_name = None + self.nt_domain = None + self.upn_suffix = None + self.sid = None + self.aad_tenant_id = None + self.aad_user_id = None + self.puid = None + self.is_domain_joined = None + self.object_guid = None + self.kind = 'Account' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity_py3.py new file mode 100644 index 000000000000..da49ffa53d87 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity_py3.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_py3 import Entity + + +class AccountEntity(Entity): + """Represents an account entity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + :ivar account_entity_name: The name of the account. This field should hold + only the name without any domain added to it, i.e. administrator. + :vartype account_entity_name: str + :ivar nt_domain: The NETBIOS domain name as it appears in the alert format + – domain\\username. Examples: NT AUTHORITY. + :vartype nt_domain: str + :ivar upn_suffix: The user principal name suffix for the account, in some + cases it is also the domain name. Examples: contoso.com. + :vartype upn_suffix: str + :ivar sid: The account security identifier, e.g. S-1-5-18. + :vartype sid: str + :ivar aad_tenant_id: The AAD tenant id. + :vartype aad_tenant_id: str + :ivar aad_user_id: The AAD user id. + :vartype aad_user_id: str + :ivar puid: The AAD Passport User ID. + :vartype puid: str + :ivar is_domain_joined: Determines whether this is a domain account. + :vartype is_domain_joined: bool + :ivar object_guid: The objectGUID attribute is a single-value attribute + that is the unique identifier for the object, assigned by active + directory. + :vartype object_guid: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + 'account_entity_name': {'readonly': True}, + 'nt_domain': {'readonly': True}, + 'upn_suffix': {'readonly': True}, + 'sid': {'readonly': True}, + 'aad_tenant_id': {'readonly': True}, + 'aad_user_id': {'readonly': True}, + 'puid': {'readonly': True}, + 'is_domain_joined': {'readonly': True}, + 'object_guid': {'readonly': True, 'pattern': r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'account_entity_name': {'key': 'properties.name', 'type': 'str'}, + 'nt_domain': {'key': 'properties.ntDomain', 'type': 'str'}, + 'upn_suffix': {'key': 'properties.upnSuffix', 'type': 'str'}, + 'sid': {'key': 'properties.sid', 'type': 'str'}, + 'aad_tenant_id': {'key': 'properties.aadTenantId', 'type': 'str'}, + 'aad_user_id': {'key': 'properties.aadUserId', 'type': 'str'}, + 'puid': {'key': 'properties.puid', 'type': 'str'}, + 'is_domain_joined': {'key': 'properties.isDomainJoined', 'type': 'bool'}, + 'object_guid': {'key': 'properties.objectGuid', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AccountEntity, self).__init__(**kwargs) + self.account_entity_name = None + self.nt_domain = None + self.upn_suffix = None + self.sid = None + self.aad_tenant_id = None + self.aad_user_id = None + self.puid = None + self.is_domain_joined = None + self.object_guid = None + self.kind = 'Account' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action.py new file mode 100644 index 000000000000..1bbfe67b66c4 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class Action(Resource): + """Action for alert rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param etag: Etag of the action. + :type etag: str + :param trigger_uri: The uri for the action to trigger. + :type trigger_uri: str + :ivar rule_id: The unique identifier of the rule. + :vartype rule_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'rule_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'trigger_uri': {'key': 'properties.triggerUri', 'type': 'str'}, + 'rule_id': {'key': 'properties.ruleId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Action, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.trigger_uri = kwargs.get('trigger_uri', None) + self.rule_id = None diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_paged.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_paged.py new file mode 100644 index 000000000000..2aff45e3393b --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ActionPaged(Paged): + """ + A paging container for iterating over a list of :class:`Action ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Action]'} + } + + def __init__(self, *args, **kwargs): + + super(ActionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_py3.py new file mode 100644 index 000000000000..77b4c421e571 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class Action(Resource): + """Action for alert rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param etag: Etag of the action. + :type etag: str + :param trigger_uri: The uri for the action to trigger. + :type trigger_uri: str + :ivar rule_id: The unique identifier of the rule. + :vartype rule_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'rule_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'trigger_uri': {'key': 'properties.triggerUri', 'type': 'str'}, + 'rule_id': {'key': 'properties.ruleId', 'type': 'str'}, + } + + def __init__(self, *, etag: str=None, trigger_uri: str=None, **kwargs) -> None: + super(Action, self).__init__(**kwargs) + self.etag = etag + self.trigger_uri = trigger_uri + self.rule_id = None diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark.py new file mode 100644 index 000000000000..bebdaa88bbd2 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark.py @@ -0,0 +1,82 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class Bookmark(Resource): + """Represents a bookmark in Azure Security Insights. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param etag: Etag of the bookmark. + :type etag: str + :param display_name: Required. The display name of the bookmark + :type display_name: str + :param last_updated_time_utc: The last time the bookmark was updated + :type last_updated_time_utc: datetime + :param created_time_utc: The time the bookmark was created + :type created_time_utc: datetime + :param created_by: Describes a user that created the bookmark + :type created_by: ~azure.mgmt.securityinsight.models.UserInfo + :param updated_by: Describes a user that updated the bookmark + :type updated_by: + ~azure.mgmt.securityinsight.models.BookmarkPropertiesUpdatedBy + :param notes: The notes of the bookmark + :type notes: str + :param tags: List of tags + :type tags: list[str] + :param query: The query of the bookmark. + :type query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'display_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'last_updated_time_utc': {'key': 'properties.lastUpdatedTimeUtc', 'type': 'iso-8601'}, + 'created_time_utc': {'key': 'properties.createdTimeUtc', 'type': 'iso-8601'}, + 'created_by': {'key': 'properties.createdBy', 'type': 'UserInfo'}, + 'updated_by': {'key': 'properties.updatedBy', 'type': 'BookmarkPropertiesUpdatedBy'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'tags': {'key': 'properties.tags', 'type': '[str]'}, + 'query': {'key': 'properties.query', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Bookmark, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.display_name = kwargs.get('display_name', None) + self.last_updated_time_utc = kwargs.get('last_updated_time_utc', None) + self.created_time_utc = kwargs.get('created_time_utc', None) + self.created_by = kwargs.get('created_by', None) + self.updated_by = kwargs.get('updated_by', None) + self.notes = kwargs.get('notes', None) + self.tags = kwargs.get('tags', None) + self.query = kwargs.get('query', None) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_paged.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_paged.py new file mode 100644 index 000000000000..cc150beecede --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class BookmarkPaged(Paged): + """ + A paging container for iterating over a list of :class:`Bookmark ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Bookmark]'} + } + + def __init__(self, *args, **kwargs): + + super(BookmarkPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_properties_updated_by.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_properties_updated_by.py new file mode 100644 index 000000000000..a7480659e1f8 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_properties_updated_by.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BookmarkPropertiesUpdatedBy(Model): + """Describes a user that updated the bookmark. + + :param object_id: The object id of the user. + :type object_id: str + :param email: The email of the user. + :type email: str + :param name: The name of the user. + :type name: str + """ + + _attribute_map = { + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'email': {'key': 'email', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BookmarkPropertiesUpdatedBy, self).__init__(**kwargs) + self.object_id = kwargs.get('object_id', None) + self.email = kwargs.get('email', None) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_properties_updated_by_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_properties_updated_by_py3.py new file mode 100644 index 000000000000..f2ca77368392 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_properties_updated_by_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BookmarkPropertiesUpdatedBy(Model): + """Describes a user that updated the bookmark. + + :param object_id: The object id of the user. + :type object_id: str + :param email: The email of the user. + :type email: str + :param name: The name of the user. + :type name: str + """ + + _attribute_map = { + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'email': {'key': 'email', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, object_id: str=None, email: str=None, name: str=None, **kwargs) -> None: + super(BookmarkPropertiesUpdatedBy, self).__init__(**kwargs) + self.object_id = object_id + self.email = email + self.name = name diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_py3.py new file mode 100644 index 000000000000..af5b870b9590 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_py3.py @@ -0,0 +1,82 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class Bookmark(Resource): + """Represents a bookmark in Azure Security Insights. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param etag: Etag of the bookmark. + :type etag: str + :param display_name: Required. The display name of the bookmark + :type display_name: str + :param last_updated_time_utc: The last time the bookmark was updated + :type last_updated_time_utc: datetime + :param created_time_utc: The time the bookmark was created + :type created_time_utc: datetime + :param created_by: Describes a user that created the bookmark + :type created_by: ~azure.mgmt.securityinsight.models.UserInfo + :param updated_by: Describes a user that updated the bookmark + :type updated_by: + ~azure.mgmt.securityinsight.models.BookmarkPropertiesUpdatedBy + :param notes: The notes of the bookmark + :type notes: str + :param tags: List of tags + :type tags: list[str] + :param query: The query of the bookmark. + :type query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'display_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'last_updated_time_utc': {'key': 'properties.lastUpdatedTimeUtc', 'type': 'iso-8601'}, + 'created_time_utc': {'key': 'properties.createdTimeUtc', 'type': 'iso-8601'}, + 'created_by': {'key': 'properties.createdBy', 'type': 'UserInfo'}, + 'updated_by': {'key': 'properties.updatedBy', 'type': 'BookmarkPropertiesUpdatedBy'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'tags': {'key': 'properties.tags', 'type': '[str]'}, + 'query': {'key': 'properties.query', 'type': 'str'}, + } + + def __init__(self, *, display_name: str, etag: str=None, last_updated_time_utc=None, created_time_utc=None, created_by=None, updated_by=None, notes: str=None, tags=None, query: str=None, **kwargs) -> None: + super(Bookmark, self).__init__(**kwargs) + self.etag = etag + self.display_name = display_name + self.last_updated_time_utc = last_updated_time_utc + self.created_time_utc = created_time_utc + self.created_by = created_by + self.updated_by = updated_by + self.notes = notes + self.tags = tags + self.query = query diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case.py new file mode 100644 index 000000000000..c5de1050b57c --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case.py @@ -0,0 +1,98 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class Case(Resource): + """Represents a case in Azure Security Insights. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param etag: Etag of the alert rule. + :type etag: str + :param last_updated_time_utc: The last time the case was updated + :type last_updated_time_utc: datetime + :param created_time_utc: The time the case was created + :type created_time_utc: datetime + :param end_time_utc: The end time of the case + :type end_time_utc: datetime + :param start_time_utc: The start time of the case + :type start_time_utc: datetime + :param tags: List of tags + :type tags: list[str] + :param description: The description of the case + :type description: str + :param title: Required. The title of the case + :type title: str + :param assigned_to: Describes a user that the case is assigned to + :type assigned_to: ~azure.mgmt.securityinsight.models.UserInfo + :param severity: Required. The severity of the case. Possible values + include: 'Critical', 'High', 'Medium', 'Low', 'Informational' + :type severity: str or ~azure.mgmt.securityinsight.models.CaseSeverity + :param status: Required. The status of the case. Possible values include: + 'Draft', 'Open', 'InProgress', 'Closed' + :type status: str or ~azure.mgmt.securityinsight.models.Status + :param close_reason: The reason the case was closed. Possible values + include: 'Resolved', 'Dismissed', 'Other' + :type close_reason: str or ~azure.mgmt.securityinsight.models.CloseReason + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'title': {'required': True}, + 'severity': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'last_updated_time_utc': {'key': 'properties.lastUpdatedTimeUtc', 'type': 'iso-8601'}, + 'created_time_utc': {'key': 'properties.createdTimeUtc', 'type': 'iso-8601'}, + 'end_time_utc': {'key': 'properties.endTimeUtc', 'type': 'iso-8601'}, + 'start_time_utc': {'key': 'properties.startTimeUtc', 'type': 'iso-8601'}, + 'tags': {'key': 'properties.tags', 'type': '[str]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'assigned_to': {'key': 'properties.assignedTo', 'type': 'UserInfo'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'close_reason': {'key': 'properties.closeReason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Case, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.last_updated_time_utc = kwargs.get('last_updated_time_utc', None) + self.created_time_utc = kwargs.get('created_time_utc', None) + self.end_time_utc = kwargs.get('end_time_utc', None) + self.start_time_utc = kwargs.get('start_time_utc', None) + self.tags = kwargs.get('tags', None) + self.description = kwargs.get('description', None) + self.title = kwargs.get('title', None) + self.assigned_to = kwargs.get('assigned_to', None) + self.severity = kwargs.get('severity', None) + self.status = kwargs.get('status', None) + self.close_reason = kwargs.get('close_reason', None) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_paged.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_paged.py new file mode 100644 index 000000000000..bf2bf64e9a7f --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class CasePaged(Paged): + """ + A paging container for iterating over a list of :class:`Case ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Case]'} + } + + def __init__(self, *args, **kwargs): + + super(CasePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_py3.py new file mode 100644 index 000000000000..a84415d44429 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_py3.py @@ -0,0 +1,98 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class Case(Resource): + """Represents a case in Azure Security Insights. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param etag: Etag of the alert rule. + :type etag: str + :param last_updated_time_utc: The last time the case was updated + :type last_updated_time_utc: datetime + :param created_time_utc: The time the case was created + :type created_time_utc: datetime + :param end_time_utc: The end time of the case + :type end_time_utc: datetime + :param start_time_utc: The start time of the case + :type start_time_utc: datetime + :param tags: List of tags + :type tags: list[str] + :param description: The description of the case + :type description: str + :param title: Required. The title of the case + :type title: str + :param assigned_to: Describes a user that the case is assigned to + :type assigned_to: ~azure.mgmt.securityinsight.models.UserInfo + :param severity: Required. The severity of the case. Possible values + include: 'Critical', 'High', 'Medium', 'Low', 'Informational' + :type severity: str or ~azure.mgmt.securityinsight.models.CaseSeverity + :param status: Required. The status of the case. Possible values include: + 'Draft', 'Open', 'InProgress', 'Closed' + :type status: str or ~azure.mgmt.securityinsight.models.Status + :param close_reason: The reason the case was closed. Possible values + include: 'Resolved', 'Dismissed', 'Other' + :type close_reason: str or ~azure.mgmt.securityinsight.models.CloseReason + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'title': {'required': True}, + 'severity': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'last_updated_time_utc': {'key': 'properties.lastUpdatedTimeUtc', 'type': 'iso-8601'}, + 'created_time_utc': {'key': 'properties.createdTimeUtc', 'type': 'iso-8601'}, + 'end_time_utc': {'key': 'properties.endTimeUtc', 'type': 'iso-8601'}, + 'start_time_utc': {'key': 'properties.startTimeUtc', 'type': 'iso-8601'}, + 'tags': {'key': 'properties.tags', 'type': '[str]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'assigned_to': {'key': 'properties.assignedTo', 'type': 'UserInfo'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'close_reason': {'key': 'properties.closeReason', 'type': 'str'}, + } + + def __init__(self, *, title: str, severity, status, etag: str=None, last_updated_time_utc=None, created_time_utc=None, end_time_utc=None, start_time_utc=None, tags=None, description: str=None, assigned_to=None, close_reason=None, **kwargs) -> None: + super(Case, self).__init__(**kwargs) + self.etag = etag + self.last_updated_time_utc = last_updated_time_utc + self.created_time_utc = created_time_utc + self.end_time_utc = end_time_utc + self.start_time_utc = start_time_utc + self.tags = tags + self.description = description + self.title = title + self.assigned_to = assigned_to + self.severity = severity + self.status = status + self.close_reason = close_reason diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity.py new file mode 100644 index 000000000000..6ff63f9545c4 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Entity(Model): + """Specific entity. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AccountEntity, HostEntity, FileEntity + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Account': 'AccountEntity', 'Host': 'HostEntity', 'File': 'FileEntity'} + } + + def __init__(self, **kwargs): + super(Entity, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.kind = None diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_kind1.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_kind1.py new file mode 100644 index 000000000000..ba90815c9d83 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_kind1.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityKind1(Model): + """Describes an Azure resource with kind. + + :param kind: The kind of the entity. Possible values include: 'Account', + 'Host', 'File' + :type kind: str or ~azure.mgmt.securityinsight.models.EntityKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EntityKind1, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_kind1_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_kind1_py3.py new file mode 100644 index 000000000000..f318be914961 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_kind1_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityKind1(Model): + """Describes an Azure resource with kind. + + :param kind: The kind of the entity. Possible values include: 'Account', + 'Host', 'File' + :type kind: str or ~azure.mgmt.securityinsight.models.EntityKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind=None, **kwargs) -> None: + super(EntityKind1, self).__init__(**kwargs) + self.kind = kind diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_paged.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_paged.py new file mode 100644 index 000000000000..1cc3027ddd60 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class EntityPaged(Paged): + """ + A paging container for iterating over a list of :class:`Entity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Entity]'} + } + + def __init__(self, *args, **kwargs): + + super(EntityPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_py3.py new file mode 100644 index 000000000000..a3dae2ccad17 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Entity(Model): + """Specific entity. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AccountEntity, HostEntity, FileEntity + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Account': 'AccountEntity', 'Host': 'HostEntity', 'File': 'FileEntity'} + } + + def __init__(self, **kwargs) -> None: + super(Entity, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.kind = None diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity.py new file mode 100644 index 000000000000..5f29a9e69b9d --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity import Entity + + +class FileEntity(Entity): + """Represents a file entity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + :ivar directory: The full path to the file. + :vartype directory: str + :ivar file_entity_name: The file name without path (some alerts might not + include path). + :vartype file_entity_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + 'directory': {'readonly': True}, + 'file_entity_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'directory': {'key': 'properties.directory', 'type': 'str'}, + 'file_entity_name': {'key': 'properties.name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FileEntity, self).__init__(**kwargs) + self.directory = None + self.file_entity_name = None + self.kind = 'File' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity_py3.py new file mode 100644 index 000000000000..6027514619ca --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_py3 import Entity + + +class FileEntity(Entity): + """Represents a file entity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + :ivar directory: The full path to the file. + :vartype directory: str + :ivar file_entity_name: The file name without path (some alerts might not + include path). + :vartype file_entity_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + 'directory': {'readonly': True}, + 'file_entity_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'directory': {'key': 'properties.directory', 'type': 'str'}, + 'file_entity_name': {'key': 'properties.name', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(FileEntity, self).__init__(**kwargs) + self.directory = None + self.file_entity_name = None + self.kind = 'File' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/host_entity.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/host_entity.py new file mode 100644 index 000000000000..550383353480 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/host_entity.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity import Entity + + +class HostEntity(Entity): + """Represents a host entity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + :ivar dns_domain: The DNS domain that this host belongs to. Should contain + the compete DNS suffix for the domain + :vartype dns_domain: str + :ivar nt_domain: The NT domain that this host belongs to. + :vartype nt_domain: str + :ivar host_name: The hostname without the domain suffix. + :vartype host_name: str + :ivar net_bios_name: The host name (pre-windows2000). + :vartype net_bios_name: str + :ivar azure_id: The azure resource id of the VM. + :vartype azure_id: str + :ivar oms_agent_id: The OMS agent id, if the host has OMS agent installed. + :vartype oms_agent_id: str + :param os_family: The operartion system type. Possible values include: + 'Linux', 'Windows', 'Android', 'IOS' + :type os_family: str or ~azure.mgmt.securityinsight.models.OSFamily + :ivar os_version: A free text representation of the operating system. This + field is meant to hold specific versions the are more fine grained than + OSFamily or future values not supported by OSFamily enumeration + :vartype os_version: str + :ivar is_domain_joined: Determines whether this host belongs to a domain. + :vartype is_domain_joined: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + 'dns_domain': {'readonly': True}, + 'nt_domain': {'readonly': True}, + 'host_name': {'readonly': True}, + 'net_bios_name': {'readonly': True}, + 'azure_id': {'readonly': True}, + 'oms_agent_id': {'readonly': True}, + 'os_version': {'readonly': True}, + 'is_domain_joined': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'dns_domain': {'key': 'properties.dnsDomain', 'type': 'str'}, + 'nt_domain': {'key': 'properties.ntDomain', 'type': 'str'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'net_bios_name': {'key': 'properties.netBiosName', 'type': 'str'}, + 'azure_id': {'key': 'properties.azureID', 'type': 'str'}, + 'oms_agent_id': {'key': 'properties.omsAgentID', 'type': 'str'}, + 'os_family': {'key': 'properties.osFamily', 'type': 'OSFamily'}, + 'os_version': {'key': 'properties.osVersion', 'type': 'str'}, + 'is_domain_joined': {'key': 'properties.isDomainJoined', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(HostEntity, self).__init__(**kwargs) + self.dns_domain = None + self.nt_domain = None + self.host_name = None + self.net_bios_name = None + self.azure_id = None + self.oms_agent_id = None + self.os_family = kwargs.get('os_family', None) + self.os_version = None + self.is_domain_joined = None + self.kind = 'Host' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/host_entity_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/host_entity_py3.py new file mode 100644 index 000000000000..75dd6e81efdb --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/host_entity_py3.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_py3 import Entity + + +class HostEntity(Entity): + """Represents a host entity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + :ivar dns_domain: The DNS domain that this host belongs to. Should contain + the compete DNS suffix for the domain + :vartype dns_domain: str + :ivar nt_domain: The NT domain that this host belongs to. + :vartype nt_domain: str + :ivar host_name: The hostname without the domain suffix. + :vartype host_name: str + :ivar net_bios_name: The host name (pre-windows2000). + :vartype net_bios_name: str + :ivar azure_id: The azure resource id of the VM. + :vartype azure_id: str + :ivar oms_agent_id: The OMS agent id, if the host has OMS agent installed. + :vartype oms_agent_id: str + :param os_family: The operartion system type. Possible values include: + 'Linux', 'Windows', 'Android', 'IOS' + :type os_family: str or ~azure.mgmt.securityinsight.models.OSFamily + :ivar os_version: A free text representation of the operating system. This + field is meant to hold specific versions the are more fine grained than + OSFamily or future values not supported by OSFamily enumeration + :vartype os_version: str + :ivar is_domain_joined: Determines whether this host belongs to a domain. + :vartype is_domain_joined: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + 'dns_domain': {'readonly': True}, + 'nt_domain': {'readonly': True}, + 'host_name': {'readonly': True}, + 'net_bios_name': {'readonly': True}, + 'azure_id': {'readonly': True}, + 'oms_agent_id': {'readonly': True}, + 'os_version': {'readonly': True}, + 'is_domain_joined': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'dns_domain': {'key': 'properties.dnsDomain', 'type': 'str'}, + 'nt_domain': {'key': 'properties.ntDomain', 'type': 'str'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'net_bios_name': {'key': 'properties.netBiosName', 'type': 'str'}, + 'azure_id': {'key': 'properties.azureID', 'type': 'str'}, + 'oms_agent_id': {'key': 'properties.omsAgentID', 'type': 'str'}, + 'os_family': {'key': 'properties.osFamily', 'type': 'OSFamily'}, + 'os_version': {'key': 'properties.osVersion', 'type': 'str'}, + 'is_domain_joined': {'key': 'properties.isDomainJoined', 'type': 'bool'}, + } + + def __init__(self, *, os_family=None, **kwargs) -> None: + super(HostEntity, self).__init__(**kwargs) + self.dns_domain = None + self.nt_domain = None + self.host_name = None + self.net_bios_name = None + self.azure_id = None + self.oms_agent_id = None + self.os_family = os_family + self.os_version = None + self.is_domain_joined = None + self.kind = 'Host' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent.py new file mode 100644 index 000000000000..bea49f793ea6 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class OfficeConsent(Resource): + """Consent for Office365 tenant that already made. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param tenant_id: The tenantId of the Office365 with the concesnt. + :type tenant_id: str + :ivar tenant_name: The tenant name of the Office365 with the concesnt. + :vartype tenant_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'tenant_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'tenant_name': {'key': 'properties.tenantName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OfficeConsent, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.tenant_name = None diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent_paged.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent_paged.py new file mode 100644 index 000000000000..18a2869e7abf --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OfficeConsentPaged(Paged): + """ + A paging container for iterating over a list of :class:`OfficeConsent ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OfficeConsent]'} + } + + def __init__(self, *args, **kwargs): + + super(OfficeConsentPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent_py3.py new file mode 100644 index 000000000000..4feb93636e8f --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class OfficeConsent(Resource): + """Consent for Office365 tenant that already made. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param tenant_id: The tenantId of the Office365 with the concesnt. + :type tenant_id: str + :ivar tenant_name: The tenant name of the Office365 with the concesnt. + :vartype tenant_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'tenant_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'tenant_name': {'key': 'properties.tenantName', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, **kwargs) -> None: + super(OfficeConsent, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.tenant_name = None diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule.py index fecadd7e4213..2a1de916a46f 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule.py @@ -36,8 +36,8 @@ class ScheduledAlertRule(AlertRule): :param description: Required. The description of the alert rule. :type description: str :param severity: Required. The severity for alerts created by this alert - rule. Possible values include: 'Low', 'Medium', 'High', 'Informational' - :type severity: str or ~azure.mgmt.securityinsight.models.Severity + rule. Possible values include: 'High', 'Medium', 'Low', 'Informational' + :type severity: str or ~azure.mgmt.securityinsight.models.AlertSeverity :param enabled: Required. Determines whether this alert rule is enabled or disabled. :type enabled: bool @@ -94,7 +94,7 @@ class ScheduledAlertRule(AlertRule): 'kind': {'key': 'kind', 'type': 'str'}, 'rule_name': {'key': 'properties.ruleName', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, - 'severity': {'key': 'properties.severity', 'type': 'Severity'}, + 'severity': {'key': 'properties.severity', 'type': 'AlertSeverity'}, 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'query': {'key': 'properties.query', 'type': 'str'}, 'query_frequency': {'key': 'properties.queryFrequency', 'type': 'duration'}, diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule_py3.py index b3eac8ccc2d8..9411683761af 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule_py3.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule_py3.py @@ -36,8 +36,8 @@ class ScheduledAlertRule(AlertRule): :param description: Required. The description of the alert rule. :type description: str :param severity: Required. The severity for alerts created by this alert - rule. Possible values include: 'Low', 'Medium', 'High', 'Informational' - :type severity: str or ~azure.mgmt.securityinsight.models.Severity + rule. Possible values include: 'High', 'Medium', 'Low', 'Informational' + :type severity: str or ~azure.mgmt.securityinsight.models.AlertSeverity :param enabled: Required. Determines whether this alert rule is enabled or disabled. :type enabled: bool @@ -94,7 +94,7 @@ class ScheduledAlertRule(AlertRule): 'kind': {'key': 'kind', 'type': 'str'}, 'rule_name': {'key': 'properties.ruleName', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, - 'severity': {'key': 'properties.severity', 'type': 'Severity'}, + 'severity': {'key': 'properties.severity', 'type': 'AlertSeverity'}, 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'query': {'key': 'properties.query', 'type': 'str'}, 'query_frequency': {'key': 'properties.queryFrequency', 'type': 'duration'}, diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/security_insights_enums.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/security_insights_enums.py index 71f4acc7853b..88551e855bf1 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/security_insights_enums.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/security_insights_enums.py @@ -17,12 +17,12 @@ class AlertRuleKind(str, Enum): scheduled = "Scheduled" -class Severity(str, Enum): +class AlertSeverity(str, Enum): - low = "Low" - medium = "Medium" - high = "High" - informational = "Informational" + high = "High" #: High severity + medium = "Medium" #: Medium severity + low = "Low" #: Low severity + informational = "Informational" #: Informational severity class TriggerOperator(str, Enum): @@ -33,6 +33,30 @@ class TriggerOperator(str, Enum): not_equal = "NotEqual" +class CaseSeverity(str, Enum): + + critical = "Critical" #: Critical severity + high = "High" #: High severity + medium = "Medium" #: Medium severity + low = "Low" #: Low severity + informational = "Informational" #: Informational severity + + +class Status(str, Enum): + + draft = "Draft" #: Case is in draft status + open = "Open" #: Case is in open status + in_progress = "InProgress" #: Case is in progress status + closed = "Closed" #: Case is in closed status + + +class CloseReason(str, Enum): + + resolved = "Resolved" #: Case was resolved + dismissed = "Dismissed" #: Case was dismissed + other = "Other" #: Case was closed for another reason + + class DataConnectorKind(str, Enum): azure_active_directory = "AzureActiveDirectory" @@ -46,3 +70,30 @@ class DataTypeState(str, Enum): enabled = "Enabled" disabled = "Disabled" + + +class EntityKind(str, Enum): + + account = "Account" + host = "Host" + file = "File" + + +class OSFamily(str, Enum): + + linux = "Linux" + windows = "Windows" + android = "Android" + ios = "IOS" + + +class SettingKind(str, Enum): + + ueba_settings = "UebaSettings" + toggle_settings = "ToggleSettings" + + +class StatusInMcas(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings.py new file mode 100644 index 000000000000..40c938b5af44 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Settings(Model): + """The Setting. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: UebaSettings, ToggleSettings + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'UebaSettings': 'UebaSettings', 'ToggleSettings': 'ToggleSettings'} + } + + def __init__(self, **kwargs): + super(Settings, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.kind = None diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_kind.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_kind.py new file mode 100644 index 000000000000..05e31e0ea210 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_kind.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SettingsKind(Model): + """Describes an Azure resource with kind. + + :param kind: The kind of the setting. Possible values include: + 'UebaSettings', 'ToggleSettings' + :type kind: str or ~azure.mgmt.securityinsight.models.SettingKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SettingsKind, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_kind_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_kind_py3.py new file mode 100644 index 000000000000..a6501e3c7613 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_kind_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SettingsKind(Model): + """Describes an Azure resource with kind. + + :param kind: The kind of the setting. Possible values include: + 'UebaSettings', 'ToggleSettings' + :type kind: str or ~azure.mgmt.securityinsight.models.SettingKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind=None, **kwargs) -> None: + super(SettingsKind, self).__init__(**kwargs) + self.kind = kind diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_py3.py new file mode 100644 index 000000000000..cca5858eafb8 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Settings(Model): + """The Setting. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: UebaSettings, ToggleSettings + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'UebaSettings': 'UebaSettings', 'ToggleSettings': 'ToggleSettings'} + } + + def __init__(self, **kwargs) -> None: + super(Settings, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.kind = None diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings.py new file mode 100644 index 000000000000..cd5eafbe1a96 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .settings import Settings + + +class ToggleSettings(Settings): + """Settings with single toggle. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param is_enabled: Determines whether the setting is enable or disabled. + :type is_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ToggleSettings, self).__init__(**kwargs) + self.is_enabled = kwargs.get('is_enabled', None) + self.kind = 'ToggleSettings' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings_py3.py new file mode 100644 index 000000000000..9573ec9202e4 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .settings_py3 import Settings + + +class ToggleSettings(Settings): + """Settings with single toggle. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param is_enabled: Determines whether the setting is enable or disabled. + :type is_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + } + + def __init__(self, *, is_enabled: bool=None, **kwargs) -> None: + super(ToggleSettings, self).__init__(**kwargs) + self.is_enabled = is_enabled + self.kind = 'ToggleSettings' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings.py new file mode 100644 index 000000000000..98cb39379bf7 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .settings import Settings + + +class UebaSettings(Settings): + """Represents settings for UEBA enablement. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param is_enabled: Determines whether UEBA is enabled for this workspace. + :type is_enabled: bool + :ivar status_in_mcas: Determines whether UEBA is enabled from MCAS. + Possible values include: 'Enabled', 'Disabled' + :vartype status_in_mcas: str or + ~azure.mgmt.securityinsight.models.StatusInMcas + :ivar atp_license_status: Determines whether the tenant . + :vartype atp_license_status: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + 'status_in_mcas': {'readonly': True}, + 'atp_license_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'status_in_mcas': {'key': 'properties.statusInMcas', 'type': 'str'}, + 'atp_license_status': {'key': 'properties.atpLicenseStatus', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(UebaSettings, self).__init__(**kwargs) + self.is_enabled = kwargs.get('is_enabled', None) + self.status_in_mcas = None + self.atp_license_status = None + self.kind = 'UebaSettings' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings_py3.py new file mode 100644 index 000000000000..85dcd5177be8 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings_py3.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .settings_py3 import Settings + + +class UebaSettings(Settings): + """Represents settings for UEBA enablement. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param is_enabled: Determines whether UEBA is enabled for this workspace. + :type is_enabled: bool + :ivar status_in_mcas: Determines whether UEBA is enabled from MCAS. + Possible values include: 'Enabled', 'Disabled' + :vartype status_in_mcas: str or + ~azure.mgmt.securityinsight.models.StatusInMcas + :ivar atp_license_status: Determines whether the tenant . + :vartype atp_license_status: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + 'status_in_mcas': {'readonly': True}, + 'atp_license_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'status_in_mcas': {'key': 'properties.statusInMcas', 'type': 'str'}, + 'atp_license_status': {'key': 'properties.atpLicenseStatus', 'type': 'bool'}, + } + + def __init__(self, *, is_enabled: bool=None, **kwargs) -> None: + super(UebaSettings, self).__init__(**kwargs) + self.is_enabled = is_enabled + self.status_in_mcas = None + self.atp_license_status = None + self.kind = 'UebaSettings' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/user_info.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/user_info.py new file mode 100644 index 000000000000..2a3863f81e85 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/user_info.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UserInfo(Model): + """User information that made some action. + + :param object_id: The object id of the user. + :type object_id: str + :param email: The email of the user. + :type email: str + :param name: The name of the user. + :type name: str + """ + + _attribute_map = { + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'email': {'key': 'email', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserInfo, self).__init__(**kwargs) + self.object_id = kwargs.get('object_id', None) + self.email = kwargs.get('email', None) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/user_info_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/user_info_py3.py new file mode 100644 index 000000000000..f69ed5c45e56 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/user_info_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UserInfo(Model): + """User information that made some action. + + :param object_id: The object id of the user. + :type object_id: str + :param email: The email of the user. + :type email: str + :param name: The name of the user. + :type name: str + """ + + _attribute_map = { + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'email': {'key': 'email', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, object_id: str=None, email: str=None, name: str=None, **kwargs) -> None: + super(UserInfo, self).__init__(**kwargs) + self.object_id = object_id + self.email = email + self.name = name diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/__init__.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/__init__.py index d2ed4a88c33a..3fb060e77fd9 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/__init__.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/__init__.py @@ -11,10 +11,22 @@ from .operations import Operations from .alert_rules_operations import AlertRulesOperations +from .actions_operations import ActionsOperations +from .cases_operations import CasesOperations +from .bookmarks_operations import BookmarksOperations from .data_connectors_operations import DataConnectorsOperations +from .entities_operations import EntitiesOperations +from .office_consents_operations import OfficeConsentsOperations +from .product_settings_operations import ProductSettingsOperations __all__ = [ 'Operations', 'AlertRulesOperations', + 'ActionsOperations', + 'CasesOperations', + 'BookmarksOperations', 'DataConnectorsOperations', + 'EntitiesOperations', + 'OfficeConsentsOperations', + 'ProductSettingsOperations', ] diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/actions_operations.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/actions_operations.py new file mode 100644 index 000000000000..3aad6485201a --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/actions_operations.py @@ -0,0 +1,191 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ActionsOperations(object): + """ActionsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list_by_alert_rule( + self, resource_group_name, operational_insights_resource_provider, workspace_name, rule_id, custom_headers=None, raw=False, **operation_config): + """Gets all actions of alert rule. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param rule_id: Alert rule ID + :type rule_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Action + :rtype: + ~azure.mgmt.securityinsight.models.ActionPaged[~azure.mgmt.securityinsight.models.Action] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_alert_rule.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'ruleId': self._serialize.url("rule_id", rule_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ActionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ActionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_alert_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions'} + + def list( + self, resource_group_name, operational_insights_resource_provider, workspace_name, custom_headers=None, raw=False, **operation_config): + """Gets all actions. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Action + :rtype: + ~azure.mgmt.securityinsight.models.ActionPaged[~azure.mgmt.securityinsight.models.Action] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ActionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ActionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/actions'} diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/alert_rules_operations.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/alert_rules_operations.py index ad49f712b1be..3c845fa564bc 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/alert_rules_operations.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/alert_rules_operations.py @@ -114,7 +114,7 @@ def internal_paging(next_link=None, raw=False): def get( self, resource_group_name, operational_insights_resource_provider, workspace_name, rule_id, custom_headers=None, raw=False, **operation_config): - """Gets a alert rule. + """Gets the alert rule. :param resource_group_name: The name of the resource group within the user's subscription. The name is case insensitive. @@ -320,3 +320,225 @@ def delete( client_raw_response = ClientRawResponse(None, response) return client_raw_response delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}'} + + def get_action( + self, resource_group_name, operational_insights_resource_provider, workspace_name, rule_id, action_id, custom_headers=None, raw=False, **operation_config): + """Gets the action of alert rule. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param rule_id: Alert rule ID + :type rule_id: str + :param action_id: Action ID + :type action_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Action or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.Action or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_action.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'ruleId': self._serialize.url("rule_id", rule_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'actionId': self._serialize.url("action_id", action_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Action', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_action.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions/{actionId}'} + + def create_action( + self, resource_group_name, operational_insights_resource_provider, workspace_name, rule_id, action_id, etag=None, trigger_uri=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates the action of alert rule. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param rule_id: Alert rule ID + :type rule_id: str + :param action_id: Action ID + :type action_id: str + :param etag: Etag of the action. + :type etag: str + :param trigger_uri: The uri for the action to trigger. + :type trigger_uri: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Action or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.Action or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + action = models.Action(etag=etag, trigger_uri=trigger_uri) + + # Construct URL + url = self.create_action.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'ruleId': self._serialize.url("rule_id", rule_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'actionId': self._serialize.url("action_id", action_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(action, 'Action') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Action', response) + if response.status_code == 201: + deserialized = self._deserialize('Action', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_action.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions/{actionId}'} + + def delete_action( + self, resource_group_name, operational_insights_resource_provider, workspace_name, rule_id, action_id, custom_headers=None, raw=False, **operation_config): + """Delete the action of alert rule. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param rule_id: Alert rule ID + :type rule_id: str + :param action_id: Action ID + :type action_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_action.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'ruleId': self._serialize.url("rule_id", rule_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'actionId': self._serialize.url("action_id", action_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_action.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions/{actionId}'} diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/bookmarks_operations.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/bookmarks_operations.py new file mode 100644 index 000000000000..14908da5f345 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/bookmarks_operations.py @@ -0,0 +1,322 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class BookmarksOperations(object): + """BookmarksOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list( + self, resource_group_name, operational_insights_resource_provider, workspace_name, custom_headers=None, raw=False, **operation_config): + """Gets all bookmarks. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Bookmark + :rtype: + ~azure.mgmt.securityinsight.models.BookmarkPaged[~azure.mgmt.securityinsight.models.Bookmark] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.BookmarkPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.BookmarkPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks'} + + def get( + self, resource_group_name, operational_insights_resource_provider, workspace_name, bookmark_id, custom_headers=None, raw=False, **operation_config): + """Gets a bookmark. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param bookmark_id: Bookmark ID + :type bookmark_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Bookmark or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.Bookmark or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'bookmarkId': self._serialize.url("bookmark_id", bookmark_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Bookmark', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}'} + + def create( + self, resource_group_name, operational_insights_resource_provider, workspace_name, bookmark_id, bookmark, custom_headers=None, raw=False, **operation_config): + """Creates or updates the bookmark. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param bookmark_id: Bookmark ID + :type bookmark_id: str + :param bookmark: The bookmark + :type bookmark: ~azure.mgmt.securityinsight.models.Bookmark + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Bookmark or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.Bookmark or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'bookmarkId': self._serialize.url("bookmark_id", bookmark_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(bookmark, 'Bookmark') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Bookmark', response) + if response.status_code == 201: + deserialized = self._deserialize('Bookmark', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}'} + + def delete( + self, resource_group_name, operational_insights_resource_provider, workspace_name, bookmark_id, custom_headers=None, raw=False, **operation_config): + """Delete the bookmark. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param bookmark_id: Bookmark ID + :type bookmark_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'bookmarkId': self._serialize.url("bookmark_id", bookmark_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}'} diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/cases_operations.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/cases_operations.py new file mode 100644 index 000000000000..36c218038c7a --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/cases_operations.py @@ -0,0 +1,322 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class CasesOperations(object): + """CasesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list( + self, resource_group_name, operational_insights_resource_provider, workspace_name, custom_headers=None, raw=False, **operation_config): + """Gets all cases. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Case + :rtype: + ~azure.mgmt.securityinsight.models.CasePaged[~azure.mgmt.securityinsight.models.Case] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.CasePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.CasePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/cases'} + + def get( + self, resource_group_name, operational_insights_resource_provider, workspace_name, case_id, custom_headers=None, raw=False, **operation_config): + """Gets a case. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param case_id: Case ID + :type case_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Case or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.Case or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'caseId': self._serialize.url("case_id", case_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Case', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/cases/{caseId}'} + + def create( + self, resource_group_name, operational_insights_resource_provider, workspace_name, case_id, case, custom_headers=None, raw=False, **operation_config): + """Creates or updates the case. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param case_id: Case ID + :type case_id: str + :param case: The case + :type case: ~azure.mgmt.securityinsight.models.Case + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Case or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.Case or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'caseId': self._serialize.url("case_id", case_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(case, 'Case') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Case', response) + if response.status_code == 201: + deserialized = self._deserialize('Case', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/cases/{caseId}'} + + def delete( + self, resource_group_name, operational_insights_resource_provider, workspace_name, case_id, custom_headers=None, raw=False, **operation_config): + """Delete the case. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param case_id: Case ID + :type case_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'caseId': self._serialize.url("case_id", case_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/cases/{caseId}'} diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/entities_operations.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/entities_operations.py new file mode 100644 index 000000000000..b00353ee2ce2 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/entities_operations.py @@ -0,0 +1,183 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class EntitiesOperations(object): + """EntitiesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list( + self, resource_group_name, operational_insights_resource_provider, workspace_name, custom_headers=None, raw=False, **operation_config): + """Gets all entities. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Entity + :rtype: + ~azure.mgmt.securityinsight.models.EntityPaged[~azure.mgmt.securityinsight.models.Entity] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.EntityPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.EntityPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities'} + + def get( + self, resource_group_name, operational_insights_resource_provider, workspace_name, entity_id, custom_headers=None, raw=False, **operation_config): + """Gets an entity. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param entity_id: entity ID + :type entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Entity or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.Entity or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Entity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}'} diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/office_consents_operations.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/office_consents_operations.py new file mode 100644 index 000000000000..c3e133607a46 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/office_consents_operations.py @@ -0,0 +1,244 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class OfficeConsentsOperations(object): + """OfficeConsentsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list( + self, resource_group_name, operational_insights_resource_provider, workspace_name, custom_headers=None, raw=False, **operation_config): + """Gets all office365 consents. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of OfficeConsent + :rtype: + ~azure.mgmt.securityinsight.models.OfficeConsentPaged[~azure.mgmt.securityinsight.models.OfficeConsent] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.OfficeConsentPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OfficeConsentPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents'} + + def get( + self, resource_group_name, operational_insights_resource_provider, workspace_name, consent_id, custom_headers=None, raw=False, **operation_config): + """Gets an office365 consent. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param consent_id: consent ID + :type consent_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OfficeConsent or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.OfficeConsent or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'consentId': self._serialize.url("consent_id", consent_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OfficeConsent', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents/{consentId}'} + + def delete( + self, resource_group_name, operational_insights_resource_provider, workspace_name, consent_id, custom_headers=None, raw=False, **operation_config): + """Delete the office365 consent. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param consent_id: consent ID + :type consent_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'consentId': self._serialize.url("consent_id", consent_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents/{consentId}'} diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/product_settings_operations.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/product_settings_operations.py new file mode 100644 index 000000000000..79ce2831b22b --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/product_settings_operations.py @@ -0,0 +1,184 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ProductSettingsOperations(object): + """ProductSettingsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def get( + self, resource_group_name, operational_insights_resource_provider, workspace_name, settings_name, custom_headers=None, raw=False, **operation_config): + """Gets a stting. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param settings_name: The setting name. Supports- Fusion, UEBA + :type settings_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Settings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.Settings or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'settingsName': self._serialize.url("settings_name", settings_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Settings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}'} + + def create( + self, resource_group_name, operational_insights_resource_provider, workspace_name, settings_name, settings, custom_headers=None, raw=False, **operation_config): + """Creates or updates the setting. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param settings_name: The setting name. Supports- Fusion, UEBA + :type settings_name: str + :param settings: The setting + :type settings: ~azure.mgmt.securityinsight.models.Settings + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Settings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.Settings or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'settingsName': self._serialize.url("settings_name", settings_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(settings, 'Settings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Settings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}'} diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/security_insights.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/security_insights.py index b32b1e4ee1ee..a8ed1d8179c5 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/security_insights.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/security_insights.py @@ -15,7 +15,13 @@ from .version import VERSION from .operations.operations import Operations from .operations.alert_rules_operations import AlertRulesOperations +from .operations.actions_operations import ActionsOperations +from .operations.cases_operations import CasesOperations +from .operations.bookmarks_operations import BookmarksOperations from .operations.data_connectors_operations import DataConnectorsOperations +from .operations.entities_operations import EntitiesOperations +from .operations.office_consents_operations import OfficeConsentsOperations +from .operations.product_settings_operations import ProductSettingsOperations from . import models @@ -61,8 +67,20 @@ class SecurityInsights(SDKClient): :vartype operations: azure.mgmt.securityinsight.operations.Operations :ivar alert_rules: AlertRules operations :vartype alert_rules: azure.mgmt.securityinsight.operations.AlertRulesOperations + :ivar actions: Actions operations + :vartype actions: azure.mgmt.securityinsight.operations.ActionsOperations + :ivar cases: Cases operations + :vartype cases: azure.mgmt.securityinsight.operations.CasesOperations + :ivar bookmarks: Bookmarks operations + :vartype bookmarks: azure.mgmt.securityinsight.operations.BookmarksOperations :ivar data_connectors: DataConnectors operations :vartype data_connectors: azure.mgmt.securityinsight.operations.DataConnectorsOperations + :ivar entities: Entities operations + :vartype entities: azure.mgmt.securityinsight.operations.EntitiesOperations + :ivar office_consents: OfficeConsents operations + :vartype office_consents: azure.mgmt.securityinsight.operations.OfficeConsentsOperations + :ivar product_settings: ProductSettings operations + :vartype product_settings: azure.mgmt.securityinsight.operations.ProductSettingsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -87,5 +105,17 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.alert_rules = AlertRulesOperations( self._client, self.config, self._serialize, self._deserialize) + self.actions = ActionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.cases = CasesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.bookmarks = BookmarksOperations( + self._client, self.config, self._serialize, self._deserialize) self.data_connectors = DataConnectorsOperations( self._client, self.config, self._serialize, self._deserialize) + self.entities = EntitiesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.office_consents = OfficeConsentsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.product_settings = ProductSettingsOperations( + self._client, self.config, self._serialize, self._deserialize) From f4fd748d60c791713253a912f054d861e2af8638 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 12 Feb 2019 13:58:05 +0000 Subject: [PATCH 2/6] Generated from ceed8746e2edeaf5c211e6490bc89c52712b0f34 Fixing comments from PR --- .../mgmt/securityinsight/models/__init__.py | 3 -- .../securityinsight/models/account_entity.py | 18 +++++----- .../models/account_entity_py3.py | 18 +++++----- .../mgmt/securityinsight/models/bookmark.py | 16 ++++----- .../models/bookmark_properties_updated_by.py | 36 ------------------- .../bookmark_properties_updated_by_py3.py | 36 ------------------- .../securityinsight/models/bookmark_py3.py | 18 +++++----- .../azure/mgmt/securityinsight/models/case.py | 8 ++--- .../mgmt/securityinsight/models/case_py3.py | 10 +++--- .../securityinsight/models/file_entity.py | 12 +++---- .../securityinsight/models/file_entity_py3.py | 12 +++---- .../models/security_insights_enums.py | 22 ++++++------ .../models/ti_data_connector_data_types.py | 2 +- .../ti_data_connector_data_types_py3.py | 2 +- .../securityinsight/models/ueba_settings.py | 13 ++++--- .../models/ueba_settings_py3.py | 13 ++++--- 16 files changed, 85 insertions(+), 154 deletions(-) delete mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_properties_updated_by.py delete mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_properties_updated_by_py3.py diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py index b881594814cd..8786a582c626 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py @@ -18,7 +18,6 @@ from .action_py3 import Action from .user_info_py3 import UserInfo from .case_py3 import Case - from .bookmark_properties_updated_by_py3 import BookmarkPropertiesUpdatedBy from .bookmark_py3 import Bookmark from .data_connector_py3 import DataConnector from .data_connector_kind1_py3 import DataConnectorKind1 @@ -57,7 +56,6 @@ from .action import Action from .user_info import UserInfo from .case import Case - from .bookmark_properties_updated_by import BookmarkPropertiesUpdatedBy from .bookmark import Bookmark from .data_connector import DataConnector from .data_connector_kind1 import DataConnectorKind1 @@ -119,7 +117,6 @@ 'Action', 'UserInfo', 'Case', - 'BookmarkPropertiesUpdatedBy', 'Bookmark', 'DataConnector', 'DataConnectorKind1', diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity.py index 3fd34a273f34..d55e1a59cc89 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity.py @@ -28,9 +28,9 @@ class AccountEntity(Entity): :vartype name: str :param kind: Required. Constant filled by server. :type kind: str - :ivar account_entity_name: The name of the account. This field should hold - only the name without any domain added to it, i.e. administrator. - :vartype account_entity_name: str + :ivar account_name: The name of the account. This field should hold only + the name without any domain added to it, i.e. administrator. + :vartype account_name: str :ivar nt_domain: The NETBIOS domain name as it appears in the alert format – domain\\username. Examples: NT AUTHORITY. :vartype nt_domain: str @@ -39,11 +39,11 @@ class AccountEntity(Entity): :vartype upn_suffix: str :ivar sid: The account security identifier, e.g. S-1-5-18. :vartype sid: str - :ivar aad_tenant_id: The AAD tenant id. + :ivar aad_tenant_id: The Azure Active Directory tenant id. :vartype aad_tenant_id: str - :ivar aad_user_id: The AAD user id. + :ivar aad_user_id: The Azure Active Directory user id. :vartype aad_user_id: str - :ivar puid: The AAD Passport User ID. + :ivar puid: The Azure Active Directory Passport User ID. :vartype puid: str :ivar is_domain_joined: Determines whether this is a domain account. :vartype is_domain_joined: bool @@ -58,7 +58,7 @@ class AccountEntity(Entity): 'type': {'readonly': True}, 'name': {'readonly': True}, 'kind': {'required': True}, - 'account_entity_name': {'readonly': True}, + 'account_name': {'readonly': True}, 'nt_domain': {'readonly': True}, 'upn_suffix': {'readonly': True}, 'sid': {'readonly': True}, @@ -74,7 +74,7 @@ class AccountEntity(Entity): 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'account_entity_name': {'key': 'properties.name', 'type': 'str'}, + 'account_name': {'key': 'properties.accountName', 'type': 'str'}, 'nt_domain': {'key': 'properties.ntDomain', 'type': 'str'}, 'upn_suffix': {'key': 'properties.upnSuffix', 'type': 'str'}, 'sid': {'key': 'properties.sid', 'type': 'str'}, @@ -87,7 +87,7 @@ class AccountEntity(Entity): def __init__(self, **kwargs): super(AccountEntity, self).__init__(**kwargs) - self.account_entity_name = None + self.account_name = None self.nt_domain = None self.upn_suffix = None self.sid = None diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity_py3.py index da49ffa53d87..85c5be6c33f4 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity_py3.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity_py3.py @@ -28,9 +28,9 @@ class AccountEntity(Entity): :vartype name: str :param kind: Required. Constant filled by server. :type kind: str - :ivar account_entity_name: The name of the account. This field should hold - only the name without any domain added to it, i.e. administrator. - :vartype account_entity_name: str + :ivar account_name: The name of the account. This field should hold only + the name without any domain added to it, i.e. administrator. + :vartype account_name: str :ivar nt_domain: The NETBIOS domain name as it appears in the alert format – domain\\username. Examples: NT AUTHORITY. :vartype nt_domain: str @@ -39,11 +39,11 @@ class AccountEntity(Entity): :vartype upn_suffix: str :ivar sid: The account security identifier, e.g. S-1-5-18. :vartype sid: str - :ivar aad_tenant_id: The AAD tenant id. + :ivar aad_tenant_id: The Azure Active Directory tenant id. :vartype aad_tenant_id: str - :ivar aad_user_id: The AAD user id. + :ivar aad_user_id: The Azure Active Directory user id. :vartype aad_user_id: str - :ivar puid: The AAD Passport User ID. + :ivar puid: The Azure Active Directory Passport User ID. :vartype puid: str :ivar is_domain_joined: Determines whether this is a domain account. :vartype is_domain_joined: bool @@ -58,7 +58,7 @@ class AccountEntity(Entity): 'type': {'readonly': True}, 'name': {'readonly': True}, 'kind': {'required': True}, - 'account_entity_name': {'readonly': True}, + 'account_name': {'readonly': True}, 'nt_domain': {'readonly': True}, 'upn_suffix': {'readonly': True}, 'sid': {'readonly': True}, @@ -74,7 +74,7 @@ class AccountEntity(Entity): 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'account_entity_name': {'key': 'properties.name', 'type': 'str'}, + 'account_name': {'key': 'properties.accountName', 'type': 'str'}, 'nt_domain': {'key': 'properties.ntDomain', 'type': 'str'}, 'upn_suffix': {'key': 'properties.upnSuffix', 'type': 'str'}, 'sid': {'key': 'properties.sid', 'type': 'str'}, @@ -87,7 +87,7 @@ class AccountEntity(Entity): def __init__(self, **kwargs) -> None: super(AccountEntity, self).__init__(**kwargs) - self.account_entity_name = None + self.account_name = None self.nt_domain = None self.upn_suffix = None self.sid = None diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark.py index bebdaa88bbd2..58230219559e 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark.py @@ -37,13 +37,12 @@ class Bookmark(Resource): :param created_by: Describes a user that created the bookmark :type created_by: ~azure.mgmt.securityinsight.models.UserInfo :param updated_by: Describes a user that updated the bookmark - :type updated_by: - ~azure.mgmt.securityinsight.models.BookmarkPropertiesUpdatedBy + :type updated_by: ~azure.mgmt.securityinsight.models.UserInfo :param notes: The notes of the bookmark :type notes: str - :param tags: List of tags - :type tags: list[str] - :param query: The query of the bookmark. + :param labels: List of labels relevant to this bookmark + :type labels: list[str] + :param query: Required. The query of the bookmark. :type query: str """ @@ -52,6 +51,7 @@ class Bookmark(Resource): 'type': {'readonly': True}, 'name': {'readonly': True}, 'display_name': {'required': True}, + 'query': {'required': True}, } _attribute_map = { @@ -63,9 +63,9 @@ class Bookmark(Resource): 'last_updated_time_utc': {'key': 'properties.lastUpdatedTimeUtc', 'type': 'iso-8601'}, 'created_time_utc': {'key': 'properties.createdTimeUtc', 'type': 'iso-8601'}, 'created_by': {'key': 'properties.createdBy', 'type': 'UserInfo'}, - 'updated_by': {'key': 'properties.updatedBy', 'type': 'BookmarkPropertiesUpdatedBy'}, + 'updated_by': {'key': 'properties.updatedBy', 'type': 'UserInfo'}, 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'tags': {'key': 'properties.tags', 'type': '[str]'}, + 'labels': {'key': 'properties.labels', 'type': '[str]'}, 'query': {'key': 'properties.query', 'type': 'str'}, } @@ -78,5 +78,5 @@ def __init__(self, **kwargs): self.created_by = kwargs.get('created_by', None) self.updated_by = kwargs.get('updated_by', None) self.notes = kwargs.get('notes', None) - self.tags = kwargs.get('tags', None) + self.labels = kwargs.get('labels', None) self.query = kwargs.get('query', None) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_properties_updated_by.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_properties_updated_by.py deleted file mode 100644 index a7480659e1f8..000000000000 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_properties_updated_by.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BookmarkPropertiesUpdatedBy(Model): - """Describes a user that updated the bookmark. - - :param object_id: The object id of the user. - :type object_id: str - :param email: The email of the user. - :type email: str - :param name: The name of the user. - :type name: str - """ - - _attribute_map = { - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'email': {'key': 'email', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BookmarkPropertiesUpdatedBy, self).__init__(**kwargs) - self.object_id = kwargs.get('object_id', None) - self.email = kwargs.get('email', None) - self.name = kwargs.get('name', None) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_properties_updated_by_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_properties_updated_by_py3.py deleted file mode 100644 index f2ca77368392..000000000000 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_properties_updated_by_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BookmarkPropertiesUpdatedBy(Model): - """Describes a user that updated the bookmark. - - :param object_id: The object id of the user. - :type object_id: str - :param email: The email of the user. - :type email: str - :param name: The name of the user. - :type name: str - """ - - _attribute_map = { - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'email': {'key': 'email', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, object_id: str=None, email: str=None, name: str=None, **kwargs) -> None: - super(BookmarkPropertiesUpdatedBy, self).__init__(**kwargs) - self.object_id = object_id - self.email = email - self.name = name diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_py3.py index af5b870b9590..c051b561db38 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_py3.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_py3.py @@ -37,13 +37,12 @@ class Bookmark(Resource): :param created_by: Describes a user that created the bookmark :type created_by: ~azure.mgmt.securityinsight.models.UserInfo :param updated_by: Describes a user that updated the bookmark - :type updated_by: - ~azure.mgmt.securityinsight.models.BookmarkPropertiesUpdatedBy + :type updated_by: ~azure.mgmt.securityinsight.models.UserInfo :param notes: The notes of the bookmark :type notes: str - :param tags: List of tags - :type tags: list[str] - :param query: The query of the bookmark. + :param labels: List of labels relevant to this bookmark + :type labels: list[str] + :param query: Required. The query of the bookmark. :type query: str """ @@ -52,6 +51,7 @@ class Bookmark(Resource): 'type': {'readonly': True}, 'name': {'readonly': True}, 'display_name': {'required': True}, + 'query': {'required': True}, } _attribute_map = { @@ -63,13 +63,13 @@ class Bookmark(Resource): 'last_updated_time_utc': {'key': 'properties.lastUpdatedTimeUtc', 'type': 'iso-8601'}, 'created_time_utc': {'key': 'properties.createdTimeUtc', 'type': 'iso-8601'}, 'created_by': {'key': 'properties.createdBy', 'type': 'UserInfo'}, - 'updated_by': {'key': 'properties.updatedBy', 'type': 'BookmarkPropertiesUpdatedBy'}, + 'updated_by': {'key': 'properties.updatedBy', 'type': 'UserInfo'}, 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'tags': {'key': 'properties.tags', 'type': '[str]'}, + 'labels': {'key': 'properties.labels', 'type': '[str]'}, 'query': {'key': 'properties.query', 'type': 'str'}, } - def __init__(self, *, display_name: str, etag: str=None, last_updated_time_utc=None, created_time_utc=None, created_by=None, updated_by=None, notes: str=None, tags=None, query: str=None, **kwargs) -> None: + def __init__(self, *, display_name: str, query: str, etag: str=None, last_updated_time_utc=None, created_time_utc=None, created_by=None, updated_by=None, notes: str=None, labels=None, **kwargs) -> None: super(Bookmark, self).__init__(**kwargs) self.etag = etag self.display_name = display_name @@ -78,5 +78,5 @@ def __init__(self, *, display_name: str, etag: str=None, last_updated_time_utc=N self.created_by = created_by self.updated_by = updated_by self.notes = notes - self.tags = tags + self.labels = labels self.query = query diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case.py index c5de1050b57c..241a670c8b45 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case.py @@ -36,8 +36,8 @@ class Case(Resource): :type end_time_utc: datetime :param start_time_utc: The start time of the case :type start_time_utc: datetime - :param tags: List of tags - :type tags: list[str] + :param labels: List of labels relevant to this case + :type labels: list[str] :param description: The description of the case :type description: str :param title: Required. The title of the case @@ -73,7 +73,7 @@ class Case(Resource): 'created_time_utc': {'key': 'properties.createdTimeUtc', 'type': 'iso-8601'}, 'end_time_utc': {'key': 'properties.endTimeUtc', 'type': 'iso-8601'}, 'start_time_utc': {'key': 'properties.startTimeUtc', 'type': 'iso-8601'}, - 'tags': {'key': 'properties.tags', 'type': '[str]'}, + 'labels': {'key': 'properties.labels', 'type': '[str]'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'title': {'key': 'properties.title', 'type': 'str'}, 'assigned_to': {'key': 'properties.assignedTo', 'type': 'UserInfo'}, @@ -89,7 +89,7 @@ def __init__(self, **kwargs): self.created_time_utc = kwargs.get('created_time_utc', None) self.end_time_utc = kwargs.get('end_time_utc', None) self.start_time_utc = kwargs.get('start_time_utc', None) - self.tags = kwargs.get('tags', None) + self.labels = kwargs.get('labels', None) self.description = kwargs.get('description', None) self.title = kwargs.get('title', None) self.assigned_to = kwargs.get('assigned_to', None) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_py3.py index a84415d44429..709d89b476d7 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_py3.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_py3.py @@ -36,8 +36,8 @@ class Case(Resource): :type end_time_utc: datetime :param start_time_utc: The start time of the case :type start_time_utc: datetime - :param tags: List of tags - :type tags: list[str] + :param labels: List of labels relevant to this case + :type labels: list[str] :param description: The description of the case :type description: str :param title: Required. The title of the case @@ -73,7 +73,7 @@ class Case(Resource): 'created_time_utc': {'key': 'properties.createdTimeUtc', 'type': 'iso-8601'}, 'end_time_utc': {'key': 'properties.endTimeUtc', 'type': 'iso-8601'}, 'start_time_utc': {'key': 'properties.startTimeUtc', 'type': 'iso-8601'}, - 'tags': {'key': 'properties.tags', 'type': '[str]'}, + 'labels': {'key': 'properties.labels', 'type': '[str]'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'title': {'key': 'properties.title', 'type': 'str'}, 'assigned_to': {'key': 'properties.assignedTo', 'type': 'UserInfo'}, @@ -82,14 +82,14 @@ class Case(Resource): 'close_reason': {'key': 'properties.closeReason', 'type': 'str'}, } - def __init__(self, *, title: str, severity, status, etag: str=None, last_updated_time_utc=None, created_time_utc=None, end_time_utc=None, start_time_utc=None, tags=None, description: str=None, assigned_to=None, close_reason=None, **kwargs) -> None: + def __init__(self, *, title: str, severity, status, etag: str=None, last_updated_time_utc=None, created_time_utc=None, end_time_utc=None, start_time_utc=None, labels=None, description: str=None, assigned_to=None, close_reason=None, **kwargs) -> None: super(Case, self).__init__(**kwargs) self.etag = etag self.last_updated_time_utc = last_updated_time_utc self.created_time_utc = created_time_utc self.end_time_utc = end_time_utc self.start_time_utc = start_time_utc - self.tags = tags + self.labels = labels self.description = description self.title = title self.assigned_to = assigned_to diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity.py index 5f29a9e69b9d..a05b2798f09e 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity.py @@ -30,9 +30,9 @@ class FileEntity(Entity): :type kind: str :ivar directory: The full path to the file. :vartype directory: str - :ivar file_entity_name: The file name without path (some alerts might not - include path). - :vartype file_entity_name: str + :ivar file_name: The file name without path (some alerts might not include + path). + :vartype file_name: str """ _validation = { @@ -41,7 +41,7 @@ class FileEntity(Entity): 'name': {'readonly': True}, 'kind': {'required': True}, 'directory': {'readonly': True}, - 'file_entity_name': {'readonly': True}, + 'file_name': {'readonly': True}, } _attribute_map = { @@ -50,11 +50,11 @@ class FileEntity(Entity): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'directory': {'key': 'properties.directory', 'type': 'str'}, - 'file_entity_name': {'key': 'properties.name', 'type': 'str'}, + 'file_name': {'key': 'properties.fileName', 'type': 'str'}, } def __init__(self, **kwargs): super(FileEntity, self).__init__(**kwargs) self.directory = None - self.file_entity_name = None + self.file_name = None self.kind = 'File' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity_py3.py index 6027514619ca..c60c5da36071 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity_py3.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity_py3.py @@ -30,9 +30,9 @@ class FileEntity(Entity): :type kind: str :ivar directory: The full path to the file. :vartype directory: str - :ivar file_entity_name: The file name without path (some alerts might not - include path). - :vartype file_entity_name: str + :ivar file_name: The file name without path (some alerts might not include + path). + :vartype file_name: str """ _validation = { @@ -41,7 +41,7 @@ class FileEntity(Entity): 'name': {'readonly': True}, 'kind': {'required': True}, 'directory': {'readonly': True}, - 'file_entity_name': {'readonly': True}, + 'file_name': {'readonly': True}, } _attribute_map = { @@ -50,11 +50,11 @@ class FileEntity(Entity): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'directory': {'key': 'properties.directory', 'type': 'str'}, - 'file_entity_name': {'key': 'properties.name', 'type': 'str'}, + 'file_name': {'key': 'properties.fileName', 'type': 'str'}, } def __init__(self, **kwargs) -> None: super(FileEntity, self).__init__(**kwargs) self.directory = None - self.file_entity_name = None + self.file_name = None self.kind = 'File' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/security_insights_enums.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/security_insights_enums.py index 88551e855bf1..e1fab21a8610 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/security_insights_enums.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/security_insights_enums.py @@ -44,10 +44,10 @@ class CaseSeverity(str, Enum): class Status(str, Enum): - draft = "Draft" #: Case is in draft status - open = "Open" #: Case is in open status - in_progress = "InProgress" #: Case is in progress status - closed = "Closed" #: Case is in closed status + draft = "Draft" #: Case that wasn't promoted yet to active + open = "Open" #: An active case which isn't handled currently + in_progress = "InProgress" #: An active case which is handled + closed = "Closed" #: A non active case class CloseReason(str, Enum): @@ -74,17 +74,17 @@ class DataTypeState(str, Enum): class EntityKind(str, Enum): - account = "Account" - host = "Host" - file = "File" + account = "Account" #: Entity represents account in the system. + host = "Host" #: Entity represents host in the system. + file = "File" #: Entity represents file in the system. class OSFamily(str, Enum): - linux = "Linux" - windows = "Windows" - android = "Android" - ios = "IOS" + linux = "Linux" #: Host with Linux operartion system. + windows = "Windows" #: Host with Windows operartion system. + android = "Android" #: Host with Android operartion system. + ios = "IOS" #: Host with IOS operartion system. class SettingKind(str, Enum): diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types.py index 8109ed18495b..fca339c71037 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types.py @@ -13,7 +13,7 @@ class TIDataConnectorDataTypes(Model): - """The available data types for TI data connector. + """The available data types for TI (Threat Intelligence) data connector. :param indicators: Data type for indicators connection. :type indicators: diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types_py3.py index c96a8d6db3b4..0abe983c3ad3 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types_py3.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types_py3.py @@ -13,7 +13,7 @@ class TIDataConnectorDataTypes(Model): - """The available data types for TI data connector. + """The available data types for TI (Threat Intelligence) data connector. :param indicators: Data type for indicators connection. :type indicators: diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings.py index 98cb39379bf7..b41abbd99b37 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings.py @@ -13,7 +13,7 @@ class UebaSettings(Settings): - """Represents settings for UEBA enablement. + """Represents settings for User and Entity Behavior Analytics enablement. Variables are only populated by the server, and will be ignored when sending a request. @@ -28,13 +28,16 @@ class UebaSettings(Settings): :vartype name: str :param kind: Required. Constant filled by server. :type kind: str - :param is_enabled: Determines whether UEBA is enabled for this workspace. + :param is_enabled: Determines whether User and Entity Behavior Analytics + is enabled for this workspace. :type is_enabled: bool - :ivar status_in_mcas: Determines whether UEBA is enabled from MCAS. - Possible values include: 'Enabled', 'Disabled' + :ivar status_in_mcas: Determines whether User and Entity Behavior + Analytics is enabled from MCAS (Microsoft Cloud App Security). Possible + values include: 'Enabled', 'Disabled' :vartype status_in_mcas: str or ~azure.mgmt.securityinsight.models.StatusInMcas - :ivar atp_license_status: Determines whether the tenant . + :ivar atp_license_status: Determines whether the tenant has ATP (Advanced + Threat Protection) license. :vartype atp_license_status: bool """ diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings_py3.py index 85dcd5177be8..5c8b801a89b3 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings_py3.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings_py3.py @@ -13,7 +13,7 @@ class UebaSettings(Settings): - """Represents settings for UEBA enablement. + """Represents settings for User and Entity Behavior Analytics enablement. Variables are only populated by the server, and will be ignored when sending a request. @@ -28,13 +28,16 @@ class UebaSettings(Settings): :vartype name: str :param kind: Required. Constant filled by server. :type kind: str - :param is_enabled: Determines whether UEBA is enabled for this workspace. + :param is_enabled: Determines whether User and Entity Behavior Analytics + is enabled for this workspace. :type is_enabled: bool - :ivar status_in_mcas: Determines whether UEBA is enabled from MCAS. - Possible values include: 'Enabled', 'Disabled' + :ivar status_in_mcas: Determines whether User and Entity Behavior + Analytics is enabled from MCAS (Microsoft Cloud App Security). Possible + values include: 'Enabled', 'Disabled' :vartype status_in_mcas: str or ~azure.mgmt.securityinsight.models.StatusInMcas - :ivar atp_license_status: Determines whether the tenant . + :ivar atp_license_status: Determines whether the tenant has ATP (Advanced + Threat Protection) license. :vartype atp_license_status: bool """ From 3d46d979645a8d0be40b783e440a7039c6d4c4e4 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 12 Feb 2019 15:17:14 +0000 Subject: [PATCH 3/6] Generated from 04b7d638ff87ca0ade886655d1965ba363ce0dc7 Change in dataConnectors from contextId to the relevant ID --- .../mgmt/securityinsight/models/__init__.py | 24 +++---- .../models/aad_data_connector.py | 13 ++-- .../models/aad_data_connector_py3.py | 17 ++--- .../models/asc_data_connector.py | 14 ++-- .../models/asc_data_connector_py3.py | 18 ++--- .../securityinsight/models/data_connector.py | 6 +- .../models/data_connector_py3.py | 6 +- ...text_id.py => data_connector_tenant_id.py} | 15 ++-- ...py3.py => data_connector_tenant_id_py3.py} | 17 +++-- .../models/data_connector_with_alerts.py | 69 ------------------- .../data_connector_with_alerts_properties.py | 29 ++++++++ ...ta_connector_with_alerts_properties_py3.py | 29 ++++++++ .../models/data_connector_with_alerts_py3.py | 69 ------------------- .../models/mcas_data_connector.py | 13 ++-- .../models/mcas_data_connector_py3.py | 17 ++--- .../models/office_data_connector.py | 9 ++- .../models/office_data_connector_py3.py | 11 ++- .../models/ti_data_connector.py | 9 ++- .../models/ti_data_connector_py3.py | 11 ++- 19 files changed, 159 insertions(+), 237 deletions(-) rename azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/{data_connector_context_id.py => data_connector_tenant_id.py} (59%) rename azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/{data_connector_context_id_py3.py => data_connector_tenant_id_py3.py} (55%) delete mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts_properties.py create mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts_properties_py3.py delete mode 100644 azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts_py3.py diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py index 8786a582c626..1e1307fb7b54 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py @@ -21,7 +21,7 @@ from .bookmark_py3 import Bookmark from .data_connector_py3 import DataConnector from .data_connector_kind1_py3 import DataConnectorKind1 - from .data_connector_context_id_py3 import DataConnectorContextId + from .data_connector_tenant_id_py3 import DataConnectorTenantId from .office_data_connector_data_types_share_point_py3 import OfficeDataConnectorDataTypesSharePoint from .office_data_connector_data_types_exchange_py3 import OfficeDataConnectorDataTypesExchange from .office_data_connector_data_types_py3 import OfficeDataConnectorDataTypes @@ -29,12 +29,12 @@ from .ti_data_connector_data_types_indicators_py3 import TIDataConnectorDataTypesIndicators from .ti_data_connector_data_types_py3 import TIDataConnectorDataTypes from .ti_data_connector_py3 import TIDataConnector + from .alerts_data_type_of_data_connector_alerts_py3 import AlertsDataTypeOfDataConnectorAlerts + from .alerts_data_type_of_data_connector_py3 import AlertsDataTypeOfDataConnector from .aad_data_connector_py3 import AADDataConnector from .asc_data_connector_py3 import ASCDataConnector from .mcas_data_connector_py3 import MCASDataConnector - from .alerts_data_type_of_data_connector_alerts_py3 import AlertsDataTypeOfDataConnectorAlerts - from .alerts_data_type_of_data_connector_py3 import AlertsDataTypeOfDataConnector - from .data_connector_with_alerts_py3 import DataConnectorWithAlerts + from .data_connector_with_alerts_properties_py3 import DataConnectorWithAlertsProperties from .data_connector_data_type_common_py3 import DataConnectorDataTypeCommon from .entity_py3 import Entity from .entity_kind1_py3 import EntityKind1 @@ -59,7 +59,7 @@ from .bookmark import Bookmark from .data_connector import DataConnector from .data_connector_kind1 import DataConnectorKind1 - from .data_connector_context_id import DataConnectorContextId + from .data_connector_tenant_id import DataConnectorTenantId from .office_data_connector_data_types_share_point import OfficeDataConnectorDataTypesSharePoint from .office_data_connector_data_types_exchange import OfficeDataConnectorDataTypesExchange from .office_data_connector_data_types import OfficeDataConnectorDataTypes @@ -67,12 +67,12 @@ from .ti_data_connector_data_types_indicators import TIDataConnectorDataTypesIndicators from .ti_data_connector_data_types import TIDataConnectorDataTypes from .ti_data_connector import TIDataConnector + from .alerts_data_type_of_data_connector_alerts import AlertsDataTypeOfDataConnectorAlerts + from .alerts_data_type_of_data_connector import AlertsDataTypeOfDataConnector from .aad_data_connector import AADDataConnector from .asc_data_connector import ASCDataConnector from .mcas_data_connector import MCASDataConnector - from .alerts_data_type_of_data_connector_alerts import AlertsDataTypeOfDataConnectorAlerts - from .alerts_data_type_of_data_connector import AlertsDataTypeOfDataConnector - from .data_connector_with_alerts import DataConnectorWithAlerts + from .data_connector_with_alerts_properties import DataConnectorWithAlertsProperties from .data_connector_data_type_common import DataConnectorDataTypeCommon from .entity import Entity from .entity_kind1 import EntityKind1 @@ -120,7 +120,7 @@ 'Bookmark', 'DataConnector', 'DataConnectorKind1', - 'DataConnectorContextId', + 'DataConnectorTenantId', 'OfficeDataConnectorDataTypesSharePoint', 'OfficeDataConnectorDataTypesExchange', 'OfficeDataConnectorDataTypes', @@ -128,12 +128,12 @@ 'TIDataConnectorDataTypesIndicators', 'TIDataConnectorDataTypes', 'TIDataConnector', + 'AlertsDataTypeOfDataConnectorAlerts', + 'AlertsDataTypeOfDataConnector', 'AADDataConnector', 'ASCDataConnector', 'MCASDataConnector', - 'AlertsDataTypeOfDataConnectorAlerts', - 'AlertsDataTypeOfDataConnector', - 'DataConnectorWithAlerts', + 'DataConnectorWithAlertsProperties', 'DataConnectorDataTypeCommon', 'Entity', 'EntityKind1', diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector.py index 0af5abc053ab..d4e920262e9c 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .data_connector_with_alerts import DataConnectorWithAlerts +from .data_connector import DataConnector -class AADDataConnector(DataConnectorWithAlerts): +class AADDataConnector(DataConnector): """Represents AAD (Azure Active Directory) data connector. Variables are only populated by the server, and will be ignored when @@ -30,9 +30,8 @@ class AADDataConnector(DataConnectorWithAlerts): :type etag: str :param kind: Required. Constant filled by server. :type kind: str - :param context_id: The context id of the origin data source (Like - tenantID, SubscriptionID etc.). - :type context_id: str + :param tenant_id: The tenant id to connect to, and get the data from. + :type tenant_id: str :param data_types: The available data types for the connector. :type data_types: ~azure.mgmt.securityinsight.models.AlertsDataTypeOfDataConnector @@ -51,10 +50,12 @@ class AADDataConnector(DataConnectorWithAlerts): 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'context_id': {'key': 'properties.contextId', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, 'data_types': {'key': 'properties.dataTypes', 'type': 'AlertsDataTypeOfDataConnector'}, } def __init__(self, **kwargs): super(AADDataConnector, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.data_types = kwargs.get('data_types', None) self.kind = 'AzureActiveDirectory' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector_py3.py index 2d2a0a618e3b..c0b906524928 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector_py3.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector_py3.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .data_connector_with_alerts_py3 import DataConnectorWithAlerts +from .data_connector_py3 import DataConnector -class AADDataConnector(DataConnectorWithAlerts): +class AADDataConnector(DataConnector): """Represents AAD (Azure Active Directory) data connector. Variables are only populated by the server, and will be ignored when @@ -30,9 +30,8 @@ class AADDataConnector(DataConnectorWithAlerts): :type etag: str :param kind: Required. Constant filled by server. :type kind: str - :param context_id: The context id of the origin data source (Like - tenantID, SubscriptionID etc.). - :type context_id: str + :param tenant_id: The tenant id to connect to, and get the data from. + :type tenant_id: str :param data_types: The available data types for the connector. :type data_types: ~azure.mgmt.securityinsight.models.AlertsDataTypeOfDataConnector @@ -51,10 +50,12 @@ class AADDataConnector(DataConnectorWithAlerts): 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'context_id': {'key': 'properties.contextId', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, 'data_types': {'key': 'properties.dataTypes', 'type': 'AlertsDataTypeOfDataConnector'}, } - def __init__(self, *, etag: str=None, context_id: str=None, data_types=None, **kwargs) -> None: - super(AADDataConnector, self).__init__(etag=etag, context_id=context_id, data_types=data_types, **kwargs) + def __init__(self, *, etag: str=None, tenant_id: str=None, data_types=None, **kwargs) -> None: + super(AADDataConnector, self).__init__(etag=etag, **kwargs) + self.tenant_id = tenant_id + self.data_types = data_types self.kind = 'AzureActiveDirectory' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector.py index 326c886fe8b6..ef5c6c670e74 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .data_connector_with_alerts import DataConnectorWithAlerts +from .data_connector import DataConnector -class ASCDataConnector(DataConnectorWithAlerts): +class ASCDataConnector(DataConnector): """Represents ASC (Azure Security Center) data connector. Variables are only populated by the server, and will be ignored when @@ -30,12 +30,12 @@ class ASCDataConnector(DataConnectorWithAlerts): :type etag: str :param kind: Required. Constant filled by server. :type kind: str - :param context_id: The context id of the origin data source (Like - tenantID, SubscriptionID etc.). - :type context_id: str :param data_types: The available data types for the connector. :type data_types: ~azure.mgmt.securityinsight.models.AlertsDataTypeOfDataConnector + :param subscription_id: The subscription id to connect to, and get the + data from. + :type subscription_id: str """ _validation = { @@ -51,10 +51,12 @@ class ASCDataConnector(DataConnectorWithAlerts): 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'context_id': {'key': 'properties.contextId', 'type': 'str'}, 'data_types': {'key': 'properties.dataTypes', 'type': 'AlertsDataTypeOfDataConnector'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, } def __init__(self, **kwargs): super(ASCDataConnector, self).__init__(**kwargs) + self.data_types = kwargs.get('data_types', None) + self.subscription_id = kwargs.get('subscription_id', None) self.kind = 'AzureSecurityCenter' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector_py3.py index c74146245a1d..c0dcbae59d36 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector_py3.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector_py3.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .data_connector_with_alerts_py3 import DataConnectorWithAlerts +from .data_connector_py3 import DataConnector -class ASCDataConnector(DataConnectorWithAlerts): +class ASCDataConnector(DataConnector): """Represents ASC (Azure Security Center) data connector. Variables are only populated by the server, and will be ignored when @@ -30,12 +30,12 @@ class ASCDataConnector(DataConnectorWithAlerts): :type etag: str :param kind: Required. Constant filled by server. :type kind: str - :param context_id: The context id of the origin data source (Like - tenantID, SubscriptionID etc.). - :type context_id: str :param data_types: The available data types for the connector. :type data_types: ~azure.mgmt.securityinsight.models.AlertsDataTypeOfDataConnector + :param subscription_id: The subscription id to connect to, and get the + data from. + :type subscription_id: str """ _validation = { @@ -51,10 +51,12 @@ class ASCDataConnector(DataConnectorWithAlerts): 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'context_id': {'key': 'properties.contextId', 'type': 'str'}, 'data_types': {'key': 'properties.dataTypes', 'type': 'AlertsDataTypeOfDataConnector'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, } - def __init__(self, *, etag: str=None, context_id: str=None, data_types=None, **kwargs) -> None: - super(ASCDataConnector, self).__init__(etag=etag, context_id=context_id, data_types=data_types, **kwargs) + def __init__(self, *, etag: str=None, data_types=None, subscription_id: str=None, **kwargs) -> None: + super(ASCDataConnector, self).__init__(etag=etag, **kwargs) + self.data_types = data_types + self.subscription_id = subscription_id self.kind = 'AzureSecurityCenter' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector.py index d6c8634a338d..c07a06bee266 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector.py @@ -16,8 +16,8 @@ class DataConnector(Model): """Data connector. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: OfficeDataConnector, TIDataConnector, - DataConnectorWithAlerts + sub-classes are: OfficeDataConnector, TIDataConnector, AADDataConnector, + ASCDataConnector, MCASDataConnector Variables are only populated by the server, and will be ignored when sending a request. @@ -52,7 +52,7 @@ class DataConnector(Model): } _subtype_map = { - 'kind': {'Office365': 'OfficeDataConnector', 'ThreatIntelligence': 'TIDataConnector', 'DataConnectorWithAlerts': 'DataConnectorWithAlerts'} + 'kind': {'Office365': 'OfficeDataConnector', 'ThreatIntelligence': 'TIDataConnector', 'AzureActiveDirectory': 'AADDataConnector', 'AzureSecurityCenter': 'ASCDataConnector', 'MicrosoftCloudAppSecurity': 'MCASDataConnector'} } def __init__(self, **kwargs): diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_py3.py index 8b8782ff6de5..bbbcd62d3065 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_py3.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_py3.py @@ -16,8 +16,8 @@ class DataConnector(Model): """Data connector. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: OfficeDataConnector, TIDataConnector, - DataConnectorWithAlerts + sub-classes are: OfficeDataConnector, TIDataConnector, AADDataConnector, + ASCDataConnector, MCASDataConnector Variables are only populated by the server, and will be ignored when sending a request. @@ -52,7 +52,7 @@ class DataConnector(Model): } _subtype_map = { - 'kind': {'Office365': 'OfficeDataConnector', 'ThreatIntelligence': 'TIDataConnector', 'DataConnectorWithAlerts': 'DataConnectorWithAlerts'} + 'kind': {'Office365': 'OfficeDataConnector', 'ThreatIntelligence': 'TIDataConnector', 'AzureActiveDirectory': 'AADDataConnector', 'AzureSecurityCenter': 'ASCDataConnector', 'MicrosoftCloudAppSecurity': 'MCASDataConnector'} } def __init__(self, *, etag: str=None, **kwargs) -> None: diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_context_id.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_tenant_id.py similarity index 59% rename from azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_context_id.py rename to azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_tenant_id.py index 593f5cddcfe5..66b07808b6aa 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_context_id.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_tenant_id.py @@ -12,18 +12,17 @@ from msrest.serialization import Model -class DataConnectorContextId(Model): - """Describes an Azure resource with kind. +class DataConnectorTenantId(Model): + """Properties data connector on tenant level. - :param context_id: The context id of the origin data source (Like - tenantID, SubscriptionID etc.). - :type context_id: str + :param tenant_id: The tenant id to connect to, and get the data from. + :type tenant_id: str """ _attribute_map = { - 'context_id': {'key': 'contextId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, } def __init__(self, **kwargs): - super(DataConnectorContextId, self).__init__(**kwargs) - self.context_id = kwargs.get('context_id', None) + super(DataConnectorTenantId, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_context_id_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_tenant_id_py3.py similarity index 55% rename from azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_context_id_py3.py rename to azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_tenant_id_py3.py index 7b26fbf253cb..27997416eb33 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_context_id_py3.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_tenant_id_py3.py @@ -12,18 +12,17 @@ from msrest.serialization import Model -class DataConnectorContextId(Model): - """Describes an Azure resource with kind. +class DataConnectorTenantId(Model): + """Properties data connector on tenant level. - :param context_id: The context id of the origin data source (Like - tenantID, SubscriptionID etc.). - :type context_id: str + :param tenant_id: The tenant id to connect to, and get the data from. + :type tenant_id: str """ _attribute_map = { - 'context_id': {'key': 'contextId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, } - def __init__(self, *, context_id: str=None, **kwargs) -> None: - super(DataConnectorContextId, self).__init__(**kwargs) - self.context_id = context_id + def __init__(self, *, tenant_id: str=None, **kwargs) -> None: + super(DataConnectorTenantId, self).__init__(**kwargs) + self.tenant_id = tenant_id diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts.py deleted file mode 100644 index 1b35258799b1..000000000000 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .data_connector import DataConnector - - -class DataConnectorWithAlerts(DataConnector): - """Data connector with alerts data type. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AADDataConnector, ASCDataConnector, MCASDataConnector - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param etag: Etag of the data connector. - :type etag: str - :param kind: Required. Constant filled by server. - :type kind: str - :param context_id: The context id of the origin data source (Like - tenantID, SubscriptionID etc.). - :type context_id: str - :param data_types: The available data types for the connector. - :type data_types: - ~azure.mgmt.securityinsight.models.AlertsDataTypeOfDataConnector - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'context_id': {'key': 'properties.contextId', 'type': 'str'}, - 'data_types': {'key': 'properties.dataTypes', 'type': 'AlertsDataTypeOfDataConnector'}, - } - - _subtype_map = { - 'kind': {'AzureActiveDirectory': 'AADDataConnector', 'AzureSecurityCenter': 'ASCDataConnector', 'MicrosoftCloudAppSecurity': 'MCASDataConnector'} - } - - def __init__(self, **kwargs): - super(DataConnectorWithAlerts, self).__init__(**kwargs) - self.context_id = kwargs.get('context_id', None) - self.data_types = kwargs.get('data_types', None) - self.kind = 'DataConnectorWithAlerts' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts_properties.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts_properties.py new file mode 100644 index 000000000000..a38001750f3f --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts_properties.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DataConnectorWithAlertsProperties(Model): + """Data connector properties. + + :param data_types: The available data types for the connector. + :type data_types: + ~azure.mgmt.securityinsight.models.AlertsDataTypeOfDataConnector + """ + + _attribute_map = { + 'data_types': {'key': 'dataTypes', 'type': 'AlertsDataTypeOfDataConnector'}, + } + + def __init__(self, **kwargs): + super(DataConnectorWithAlertsProperties, self).__init__(**kwargs) + self.data_types = kwargs.get('data_types', None) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts_properties_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts_properties_py3.py new file mode 100644 index 000000000000..e2234f75d9b3 --- /dev/null +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts_properties_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DataConnectorWithAlertsProperties(Model): + """Data connector properties. + + :param data_types: The available data types for the connector. + :type data_types: + ~azure.mgmt.securityinsight.models.AlertsDataTypeOfDataConnector + """ + + _attribute_map = { + 'data_types': {'key': 'dataTypes', 'type': 'AlertsDataTypeOfDataConnector'}, + } + + def __init__(self, *, data_types=None, **kwargs) -> None: + super(DataConnectorWithAlertsProperties, self).__init__(**kwargs) + self.data_types = data_types diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts_py3.py deleted file mode 100644 index 962cae013763..000000000000 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .data_connector_py3 import DataConnector - - -class DataConnectorWithAlerts(DataConnector): - """Data connector with alerts data type. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AADDataConnector, ASCDataConnector, MCASDataConnector - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param etag: Etag of the data connector. - :type etag: str - :param kind: Required. Constant filled by server. - :type kind: str - :param context_id: The context id of the origin data source (Like - tenantID, SubscriptionID etc.). - :type context_id: str - :param data_types: The available data types for the connector. - :type data_types: - ~azure.mgmt.securityinsight.models.AlertsDataTypeOfDataConnector - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'context_id': {'key': 'properties.contextId', 'type': 'str'}, - 'data_types': {'key': 'properties.dataTypes', 'type': 'AlertsDataTypeOfDataConnector'}, - } - - _subtype_map = { - 'kind': {'AzureActiveDirectory': 'AADDataConnector', 'AzureSecurityCenter': 'ASCDataConnector', 'MicrosoftCloudAppSecurity': 'MCASDataConnector'} - } - - def __init__(self, *, etag: str=None, context_id: str=None, data_types=None, **kwargs) -> None: - super(DataConnectorWithAlerts, self).__init__(etag=etag, **kwargs) - self.context_id = context_id - self.data_types = data_types - self.kind = 'DataConnectorWithAlerts' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector.py index 47e35b96e22e..e8f33ade4645 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .data_connector_with_alerts import DataConnectorWithAlerts +from .data_connector import DataConnector -class MCASDataConnector(DataConnectorWithAlerts): +class MCASDataConnector(DataConnector): """Represents MCAS (Microsoft Cloud App Security) data connector. Variables are only populated by the server, and will be ignored when @@ -30,9 +30,8 @@ class MCASDataConnector(DataConnectorWithAlerts): :type etag: str :param kind: Required. Constant filled by server. :type kind: str - :param context_id: The context id of the origin data source (Like - tenantID, SubscriptionID etc.). - :type context_id: str + :param tenant_id: The tenant id to connect to, and get the data from. + :type tenant_id: str :param data_types: The available data types for the connector. :type data_types: ~azure.mgmt.securityinsight.models.AlertsDataTypeOfDataConnector @@ -51,10 +50,12 @@ class MCASDataConnector(DataConnectorWithAlerts): 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'context_id': {'key': 'properties.contextId', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, 'data_types': {'key': 'properties.dataTypes', 'type': 'AlertsDataTypeOfDataConnector'}, } def __init__(self, **kwargs): super(MCASDataConnector, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.data_types = kwargs.get('data_types', None) self.kind = 'MicrosoftCloudAppSecurity' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector_py3.py index f7d3007b934b..8738d0607686 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector_py3.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector_py3.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .data_connector_with_alerts_py3 import DataConnectorWithAlerts +from .data_connector_py3 import DataConnector -class MCASDataConnector(DataConnectorWithAlerts): +class MCASDataConnector(DataConnector): """Represents MCAS (Microsoft Cloud App Security) data connector. Variables are only populated by the server, and will be ignored when @@ -30,9 +30,8 @@ class MCASDataConnector(DataConnectorWithAlerts): :type etag: str :param kind: Required. Constant filled by server. :type kind: str - :param context_id: The context id of the origin data source (Like - tenantID, SubscriptionID etc.). - :type context_id: str + :param tenant_id: The tenant id to connect to, and get the data from. + :type tenant_id: str :param data_types: The available data types for the connector. :type data_types: ~azure.mgmt.securityinsight.models.AlertsDataTypeOfDataConnector @@ -51,10 +50,12 @@ class MCASDataConnector(DataConnectorWithAlerts): 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'context_id': {'key': 'properties.contextId', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, 'data_types': {'key': 'properties.dataTypes', 'type': 'AlertsDataTypeOfDataConnector'}, } - def __init__(self, *, etag: str=None, context_id: str=None, data_types=None, **kwargs) -> None: - super(MCASDataConnector, self).__init__(etag=etag, context_id=context_id, data_types=data_types, **kwargs) + def __init__(self, *, etag: str=None, tenant_id: str=None, data_types=None, **kwargs) -> None: + super(MCASDataConnector, self).__init__(etag=etag, **kwargs) + self.tenant_id = tenant_id + self.data_types = data_types self.kind = 'MicrosoftCloudAppSecurity' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector.py index d27ac1ced326..44559f2536b2 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector.py @@ -30,9 +30,8 @@ class OfficeDataConnector(DataConnector): :type etag: str :param kind: Required. Constant filled by server. :type kind: str - :param context_id: The context id of the origin data source (Like - tenantID, SubscriptionID etc.). - :type context_id: str + :param tenant_id: The tenant id to connect to, and get the data from. + :type tenant_id: str :param data_types: The available data types for the connector. :type data_types: ~azure.mgmt.securityinsight.models.OfficeDataConnectorDataTypes @@ -51,12 +50,12 @@ class OfficeDataConnector(DataConnector): 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'context_id': {'key': 'properties.contextId', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, 'data_types': {'key': 'properties.dataTypes', 'type': 'OfficeDataConnectorDataTypes'}, } def __init__(self, **kwargs): super(OfficeDataConnector, self).__init__(**kwargs) - self.context_id = kwargs.get('context_id', None) + self.tenant_id = kwargs.get('tenant_id', None) self.data_types = kwargs.get('data_types', None) self.kind = 'Office365' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_py3.py index 7302bf453ecf..0b8369ad7727 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_py3.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_py3.py @@ -30,9 +30,8 @@ class OfficeDataConnector(DataConnector): :type etag: str :param kind: Required. Constant filled by server. :type kind: str - :param context_id: The context id of the origin data source (Like - tenantID, SubscriptionID etc.). - :type context_id: str + :param tenant_id: The tenant id to connect to, and get the data from. + :type tenant_id: str :param data_types: The available data types for the connector. :type data_types: ~azure.mgmt.securityinsight.models.OfficeDataConnectorDataTypes @@ -51,12 +50,12 @@ class OfficeDataConnector(DataConnector): 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'context_id': {'key': 'properties.contextId', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, 'data_types': {'key': 'properties.dataTypes', 'type': 'OfficeDataConnectorDataTypes'}, } - def __init__(self, *, etag: str=None, context_id: str=None, data_types=None, **kwargs) -> None: + def __init__(self, *, etag: str=None, tenant_id: str=None, data_types=None, **kwargs) -> None: super(OfficeDataConnector, self).__init__(etag=etag, **kwargs) - self.context_id = context_id + self.tenant_id = tenant_id self.data_types = data_types self.kind = 'Office365' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector.py index 8a5d5362da47..8b7527c417d9 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector.py @@ -30,9 +30,8 @@ class TIDataConnector(DataConnector): :type etag: str :param kind: Required. Constant filled by server. :type kind: str - :param context_id: The context id of the origin data source (Like - tenantID, SubscriptionID etc.). - :type context_id: str + :param tenant_id: The tenant id to connect to, and get the data from. + :type tenant_id: str :param data_types: The available data types for the connector. :type data_types: ~azure.mgmt.securityinsight.models.TIDataConnectorDataTypes @@ -51,12 +50,12 @@ class TIDataConnector(DataConnector): 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'context_id': {'key': 'properties.contextId', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, 'data_types': {'key': 'properties.dataTypes', 'type': 'TIDataConnectorDataTypes'}, } def __init__(self, **kwargs): super(TIDataConnector, self).__init__(**kwargs) - self.context_id = kwargs.get('context_id', None) + self.tenant_id = kwargs.get('tenant_id', None) self.data_types = kwargs.get('data_types', None) self.kind = 'ThreatIntelligence' diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_py3.py index 3e2cb053bb05..9342603bf765 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_py3.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_py3.py @@ -30,9 +30,8 @@ class TIDataConnector(DataConnector): :type etag: str :param kind: Required. Constant filled by server. :type kind: str - :param context_id: The context id of the origin data source (Like - tenantID, SubscriptionID etc.). - :type context_id: str + :param tenant_id: The tenant id to connect to, and get the data from. + :type tenant_id: str :param data_types: The available data types for the connector. :type data_types: ~azure.mgmt.securityinsight.models.TIDataConnectorDataTypes @@ -51,12 +50,12 @@ class TIDataConnector(DataConnector): 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'context_id': {'key': 'properties.contextId', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, 'data_types': {'key': 'properties.dataTypes', 'type': 'TIDataConnectorDataTypes'}, } - def __init__(self, *, etag: str=None, context_id: str=None, data_types=None, **kwargs) -> None: + def __init__(self, *, etag: str=None, tenant_id: str=None, data_types=None, **kwargs) -> None: super(TIDataConnector, self).__init__(etag=etag, **kwargs) - self.context_id = context_id + self.tenant_id = tenant_id self.data_types = data_types self.kind = 'ThreatIntelligence' From f499b62786c6d8e79951d93792dc379645160533 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 12 Feb 2019 20:19:50 +0000 Subject: [PATCH 4/6] 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 --- .../securityinsight/models/account_entity.py | 2 +- .../models/account_entity_py3.py | 2 +- .../mgmt/securityinsight/models/action.py | 5 -- .../mgmt/securityinsight/models/action_py3.py | 5 -- .../models/scheduled_alert_rule.py | 9 +-- .../models/scheduled_alert_rule_py3.py | 11 ++- .../operations/actions_operations.py | 77 +------------------ .../operations/alert_rules_operations.py | 12 +-- .../operations/bookmarks_operations.py | 6 +- .../operations/cases_operations.py | 6 +- 10 files changed, 24 insertions(+), 111 deletions(-) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity.py index d55e1a59cc89..89c273d5013e 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity.py @@ -66,7 +66,7 @@ class AccountEntity(Entity): 'aad_user_id': {'readonly': True}, 'puid': {'readonly': True}, 'is_domain_joined': {'readonly': True}, - 'object_guid': {'readonly': True, 'pattern': r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'}, + 'object_guid': {'readonly': True}, } _attribute_map = { diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity_py3.py index 85c5be6c33f4..ec5e903ae655 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity_py3.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity_py3.py @@ -66,7 +66,7 @@ class AccountEntity(Entity): 'aad_user_id': {'readonly': True}, 'puid': {'readonly': True}, 'is_domain_joined': {'readonly': True}, - 'object_guid': {'readonly': True, 'pattern': r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'}, + 'object_guid': {'readonly': True}, } _attribute_map = { diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action.py index 1bbfe67b66c4..496358cee439 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action.py @@ -28,15 +28,12 @@ class Action(Resource): :type etag: str :param trigger_uri: The uri for the action to trigger. :type trigger_uri: str - :ivar rule_id: The unique identifier of the rule. - :vartype rule_id: str """ _validation = { 'id': {'readonly': True}, 'type': {'readonly': True}, 'name': {'readonly': True}, - 'rule_id': {'readonly': True}, } _attribute_map = { @@ -45,11 +42,9 @@ class Action(Resource): 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'trigger_uri': {'key': 'properties.triggerUri', 'type': 'str'}, - 'rule_id': {'key': 'properties.ruleId', 'type': 'str'}, } def __init__(self, **kwargs): super(Action, self).__init__(**kwargs) self.etag = kwargs.get('etag', None) self.trigger_uri = kwargs.get('trigger_uri', None) - self.rule_id = None diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_py3.py index 77b4c421e571..33cccb5190d6 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_py3.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_py3.py @@ -28,15 +28,12 @@ class Action(Resource): :type etag: str :param trigger_uri: The uri for the action to trigger. :type trigger_uri: str - :ivar rule_id: The unique identifier of the rule. - :vartype rule_id: str """ _validation = { 'id': {'readonly': True}, 'type': {'readonly': True}, 'name': {'readonly': True}, - 'rule_id': {'readonly': True}, } _attribute_map = { @@ -45,11 +42,9 @@ class Action(Resource): 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'trigger_uri': {'key': 'properties.triggerUri', 'type': 'str'}, - 'rule_id': {'key': 'properties.ruleId', 'type': 'str'}, } def __init__(self, *, etag: str=None, trigger_uri: str=None, **kwargs) -> None: super(Action, self).__init__(**kwargs) self.etag = etag self.trigger_uri = trigger_uri - self.rule_id = None diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule.py index 2a1de916a46f..ffff2fac8f51 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule.py @@ -30,9 +30,9 @@ class ScheduledAlertRule(AlertRule): :type etag: str :param kind: Required. Constant filled by server. :type kind: str - :param rule_name: Required. The name for alerts created by this alert + :param display_name: The display name for alerts created by this alert rule. - :type rule_name: str + :type display_name: str :param description: Required. The description of the alert rule. :type description: str :param severity: Required. The severity for alerts created by this alert @@ -72,7 +72,6 @@ class ScheduledAlertRule(AlertRule): 'type': {'readonly': True}, 'name': {'readonly': True}, 'kind': {'required': True}, - 'rule_name': {'required': True}, 'description': {'required': True}, 'severity': {'required': True}, 'enabled': {'required': True}, @@ -92,7 +91,7 @@ class ScheduledAlertRule(AlertRule): 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'rule_name': {'key': 'properties.ruleName', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'severity': {'key': 'properties.severity', 'type': 'AlertSeverity'}, 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, @@ -108,7 +107,7 @@ class ScheduledAlertRule(AlertRule): def __init__(self, **kwargs): super(ScheduledAlertRule, self).__init__(**kwargs) - self.rule_name = kwargs.get('rule_name', None) + self.display_name = kwargs.get('display_name', None) self.description = kwargs.get('description', None) self.severity = kwargs.get('severity', None) self.enabled = kwargs.get('enabled', None) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule_py3.py index 9411683761af..d327d95b6d47 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule_py3.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule_py3.py @@ -30,9 +30,9 @@ class ScheduledAlertRule(AlertRule): :type etag: str :param kind: Required. Constant filled by server. :type kind: str - :param rule_name: Required. The name for alerts created by this alert + :param display_name: The display name for alerts created by this alert rule. - :type rule_name: str + :type display_name: str :param description: Required. The description of the alert rule. :type description: str :param severity: Required. The severity for alerts created by this alert @@ -72,7 +72,6 @@ class ScheduledAlertRule(AlertRule): 'type': {'readonly': True}, 'name': {'readonly': True}, 'kind': {'required': True}, - 'rule_name': {'required': True}, 'description': {'required': True}, 'severity': {'required': True}, 'enabled': {'required': True}, @@ -92,7 +91,7 @@ class ScheduledAlertRule(AlertRule): 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'rule_name': {'key': 'properties.ruleName', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'severity': {'key': 'properties.severity', 'type': 'AlertSeverity'}, 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, @@ -106,9 +105,9 @@ class ScheduledAlertRule(AlertRule): 'last_modified_utc': {'key': 'properties.lastModifiedUtc', 'type': 'str'}, } - def __init__(self, *, rule_name: str, description: str, severity, enabled: bool, query: str, query_frequency, query_period, trigger_operator, trigger_threshold: int, suppression_enabled: bool, suppression_duration, etag: str=None, **kwargs) -> None: + def __init__(self, *, description: str, severity, enabled: bool, query: str, query_frequency, query_period, trigger_operator, trigger_threshold: int, suppression_enabled: bool, suppression_duration, etag: str=None, display_name: str=None, **kwargs) -> None: super(ScheduledAlertRule, self).__init__(etag=etag, **kwargs) - self.rule_name = rule_name + self.display_name = display_name self.description = description self.severity = severity self.enabled = enabled diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/actions_operations.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/actions_operations.py index 3aad6485201a..e32d7e6f3188 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/actions_operations.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/actions_operations.py @@ -71,7 +71,7 @@ def internal_paging(next_link=None, raw=False): 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), - 'ruleId': self._serialize.url("rule_id", rule_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + 'ruleId': self._serialize.url("rule_id", rule_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -114,78 +114,3 @@ def internal_paging(next_link=None, raw=False): return deserialized list_by_alert_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions'} - - def list( - self, resource_group_name, operational_insights_resource_provider, workspace_name, custom_headers=None, raw=False, **operation_config): - """Gets all actions. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param operational_insights_resource_provider: The namespace of - workspaces resource provider- Microsoft.OperationalInsights. - :type operational_insights_resource_provider: str - :param workspace_name: The name of the workspace. - :type workspace_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Action - :rtype: - ~azure.mgmt.securityinsight.models.ActionPaged[~azure.mgmt.securityinsight.models.Action] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ActionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ActionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/actions'} diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/alert_rules_operations.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/alert_rules_operations.py index 3c845fa564bc..ce88f155f146 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/alert_rules_operations.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/alert_rules_operations.py @@ -143,7 +143,7 @@ def get( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), - 'ruleId': self._serialize.url("rule_id", rule_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + 'ruleId': self._serialize.url("rule_id", rule_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -215,7 +215,7 @@ def create( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), - 'ruleId': self._serialize.url("rule_id", rule_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + 'ruleId': self._serialize.url("rule_id", rule_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -290,7 +290,7 @@ def delete( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), - 'ruleId': self._serialize.url("rule_id", rule_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + 'ruleId': self._serialize.url("rule_id", rule_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -354,7 +354,7 @@ def get_action( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), - 'ruleId': self._serialize.url("rule_id", rule_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ruleId': self._serialize.url("rule_id", rule_id, 'str'), 'actionId': self._serialize.url("action_id", action_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -433,7 +433,7 @@ def create_action( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), - 'ruleId': self._serialize.url("rule_id", rule_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ruleId': self._serialize.url("rule_id", rule_id, 'str'), 'actionId': self._serialize.url("action_id", action_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -511,7 +511,7 @@ def delete_action( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), - 'ruleId': self._serialize.url("rule_id", rule_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ruleId': self._serialize.url("rule_id", rule_id, 'str'), 'actionId': self._serialize.url("action_id", action_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/bookmarks_operations.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/bookmarks_operations.py index 14908da5f345..052444baca8c 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/bookmarks_operations.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/bookmarks_operations.py @@ -143,7 +143,7 @@ def get( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), - 'bookmarkId': self._serialize.url("bookmark_id", bookmark_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + 'bookmarkId': self._serialize.url("bookmark_id", bookmark_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -215,7 +215,7 @@ def create( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), - 'bookmarkId': self._serialize.url("bookmark_id", bookmark_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + 'bookmarkId': self._serialize.url("bookmark_id", bookmark_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -290,7 +290,7 @@ def delete( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), - 'bookmarkId': self._serialize.url("bookmark_id", bookmark_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + 'bookmarkId': self._serialize.url("bookmark_id", bookmark_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/cases_operations.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/cases_operations.py index 36c218038c7a..15eb96c0fd81 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/cases_operations.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/cases_operations.py @@ -143,7 +143,7 @@ def get( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), - 'caseId': self._serialize.url("case_id", case_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + 'caseId': self._serialize.url("case_id", case_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -215,7 +215,7 @@ def create( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), - 'caseId': self._serialize.url("case_id", case_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + 'caseId': self._serialize.url("case_id", case_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -290,7 +290,7 @@ def delete( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), - 'caseId': self._serialize.url("case_id", case_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + 'caseId': self._serialize.url("case_id", case_id, 'str') } url = self._client.format_url(url, **path_format_arguments) From 63c73a19873086b139d40259d3e18591bac4a16e Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 13 Feb 2019 06:35:18 +0000 Subject: [PATCH 5/6] Generated from 455c9b456a849ede16da071ad6da7bb3ed0bfd4e Fixing validation error --- .../mgmt/securityinsight/models/scheduled_alert_rule.py | 5 +++-- .../securityinsight/models/scheduled_alert_rule_py3.py | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule.py index ffff2fac8f51..430f82b84994 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule.py @@ -30,8 +30,8 @@ class ScheduledAlertRule(AlertRule): :type etag: str :param kind: Required. Constant filled by server. :type kind: str - :param display_name: The display name for alerts created by this alert - rule. + :param display_name: Required. The display name for alerts created by this + alert rule. :type display_name: str :param description: Required. The description of the alert rule. :type description: str @@ -72,6 +72,7 @@ class ScheduledAlertRule(AlertRule): 'type': {'readonly': True}, 'name': {'readonly': True}, 'kind': {'required': True}, + 'display_name': {'required': True}, 'description': {'required': True}, 'severity': {'required': True}, 'enabled': {'required': True}, diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule_py3.py index d327d95b6d47..48bdaa08acfc 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule_py3.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule_py3.py @@ -30,8 +30,8 @@ class ScheduledAlertRule(AlertRule): :type etag: str :param kind: Required. Constant filled by server. :type kind: str - :param display_name: The display name for alerts created by this alert - rule. + :param display_name: Required. The display name for alerts created by this + alert rule. :type display_name: str :param description: Required. The description of the alert rule. :type description: str @@ -72,6 +72,7 @@ class ScheduledAlertRule(AlertRule): 'type': {'readonly': True}, 'name': {'readonly': True}, 'kind': {'required': True}, + 'display_name': {'required': True}, 'description': {'required': True}, 'severity': {'required': True}, 'enabled': {'required': True}, @@ -105,7 +106,7 @@ class ScheduledAlertRule(AlertRule): 'last_modified_utc': {'key': 'properties.lastModifiedUtc', 'type': 'str'}, } - def __init__(self, *, description: str, severity, enabled: bool, query: str, query_frequency, query_period, trigger_operator, trigger_threshold: int, suppression_enabled: bool, suppression_duration, etag: str=None, display_name: str=None, **kwargs) -> None: + def __init__(self, *, display_name: str, description: str, severity, enabled: bool, query: str, query_frequency, query_period, trigger_operator, trigger_threshold: int, suppression_enabled: bool, suppression_duration, etag: str=None, **kwargs) -> None: super(ScheduledAlertRule, self).__init__(etag=etag, **kwargs) self.display_name = display_name self.description = description From da3e17e08ef20a053e48aa231fd3e09bab729106 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 13 Feb 2019 20:04:59 +0000 Subject: [PATCH 6/6] Generated from 22bf30282758b6cd3f4ebb2bf535946a1851bec0 updating the operationIds to be more precise --- .../azure/mgmt/securityinsight/models/__init__.py | 4 ++-- .../azure/mgmt/securityinsight/models/case.py | 2 +- .../azure/mgmt/securityinsight/models/case_py3.py | 2 +- .../models/security_insights_enums.py | 2 +- .../operations/alert_rules_operations.py | 12 ++++++------ .../operations/bookmarks_operations.py | 6 +++--- .../securityinsight/operations/cases_operations.py | 6 +++--- .../operations/data_connectors_operations.py | 6 +++--- .../operations/product_settings_operations.py | 8 ++++---- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py index 1e1307fb7b54..f44962a7aeb5 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py @@ -98,7 +98,7 @@ AlertSeverity, TriggerOperator, CaseSeverity, - Status, + CaseStatus, CloseReason, DataConnectorKind, DataTypeState, @@ -158,7 +158,7 @@ 'AlertSeverity', 'TriggerOperator', 'CaseSeverity', - 'Status', + 'CaseStatus', 'CloseReason', 'DataConnectorKind', 'DataTypeState', diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case.py index 241a670c8b45..11c77bf387cb 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case.py @@ -49,7 +49,7 @@ class Case(Resource): :type severity: str or ~azure.mgmt.securityinsight.models.CaseSeverity :param status: Required. The status of the case. Possible values include: 'Draft', 'Open', 'InProgress', 'Closed' - :type status: str or ~azure.mgmt.securityinsight.models.Status + :type status: str or ~azure.mgmt.securityinsight.models.CaseStatus :param close_reason: The reason the case was closed. Possible values include: 'Resolved', 'Dismissed', 'Other' :type close_reason: str or ~azure.mgmt.securityinsight.models.CloseReason diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_py3.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_py3.py index 709d89b476d7..f76402bae134 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_py3.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_py3.py @@ -49,7 +49,7 @@ class Case(Resource): :type severity: str or ~azure.mgmt.securityinsight.models.CaseSeverity :param status: Required. The status of the case. Possible values include: 'Draft', 'Open', 'InProgress', 'Closed' - :type status: str or ~azure.mgmt.securityinsight.models.Status + :type status: str or ~azure.mgmt.securityinsight.models.CaseStatus :param close_reason: The reason the case was closed. Possible values include: 'Resolved', 'Dismissed', 'Other' :type close_reason: str or ~azure.mgmt.securityinsight.models.CloseReason diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/security_insights_enums.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/security_insights_enums.py index e1fab21a8610..655ba0639343 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/security_insights_enums.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/security_insights_enums.py @@ -42,7 +42,7 @@ class CaseSeverity(str, Enum): informational = "Informational" #: Informational severity -class Status(str, Enum): +class CaseStatus(str, Enum): draft = "Draft" #: Case that wasn't promoted yet to active open = "Open" #: An active case which isn't handled currently diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/alert_rules_operations.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/alert_rules_operations.py index ce88f155f146..9f246b8a89f9 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/alert_rules_operations.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/alert_rules_operations.py @@ -182,7 +182,7 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}'} - def create( + def create_or_update( self, resource_group_name, operational_insights_resource_provider, workspace_name, rule_id, alert_rule, custom_headers=None, raw=False, **operation_config): """Creates or updates the alert rule. @@ -209,7 +209,7 @@ def create( :raises: :class:`CloudError` """ # Construct URL - url = self.create.metadata['url'] + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -258,7 +258,7 @@ def create( return client_raw_response return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}'} def delete( self, resource_group_name, operational_insights_resource_provider, workspace_name, rule_id, custom_headers=None, raw=False, **operation_config): @@ -394,7 +394,7 @@ def get_action( return deserialized get_action.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions/{actionId}'} - def create_action( + def create_or_update_action( self, resource_group_name, operational_insights_resource_provider, workspace_name, rule_id, action_id, etag=None, trigger_uri=None, custom_headers=None, raw=False, **operation_config): """Creates or updates the action of alert rule. @@ -427,7 +427,7 @@ def create_action( action = models.Action(etag=etag, trigger_uri=trigger_uri) # Construct URL - url = self.create_action.metadata['url'] + url = self.create_or_update_action.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -477,7 +477,7 @@ def create_action( return client_raw_response return deserialized - create_action.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions/{actionId}'} + create_or_update_action.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions/{actionId}'} def delete_action( self, resource_group_name, operational_insights_resource_provider, workspace_name, rule_id, action_id, custom_headers=None, raw=False, **operation_config): diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/bookmarks_operations.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/bookmarks_operations.py index 052444baca8c..c0d38f7ee281 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/bookmarks_operations.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/bookmarks_operations.py @@ -182,7 +182,7 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}'} - def create( + def create_or_update( self, resource_group_name, operational_insights_resource_provider, workspace_name, bookmark_id, bookmark, custom_headers=None, raw=False, **operation_config): """Creates or updates the bookmark. @@ -209,7 +209,7 @@ def create( :raises: :class:`CloudError` """ # Construct URL - url = self.create.metadata['url'] + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -258,7 +258,7 @@ def create( return client_raw_response return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}'} def delete( self, resource_group_name, operational_insights_resource_provider, workspace_name, bookmark_id, custom_headers=None, raw=False, **operation_config): diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/cases_operations.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/cases_operations.py index 15eb96c0fd81..c7ded22b619c 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/cases_operations.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/cases_operations.py @@ -182,7 +182,7 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/cases/{caseId}'} - def create( + def create_or_update( self, resource_group_name, operational_insights_resource_provider, workspace_name, case_id, case, custom_headers=None, raw=False, **operation_config): """Creates or updates the case. @@ -209,7 +209,7 @@ def create( :raises: :class:`CloudError` """ # Construct URL - url = self.create.metadata['url'] + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -258,7 +258,7 @@ def create( return client_raw_response return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/cases/{caseId}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/cases/{caseId}'} def delete( self, resource_group_name, operational_insights_resource_provider, workspace_name, case_id, custom_headers=None, raw=False, **operation_config): diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/data_connectors_operations.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/data_connectors_operations.py index 408213b64719..61107803dfad 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/data_connectors_operations.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/data_connectors_operations.py @@ -182,7 +182,7 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}'} - def create( + def create_or_update( self, resource_group_name, operational_insights_resource_provider, workspace_name, data_connector_id, data_connector, custom_headers=None, raw=False, **operation_config): """Creates or updates the data connector. @@ -209,7 +209,7 @@ def create( :raises: :class:`CloudError` """ # Construct URL - url = self.create.metadata['url'] + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -258,7 +258,7 @@ def create( return client_raw_response return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}'} def delete( self, resource_group_name, operational_insights_resource_provider, workspace_name, data_connector_id, custom_headers=None, raw=False, **operation_config): diff --git a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/product_settings_operations.py b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/product_settings_operations.py index 79ce2831b22b..4bdaffcbf466 100644 --- a/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/product_settings_operations.py +++ b/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/product_settings_operations.py @@ -107,9 +107,9 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}'} - def create( + def update( self, resource_group_name, operational_insights_resource_provider, workspace_name, settings_name, settings, custom_headers=None, raw=False, **operation_config): - """Creates or updates the setting. + """Updates the setting. :param resource_group_name: The name of the resource group within the user's subscription. The name is case insensitive. @@ -134,7 +134,7 @@ def create( :raises: :class:`CloudError` """ # Construct URL - url = self.create.metadata['url'] + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -181,4 +181,4 @@ def create( return client_raw_response return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}'}