From 69f261b15f1143cf4a91534c1d0ef7b3431dc2e4 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 29 May 2019 13:05:30 +0000 Subject: [PATCH 1/2] Generated from 8a93683c96abffb6f810fe70b251c09ce086340c added new resource - entityQueries --- .../azure/mgmt/securityinsight/__init__.py | 18 + .../mgmt/securityinsight/models/__init__.py | 182 ++++++ .../models/aad_data_connector.py | 61 ++ .../models/aad_data_connector_py3.py | 61 ++ .../securityinsight/models/account_entity.py | 99 ++++ .../models/account_entity_py3.py | 99 ++++ .../mgmt/securityinsight/models/action.py | 50 ++ .../securityinsight/models/action_paged.py | 27 + .../mgmt/securityinsight/models/action_py3.py | 50 ++ .../securityinsight/models/aggregations.py | 52 ++ .../models/aggregations_kind1.py | 29 + .../models/aggregations_kind1_py3.py | 29 + .../models/aggregations_py3.py | 52 ++ .../mgmt/securityinsight/models/alert_rule.py | 63 ++ .../models/alert_rule_kind1.py | 29 + .../models/alert_rule_kind1_py3.py | 29 + .../models/alert_rule_paged.py | 27 + .../securityinsight/models/alert_rule_py3.py | 63 ++ .../alerts_data_type_of_data_connector.py | 29 + ...erts_data_type_of_data_connector_alerts.py | 28 + ..._data_type_of_data_connector_alerts_py3.py | 28 + .../alerts_data_type_of_data_connector_py3.py | 29 + .../models/asc_data_connector.py | 62 ++ .../models/asc_data_connector_py3.py | 62 ++ .../mgmt/securityinsight/models/bookmark.py | 82 +++ .../securityinsight/models/bookmark_paged.py | 27 + .../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 ++++ .../securityinsight/models/data_connector.py | 64 +++ .../models/data_connector_data_type_common.py | 29 + .../data_connector_data_type_common_py3.py | 29 + .../models/data_connector_kind1.py | 30 + .../models/data_connector_kind1_py3.py | 30 + .../models/data_connector_paged.py | 27 + .../models/data_connector_py3.py | 64 +++ .../models/data_connector_tenant_id.py | 28 + .../models/data_connector_tenant_id_py3.py | 28 + .../data_connector_with_alerts_properties.py | 29 + ...ta_connector_with_alerts_properties_py3.py | 29 + .../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/entity_query.py | 42 ++ .../models/entity_query_paged.py | 27 + .../models/entity_query_py3.py | 42 ++ .../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 ++++ .../models/mcas_data_connector.py | 61 ++ .../models/mcas_data_connector_py3.py | 61 ++ .../securityinsight/models/office_consent.py | 51 ++ .../models/office_consent_paged.py | 27 + .../models/office_consent_py3.py | 51 ++ .../models/office_data_connector.py | 61 ++ .../office_data_connector_data_types.py | 34 ++ ...fice_data_connector_data_types_exchange.py | 28 + ..._data_connector_data_types_exchange_py3.py | 28 + .../office_data_connector_data_types_py3.py | 34 ++ ...e_data_connector_data_types_share_point.py | 28 + ...ta_connector_data_types_share_point_py3.py | 28 + .../models/office_data_connector_py3.py | 61 ++ .../mgmt/securityinsight/models/operation.py | 32 ++ .../models/operation_display.py | 40 ++ .../models/operation_display_py3.py | 40 ++ .../securityinsight/models/operation_paged.py | 27 + .../securityinsight/models/operation_py3.py | 32 ++ .../mgmt/securityinsight/models/resource.py | 45 ++ .../securityinsight/models/resource_py3.py | 45 ++ .../models/scheduled_alert_rule.py | 123 ++++ .../models/scheduled_alert_rule_py3.py | 123 ++++ .../models/security_insights_enums.py | 104 ++++ .../mgmt/securityinsight/models/settings.py | 59 ++ .../securityinsight/models/settings_kind.py | 29 + .../models/settings_kind_py3.py | 29 + .../securityinsight/models/settings_py3.py | 59 ++ .../models/ti_data_connector.py | 61 ++ .../models/ti_data_connector_data_types.py | 29 + ...ti_data_connector_data_types_indicators.py | 28 + ...ata_connector_data_types_indicators_py3.py | 28 + .../ti_data_connector_data_types_py3.py | 29 + .../models/ti_data_connector_py3.py | 61 ++ .../securityinsight/models/toggle_settings.py | 53 ++ .../models/toggle_settings_py3.py | 53 ++ .../securityinsight/models/ueba_settings.py | 68 +++ .../models/ueba_settings_py3.py | 68 +++ .../mgmt/securityinsight/models/user_info.py | 36 ++ .../securityinsight/models/user_info_py3.py | 36 ++ .../securityinsight/operations/__init__.py | 36 ++ .../operations/actions_operations.py | 116 ++++ .../operations/alert_rules_operations.py | 544 ++++++++++++++++++ .../operations/bookmarks_operations.py | 322 +++++++++++ .../cases_aggregations_operations.py | 109 ++++ .../operations/cases_operations.py | 322 +++++++++++ .../operations/data_connectors_operations.py | 322 +++++++++++ .../operations/entities_operations.py | 183 ++++++ .../operations/entity_queries_operations.py | 183 ++++++ .../operations/office_consents_operations.py | 244 ++++++++ .../securityinsight/operations/operations.py | 99 ++++ .../operations/product_settings_operations.py | 184 ++++++ .../mgmt/securityinsight/security_insights.py | 131 +++++ .../azure/mgmt/securityinsight/version.py | 13 + 106 files changed, 7385 insertions(+) create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/__init__.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_paged.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aggregations.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aggregations_kind1.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aggregations_kind1_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aggregations_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule_kind1.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule_kind1_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule_paged.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alerts_data_type_of_data_connector.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alerts_data_type_of_data_connector_alerts.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alerts_data_type_of_data_connector_alerts_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alerts_data_type_of_data_connector_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_paged.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_paged.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_data_type_common.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_data_type_common_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_kind1.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_kind1_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_paged.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_tenant_id.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_tenant_id_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts_properties.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts_properties_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_kind1.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_kind1_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_paged.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_query.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_query_paged.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_query_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/host_entity.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/host_entity_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent_paged.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types_exchange.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types_exchange_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types_share_point.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types_share_point_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/operation.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/operation_display.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/operation_display_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/operation_paged.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/operation_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/resource.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/resource_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/security_insights_enums.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_kind.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_kind_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types_indicators.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types_indicators_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/user_info.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/user_info_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/__init__.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/actions_operations.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/alert_rules_operations.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/bookmarks_operations.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/cases_aggregations_operations.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/cases_operations.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/data_connectors_operations.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/entities_operations.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/entity_queries_operations.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/office_consents_operations.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/operations.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/product_settings_operations.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/security_insights.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/version.py diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/__init__.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/__init__.py new file mode 100644 index 000000000000..59c5d0a0e375 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/__init__.py @@ -0,0 +1,18 @@ +# 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 .security_insights import SecurityInsights +from .version import VERSION + +__all__ = ['SecurityInsights'] + +__version__ = VERSION + diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py new file mode 100644 index 000000000000..ba23fbb16985 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py @@ -0,0 +1,182 @@ +# 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. +# -------------------------------------------------------------------------- + +try: + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + 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_py3 import Bookmark + from .data_connector_py3 import DataConnector + from .data_connector_kind1_py3 import DataConnectorKind1 + 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 + from .office_data_connector_py3 import OfficeDataConnector + 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 .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 + 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 + from .aggregations_py3 import Aggregations + from .aggregations_kind1_py3 import AggregationsKind1 + from .entity_query_py3 import EntityQuery +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 import Bookmark + from .data_connector import DataConnector + from .data_connector_kind1 import DataConnectorKind1 + 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 + from .office_data_connector import OfficeDataConnector + 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 .data_connector_with_alerts_properties import DataConnectorWithAlertsProperties + 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 .aggregations import Aggregations + from .aggregations_kind1 import AggregationsKind1 + from .entity_query import EntityQuery +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 .entity_query_paged import EntityQueryPaged +from .security_insights_enums import ( + AlertRuleKind, + AlertSeverity, + TriggerOperator, + CaseSeverity, + CaseStatus, + CloseReason, + DataConnectorKind, + DataTypeState, + EntityKind, + OSFamily, + SettingKind, + StatusInMcas, + AggregationsKind, +) + +__all__ = [ + 'OperationDisplay', + 'Operation', + 'AlertRule', + 'AlertRuleKind1', + 'ScheduledAlertRule', + 'Action', + 'UserInfo', + 'Case', + 'Bookmark', + 'DataConnector', + 'DataConnectorKind1', + 'DataConnectorTenantId', + 'OfficeDataConnectorDataTypesSharePoint', + 'OfficeDataConnectorDataTypesExchange', + 'OfficeDataConnectorDataTypes', + 'OfficeDataConnector', + 'TIDataConnectorDataTypesIndicators', + 'TIDataConnectorDataTypes', + 'TIDataConnector', + 'AlertsDataTypeOfDataConnectorAlerts', + 'AlertsDataTypeOfDataConnector', + 'AADDataConnector', + 'ASCDataConnector', + 'MCASDataConnector', + 'DataConnectorWithAlertsProperties', + 'DataConnectorDataTypeCommon', + 'Entity', + 'EntityKind1', + 'AccountEntity', + 'HostEntity', + 'FileEntity', + 'OfficeConsent', + 'Resource', + 'Settings', + 'SettingsKind', + 'UebaSettings', + 'ToggleSettings', + 'Aggregations', + 'AggregationsKind1', + 'EntityQuery', + 'OperationPaged', + 'AlertRulePaged', + 'ActionPaged', + 'CasePaged', + 'BookmarkPaged', + 'DataConnectorPaged', + 'EntityPaged', + 'OfficeConsentPaged', + 'EntityQueryPaged', + 'AlertRuleKind', + 'AlertSeverity', + 'TriggerOperator', + 'CaseSeverity', + 'CaseStatus', + 'CloseReason', + 'DataConnectorKind', + 'DataTypeState', + 'EntityKind', + 'OSFamily', + 'SettingKind', + 'StatusInMcas', + 'AggregationsKind', +] diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector.py new file mode 100644 index 000000000000..d4e920262e9c --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector.py @@ -0,0 +1,61 @@ +# 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 AADDataConnector(DataConnector): + """Represents AAD (Azure Active Directory) data connector. + + 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 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 + """ + + _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'}, + '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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector_py3.py new file mode 100644 index 000000000000..c0b906524928 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector_py3.py @@ -0,0 +1,61 @@ +# 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 AADDataConnector(DataConnector): + """Represents AAD (Azure Active Directory) data connector. + + 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 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 + """ + + _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'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'data_types': {'key': 'properties.dataTypes', 'type': 'AlertsDataTypeOfDataConnector'}, + } + + 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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity.py new file mode 100644 index 000000000000..e1b09b4fc542 --- /dev/null +++ b/sdk/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_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 + :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 Azure Active Directory tenant id. + :vartype aad_tenant_id: str + :ivar aad_user_id: The Azure Active Directory user id. + :vartype aad_user_id: str + :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 + :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_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}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', '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'}, + '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_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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/account_entity_py3.py new file mode 100644 index 000000000000..488716037262 --- /dev/null +++ b/sdk/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_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 + :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 Azure Active Directory tenant id. + :vartype aad_tenant_id: str + :ivar aad_user_id: The Azure Active Directory user id. + :vartype aad_user_id: str + :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 + :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_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}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', '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'}, + '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_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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action.py new file mode 100644 index 000000000000..496358cee439 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action.py @@ -0,0 +1,50 @@ +# 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'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'}, + } + + def __init__(self, **kwargs): + super(Action, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.trigger_uri = kwargs.get('trigger_uri', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_paged.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_paged.py new file mode 100644 index 000000000000..2aff45e3393b --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_py3.py new file mode 100644 index 000000000000..33cccb5190d6 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_py3.py @@ -0,0 +1,50 @@ +# 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'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'}, + } + + 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 diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aggregations.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aggregations.py new file mode 100644 index 000000000000..1725d1ad51af --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aggregations.py @@ -0,0 +1,52 @@ +# 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 Aggregations(Model): + """The aggregation. + + 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'}, + } + + def __init__(self, **kwargs): + super(Aggregations, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.kind = None diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aggregations_kind1.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aggregations_kind1.py new file mode 100644 index 000000000000..8af6327111f3 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aggregations_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 AggregationsKind1(Model): + """Describes an Azure resource with kind. + + :param kind: The kind of the setting. Possible values include: + 'CasesAggregation' + :type kind: str or ~azure.mgmt.securityinsight.models.AggregationsKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AggregationsKind1, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aggregations_kind1_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aggregations_kind1_py3.py new file mode 100644 index 000000000000..13fe73cf6168 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aggregations_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 AggregationsKind1(Model): + """Describes an Azure resource with kind. + + :param kind: The kind of the setting. Possible values include: + 'CasesAggregation' + :type kind: str or ~azure.mgmt.securityinsight.models.AggregationsKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind=None, **kwargs) -> None: + super(AggregationsKind1, self).__init__(**kwargs) + self.kind = kind diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aggregations_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aggregations_py3.py new file mode 100644 index 000000000000..82ab1d137e2a --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aggregations_py3.py @@ -0,0 +1,52 @@ +# 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 Aggregations(Model): + """The aggregation. + + 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'}, + } + + def __init__(self, **kwargs) -> None: + super(Aggregations, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.kind = None diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule.py new file mode 100644 index 000000000000..da97ab6a6f50 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule.py @@ -0,0 +1,63 @@ +# 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 AlertRule(Model): + """Alert rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ScheduledAlertRule + + 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 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'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Scheduled': 'ScheduledAlertRule'} + } + + def __init__(self, **kwargs): + super(AlertRule, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.etag = kwargs.get('etag', None) + self.kind = None diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule_kind1.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule_kind1.py new file mode 100644 index 000000000000..204fa1ddf932 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule_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 AlertRuleKind1(Model): + """Describes an Azure resource with kind. + + :param kind: The kind of the alert rule. Possible values include: + 'Scheduled' + :type kind: str or ~azure.mgmt.securityinsight.models.AlertRuleKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AlertRuleKind1, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule_kind1_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule_kind1_py3.py new file mode 100644 index 000000000000..aff9133b36c9 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule_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 AlertRuleKind1(Model): + """Describes an Azure resource with kind. + + :param kind: The kind of the alert rule. Possible values include: + 'Scheduled' + :type kind: str or ~azure.mgmt.securityinsight.models.AlertRuleKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind=None, **kwargs) -> None: + super(AlertRuleKind1, self).__init__(**kwargs) + self.kind = kind diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule_paged.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule_paged.py new file mode 100644 index 000000000000..765456eff7ec --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule_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 AlertRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`AlertRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AlertRule]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule_py3.py new file mode 100644 index 000000000000..0bd3aa93133d --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule_py3.py @@ -0,0 +1,63 @@ +# 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 AlertRule(Model): + """Alert rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ScheduledAlertRule + + 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 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'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Scheduled': 'ScheduledAlertRule'} + } + + def __init__(self, *, etag: str=None, **kwargs) -> None: + super(AlertRule, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.etag = etag + self.kind = None diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alerts_data_type_of_data_connector.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alerts_data_type_of_data_connector.py new file mode 100644 index 000000000000..36a5e58a48ad --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alerts_data_type_of_data_connector.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 AlertsDataTypeOfDataConnector(Model): + """Alerts data type for data connectors. + + :param alerts: Alerts data type connection. + :type alerts: + ~azure.mgmt.securityinsight.models.AlertsDataTypeOfDataConnectorAlerts + """ + + _attribute_map = { + 'alerts': {'key': 'alerts', 'type': 'AlertsDataTypeOfDataConnectorAlerts'}, + } + + def __init__(self, **kwargs): + super(AlertsDataTypeOfDataConnector, self).__init__(**kwargs) + self.alerts = kwargs.get('alerts', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alerts_data_type_of_data_connector_alerts.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alerts_data_type_of_data_connector_alerts.py new file mode 100644 index 000000000000..534735b5faef --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alerts_data_type_of_data_connector_alerts.py @@ -0,0 +1,28 @@ +# 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_data_type_common import DataConnectorDataTypeCommon + + +class AlertsDataTypeOfDataConnectorAlerts(DataConnectorDataTypeCommon): + """Alerts data type connection. + + :param state: Describe whether this data type connection is enabled or + not. Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.securityinsight.models.DataTypeState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AlertsDataTypeOfDataConnectorAlerts, self).__init__(**kwargs) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alerts_data_type_of_data_connector_alerts_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alerts_data_type_of_data_connector_alerts_py3.py new file mode 100644 index 000000000000..9ab513e28b34 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alerts_data_type_of_data_connector_alerts_py3.py @@ -0,0 +1,28 @@ +# 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_data_type_common_py3 import DataConnectorDataTypeCommon + + +class AlertsDataTypeOfDataConnectorAlerts(DataConnectorDataTypeCommon): + """Alerts data type connection. + + :param state: Describe whether this data type connection is enabled or + not. Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.securityinsight.models.DataTypeState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(AlertsDataTypeOfDataConnectorAlerts, self).__init__(state=state, **kwargs) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alerts_data_type_of_data_connector_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alerts_data_type_of_data_connector_py3.py new file mode 100644 index 000000000000..df40d726ad58 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alerts_data_type_of_data_connector_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 AlertsDataTypeOfDataConnector(Model): + """Alerts data type for data connectors. + + :param alerts: Alerts data type connection. + :type alerts: + ~azure.mgmt.securityinsight.models.AlertsDataTypeOfDataConnectorAlerts + """ + + _attribute_map = { + 'alerts': {'key': 'alerts', 'type': 'AlertsDataTypeOfDataConnectorAlerts'}, + } + + def __init__(self, *, alerts=None, **kwargs) -> None: + super(AlertsDataTypeOfDataConnector, self).__init__(**kwargs) + self.alerts = alerts diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector.py new file mode 100644 index 000000000000..ef5c6c670e74 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector.py @@ -0,0 +1,62 @@ +# 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 ASCDataConnector(DataConnector): + """Represents ASC (Azure Security Center) data connector. + + 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 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 = { + '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'}, + '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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector_py3.py new file mode 100644 index 000000000000..c0dcbae59d36 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector_py3.py @@ -0,0 +1,62 @@ +# 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 ASCDataConnector(DataConnector): + """Represents ASC (Azure Security Center) data connector. + + 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 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 = { + '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'}, + 'data_types': {'key': 'properties.dataTypes', 'type': 'AlertsDataTypeOfDataConnector'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + 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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark.py new file mode 100644 index 000000000000..58230219559e --- /dev/null +++ b/sdk/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.UserInfo + :param notes: The notes of the bookmark + :type notes: str + :param labels: List of labels relevant to this bookmark + :type labels: list[str] + :param query: Required. The query of the bookmark. + :type query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'display_name': {'required': True}, + 'query': {'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': 'UserInfo'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'labels': {'key': 'properties.labels', '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.labels = kwargs.get('labels', None) + self.query = kwargs.get('query', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_paged.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_paged.py new file mode 100644 index 000000000000..cc150beecede --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_py3.py new file mode 100644 index 000000000000..c051b561db38 --- /dev/null +++ b/sdk/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.UserInfo + :param notes: The notes of the bookmark + :type notes: str + :param labels: List of labels relevant to this bookmark + :type labels: list[str] + :param query: Required. The query of the bookmark. + :type query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'display_name': {'required': True}, + 'query': {'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': 'UserInfo'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'labels': {'key': 'properties.labels', 'type': '[str]'}, + 'query': {'key': 'properties.query', 'type': 'str'}, + } + + 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 + 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.labels = labels + self.query = query diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case.py new file mode 100644 index 000000000000..11c77bf387cb --- /dev/null +++ b/sdk/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 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 + :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.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 + """ + + _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'}, + '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'}, + '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.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) + self.severity = kwargs.get('severity', None) + self.status = kwargs.get('status', None) + self.close_reason = kwargs.get('close_reason', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_paged.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_paged.py new file mode 100644 index 000000000000..bf2bf64e9a7f --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_py3.py new file mode 100644 index 000000000000..f76402bae134 --- /dev/null +++ b/sdk/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 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 + :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.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 + """ + + _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'}, + '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'}, + '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, 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.labels = labels + 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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector.py new file mode 100644 index 000000000000..c07a06bee266 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector.py @@ -0,0 +1,64 @@ +# 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 DataConnector(Model): + """Data connector. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: OfficeDataConnector, TIDataConnector, 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 + """ + + _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'}, + } + + _subtype_map = { + 'kind': {'Office365': 'OfficeDataConnector', 'ThreatIntelligence': 'TIDataConnector', 'AzureActiveDirectory': 'AADDataConnector', 'AzureSecurityCenter': 'ASCDataConnector', 'MicrosoftCloudAppSecurity': 'MCASDataConnector'} + } + + def __init__(self, **kwargs): + super(DataConnector, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.etag = kwargs.get('etag', None) + self.kind = None diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_data_type_common.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_data_type_common.py new file mode 100644 index 000000000000..91c0a49613f9 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_data_type_common.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 DataConnectorDataTypeCommon(Model): + """Common field for data type in data connectors. + + :param state: Describe whether this data type connection is enabled or + not. Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.securityinsight.models.DataTypeState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataConnectorDataTypeCommon, self).__init__(**kwargs) + self.state = kwargs.get('state', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_data_type_common_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_data_type_common_py3.py new file mode 100644 index 000000000000..33866464f222 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_data_type_common_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 DataConnectorDataTypeCommon(Model): + """Common field for data type in data connectors. + + :param state: Describe whether this data type connection is enabled or + not. Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.securityinsight.models.DataTypeState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(DataConnectorDataTypeCommon, self).__init__(**kwargs) + self.state = state diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_kind1.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_kind1.py new file mode 100644 index 000000000000..acb1391b716b --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_kind1.py @@ -0,0 +1,30 @@ +# 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 DataConnectorKind1(Model): + """Describes an Azure resource with kind. + + :param kind: The kind of the data connector. Possible values include: + 'AzureActiveDirectory', 'AzureSecurityCenter', + 'MicrosoftCloudAppSecurity', 'ThreatIntelligence', 'Office365' + :type kind: str or ~azure.mgmt.securityinsight.models.DataConnectorKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataConnectorKind1, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_kind1_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_kind1_py3.py new file mode 100644 index 000000000000..1fc79470d356 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_kind1_py3.py @@ -0,0 +1,30 @@ +# 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 DataConnectorKind1(Model): + """Describes an Azure resource with kind. + + :param kind: The kind of the data connector. Possible values include: + 'AzureActiveDirectory', 'AzureSecurityCenter', + 'MicrosoftCloudAppSecurity', 'ThreatIntelligence', 'Office365' + :type kind: str or ~azure.mgmt.securityinsight.models.DataConnectorKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind=None, **kwargs) -> None: + super(DataConnectorKind1, self).__init__(**kwargs) + self.kind = kind diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_paged.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_paged.py new file mode 100644 index 000000000000..b3929c84ac01 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_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 DataConnectorPaged(Paged): + """ + A paging container for iterating over a list of :class:`DataConnector ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DataConnector]'} + } + + def __init__(self, *args, **kwargs): + + super(DataConnectorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_py3.py new file mode 100644 index 000000000000..bbbcd62d3065 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_py3.py @@ -0,0 +1,64 @@ +# 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 DataConnector(Model): + """Data connector. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: OfficeDataConnector, TIDataConnector, 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 + """ + + _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'}, + } + + _subtype_map = { + 'kind': {'Office365': 'OfficeDataConnector', 'ThreatIntelligence': 'TIDataConnector', 'AzureActiveDirectory': 'AADDataConnector', 'AzureSecurityCenter': 'ASCDataConnector', 'MicrosoftCloudAppSecurity': 'MCASDataConnector'} + } + + def __init__(self, *, etag: str=None, **kwargs) -> None: + super(DataConnector, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.etag = etag + self.kind = None diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_tenant_id.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_tenant_id.py new file mode 100644 index 000000000000..66b07808b6aa --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_tenant_id.py @@ -0,0 +1,28 @@ +# 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 DataConnectorTenantId(Model): + """Properties data connector on tenant level. + + :param tenant_id: The tenant id to connect to, and get the data from. + :type tenant_id: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataConnectorTenantId, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_tenant_id_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_tenant_id_py3.py new file mode 100644 index 000000000000..27997416eb33 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_tenant_id_py3.py @@ -0,0 +1,28 @@ +# 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 DataConnectorTenantId(Model): + """Properties data connector on tenant level. + + :param tenant_id: The tenant id to connect to, and get the data from. + :type tenant_id: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, **kwargs) -> None: + super(DataConnectorTenantId, self).__init__(**kwargs) + self.tenant_id = tenant_id diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts_properties.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts_properties.py new file mode 100644 index 000000000000..a38001750f3f --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts_properties_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_with_alerts_properties_py3.py new file mode 100644 index 000000000000..e2234f75d9b3 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity.py new file mode 100644 index 000000000000..6ff63f9545c4 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_kind1.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_kind1.py new file mode 100644 index 000000000000..ba90815c9d83 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_kind1_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_kind1_py3.py new file mode 100644 index 000000000000..f318be914961 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_paged.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_paged.py new file mode 100644 index 000000000000..1cc3027ddd60 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_py3.py new file mode 100644 index 000000000000..a3dae2ccad17 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_query.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_query.py new file mode 100644 index 000000000000..b1f4ff970e8e --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_query.py @@ -0,0 +1,42 @@ +# 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 EntityQuery(Resource): + """Specific entity query. + + 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EntityQuery, self).__init__(**kwargs) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_query_paged.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_query_paged.py new file mode 100644 index 000000000000..164d6070e862 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_query_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 EntityQueryPaged(Paged): + """ + A paging container for iterating over a list of :class:`EntityQuery ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[EntityQuery]'} + } + + def __init__(self, *args, **kwargs): + + super(EntityQueryPaged, self).__init__(*args, **kwargs) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_query_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_query_py3.py new file mode 100644 index 000000000000..43a224c3395d --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_query_py3.py @@ -0,0 +1,42 @@ +# 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 EntityQuery(Resource): + """Specific entity query. + + 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(EntityQuery, self).__init__(**kwargs) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity.py new file mode 100644 index 000000000000..a05b2798f09e --- /dev/null +++ b/sdk/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_name: The file name without path (some alerts might not include + path). + :vartype file_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + 'directory': {'readonly': True}, + 'file_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_name': {'key': 'properties.fileName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FileEntity, self).__init__(**kwargs) + self.directory = None + self.file_name = None + self.kind = 'File' diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/file_entity_py3.py new file mode 100644 index 000000000000..c60c5da36071 --- /dev/null +++ b/sdk/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_name: The file name without path (some alerts might not include + path). + :vartype file_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + 'directory': {'readonly': True}, + 'file_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_name': {'key': 'properties.fileName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(FileEntity, self).__init__(**kwargs) + self.directory = None + self.file_name = None + self.kind = 'File' diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/host_entity.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/host_entity.py new file mode 100644 index 000000000000..eca078070880 --- /dev/null +++ b/sdk/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 operating 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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/host_entity_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/host_entity_py3.py new file mode 100644 index 000000000000..0590bd25f509 --- /dev/null +++ b/sdk/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 operating 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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector.py new file mode 100644 index 000000000000..e8f33ade4645 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector.py @@ -0,0 +1,61 @@ +# 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 MCASDataConnector(DataConnector): + """Represents MCAS (Microsoft Cloud App Security) data connector. + + 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 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 + """ + + _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'}, + '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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector_py3.py new file mode 100644 index 000000000000..8738d0607686 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector_py3.py @@ -0,0 +1,61 @@ +# 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 MCASDataConnector(DataConnector): + """Represents MCAS (Microsoft Cloud App Security) data connector. + + 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 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 + """ + + _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'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'data_types': {'key': 'properties.dataTypes', 'type': 'AlertsDataTypeOfDataConnector'}, + } + + 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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent.py new file mode 100644 index 000000000000..c5e997afa3af --- /dev/null +++ b/sdk/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 consent. + :type tenant_id: str + :ivar tenant_name: The tenant name of the Office365 with the consent. + :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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent_paged.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent_paged.py new file mode 100644 index 000000000000..18a2869e7abf --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_consent_py3.py new file mode 100644 index 000000000000..4d2c4de98318 --- /dev/null +++ b/sdk/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 consent. + :type tenant_id: str + :ivar tenant_name: The tenant name of the Office365 with the consent. + :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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector.py new file mode 100644 index 000000000000..44559f2536b2 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector.py @@ -0,0 +1,61 @@ +# 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 OfficeDataConnector(DataConnector): + """Represents office data connector. + + 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 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 + """ + + _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'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'data_types': {'key': 'properties.dataTypes', 'type': 'OfficeDataConnectorDataTypes'}, + } + + def __init__(self, **kwargs): + super(OfficeDataConnector, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.data_types = kwargs.get('data_types', None) + self.kind = 'Office365' diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types.py new file mode 100644 index 000000000000..31885bab93ce --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types.py @@ -0,0 +1,34 @@ +# 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 OfficeDataConnectorDataTypes(Model): + """The available data types for office data connector. + + :param share_point: SharePoint data type connection. + :type share_point: + ~azure.mgmt.securityinsight.models.OfficeDataConnectorDataTypesSharePoint + :param exchange: Exchange data type connection. + :type exchange: + ~azure.mgmt.securityinsight.models.OfficeDataConnectorDataTypesExchange + """ + + _attribute_map = { + 'share_point': {'key': 'sharePoint', 'type': 'OfficeDataConnectorDataTypesSharePoint'}, + 'exchange': {'key': 'exchange', 'type': 'OfficeDataConnectorDataTypesExchange'}, + } + + def __init__(self, **kwargs): + super(OfficeDataConnectorDataTypes, self).__init__(**kwargs) + self.share_point = kwargs.get('share_point', None) + self.exchange = kwargs.get('exchange', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types_exchange.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types_exchange.py new file mode 100644 index 000000000000..0f0d4e362449 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types_exchange.py @@ -0,0 +1,28 @@ +# 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_data_type_common import DataConnectorDataTypeCommon + + +class OfficeDataConnectorDataTypesExchange(DataConnectorDataTypeCommon): + """Exchange data type connection. + + :param state: Describe whether this data type connection is enabled or + not. Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.securityinsight.models.DataTypeState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OfficeDataConnectorDataTypesExchange, self).__init__(**kwargs) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types_exchange_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types_exchange_py3.py new file mode 100644 index 000000000000..a538d5111466 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types_exchange_py3.py @@ -0,0 +1,28 @@ +# 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_data_type_common_py3 import DataConnectorDataTypeCommon + + +class OfficeDataConnectorDataTypesExchange(DataConnectorDataTypeCommon): + """Exchange data type connection. + + :param state: Describe whether this data type connection is enabled or + not. Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.securityinsight.models.DataTypeState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(OfficeDataConnectorDataTypesExchange, self).__init__(state=state, **kwargs) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types_py3.py new file mode 100644 index 000000000000..a0a81ab29652 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types_py3.py @@ -0,0 +1,34 @@ +# 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 OfficeDataConnectorDataTypes(Model): + """The available data types for office data connector. + + :param share_point: SharePoint data type connection. + :type share_point: + ~azure.mgmt.securityinsight.models.OfficeDataConnectorDataTypesSharePoint + :param exchange: Exchange data type connection. + :type exchange: + ~azure.mgmt.securityinsight.models.OfficeDataConnectorDataTypesExchange + """ + + _attribute_map = { + 'share_point': {'key': 'sharePoint', 'type': 'OfficeDataConnectorDataTypesSharePoint'}, + 'exchange': {'key': 'exchange', 'type': 'OfficeDataConnectorDataTypesExchange'}, + } + + def __init__(self, *, share_point=None, exchange=None, **kwargs) -> None: + super(OfficeDataConnectorDataTypes, self).__init__(**kwargs) + self.share_point = share_point + self.exchange = exchange diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types_share_point.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types_share_point.py new file mode 100644 index 000000000000..55dfd4350ed5 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types_share_point.py @@ -0,0 +1,28 @@ +# 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_data_type_common import DataConnectorDataTypeCommon + + +class OfficeDataConnectorDataTypesSharePoint(DataConnectorDataTypeCommon): + """SharePoint data type connection. + + :param state: Describe whether this data type connection is enabled or + not. Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.securityinsight.models.DataTypeState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OfficeDataConnectorDataTypesSharePoint, self).__init__(**kwargs) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types_share_point_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types_share_point_py3.py new file mode 100644 index 000000000000..5e12e920d2c5 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_data_types_share_point_py3.py @@ -0,0 +1,28 @@ +# 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_data_type_common_py3 import DataConnectorDataTypeCommon + + +class OfficeDataConnectorDataTypesSharePoint(DataConnectorDataTypeCommon): + """SharePoint data type connection. + + :param state: Describe whether this data type connection is enabled or + not. Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.securityinsight.models.DataTypeState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(OfficeDataConnectorDataTypesSharePoint, self).__init__(state=state, **kwargs) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_py3.py new file mode 100644 index 000000000000..0b8369ad7727 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_py3.py @@ -0,0 +1,61 @@ +# 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 OfficeDataConnector(DataConnector): + """Represents office data connector. + + 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 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 + """ + + _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'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'data_types': {'key': 'properties.dataTypes', 'type': 'OfficeDataConnectorDataTypes'}, + } + + def __init__(self, *, etag: str=None, tenant_id: str=None, data_types=None, **kwargs) -> None: + super(OfficeDataConnector, self).__init__(etag=etag, **kwargs) + self.tenant_id = tenant_id + self.data_types = data_types + self.kind = 'Office365' diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/operation.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/operation.py new file mode 100644 index 000000000000..3bee7e1dac48 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/operation.py @@ -0,0 +1,32 @@ +# 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 Operation(Model): + """Operation provided by provider. + + :param name: Name of the operation + :type name: str + :param display: Properties of the operation + :type display: ~azure.mgmt.securityinsight.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/operation_display.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/operation_display.py new file mode 100644 index 000000000000..89c4bdd6ccb6 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/operation_display.py @@ -0,0 +1,40 @@ +# 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 OperationDisplay(Model): + """Properties of the operation. + + :param provider: Provider name + :type provider: str + :param resource: Resource name + :type resource: str + :param operation: Operation name + :type operation: str + :param description: Description of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/operation_display_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/operation_display_py3.py new file mode 100644 index 000000000000..fa3740dfc655 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/operation_display_py3.py @@ -0,0 +1,40 @@ +# 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 OperationDisplay(Model): + """Properties of the operation. + + :param provider: Provider name + :type provider: str + :param resource: Resource name + :type resource: str + :param operation: Operation name + :type operation: str + :param description: Description of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/operation_paged.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/operation_paged.py new file mode 100644 index 000000000000..a1b03b8047b8 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/operation_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 OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/operation_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/operation_py3.py new file mode 100644 index 000000000000..d77122a675e5 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/operation_py3.py @@ -0,0 +1,32 @@ +# 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 Operation(Model): + """Operation provided by provider. + + :param name: Name of the operation + :type name: str + :param display: Properties of the operation + :type display: ~azure.mgmt.securityinsight.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/resource.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/resource.py new file mode 100644 index 000000000000..7454d56b9033 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/resource.py @@ -0,0 +1,45 @@ +# 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 Resource(Model): + """An azure resource object. + + 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/resource_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/resource_py3.py new file mode 100644 index 000000000000..83ff9951fb91 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/resource_py3.py @@ -0,0 +1,45 @@ +# 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 Resource(Model): + """An azure resource object. + + 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule.py new file mode 100644 index 000000000000..430f82b84994 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule.py @@ -0,0 +1,123 @@ +# 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 .alert_rule import AlertRule + + +class ScheduledAlertRule(AlertRule): + """Represents scheduled alert rule. + + 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 kind: Required. Constant filled by server. + :type kind: str + :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 + :param severity: Required. The severity for alerts created by this alert + 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 + :param query: Required. The query that creates alerts for this rule. + :type query: str + :param query_frequency: Required. The frequency (in ISO 8601 duration + format) for this alert rule to run. + :type query_frequency: timedelta + :param query_period: Required. The period (in ISO 8601 duration format) + that this alert rule looks at. + :type query_period: timedelta + :param trigger_operator: Required. The operation against the threshold + that triggers alert rule. Possible values include: 'GreaterThan', + 'LessThan', 'Equal', 'NotEqual' + :type trigger_operator: str or + ~azure.mgmt.securityinsight.models.TriggerOperator + :param trigger_threshold: Required. The threshold triggers this alert + rule. + :type trigger_threshold: int + :param suppression_enabled: Required. Determines whether the suppression + for this alert rule is enabled or disabled. + :type suppression_enabled: bool + :param suppression_duration: Required. The suppression (in ISO 8601 + duration format) to wait since last time this alert rule been triggered. + :type suppression_duration: timedelta + :ivar last_modified_utc: The last time that this alert has been modified. + :vartype last_modified_utc: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + 'display_name': {'required': True}, + 'description': {'required': True}, + 'severity': {'required': True}, + 'enabled': {'required': True}, + 'query': {'required': True}, + 'query_frequency': {'required': True}, + 'query_period': {'required': True}, + 'trigger_operator': {'required': True}, + 'trigger_threshold': {'required': True}, + 'suppression_enabled': {'required': True}, + 'suppression_duration': {'required': True}, + 'last_modified_utc': {'readonly': 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'}, + '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'}, + 'query': {'key': 'properties.query', 'type': 'str'}, + 'query_frequency': {'key': 'properties.queryFrequency', 'type': 'duration'}, + 'query_period': {'key': 'properties.queryPeriod', 'type': 'duration'}, + 'trigger_operator': {'key': 'properties.triggerOperator', 'type': 'TriggerOperator'}, + 'trigger_threshold': {'key': 'properties.triggerThreshold', 'type': 'int'}, + 'suppression_enabled': {'key': 'properties.suppressionEnabled', 'type': 'bool'}, + 'suppression_duration': {'key': 'properties.suppressionDuration', 'type': 'duration'}, + 'last_modified_utc': {'key': 'properties.lastModifiedUtc', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ScheduledAlertRule, self).__init__(**kwargs) + 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) + self.query = kwargs.get('query', None) + self.query_frequency = kwargs.get('query_frequency', None) + self.query_period = kwargs.get('query_period', None) + self.trigger_operator = kwargs.get('trigger_operator', None) + self.trigger_threshold = kwargs.get('trigger_threshold', None) + self.suppression_enabled = kwargs.get('suppression_enabled', None) + self.suppression_duration = kwargs.get('suppression_duration', None) + self.last_modified_utc = None + self.kind = 'Scheduled' diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule_py3.py new file mode 100644 index 000000000000..48bdaa08acfc --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule_py3.py @@ -0,0 +1,123 @@ +# 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 .alert_rule_py3 import AlertRule + + +class ScheduledAlertRule(AlertRule): + """Represents scheduled alert rule. + + 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 kind: Required. Constant filled by server. + :type kind: str + :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 + :param severity: Required. The severity for alerts created by this alert + 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 + :param query: Required. The query that creates alerts for this rule. + :type query: str + :param query_frequency: Required. The frequency (in ISO 8601 duration + format) for this alert rule to run. + :type query_frequency: timedelta + :param query_period: Required. The period (in ISO 8601 duration format) + that this alert rule looks at. + :type query_period: timedelta + :param trigger_operator: Required. The operation against the threshold + that triggers alert rule. Possible values include: 'GreaterThan', + 'LessThan', 'Equal', 'NotEqual' + :type trigger_operator: str or + ~azure.mgmt.securityinsight.models.TriggerOperator + :param trigger_threshold: Required. The threshold triggers this alert + rule. + :type trigger_threshold: int + :param suppression_enabled: Required. Determines whether the suppression + for this alert rule is enabled or disabled. + :type suppression_enabled: bool + :param suppression_duration: Required. The suppression (in ISO 8601 + duration format) to wait since last time this alert rule been triggered. + :type suppression_duration: timedelta + :ivar last_modified_utc: The last time that this alert has been modified. + :vartype last_modified_utc: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + 'display_name': {'required': True}, + 'description': {'required': True}, + 'severity': {'required': True}, + 'enabled': {'required': True}, + 'query': {'required': True}, + 'query_frequency': {'required': True}, + 'query_period': {'required': True}, + 'trigger_operator': {'required': True}, + 'trigger_threshold': {'required': True}, + 'suppression_enabled': {'required': True}, + 'suppression_duration': {'required': True}, + 'last_modified_utc': {'readonly': 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'}, + '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'}, + 'query': {'key': 'properties.query', 'type': 'str'}, + 'query_frequency': {'key': 'properties.queryFrequency', 'type': 'duration'}, + 'query_period': {'key': 'properties.queryPeriod', 'type': 'duration'}, + 'trigger_operator': {'key': 'properties.triggerOperator', 'type': 'TriggerOperator'}, + 'trigger_threshold': {'key': 'properties.triggerThreshold', 'type': 'int'}, + 'suppression_enabled': {'key': 'properties.suppressionEnabled', 'type': 'bool'}, + 'suppression_duration': {'key': 'properties.suppressionDuration', 'type': 'duration'}, + 'last_modified_utc': {'key': 'properties.lastModifiedUtc', 'type': 'str'}, + } + + 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 + self.severity = severity + self.enabled = enabled + self.query = query + self.query_frequency = query_frequency + self.query_period = query_period + self.trigger_operator = trigger_operator + self.trigger_threshold = trigger_threshold + self.suppression_enabled = suppression_enabled + self.suppression_duration = suppression_duration + self.last_modified_utc = None + self.kind = 'Scheduled' diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/security_insights_enums.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/security_insights_enums.py new file mode 100644 index 000000000000..b36f9a1e1f89 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/security_insights_enums.py @@ -0,0 +1,104 @@ +# 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 enum import Enum + + +class AlertRuleKind(str, Enum): + + scheduled = "Scheduled" + + +class AlertSeverity(str, Enum): + + high = "High" #: High severity + medium = "Medium" #: Medium severity + low = "Low" #: Low severity + informational = "Informational" #: Informational severity + + +class TriggerOperator(str, Enum): + + greater_than = "GreaterThan" + less_than = "LessThan" + equal = "Equal" + 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 CaseStatus(str, Enum): + + 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): + + 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" + azure_security_center = "AzureSecurityCenter" + microsoft_cloud_app_security = "MicrosoftCloudAppSecurity" + threat_intelligence = "ThreatIntelligence" + office365 = "Office365" + + +class DataTypeState(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class EntityKind(str, Enum): + + 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" #: Host with Linux operating system. + windows = "Windows" #: Host with Windows operating system. + android = "Android" #: Host with Android operating system. + ios = "IOS" #: Host with IOS operating system. + + +class SettingKind(str, Enum): + + ueba_settings = "UebaSettings" + toggle_settings = "ToggleSettings" + + +class StatusInMcas(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class AggregationsKind(str, Enum): + + cases_aggregation = "CasesAggregation" diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings.py new file mode 100644 index 000000000000..40c938b5af44 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_kind.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_kind.py new file mode 100644 index 000000000000..05e31e0ea210 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_kind_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_kind_py3.py new file mode 100644 index 000000000000..a6501e3c7613 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_py3.py new file mode 100644 index 000000000000..cca5858eafb8 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector.py new file mode 100644 index 000000000000..8b7527c417d9 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector.py @@ -0,0 +1,61 @@ +# 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 TIDataConnector(DataConnector): + """Represents threat intelligence data connector. + + 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 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 + """ + + _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'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'data_types': {'key': 'properties.dataTypes', 'type': 'TIDataConnectorDataTypes'}, + } + + def __init__(self, **kwargs): + super(TIDataConnector, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.data_types = kwargs.get('data_types', None) + self.kind = 'ThreatIntelligence' diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types.py new file mode 100644 index 000000000000..fca339c71037 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types.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 TIDataConnectorDataTypes(Model): + """The available data types for TI (Threat Intelligence) data connector. + + :param indicators: Data type for indicators connection. + :type indicators: + ~azure.mgmt.securityinsight.models.TIDataConnectorDataTypesIndicators + """ + + _attribute_map = { + 'indicators': {'key': 'indicators', 'type': 'TIDataConnectorDataTypesIndicators'}, + } + + def __init__(self, **kwargs): + super(TIDataConnectorDataTypes, self).__init__(**kwargs) + self.indicators = kwargs.get('indicators', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types_indicators.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types_indicators.py new file mode 100644 index 000000000000..6208e7113219 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types_indicators.py @@ -0,0 +1,28 @@ +# 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_data_type_common import DataConnectorDataTypeCommon + + +class TIDataConnectorDataTypesIndicators(DataConnectorDataTypeCommon): + """Data type for indicators connection. + + :param state: Describe whether this data type connection is enabled or + not. Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.securityinsight.models.DataTypeState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TIDataConnectorDataTypesIndicators, self).__init__(**kwargs) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types_indicators_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types_indicators_py3.py new file mode 100644 index 000000000000..f53b3e0b2dfd --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types_indicators_py3.py @@ -0,0 +1,28 @@ +# 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_data_type_common_py3 import DataConnectorDataTypeCommon + + +class TIDataConnectorDataTypesIndicators(DataConnectorDataTypeCommon): + """Data type for indicators connection. + + :param state: Describe whether this data type connection is enabled or + not. Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.securityinsight.models.DataTypeState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(TIDataConnectorDataTypesIndicators, self).__init__(state=state, **kwargs) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types_py3.py new file mode 100644 index 000000000000..0abe983c3ad3 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_data_types_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 TIDataConnectorDataTypes(Model): + """The available data types for TI (Threat Intelligence) data connector. + + :param indicators: Data type for indicators connection. + :type indicators: + ~azure.mgmt.securityinsight.models.TIDataConnectorDataTypesIndicators + """ + + _attribute_map = { + 'indicators': {'key': 'indicators', 'type': 'TIDataConnectorDataTypesIndicators'}, + } + + def __init__(self, *, indicators=None, **kwargs) -> None: + super(TIDataConnectorDataTypes, self).__init__(**kwargs) + self.indicators = indicators diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_py3.py new file mode 100644 index 000000000000..9342603bf765 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_py3.py @@ -0,0 +1,61 @@ +# 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 TIDataConnector(DataConnector): + """Represents threat intelligence data connector. + + 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 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 + """ + + _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'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'data_types': {'key': 'properties.dataTypes', 'type': 'TIDataConnectorDataTypes'}, + } + + def __init__(self, *, etag: str=None, tenant_id: str=None, data_types=None, **kwargs) -> None: + super(TIDataConnector, self).__init__(etag=etag, **kwargs) + self.tenant_id = tenant_id + self.data_types = data_types + self.kind = 'ThreatIntelligence' diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings.py new file mode 100644 index 000000000000..cd5eafbe1a96 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings_py3.py new file mode 100644 index 000000000000..9573ec9202e4 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings.py new file mode 100644 index 000000000000..b41abbd99b37 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings.py @@ -0,0 +1,68 @@ +# 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 User and Entity Behavior Analytics 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 User and Entity Behavior Analytics + is enabled for this workspace. + :type is_enabled: bool + :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 has ATP (Advanced + Threat Protection) license. + :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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings_py3.py new file mode 100644 index 000000000000..5c8b801a89b3 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings_py3.py @@ -0,0 +1,68 @@ +# 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 User and Entity Behavior Analytics 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 User and Entity Behavior Analytics + is enabled for this workspace. + :type is_enabled: bool + :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 has ATP (Advanced + Threat Protection) license. + :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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/user_info.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/user_info.py new file mode 100644 index 000000000000..2a3863f81e85 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/user_info_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/user_info_py3.py new file mode 100644 index 000000000000..f69ed5c45e56 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/__init__.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/__init__.py new file mode 100644 index 000000000000..b11b9b144e0c --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/__init__.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 .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 +from .cases_aggregations_operations import CasesAggregationsOperations +from .entity_queries_operations import EntityQueriesOperations + +__all__ = [ + 'Operations', + 'AlertRulesOperations', + 'ActionsOperations', + 'CasesOperations', + 'BookmarksOperations', + 'DataConnectorsOperations', + 'EntitiesOperations', + 'OfficeConsentsOperations', + 'ProductSettingsOperations', + 'CasesAggregationsOperations', + 'EntityQueriesOperations', +] diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/actions_operations.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/actions_operations.py new file mode 100644 index 000000000000..e32d7e6f3188 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/actions_operations.py @@ -0,0 +1,116 @@ +# 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') + } + 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'} diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/alert_rules_operations.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/alert_rules_operations.py new file mode 100644 index 000000000000..9f246b8a89f9 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/alert_rules_operations.py @@ -0,0 +1,544 @@ +# 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 AlertRulesOperations(object): + """AlertRulesOperations 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 alert rules. + + :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 AlertRule + :rtype: + ~azure.mgmt.securityinsight.models.AlertRulePaged[~azure.mgmt.securityinsight.models.AlertRule] + :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.AlertRulePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AlertRulePaged(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/alertRules'} + + def get( + self, resource_group_name, operational_insights_resource_provider, workspace_name, rule_id, custom_headers=None, raw=False, **operation_config): + """Gets the 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: AlertRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.AlertRule 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), + 'ruleId': self._serialize.url("rule_id", rule_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('AlertRule', 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/alertRules/{ruleId}'} + + 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. + + :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 alert_rule: The alert rule + :type alert_rule: ~azure.mgmt.securityinsight.models.AlertRule + :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: AlertRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.AlertRule or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct 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\._\(\)]+$'), + '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') + } + 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(alert_rule, 'AlertRule') + + # 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('AlertRule', response) + if response.status_code == 201: + deserialized = self._deserialize('AlertRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + 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): + """Delete the 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: 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), + 'ruleId': self._serialize.url("rule_id", rule_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/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'), + '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_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. + + :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_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\._\(\)]+$'), + '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'), + '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_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): + """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'), + '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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/bookmarks_operations.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/bookmarks_operations.py new file mode 100644 index 000000000000..c0d38f7ee281 --- /dev/null +++ b/sdk/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') + } + 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_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. + + :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_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\._\(\)]+$'), + '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') + } + 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_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): + """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') + } + 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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/cases_aggregations_operations.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/cases_aggregations_operations.py new file mode 100644 index 000000000000..4a22e3374106 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/cases_aggregations_operations.py @@ -0,0 +1,109 @@ +# 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 CasesAggregationsOperations(object): + """CasesAggregationsOperations 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, aggregations_name, custom_headers=None, raw=False, **operation_config): + """Get aggregative result for the given resources under the defined + workspace. + + :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 aggregations_name: The aggregation name. Supports - Cases + :type aggregations_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: Aggregations or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.Aggregations 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), + 'aggregationsName': self._serialize.url("aggregations_name", aggregations_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('Aggregations', 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/aggregations/{aggregationsName}'} diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/cases_operations.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/cases_operations.py new file mode 100644 index 000000000000..c7ded22b619c --- /dev/null +++ b/sdk/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') + } + 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_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. + + :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_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\._\(\)]+$'), + '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') + } + 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_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): + """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') + } + 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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/data_connectors_operations.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/data_connectors_operations.py new file mode 100644 index 000000000000..61107803dfad --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/data_connectors_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 DataConnectorsOperations(object): + """DataConnectorsOperations 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 data connectors. + + :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 DataConnector + :rtype: + ~azure.mgmt.securityinsight.models.DataConnectorPaged[~azure.mgmt.securityinsight.models.DataConnector] + :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.DataConnectorPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DataConnectorPaged(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/dataConnectors'} + + def get( + self, resource_group_name, operational_insights_resource_provider, workspace_name, data_connector_id, custom_headers=None, raw=False, **operation_config): + """Gets a data connector. + + :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 data_connector_id: Connector ID + :type data_connector_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: DataConnector or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.DataConnector 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), + 'dataConnectorId': self._serialize.url("data_connector_id", data_connector_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('DataConnector', 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/dataConnectors/{dataConnectorId}'} + + 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. + + :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 data_connector_id: Connector ID + :type data_connector_id: str + :param data_connector: The data connector + :type data_connector: ~azure.mgmt.securityinsight.models.DataConnector + :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: DataConnector or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.DataConnector or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct 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\._\(\)]+$'), + '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), + 'dataConnectorId': self._serialize.url("data_connector_id", data_connector_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(data_connector, 'DataConnector') + + # 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('DataConnector', response) + if response.status_code == 201: + deserialized = self._deserialize('DataConnector', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + 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): + """Delete the data connector. + + :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 data_connector_id: Connector ID + :type data_connector_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), + 'dataConnectorId': self._serialize.url("data_connector_id", data_connector_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/dataConnectors/{dataConnectorId}'} diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/entities_operations.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/entities_operations.py new file mode 100644 index 000000000000..b00353ee2ce2 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/entity_queries_operations.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/entity_queries_operations.py new file mode 100644 index 000000000000..813b8c465579 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/entity_queries_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 EntityQueriesOperations(object): + """EntityQueriesOperations 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 entity queries. + + :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 EntityQuery + :rtype: + ~azure.mgmt.securityinsight.models.EntityQueryPaged[~azure.mgmt.securityinsight.models.EntityQuery] + :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.EntityQueryPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.EntityQueryPaged(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/entityQueries'} + + def get( + self, resource_group_name, operational_insights_resource_provider, workspace_name, entity_query_id, custom_headers=None, raw=False, **operation_config): + """Gets an entity query. + + :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_query_id: entity query ID + :type entity_query_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: EntityQuery or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.EntityQuery 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), + 'entityQueryId': self._serialize.url("entity_query_id", entity_query_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('EntityQuery', 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/entityQueries/{entityQueryId}'} diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/office_consents_operations.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/office_consents_operations.py new file mode 100644 index 000000000000..c3e133607a46 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/operations.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/operations.py new file mode 100644 index 000000000000..4779a6e237a0 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/operations.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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations 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, custom_headers=None, raw=False, **operation_config): + """Lists all operations available Azure Security Insights Resource + Provider. + + :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 Operation + :rtype: + ~azure.mgmt.securityinsight.models.OperationPaged[~azure.mgmt.securityinsight.models.Operation] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # 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.OperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.SecurityInsights/operations'} diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/product_settings_operations.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/product_settings_operations.py new file mode 100644 index 000000000000..6878551636cc --- /dev/null +++ b/sdk/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 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 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 update( + self, resource_group_name, operational_insights_resource_provider, workspace_name, settings_name, settings, custom_headers=None, raw=False, **operation_config): + """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.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\._\(\)]+$'), + '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 + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}'} diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/security_insights.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/security_insights.py new file mode 100644 index 000000000000..45f74bbca7ac --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/security_insights.py @@ -0,0 +1,131 @@ +# 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.service_client import SDKClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +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 .operations.cases_aggregations_operations import CasesAggregationsOperations +from .operations.entity_queries_operations import EntityQueriesOperations +from . import models + + +class SecurityInsightsConfiguration(AzureConfiguration): + """Configuration for SecurityInsights + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(SecurityInsightsConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-securityinsight/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class SecurityInsights(SDKClient): + """API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider + + :ivar config: Configuration for client. + :vartype config: SecurityInsightsConfiguration + + :ivar operations: Operations operations + :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 + :ivar cases_aggregations: CasesAggregations operations + :vartype cases_aggregations: azure.mgmt.securityinsight.operations.CasesAggregationsOperations + :ivar entity_queries: EntityQueries operations + :vartype entity_queries: azure.mgmt.securityinsight.operations.EntityQueriesOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = SecurityInsightsConfiguration(credentials, subscription_id, base_url) + super(SecurityInsights, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2019-01-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + 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) + self.cases_aggregations = CasesAggregationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.entity_queries = EntityQueriesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/version.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/version.py new file mode 100644 index 000000000000..e0ec669828cb --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/version.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" + From c98e4bf5bd3b8549d43d1b9b4986c80c5116b971 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 29 May 2019 13:39:02 +0000 Subject: [PATCH 2/2] Generated from e06b1caf7c26d4ee8f1269af295d4f0b145a2854 added entity queries properties --- .../securityinsight/models/entity_query.py | 28 +++++++++++++++++ .../models/entity_query_py3.py | 30 ++++++++++++++++++- 2 files changed, 57 insertions(+), 1 deletion(-) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_query.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_query.py index b1f4ff970e8e..e13b5f2cdf91 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_query.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_query.py @@ -24,6 +24,22 @@ class EntityQuery(Resource): :vartype type: str :ivar name: Azure resource name :vartype name: str + :param query_template: The template query string to be parsed and + formatted + :type query_template: str + :param input_entity_type: The type of the query's source entity + :type input_entity_type: str + :param input_fields: List of the fields of the source entity that are + required to run the query + :type input_fields: list[str] + :param output_entity_types: List of the desired output types to be + constructed from the result + :type output_entity_types: list[str] + :param data_sources: List of the data sources that are required to run the + query + :type data_sources: list[str] + :param display_name: The query display name + :type display_name: str """ _validation = { @@ -36,7 +52,19 @@ class EntityQuery(Resource): 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'query_template': {'key': 'properties.queryTemplate', 'type': 'str'}, + 'input_entity_type': {'key': 'properties.inputEntityType', 'type': 'str'}, + 'input_fields': {'key': 'properties.inputFields', 'type': '[str]'}, + 'output_entity_types': {'key': 'properties.outputEntityTypes', 'type': '[str]'}, + 'data_sources': {'key': 'properties.dataSources', 'type': '[str]'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, } def __init__(self, **kwargs): super(EntityQuery, self).__init__(**kwargs) + self.query_template = kwargs.get('query_template', None) + self.input_entity_type = kwargs.get('input_entity_type', None) + self.input_fields = kwargs.get('input_fields', None) + self.output_entity_types = kwargs.get('output_entity_types', None) + self.data_sources = kwargs.get('data_sources', None) + self.display_name = kwargs.get('display_name', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_query_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_query_py3.py index 43a224c3395d..554129764249 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_query_py3.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/entity_query_py3.py @@ -24,6 +24,22 @@ class EntityQuery(Resource): :vartype type: str :ivar name: Azure resource name :vartype name: str + :param query_template: The template query string to be parsed and + formatted + :type query_template: str + :param input_entity_type: The type of the query's source entity + :type input_entity_type: str + :param input_fields: List of the fields of the source entity that are + required to run the query + :type input_fields: list[str] + :param output_entity_types: List of the desired output types to be + constructed from the result + :type output_entity_types: list[str] + :param data_sources: List of the data sources that are required to run the + query + :type data_sources: list[str] + :param display_name: The query display name + :type display_name: str """ _validation = { @@ -36,7 +52,19 @@ class EntityQuery(Resource): 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'query_template': {'key': 'properties.queryTemplate', 'type': 'str'}, + 'input_entity_type': {'key': 'properties.inputEntityType', 'type': 'str'}, + 'input_fields': {'key': 'properties.inputFields', 'type': '[str]'}, + 'output_entity_types': {'key': 'properties.outputEntityTypes', 'type': '[str]'}, + 'data_sources': {'key': 'properties.dataSources', 'type': '[str]'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, query_template: str=None, input_entity_type: str=None, input_fields=None, output_entity_types=None, data_sources=None, display_name: str=None, **kwargs) -> None: super(EntityQuery, self).__init__(**kwargs) + self.query_template = query_template + self.input_entity_type = input_entity_type + self.input_fields = input_fields + self.output_entity_types = output_entity_types + self.data_sources = data_sources + self.display_name = display_name