diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/__init__.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/__init__.py index 72fb491ff0a1..556353b79cbc 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/__init__.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/__init__.py @@ -65,6 +65,23 @@ from .information_protection_policy_py3 import InformationProtectionPolicy from .security_contact_py3 import SecurityContact from .workspace_setting_py3 import WorkspaceSetting + from .tags_resource_py3 import TagsResource + from .user_defined_resources_properties_py3 import UserDefinedResourcesProperties + from .recommendation_configuration_properties_py3 import RecommendationConfigurationProperties + from .io_tsecurity_solution_model_py3 import IoTSecuritySolutionModel + from .update_iot_security_solution_data_py3 import UpdateIotSecuritySolutionData + from .io_tseverity_metrics_py3 import IoTSeverityMetrics + from .io_tsecurity_solution_analytics_model_properties_devices_metrics_item_py3 import IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem + from .io_tsecurity_alerted_device_py3 import IoTSecurityAlertedDevice + from .io_tsecurity_alerted_devices_list_py3 import IoTSecurityAlertedDevicesList + from .io_tsecurity_device_alert_py3 import IoTSecurityDeviceAlert + from .io_tsecurity_device_alerts_list_py3 import IoTSecurityDeviceAlertsList + from .io_tsecurity_device_recommendation_py3 import IoTSecurityDeviceRecommendation + from .io_tsecurity_device_recommendations_list_py3 import IoTSecurityDeviceRecommendationsList + from .io_tsecurity_solution_analytics_model_py3 import IoTSecuritySolutionAnalyticsModel + from .io_tsecurity_solution_analytics_model_list_py3 import IoTSecuritySolutionAnalyticsModelList + from .io_tsecurity_aggregated_alert_py3 import IoTSecurityAggregatedAlert + from .io_tsecurity_aggregated_recommendation_py3 import IoTSecurityAggregatedRecommendation from .regulatory_compliance_standard_py3 import RegulatoryComplianceStandard from .regulatory_compliance_control_py3 import RegulatoryComplianceControl from .regulatory_compliance_assessment_py3 import RegulatoryComplianceAssessment @@ -126,6 +143,23 @@ from .information_protection_policy import InformationProtectionPolicy from .security_contact import SecurityContact from .workspace_setting import WorkspaceSetting + from .tags_resource import TagsResource + from .user_defined_resources_properties import UserDefinedResourcesProperties + from .recommendation_configuration_properties import RecommendationConfigurationProperties + from .io_tsecurity_solution_model import IoTSecuritySolutionModel + from .update_iot_security_solution_data import UpdateIotSecuritySolutionData + from .io_tseverity_metrics import IoTSeverityMetrics + from .io_tsecurity_solution_analytics_model_properties_devices_metrics_item import IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem + from .io_tsecurity_alerted_device import IoTSecurityAlertedDevice + from .io_tsecurity_alerted_devices_list import IoTSecurityAlertedDevicesList + from .io_tsecurity_device_alert import IoTSecurityDeviceAlert + from .io_tsecurity_device_alerts_list import IoTSecurityDeviceAlertsList + from .io_tsecurity_device_recommendation import IoTSecurityDeviceRecommendation + from .io_tsecurity_device_recommendations_list import IoTSecurityDeviceRecommendationsList + from .io_tsecurity_solution_analytics_model import IoTSecuritySolutionAnalyticsModel + from .io_tsecurity_solution_analytics_model_list import IoTSecuritySolutionAnalyticsModelList + from .io_tsecurity_aggregated_alert import IoTSecurityAggregatedAlert + from .io_tsecurity_aggregated_recommendation import IoTSecurityAggregatedRecommendation from .regulatory_compliance_standard import RegulatoryComplianceStandard from .regulatory_compliance_control import RegulatoryComplianceControl from .regulatory_compliance_assessment import RegulatoryComplianceAssessment @@ -147,6 +181,9 @@ from .information_protection_policy_paged import InformationProtectionPolicyPaged from .security_contact_paged import SecurityContactPaged from .workspace_setting_paged import WorkspaceSettingPaged +from .io_tsecurity_solution_model_paged import IoTSecuritySolutionModelPaged +from .io_tsecurity_aggregated_alert_paged import IoTSecurityAggregatedAlertPaged +from .io_tsecurity_aggregated_recommendation_paged import IoTSecurityAggregatedRecommendationPaged from .regulatory_compliance_standard_paged import RegulatoryComplianceStandardPaged from .regulatory_compliance_control_paged import RegulatoryComplianceControlPaged from .regulatory_compliance_assessment_paged import RegulatoryComplianceAssessmentPaged @@ -164,6 +201,11 @@ AutoProvision, AlertNotifications, AlertsToAdmins, + SecuritySolutionStatus, + ExportData, + DataSource, + RecommendationType, + RecommendationConfigStatus, State, ConnectionType, ) @@ -224,6 +266,23 @@ 'InformationProtectionPolicy', 'SecurityContact', 'WorkspaceSetting', + 'TagsResource', + 'UserDefinedResourcesProperties', + 'RecommendationConfigurationProperties', + 'IoTSecuritySolutionModel', + 'UpdateIotSecuritySolutionData', + 'IoTSeverityMetrics', + 'IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem', + 'IoTSecurityAlertedDevice', + 'IoTSecurityAlertedDevicesList', + 'IoTSecurityDeviceAlert', + 'IoTSecurityDeviceAlertsList', + 'IoTSecurityDeviceRecommendation', + 'IoTSecurityDeviceRecommendationsList', + 'IoTSecuritySolutionAnalyticsModel', + 'IoTSecuritySolutionAnalyticsModelList', + 'IoTSecurityAggregatedAlert', + 'IoTSecurityAggregatedRecommendation', 'RegulatoryComplianceStandard', 'RegulatoryComplianceControl', 'RegulatoryComplianceAssessment', @@ -245,6 +304,9 @@ 'InformationProtectionPolicyPaged', 'SecurityContactPaged', 'WorkspaceSettingPaged', + 'IoTSecuritySolutionModelPaged', + 'IoTSecurityAggregatedAlertPaged', + 'IoTSecurityAggregatedRecommendationPaged', 'RegulatoryComplianceStandardPaged', 'RegulatoryComplianceControlPaged', 'RegulatoryComplianceAssessmentPaged', @@ -261,6 +323,11 @@ 'AutoProvision', 'AlertNotifications', 'AlertsToAdmins', + 'SecuritySolutionStatus', + 'ExportData', + 'DataSource', + 'RecommendationType', + 'RecommendationConfigStatus', 'State', 'ConnectionType', ] diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert.py new file mode 100644 index 000000000000..e022695de0ef --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert.py @@ -0,0 +1,115 @@ +# 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 IoTSecurityAggregatedAlert(Model): + """Security Solution Aggregated Alert information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar alert_type: Name of the alert type + :vartype alert_type: str + :ivar alert_display_name: Display name of the alert type + :vartype alert_display_name: str + :ivar aggregated_date_utc: The date the incidents were detected by the + vendor + :vartype aggregated_date_utc: date + :ivar vendor_name: Name of the vendor that discovered the incident + :vartype vendor_name: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar count: Occurrence number of the alert within the aggregated date + :vartype count: int + :ivar effected_resource_type: Azure resource ID of the resource that got + the alerts + :vartype effected_resource_type: str + :ivar system_source: The type of the alerted resource (Azure, Non-Azure) + :vartype system_source: str + :ivar action_taken: The action that was taken as a response to the alert + (Active, Blocked etc.) + :vartype action_taken: str + :ivar log_analytics_query: query in log analytics to get the list of + affected devices/alerts + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'alert_type': {'readonly': True}, + 'alert_display_name': {'readonly': True}, + 'aggregated_date_utc': {'readonly': True}, + 'vendor_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'description': {'readonly': True}, + 'count': {'readonly': True}, + 'effected_resource_type': {'readonly': True}, + 'system_source': {'readonly': True}, + 'action_taken': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, + 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, + 'aggregated_date_utc': {'key': 'properties.aggregatedDateUtc', 'type': 'date'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'count': {'key': 'properties.count', 'type': 'int'}, + 'effected_resource_type': {'key': 'properties.effectedResourceType', 'type': 'str'}, + 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, + 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAggregatedAlert, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + self.alert_type = None + self.alert_display_name = None + self.aggregated_date_utc = None + self.vendor_name = None + self.reported_severity = None + self.remediation_steps = None + self.description = None + self.count = None + self.effected_resource_type = None + self.system_source = None + self.action_taken = None + self.log_analytics_query = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_paged.py new file mode 100644 index 000000000000..42bbd9750136 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_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 IoTSecurityAggregatedAlertPaged(Paged): + """ + A paging container for iterating over a list of :class:`IoTSecurityAggregatedAlert ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IoTSecurityAggregatedAlert]'} + } + + def __init__(self, *args, **kwargs): + + super(IoTSecurityAggregatedAlertPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_py3.py new file mode 100644 index 000000000000..5988186d6f53 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_py3.py @@ -0,0 +1,115 @@ +# 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 IoTSecurityAggregatedAlert(Model): + """Security Solution Aggregated Alert information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar alert_type: Name of the alert type + :vartype alert_type: str + :ivar alert_display_name: Display name of the alert type + :vartype alert_display_name: str + :ivar aggregated_date_utc: The date the incidents were detected by the + vendor + :vartype aggregated_date_utc: date + :ivar vendor_name: Name of the vendor that discovered the incident + :vartype vendor_name: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar count: Occurrence number of the alert within the aggregated date + :vartype count: int + :ivar effected_resource_type: Azure resource ID of the resource that got + the alerts + :vartype effected_resource_type: str + :ivar system_source: The type of the alerted resource (Azure, Non-Azure) + :vartype system_source: str + :ivar action_taken: The action that was taken as a response to the alert + (Active, Blocked etc.) + :vartype action_taken: str + :ivar log_analytics_query: query in log analytics to get the list of + affected devices/alerts + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'alert_type': {'readonly': True}, + 'alert_display_name': {'readonly': True}, + 'aggregated_date_utc': {'readonly': True}, + 'vendor_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'description': {'readonly': True}, + 'count': {'readonly': True}, + 'effected_resource_type': {'readonly': True}, + 'system_source': {'readonly': True}, + 'action_taken': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, + 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, + 'aggregated_date_utc': {'key': 'properties.aggregatedDateUtc', 'type': 'date'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'count': {'key': 'properties.count', 'type': 'int'}, + 'effected_resource_type': {'key': 'properties.effectedResourceType', 'type': 'str'}, + 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, + 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(IoTSecurityAggregatedAlert, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + self.alert_type = None + self.alert_display_name = None + self.aggregated_date_utc = None + self.vendor_name = None + self.reported_severity = None + self.remediation_steps = None + self.description = None + self.count = None + self.effected_resource_type = None + self.system_source = None + self.action_taken = None + self.log_analytics_query = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation.py new file mode 100644 index 000000000000..cab13bb5f5e2 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation.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 msrest.serialization import Model + + +class IoTSecurityAggregatedRecommendation(Model): + """Security Solution Recommendation Information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param recommendation_name: Name of the recommendation + :type recommendation_name: str + :ivar recommendation_display_name: Display name of the recommendation + type. + :vartype recommendation_display_name: str + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar recommendation_type_id: The recommendation-type GUID. + :vartype recommendation_type_id: str + :ivar detected_by: Name of the vendor that discovered the issue + :vartype detected_by: str + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar reported_severity: Estimated severity of this recommendation. + Possible values include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar healthy_devices: the number of the healthy devices within the + solution + :vartype healthy_devices: int + :ivar unhealthy_device_count: the number of the unhealthy devices within + the solution + :vartype unhealthy_device_count: int + :ivar log_analytics_query: query in log analytics to get the list of + affected devices/alerts + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'recommendation_display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'recommendation_type_id': {'readonly': True}, + 'detected_by': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'healthy_devices': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'recommendation_name': {'key': 'properties.recommendationName', 'type': 'str'}, + 'recommendation_display_name': {'key': 'properties.recommendationDisplayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'recommendation_type_id': {'key': 'properties.recommendationTypeId', 'type': 'str'}, + 'detected_by': {'key': 'properties.detectedBy', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'healthy_devices': {'key': 'properties.healthyDevices', 'type': 'int'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAggregatedRecommendation, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + self.recommendation_name = kwargs.get('recommendation_name', None) + self.recommendation_display_name = None + self.description = None + self.recommendation_type_id = None + self.detected_by = None + self.remediation_steps = None + self.reported_severity = None + self.healthy_devices = None + self.unhealthy_device_count = None + self.log_analytics_query = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_paged.py new file mode 100644 index 000000000000..623be0865882 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_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 IoTSecurityAggregatedRecommendationPaged(Paged): + """ + A paging container for iterating over a list of :class:`IoTSecurityAggregatedRecommendation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IoTSecurityAggregatedRecommendation]'} + } + + def __init__(self, *args, **kwargs): + + super(IoTSecurityAggregatedRecommendationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_py3.py new file mode 100644 index 000000000000..f75d04c930d1 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_py3.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 msrest.serialization import Model + + +class IoTSecurityAggregatedRecommendation(Model): + """Security Solution Recommendation Information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param recommendation_name: Name of the recommendation + :type recommendation_name: str + :ivar recommendation_display_name: Display name of the recommendation + type. + :vartype recommendation_display_name: str + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar recommendation_type_id: The recommendation-type GUID. + :vartype recommendation_type_id: str + :ivar detected_by: Name of the vendor that discovered the issue + :vartype detected_by: str + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar reported_severity: Estimated severity of this recommendation. + Possible values include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar healthy_devices: the number of the healthy devices within the + solution + :vartype healthy_devices: int + :ivar unhealthy_device_count: the number of the unhealthy devices within + the solution + :vartype unhealthy_device_count: int + :ivar log_analytics_query: query in log analytics to get the list of + affected devices/alerts + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'recommendation_display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'recommendation_type_id': {'readonly': True}, + 'detected_by': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'healthy_devices': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'recommendation_name': {'key': 'properties.recommendationName', 'type': 'str'}, + 'recommendation_display_name': {'key': 'properties.recommendationDisplayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'recommendation_type_id': {'key': 'properties.recommendationTypeId', 'type': 'str'}, + 'detected_by': {'key': 'properties.detectedBy', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'healthy_devices': {'key': 'properties.healthyDevices', 'type': 'int'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, *, tags=None, recommendation_name: str=None, **kwargs) -> None: + super(IoTSecurityAggregatedRecommendation, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + self.recommendation_name = recommendation_name + self.recommendation_display_name = None + self.description = None + self.recommendation_type_id = None + self.detected_by = None + self.remediation_steps = None + self.reported_severity = None + self.healthy_devices = None + self.unhealthy_device_count = None + self.log_analytics_query = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device.py new file mode 100644 index 000000000000..bd55f6b5a9f2 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device.py @@ -0,0 +1,41 @@ +# 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 IoTSecurityAlertedDevice(Model): + """Statistic information about the number of alerts per device during the last + period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar device_id: Name of the alert type + :vartype device_id: str + :ivar alerts_count: the number of alerts raised for this device + :vartype alerts_count: int + """ + + _validation = { + 'device_id': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAlertedDevice, self).__init__(**kwargs) + self.device_id = None + self.alerts_count = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device_py3.py new file mode 100644 index 000000000000..8f5d393791d6 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device_py3.py @@ -0,0 +1,41 @@ +# 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 IoTSecurityAlertedDevice(Model): + """Statistic information about the number of alerts per device during the last + period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar device_id: Name of the alert type + :vartype device_id: str + :ivar alerts_count: the number of alerts raised for this device + :vartype alerts_count: int + """ + + _validation = { + 'device_id': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(IoTSecurityAlertedDevice, self).__init__(**kwargs) + self.device_id = None + self.alerts_count = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list.py new file mode 100644 index 000000000000..122dece5d348 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list.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 msrest.serialization import Model + + +class IoTSecurityAlertedDevicesList(Model): + """List of devices with the count of raised alerts. + + 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. + + :param value: Required. List of aggregated alerts data + :type value: list[~azure.mgmt.security.models.IoTSecurityAlertedDevice] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityAlertedDevice]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAlertedDevicesList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list_py3.py new file mode 100644 index 000000000000..494b767a8c34 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list_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 msrest.serialization import Model + + +class IoTSecurityAlertedDevicesList(Model): + """List of devices with the count of raised alerts. + + 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. + + :param value: Required. List of aggregated alerts data + :type value: list[~azure.mgmt.security.models.IoTSecurityAlertedDevice] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityAlertedDevice]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecurityAlertedDevicesList, self).__init__(**kwargs) + self.value = value + self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert.py new file mode 100644 index 000000000000..bcabf9448c9e --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert.py @@ -0,0 +1,48 @@ +# 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 IoTSecurityDeviceAlert(Model): + """Statistic information about the number of alerts per alert type during the + last period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_display_name: Display name of the alert + :vartype alert_display_name: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar alerts_count: the number of alerts raised for this alert type + :vartype alerts_count: int + """ + + _validation = { + 'alert_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'alert_display_name': {'key': 'alertDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceAlert, self).__init__(**kwargs) + self.alert_display_name = None + self.reported_severity = None + self.alerts_count = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert_py3.py new file mode 100644 index 000000000000..25f390cb73b2 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert_py3.py @@ -0,0 +1,48 @@ +# 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 IoTSecurityDeviceAlert(Model): + """Statistic information about the number of alerts per alert type during the + last period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_display_name: Display name of the alert + :vartype alert_display_name: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar alerts_count: the number of alerts raised for this alert type + :vartype alerts_count: int + """ + + _validation = { + 'alert_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'alert_display_name': {'key': 'alertDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(IoTSecurityDeviceAlert, self).__init__(**kwargs) + self.alert_display_name = None + self.reported_severity = None + self.alerts_count = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list.py new file mode 100644 index 000000000000..4d6fa443d62b --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list.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 msrest.serialization import Model + + +class IoTSecurityDeviceAlertsList(Model): + """List of alerts with the count of raised alerts. + + 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. + + :param value: Required. List of top alerts data + :type value: list[~azure.mgmt.security.models.IoTSecurityDeviceAlert] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityDeviceAlert]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceAlertsList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list_py3.py new file mode 100644 index 000000000000..de41c1dd97eb --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list_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 msrest.serialization import Model + + +class IoTSecurityDeviceAlertsList(Model): + """List of alerts with the count of raised alerts. + + 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. + + :param value: Required. List of top alerts data + :type value: list[~azure.mgmt.security.models.IoTSecurityDeviceAlert] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityDeviceAlert]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecurityDeviceAlertsList, self).__init__(**kwargs) + self.value = value + self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation.py new file mode 100644 index 000000000000..2d36f29827a1 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation.py @@ -0,0 +1,48 @@ +# 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 IoTSecurityDeviceRecommendation(Model): + """Statistic information about the number of recommendations per + recommendation type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar recommendation_display_name: Display name of the recommendation + :vartype recommendation_display_name: str + :ivar reported_severity: Estimated severity of this recommendation. + Possible values include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar devices_count: the number of device with this recommendation + :vartype devices_count: int + """ + + _validation = { + 'recommendation_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'devices_count': {'readonly': True}, + } + + _attribute_map = { + 'recommendation_display_name': {'key': 'recommendationDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'devices_count': {'key': 'devicesCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceRecommendation, self).__init__(**kwargs) + self.recommendation_display_name = None + self.reported_severity = None + self.devices_count = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation_py3.py new file mode 100644 index 000000000000..52126486993f --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation_py3.py @@ -0,0 +1,48 @@ +# 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 IoTSecurityDeviceRecommendation(Model): + """Statistic information about the number of recommendations per + recommendation type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar recommendation_display_name: Display name of the recommendation + :vartype recommendation_display_name: str + :ivar reported_severity: Estimated severity of this recommendation. + Possible values include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar devices_count: the number of device with this recommendation + :vartype devices_count: int + """ + + _validation = { + 'recommendation_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'devices_count': {'readonly': True}, + } + + _attribute_map = { + 'recommendation_display_name': {'key': 'recommendationDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'devices_count': {'key': 'devicesCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(IoTSecurityDeviceRecommendation, self).__init__(**kwargs) + self.recommendation_display_name = None + self.reported_severity = None + self.devices_count = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list.py new file mode 100644 index 000000000000..13145a43f39d --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list.py @@ -0,0 +1,43 @@ +# 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 IoTSecurityDeviceRecommendationsList(Model): + """List of recommendations with the count of devices. + + 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. + + :param value: Required. List of aggregated recommendation data + :type value: + list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityDeviceRecommendation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceRecommendationsList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list_py3.py new file mode 100644 index 000000000000..fe62af9c67d4 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list_py3.py @@ -0,0 +1,43 @@ +# 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 IoTSecurityDeviceRecommendationsList(Model): + """List of recommendations with the count of devices. + + 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. + + :param value: Required. List of aggregated recommendation data + :type value: + list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityDeviceRecommendation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecurityDeviceRecommendationsList, self).__init__(**kwargs) + self.value = value + self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model.py new file mode 100644 index 000000000000..fca261bd72e3 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model.py @@ -0,0 +1,75 @@ +# 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 IoTSecuritySolutionAnalyticsModel(Resource): + """Security Analytics of a security solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar metrics: Security Analytics of a security solution + :vartype metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + :ivar unhealthy_device_count: number of unhealthy devices + :vartype unhealthy_device_count: int + :ivar devices_metrics: The list of devices metrics by the aggregated date. + :vartype devices_metrics: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem] + :param top_alerted_devices: The list of top 3 devices with the most + attacked. + :type top_alerted_devices: + ~azure.mgmt.security.models.IoTSecurityAlertedDevicesList + :param most_prevalent_device_alerts: The list of most prevalent 3 alerts. + :type most_prevalent_device_alerts: + ~azure.mgmt.security.models.IoTSecurityDeviceAlertsList + :param most_prevalent_device_recommendations: The list of most prevalent 3 + recommendations. + :type most_prevalent_device_recommendations: + ~azure.mgmt.security.models.IoTSecurityDeviceRecommendationsList + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metrics': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'devices_metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'metrics': {'key': 'properties.metrics', 'type': 'IoTSeverityMetrics'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'devices_metrics': {'key': 'properties.devicesMetrics', 'type': '[IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem]'}, + 'top_alerted_devices': {'key': 'properties.topAlertedDevices', 'type': 'IoTSecurityAlertedDevicesList'}, + 'most_prevalent_device_alerts': {'key': 'properties.mostPrevalentDeviceAlerts', 'type': 'IoTSecurityDeviceAlertsList'}, + 'most_prevalent_device_recommendations': {'key': 'properties.mostPrevalentDeviceRecommendations', 'type': 'IoTSecurityDeviceRecommendationsList'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionAnalyticsModel, self).__init__(**kwargs) + self.metrics = None + self.unhealthy_device_count = None + self.devices_metrics = None + self.top_alerted_devices = kwargs.get('top_alerted_devices', None) + self.most_prevalent_device_alerts = kwargs.get('most_prevalent_device_alerts', None) + self.most_prevalent_device_recommendations = kwargs.get('most_prevalent_device_recommendations', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list.py new file mode 100644 index 000000000000..734fd1eac11b --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list.py @@ -0,0 +1,43 @@ +# 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 IoTSecuritySolutionAnalyticsModelList(Model): + """List of Security Analytics of a security solution. + + 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. + + :param value: Required. List of Security Analytics of a security solution + :type value: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecuritySolutionAnalyticsModel]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionAnalyticsModelList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list_py3.py new file mode 100644 index 000000000000..557c6ec56303 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list_py3.py @@ -0,0 +1,43 @@ +# 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 IoTSecuritySolutionAnalyticsModelList(Model): + """List of Security Analytics of a security solution. + + 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. + + :param value: Required. List of Security Analytics of a security solution + :type value: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecuritySolutionAnalyticsModel]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecuritySolutionAnalyticsModelList, self).__init__(**kwargs) + self.value = value + self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item.py new file mode 100644 index 000000000000..bf0cd8470ad6 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item.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 IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem(Model): + """IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem. + + :param date_property: the date of the metrics + :type date_property: datetime + :param devices_metrics: devices alerts count by severity. + :type devices_metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'devices_metrics': {'key': 'devicesMetrics', 'type': 'IoTSeverityMetrics'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, self).__init__(**kwargs) + self.date_property = kwargs.get('date_property', None) + self.devices_metrics = kwargs.get('devices_metrics', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item_py3.py new file mode 100644 index 000000000000..9d374866cc3d --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item_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 IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem(Model): + """IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem. + + :param date_property: the date of the metrics + :type date_property: datetime + :param devices_metrics: devices alerts count by severity. + :type devices_metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'devices_metrics': {'key': 'devicesMetrics', 'type': 'IoTSeverityMetrics'}, + } + + def __init__(self, *, date_property=None, devices_metrics=None, **kwargs) -> None: + super(IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, self).__init__(**kwargs) + self.date_property = date_property + self.devices_metrics = devices_metrics diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_py3.py new file mode 100644 index 000000000000..5ff736dfc071 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_py3.py @@ -0,0 +1,75 @@ +# 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 IoTSecuritySolutionAnalyticsModel(Resource): + """Security Analytics of a security solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar metrics: Security Analytics of a security solution + :vartype metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + :ivar unhealthy_device_count: number of unhealthy devices + :vartype unhealthy_device_count: int + :ivar devices_metrics: The list of devices metrics by the aggregated date. + :vartype devices_metrics: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem] + :param top_alerted_devices: The list of top 3 devices with the most + attacked. + :type top_alerted_devices: + ~azure.mgmt.security.models.IoTSecurityAlertedDevicesList + :param most_prevalent_device_alerts: The list of most prevalent 3 alerts. + :type most_prevalent_device_alerts: + ~azure.mgmt.security.models.IoTSecurityDeviceAlertsList + :param most_prevalent_device_recommendations: The list of most prevalent 3 + recommendations. + :type most_prevalent_device_recommendations: + ~azure.mgmt.security.models.IoTSecurityDeviceRecommendationsList + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metrics': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'devices_metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'metrics': {'key': 'properties.metrics', 'type': 'IoTSeverityMetrics'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'devices_metrics': {'key': 'properties.devicesMetrics', 'type': '[IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem]'}, + 'top_alerted_devices': {'key': 'properties.topAlertedDevices', 'type': 'IoTSecurityAlertedDevicesList'}, + 'most_prevalent_device_alerts': {'key': 'properties.mostPrevalentDeviceAlerts', 'type': 'IoTSecurityDeviceAlertsList'}, + 'most_prevalent_device_recommendations': {'key': 'properties.mostPrevalentDeviceRecommendations', 'type': 'IoTSecurityDeviceRecommendationsList'}, + } + + def __init__(self, *, top_alerted_devices=None, most_prevalent_device_alerts=None, most_prevalent_device_recommendations=None, **kwargs) -> None: + super(IoTSecuritySolutionAnalyticsModel, self).__init__(**kwargs) + self.metrics = None + self.unhealthy_device_count = None + self.devices_metrics = None + self.top_alerted_devices = top_alerted_devices + self.most_prevalent_device_alerts = most_prevalent_device_alerts + self.most_prevalent_device_recommendations = most_prevalent_device_recommendations diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model.py new file mode 100644 index 000000000000..b789210c2c52 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model.py @@ -0,0 +1,101 @@ +# 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 IoTSecuritySolutionModel(Model): + """Security Solution. + + 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: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param location: The resource location. + :type location: str + :param workspace: Required. Workspace resource ID + :type workspace: str + :param display_name: Required. Resource display name. + :type display_name: str + :param status: Security solution status. Possible values include: + 'Enabled', 'Disabled'. Default value: "Enabled" . + :type status: str or ~azure.mgmt.security.models.SecuritySolutionStatus + :param export: List of additional export to workspace data options + :type export: list[str or ~azure.mgmt.security.models.ExportData] + :param disabled_data_sources: Disabled data sources. Disabling these data + sources compromises the system. + :type disabled_data_sources: list[str or + ~azure.mgmt.security.models.DataSource] + :param iot_hubs: Required. IoT Hub resource IDs + :type iot_hubs: list[str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :ivar auto_discovered_resources: List of resources that were automatically + discovered as relevant to the security solution. + :vartype auto_discovered_resources: list[str] + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'workspace': {'required': True}, + 'display_name': {'required': True}, + 'iot_hubs': {'required': True}, + 'auto_discovered_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'workspace': {'key': 'properties.workspace', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'export': {'key': 'properties.export', 'type': '[str]'}, + 'disabled_data_sources': {'key': 'properties.disabledDataSources', 'type': '[str]'}, + 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[str]'}, + 'user_defined_resources': {'key': 'properties.userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'auto_discovered_resources': {'key': 'properties.autoDiscoveredResources', 'type': '[str]'}, + 'recommendations_configuration': {'key': 'properties.recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + self.workspace = kwargs.get('workspace', None) + self.display_name = kwargs.get('display_name', None) + self.status = kwargs.get('status', "Enabled") + self.export = kwargs.get('export', None) + self.disabled_data_sources = kwargs.get('disabled_data_sources', None) + self.iot_hubs = kwargs.get('iot_hubs', None) + self.user_defined_resources = kwargs.get('user_defined_resources', None) + self.auto_discovered_resources = None + self.recommendations_configuration = kwargs.get('recommendations_configuration', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_paged.py new file mode 100644 index 000000000000..cb2524737f12 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_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 IoTSecuritySolutionModelPaged(Paged): + """ + A paging container for iterating over a list of :class:`IoTSecuritySolutionModel ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IoTSecuritySolutionModel]'} + } + + def __init__(self, *args, **kwargs): + + super(IoTSecuritySolutionModelPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_py3.py new file mode 100644 index 000000000000..c088b9be9a4b --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_py3.py @@ -0,0 +1,101 @@ +# 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 IoTSecuritySolutionModel(Model): + """Security Solution. + + 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: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param location: The resource location. + :type location: str + :param workspace: Required. Workspace resource ID + :type workspace: str + :param display_name: Required. Resource display name. + :type display_name: str + :param status: Security solution status. Possible values include: + 'Enabled', 'Disabled'. Default value: "Enabled" . + :type status: str or ~azure.mgmt.security.models.SecuritySolutionStatus + :param export: List of additional export to workspace data options + :type export: list[str or ~azure.mgmt.security.models.ExportData] + :param disabled_data_sources: Disabled data sources. Disabling these data + sources compromises the system. + :type disabled_data_sources: list[str or + ~azure.mgmt.security.models.DataSource] + :param iot_hubs: Required. IoT Hub resource IDs + :type iot_hubs: list[str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :ivar auto_discovered_resources: List of resources that were automatically + discovered as relevant to the security solution. + :vartype auto_discovered_resources: list[str] + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'workspace': {'required': True}, + 'display_name': {'required': True}, + 'iot_hubs': {'required': True}, + 'auto_discovered_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'workspace': {'key': 'properties.workspace', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'export': {'key': 'properties.export', 'type': '[str]'}, + 'disabled_data_sources': {'key': 'properties.disabledDataSources', 'type': '[str]'}, + 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[str]'}, + 'user_defined_resources': {'key': 'properties.userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'auto_discovered_resources': {'key': 'properties.autoDiscoveredResources', 'type': '[str]'}, + 'recommendations_configuration': {'key': 'properties.recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, *, workspace: str, display_name: str, iot_hubs, tags=None, location: str=None, status="Enabled", export=None, disabled_data_sources=None, user_defined_resources=None, recommendations_configuration=None, **kwargs) -> None: + super(IoTSecuritySolutionModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + self.location = location + self.workspace = workspace + self.display_name = display_name + self.status = status + self.export = export + self.disabled_data_sources = disabled_data_sources + self.iot_hubs = iot_hubs + self.user_defined_resources = user_defined_resources + self.auto_discovered_resources = None + self.recommendations_configuration = recommendations_configuration diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics.py new file mode 100644 index 000000000000..4e68eb5aab24 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics.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 IoTSeverityMetrics(Model): + """Severity metrics. + + :param high: count of high severity items + :type high: int + :param medium: count of medium severity items + :type medium: int + :param low: count of low severity items + :type low: int + """ + + _attribute_map = { + 'high': {'key': 'high', 'type': 'int'}, + 'medium': {'key': 'medium', 'type': 'int'}, + 'low': {'key': 'low', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSeverityMetrics, self).__init__(**kwargs) + self.high = kwargs.get('high', None) + self.medium = kwargs.get('medium', None) + self.low = kwargs.get('low', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics_py3.py new file mode 100644 index 000000000000..69fe974ba60a --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics_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 IoTSeverityMetrics(Model): + """Severity metrics. + + :param high: count of high severity items + :type high: int + :param medium: count of medium severity items + :type medium: int + :param low: count of low severity items + :type low: int + """ + + _attribute_map = { + 'high': {'key': 'high', 'type': 'int'}, + 'medium': {'key': 'medium', 'type': 'int'}, + 'low': {'key': 'low', 'type': 'int'}, + } + + def __init__(self, *, high: int=None, medium: int=None, low: int=None, **kwargs) -> None: + super(IoTSeverityMetrics, self).__init__(**kwargs) + self.high = high + self.medium = medium + self.low = low diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing.py index 8201c965f0a5..bfa545b47bc2 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing.py @@ -26,8 +26,11 @@ class Pricing(Resource): :vartype name: str :ivar type: Resource type :vartype type: str - :param pricing_tier: Required. The pricing tier value. Possible values - include: 'Free', 'Standard' + :param pricing_tier: Required. The pricing tier value. Azure Security + Center is provided in two pricing tiers: free and standard, with the + standard tier available with a trial period. The standard tier offers + advanced security capabilities, while the free tier offers basic security + features. Possible values include: 'Free', 'Standard' :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier :ivar free_trial_remaining_time: The duration left for the subscriptions free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py index cab29e683d39..edb48104ed19 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py @@ -26,8 +26,11 @@ class Pricing(Resource): :vartype name: str :ivar type: Resource type :vartype type: str - :param pricing_tier: Required. The pricing tier value. Possible values - include: 'Free', 'Standard' + :param pricing_tier: Required. The pricing tier value. Azure Security + Center is provided in two pricing tiers: free and standard, with the + standard tier available with a trial period. The standard tier offers + advanced security capabilities, while the free tier offers basic security + features. Possible values include: 'Free', 'Standard' :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier :ivar free_trial_remaining_time: The duration left for the subscriptions free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties.py new file mode 100644 index 000000000000..81a38e40d2ca --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties.py @@ -0,0 +1,57 @@ +# 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 RecommendationConfigurationProperties(Model): + """Recommendation configuration. + + 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. + + :param recommendation_type: Required. The recommendation type. Possible + values include: 'OpenPortsOnDevice', 'PermissiveFirewallPolicy', + 'PermissiveFirewallRuleInput', 'PermissiveFirewallRuleOut', + 'OperationSystemNotValid', 'UnutilizedMessagesFromAgent', + 'SecurityTwinConfigurationNotOptimal', + 'SecurityTwinConfigurationConflict', 'IdenticalAuthenticationCredentials', + 'DenyDefaultIpPolicy', 'TooLargeIPRange', 'EnableDiagnosticsLog' + :type recommendation_type: str or + ~azure.mgmt.security.models.RecommendationType + :ivar description: + :vartype description: str + :param status: Required. Recommendation status. The recommendation is not + generated when the status is turned off. Possible values include: + 'TurnedOff', 'TurnedOn'. Default value: "TurnedOn" . + :type status: str or + ~azure.mgmt.security.models.RecommendationConfigStatus + """ + + _validation = { + 'recommendation_type': {'required': True}, + 'description': {'readonly': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'recommendation_type': {'key': 'recommendationType', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecommendationConfigurationProperties, self).__init__(**kwargs) + self.recommendation_type = kwargs.get('recommendation_type', None) + self.description = None + self.status = kwargs.get('status', "TurnedOn") diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties_py3.py new file mode 100644 index 000000000000..a7f9f4d48d88 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties_py3.py @@ -0,0 +1,57 @@ +# 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 RecommendationConfigurationProperties(Model): + """Recommendation configuration. + + 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. + + :param recommendation_type: Required. The recommendation type. Possible + values include: 'OpenPortsOnDevice', 'PermissiveFirewallPolicy', + 'PermissiveFirewallRuleInput', 'PermissiveFirewallRuleOut', + 'OperationSystemNotValid', 'UnutilizedMessagesFromAgent', + 'SecurityTwinConfigurationNotOptimal', + 'SecurityTwinConfigurationConflict', 'IdenticalAuthenticationCredentials', + 'DenyDefaultIpPolicy', 'TooLargeIPRange', 'EnableDiagnosticsLog' + :type recommendation_type: str or + ~azure.mgmt.security.models.RecommendationType + :ivar description: + :vartype description: str + :param status: Required. Recommendation status. The recommendation is not + generated when the status is turned off. Possible values include: + 'TurnedOff', 'TurnedOn'. Default value: "TurnedOn" . + :type status: str or + ~azure.mgmt.security.models.RecommendationConfigStatus + """ + + _validation = { + 'recommendation_type': {'required': True}, + 'description': {'readonly': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'recommendation_type': {'key': 'recommendationType', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, recommendation_type, status="TurnedOn", **kwargs) -> None: + super(RecommendationConfigurationProperties, self).__init__(**kwargs) + self.recommendation_type = recommendation_type + self.description = None + self.status = status diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py index d2fe2ddff43c..e93bba6581b8 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py @@ -100,6 +100,44 @@ class AlertsToAdmins(str, Enum): off = "Off" #: Don't send notification on new alerts to the subscription's admins +class SecuritySolutionStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class ExportData(str, Enum): + + raw_events = "RawEvents" #: Agent raw events + + +class DataSource(str, Enum): + + twin_data = "TwinData" #: Devices twin data + + +class RecommendationType(str, Enum): + + open_ports_on_device = "OpenPortsOnDevice" #: A listening endpoint was found on the device. + permissive_firewall_policy = "PermissiveFirewallPolicy" #: Allowed firewall policy found (INPUT/OUTPUT). Firewall policy should deny all traffic by default, and define rules to allow necessary communication to/from the device. + permissive_firewall_rule_input = "PermissiveFirewallRuleInput" #: A rule in the firewall in the input chain has been found that contains a permissive pattern for a wide range of IP addresses or ports. + permissive_firewall_rule_out = "PermissiveFirewallRuleOut" #: A rule in the firewall in the output chain has been found that contains a permissive pattern for a wide range of IP addresses or ports. + operation_system_not_valid = "OperationSystemNotValid" #: Device doesn't comply with CIS Linux benchmarks. + unutilized_messages_from_agent = "UnutilizedMessagesFromAgent" #: 10% or more of security messages were smaller than 4kb during the last 24 hours. + security_twin_configuration_not_optimal = "SecurityTwinConfigurationNotOptimal" #: Security twin configuration is not optimal. + security_twin_configuration_conflict = "SecurityTwinConfigurationConflict" #: Conflicts were identified in the security twin configuration. + identical_authentication_credentials = "IdenticalAuthenticationCredentials" #: IoT Hub authentication credentials are used by multiple devices. This may indicate an illegitimate device impersonating a legitimate device. Duplicate credential use increases the risk of device impersonation by a malicious actor. + deny_default_ip_policy = "DenyDefaultIpPolicy" #: IP filter configuration should have rules defined for allowed traffic, and should by default, deny all other traffic by default. + too_large_ip_range = "TooLargeIPRange" #: An allow IP filter rule source IP range is too large. Overly permissive rules can expose your IoT hub to malicious actors. + enable_diagnostics_log = "EnableDiagnosticsLog" #: Enable logs and retain them for up to a year. Retaining logs enables you to recreate activity trails for investigation purposes when a security incident occurs or your network is compromised. + + +class RecommendationConfigStatus(str, Enum): + + turned_off = "TurnedOff" + turned_on = "TurnedOn" + + class State(str, Enum): passed = "Passed" #: All supported regulatory compliance controls in the given standard have a passed state diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource.py new file mode 100644 index 000000000000..3e9bca840331 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource.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 TagsResource(Model): + """A container holding only the Tags for a resource, allowing the user to + update the tags. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TagsResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource_py3.py new file mode 100644 index 000000000000..459b5db6f0b3 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource_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 TagsResource(Model): + """A container holding only the Tags for a resource, allowing the user to + update the tags. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(TagsResource, self).__init__(**kwargs) + self.tags = tags diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data.py new file mode 100644 index 000000000000..9992ee466b3d --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data.py @@ -0,0 +1,37 @@ +# 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 .tags_resource import TagsResource + + +class UpdateIotSecuritySolutionData(TagsResource): + """UpdateIotSecuritySolutionData. + + :param tags: Resource tags + :type tags: dict[str, str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'user_defined_resources': {'key': 'userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'recommendations_configuration': {'key': 'recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, **kwargs): + super(UpdateIotSecuritySolutionData, self).__init__(**kwargs) + self.user_defined_resources = kwargs.get('user_defined_resources', None) + self.recommendations_configuration = kwargs.get('recommendations_configuration', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data_py3.py new file mode 100644 index 000000000000..dbad3c94549e --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data_py3.py @@ -0,0 +1,37 @@ +# 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 .tags_resource_py3 import TagsResource + + +class UpdateIotSecuritySolutionData(TagsResource): + """UpdateIotSecuritySolutionData. + + :param tags: Resource tags + :type tags: dict[str, str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'user_defined_resources': {'key': 'userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'recommendations_configuration': {'key': 'recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, *, tags=None, user_defined_resources=None, recommendations_configuration=None, **kwargs) -> None: + super(UpdateIotSecuritySolutionData, self).__init__(tags=tags, **kwargs) + self.user_defined_resources = user_defined_resources + self.recommendations_configuration = recommendations_configuration diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties.py new file mode 100644 index 000000000000..c3ca5e92c06c --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties.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 msrest.serialization import Model + + +class UserDefinedResourcesProperties(Model): + """Properties of the solution's user defined resources. + + All required parameters must be populated in order to send to Azure. + + :param query: Required. Azure Resource Graph query which represents the + security solution's user defined resources. Required to start with "where + type != "Microsoft.Devices/IotHubs"" + :type query: str + :param query_subscriptions: Required. List of Azure subscription ids on + which the user defined resources query should be executed. + :type query_subscriptions: list[str] + """ + + _validation = { + 'query': {'required': True}, + 'query_subscriptions': {'required': True}, + } + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'}, + 'query_subscriptions': {'key': 'querySubscriptions', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(UserDefinedResourcesProperties, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.query_subscriptions = kwargs.get('query_subscriptions', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties_py3.py new file mode 100644 index 000000000000..6300959530f6 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties_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 msrest.serialization import Model + + +class UserDefinedResourcesProperties(Model): + """Properties of the solution's user defined resources. + + All required parameters must be populated in order to send to Azure. + + :param query: Required. Azure Resource Graph query which represents the + security solution's user defined resources. Required to start with "where + type != "Microsoft.Devices/IotHubs"" + :type query: str + :param query_subscriptions: Required. List of Azure subscription ids on + which the user defined resources query should be executed. + :type query_subscriptions: list[str] + """ + + _validation = { + 'query': {'required': True}, + 'query_subscriptions': {'required': True}, + } + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'}, + 'query_subscriptions': {'key': 'querySubscriptions', 'type': '[str]'}, + } + + def __init__(self, *, query: str, query_subscriptions, **kwargs) -> None: + super(UserDefinedResourcesProperties, self).__init__(**kwargs) + self.query = query + self.query_subscriptions = query_subscriptions diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/__init__.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/__init__.py index ff76660402c5..405e1f50d534 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/__init__.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/__init__.py @@ -27,6 +27,14 @@ from .information_protection_policies_operations import InformationProtectionPoliciesOperations from .security_contacts_operations import SecurityContactsOperations from .workspace_settings_operations import WorkspaceSettingsOperations +from .io_tsecurity_solutions_operations import IoTSecuritySolutionsOperations +from .io_tsecurity_solutions_resource_group_operations import IoTSecuritySolutionsResourceGroupOperations +from .iot_security_solution_operations import IotSecuritySolutionOperations +from .io_tsecurity_solutions_analytics_operations import IoTSecuritySolutionsAnalyticsOperations +from .io_tsecurity_solutions_analytics_aggregated_alerts_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations +from .io_tsecurity_solutions_analytics_aggregated_alert_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertOperations +from .io_tsecurity_solutions_analytics_recommendation_operations import IoTSecuritySolutionsAnalyticsRecommendationOperations +from .io_tsecurity_solutions_analytics_recommendations_operations import IoTSecuritySolutionsAnalyticsRecommendationsOperations from .regulatory_compliance_standards_operations import RegulatoryComplianceStandardsOperations from .regulatory_compliance_controls_operations import RegulatoryComplianceControlsOperations from .regulatory_compliance_assessments_operations import RegulatoryComplianceAssessmentsOperations @@ -51,6 +59,14 @@ 'InformationProtectionPoliciesOperations', 'SecurityContactsOperations', 'WorkspaceSettingsOperations', + 'IoTSecuritySolutionsOperations', + 'IoTSecuritySolutionsResourceGroupOperations', + 'IotSecuritySolutionOperations', + 'IoTSecuritySolutionsAnalyticsOperations', + 'IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations', + 'IoTSecuritySolutionsAnalyticsAggregatedAlertOperations', + 'IoTSecuritySolutionsAnalyticsRecommendationOperations', + 'IoTSecuritySolutionsAnalyticsRecommendationsOperations', 'RegulatoryComplianceStandardsOperations', 'RegulatoryComplianceControlsOperations', 'RegulatoryComplianceAssessmentsOperations', diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alert_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alert_operations.py new file mode 100644 index 000000000000..3b887d1b232e --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alert_operations.py @@ -0,0 +1,161 @@ +# 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 IoTSecuritySolutionsAnalyticsAggregatedAlertOperations(object): + """IoTSecuritySolutionsAnalyticsAggregatedAlertOperations 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: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def get( + self, resource_group_name, solution_name, aggregated_alert_name, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :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 solution_name: The solution manager name + :type solution_name: str + :param aggregated_alert_name: Identifier of the aggregated alert + :type aggregated_alert_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: IoTSecurityAggregatedAlert or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IoTSecurityAggregatedAlert 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\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str'), + 'aggregatedAlertName': self._serialize.url("aggregated_alert_name", aggregated_alert_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('IoTSecurityAggregatedAlert', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts/{aggregatedAlertName}'} + + def dismiss( + self, resource_group_name, solution_name, aggregated_alert_name, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :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 solution_name: The solution manager name + :type solution_name: str + :param aggregated_alert_name: Identifier of the aggregated alert + :type aggregated_alert_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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.dismiss.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\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str'), + 'aggregatedAlertName': self._serialize.url("aggregated_alert_name", aggregated_alert_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 = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + dismiss.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts/{aggregatedAlertName}/dismiss'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alerts_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alerts_operations.py new file mode 100644 index 000000000000..b7c3c363bf0c --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alerts_operations.py @@ -0,0 +1,113 @@ +# 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 IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations(object): + """IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations 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: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def list( + self, resource_group_name, solution_name, top=None, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :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 solution_name: The solution manager name + :type solution_name: str + :param top: The number of results to retrieve. + :type top: int + :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 IoTSecurityAggregatedAlert + :rtype: + ~azure.mgmt.security.models.IoTSecurityAggregatedAlertPaged[~azure.mgmt.security.models.IoTSecurityAggregatedAlert] + :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\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_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') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + 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.IoTSecurityAggregatedAlertPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.IoTSecurityAggregatedAlertPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_operations.py new file mode 100644 index 000000000000..38480e79a367 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_operations.py @@ -0,0 +1,167 @@ +# 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 IoTSecuritySolutionsAnalyticsOperations(object): + """IoTSecuritySolutionsAnalyticsOperations 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: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def get_all( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :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 solution_name: The solution manager name + :type solution_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: IoTSecuritySolutionAnalyticsModelList or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelList or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_all.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\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_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('IoTSecuritySolutionAnalyticsModelList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels'} + + def get_default( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :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 solution_name: The solution manager name + :type solution_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: IoTSecuritySolutionAnalyticsModel or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_default.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\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_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('IoTSecuritySolutionAnalyticsModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_default.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendation_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendation_operations.py new file mode 100644 index 000000000000..85bea2a5b2d0 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendation_operations.py @@ -0,0 +1,107 @@ +# 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 IoTSecuritySolutionsAnalyticsRecommendationOperations(object): + """IoTSecuritySolutionsAnalyticsRecommendationOperations 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: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def get( + self, resource_group_name, solution_name, aggregated_recommendation_name, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :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 solution_name: The solution manager name + :type solution_name: str + :param aggregated_recommendation_name: Identifier of the aggregated + recommendation + :type aggregated_recommendation_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: IoTSecurityAggregatedRecommendation or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.security.models.IoTSecurityAggregatedRecommendation 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\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str'), + 'aggregatedRecommendationName': self._serialize.url("aggregated_recommendation_name", aggregated_recommendation_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('IoTSecurityAggregatedRecommendation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedRecommendations/{aggregatedRecommendationName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendations_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendations_operations.py new file mode 100644 index 000000000000..dff823861641 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendations_operations.py @@ -0,0 +1,114 @@ +# 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 IoTSecuritySolutionsAnalyticsRecommendationsOperations(object): + """IoTSecuritySolutionsAnalyticsRecommendationsOperations 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: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def list( + self, resource_group_name, solution_name, top=None, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :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 solution_name: The solution manager name + :type solution_name: str + :param top: The number of results to retrieve. + :type top: int + :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 + IoTSecurityAggregatedRecommendation + :rtype: + ~azure.mgmt.security.models.IoTSecurityAggregatedRecommendationPaged[~azure.mgmt.security.models.IoTSecurityAggregatedRecommendation] + :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\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_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') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + 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.IoTSecurityAggregatedRecommendationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.IoTSecurityAggregatedRecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedRecommendations'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_operations.py new file mode 100644 index 000000000000..480914333184 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_operations.py @@ -0,0 +1,107 @@ +# 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 IoTSecuritySolutionsOperations(object): + """IoTSecuritySolutionsOperations 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: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def list( + self, filter=None, custom_headers=None, raw=False, **operation_config): + """List of security solutions. + + :param filter: filter the Security Solution with OData syntax. + supporting filter by iotHubs + :type filter: 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 IoTSecuritySolutionModel + :rtype: + ~azure.mgmt.security.models.IoTSecuritySolutionModelPaged[~azure.mgmt.security.models.IoTSecuritySolutionModel] + :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}$') + } + 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') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, '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.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotSecuritySolutions'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_resource_group_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_resource_group_operations.py new file mode 100644 index 000000000000..196d0d3ab1e6 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_resource_group_operations.py @@ -0,0 +1,111 @@ +# 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 IoTSecuritySolutionsResourceGroupOperations(object): + """IoTSecuritySolutionsResourceGroupOperations 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: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def list( + self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): + """List of security solutions. + + :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 filter: filter the Security Solution with OData syntax. + supporting filter by iotHubs + :type filter: 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 IoTSecuritySolutionModel + :rtype: + ~azure.mgmt.security.models.IoTSecuritySolutionModelPaged[~azure.mgmt.security.models.IoTSecuritySolutionModel] + :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\._\(\)]+$') + } + 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') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, '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.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/iot_security_solution_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/iot_security_solution_operations.py new file mode 100644 index 000000000000..7be7884ad212 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/iot_security_solution_operations.py @@ -0,0 +1,298 @@ +# 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 IotSecuritySolutionOperations(object): + """IotSecuritySolutionOperations 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: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def get( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """Details of a specific iot security solution. + + :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 solution_name: The solution manager name + :type solution_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: IoTSecuritySolutionModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IoTSecuritySolutionModel 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\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_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('IoTSecuritySolutionModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} + + def create( + self, resource_group_name, solution_name, iot_security_solution_data, custom_headers=None, raw=False, **operation_config): + """Create new solution manager. + + :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 solution_name: The solution manager name + :type solution_name: str + :param iot_security_solution_data: The security solution data + :type iot_security_solution_data: + ~azure.mgmt.security.models.IoTSecuritySolutionModel + :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: IoTSecuritySolutionModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IoTSecuritySolutionModel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_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(iot_security_solution_data, 'IoTSecuritySolutionModel') + + # 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('IoTSecuritySolutionModel', response) + if response.status_code == 201: + deserialized = self._deserialize('IoTSecuritySolutionModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} + + def update( + self, resource_group_name, solution_name, update_iot_security_solution_data, custom_headers=None, raw=False, **operation_config): + """update existing Security Solution tags or user defined resources. To + update other fields use the CreateOrUpdate method. + + :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 solution_name: The solution manager name + :type solution_name: str + :param update_iot_security_solution_data: The security solution data + :type update_iot_security_solution_data: + ~azure.mgmt.security.models.UpdateIotSecuritySolutionData + :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: IoTSecuritySolutionModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IoTSecuritySolutionModel 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\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_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(update_iot_security_solution_data, 'UpdateIotSecuritySolutionData') + + # Construct and send request + request = self._client.patch(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('IoTSecuritySolutionModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} + + def delete( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """Create new solution manager. + + :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 solution_name: The solution manager name + :type solution_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: 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\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_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 = {} + 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/Microsoft.Security/iotSecuritySolutions/{solutionName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py index 85177f446714..9d80066a2cdf 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py @@ -39,7 +39,10 @@ def __init__(self, client, config, serializer, deserializer): def list( self, custom_headers=None, raw=False, **operation_config): - """Security pricing configurations in the subscription. + """A given security pricing configuration in the subscription. Azure + Security Center is available in two pricing tiers: Free and Standard, + on multiple resource types, including Virtual machines, SQL Servers, + App service plans and Storage accounts. :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -95,7 +98,10 @@ def list( def get( self, pricing_name, custom_headers=None, raw=False, **operation_config): - """Security pricing configuration in the subscription. + """A given security pricing configuration in the subscription. Azure + Security Center is available in two pricing tiers: Free and Standard, + on multiple resource types, including Virtual machines, SQL Servers, + App service plans and Storage accounts. :param pricing_name: name of the pricing configuration :type pricing_name: str @@ -154,12 +160,18 @@ def get( def update( self, pricing_name, pricing_tier, custom_headers=None, raw=False, **operation_config): - """Security pricing configuration in the subscription. + """A given security pricing configuration in the subscription. Azure + Security Center is available in two pricing tiers: Free and Standard, + on multiple resource types, including Virtual machines, SQL Servers, + App service plans and Storage accounts. :param pricing_name: name of the pricing configuration :type pricing_name: str - :param pricing_tier: The pricing tier value. Possible values include: - 'Free', 'Standard' + :param pricing_tier: The pricing tier value. Azure Security Center is + provided in two pricing tiers: free and standard, with the standard + tier available with a trial period. The standard tier offers advanced + security capabilities, while the free tier offers basic security + features. Possible values include: 'Free', 'Standard' :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py index 8b4c683fa799..27c5f08754c8 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py @@ -31,6 +31,14 @@ from .operations.information_protection_policies_operations import InformationProtectionPoliciesOperations from .operations.security_contacts_operations import SecurityContactsOperations from .operations.workspace_settings_operations import WorkspaceSettingsOperations +from .operations.io_tsecurity_solutions_operations import IoTSecuritySolutionsOperations +from .operations.io_tsecurity_solutions_resource_group_operations import IoTSecuritySolutionsResourceGroupOperations +from .operations.iot_security_solution_operations import IotSecuritySolutionOperations +from .operations.io_tsecurity_solutions_analytics_operations import IoTSecuritySolutionsAnalyticsOperations +from .operations.io_tsecurity_solutions_analytics_aggregated_alerts_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations +from .operations.io_tsecurity_solutions_analytics_aggregated_alert_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertOperations +from .operations.io_tsecurity_solutions_analytics_recommendation_operations import IoTSecuritySolutionsAnalyticsRecommendationOperations +from .operations.io_tsecurity_solutions_analytics_recommendations_operations import IoTSecuritySolutionsAnalyticsRecommendationsOperations from .operations.regulatory_compliance_standards_operations import RegulatoryComplianceStandardsOperations from .operations.regulatory_compliance_controls_operations import RegulatoryComplianceControlsOperations from .operations.regulatory_compliance_assessments_operations import RegulatoryComplianceAssessmentsOperations @@ -118,6 +126,22 @@ class SecurityCenter(SDKClient): :vartype security_contacts: azure.mgmt.security.operations.SecurityContactsOperations :ivar workspace_settings: WorkspaceSettings operations :vartype workspace_settings: azure.mgmt.security.operations.WorkspaceSettingsOperations + :ivar io_tsecurity_solutions: IoTSecuritySolutions operations + :vartype io_tsecurity_solutions: azure.mgmt.security.operations.IoTSecuritySolutionsOperations + :ivar io_tsecurity_solutions_resource_group: IoTSecuritySolutionsResourceGroup operations + :vartype io_tsecurity_solutions_resource_group: azure.mgmt.security.operations.IoTSecuritySolutionsResourceGroupOperations + :ivar iot_security_solution: IotSecuritySolution operations + :vartype iot_security_solution: azure.mgmt.security.operations.IotSecuritySolutionOperations + :ivar io_tsecurity_solutions_analytics: IoTSecuritySolutionsAnalytics operations + :vartype io_tsecurity_solutions_analytics: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsOperations + :ivar io_tsecurity_solutions_analytics_aggregated_alerts: IoTSecuritySolutionsAnalyticsAggregatedAlerts operations + :vartype io_tsecurity_solutions_analytics_aggregated_alerts: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations + :ivar io_tsecurity_solutions_analytics_aggregated_alert: IoTSecuritySolutionsAnalyticsAggregatedAlert operations + :vartype io_tsecurity_solutions_analytics_aggregated_alert: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsAggregatedAlertOperations + :ivar io_tsecurity_solutions_analytics_recommendation: IoTSecuritySolutionsAnalyticsRecommendation operations + :vartype io_tsecurity_solutions_analytics_recommendation: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsRecommendationOperations + :ivar io_tsecurity_solutions_analytics_recommendations: IoTSecuritySolutionsAnalyticsRecommendations operations + :vartype io_tsecurity_solutions_analytics_recommendations: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsRecommendationsOperations :ivar regulatory_compliance_standards: RegulatoryComplianceStandards operations :vartype regulatory_compliance_standards: azure.mgmt.security.operations.RegulatoryComplianceStandardsOperations :ivar regulatory_compliance_controls: RegulatoryComplianceControls operations @@ -184,6 +208,22 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.workspace_settings = WorkspaceSettingsOperations( self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions = IoTSecuritySolutionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_resource_group = IoTSecuritySolutionsResourceGroupOperations( + self._client, self.config, self._serialize, self._deserialize) + self.iot_security_solution = IotSecuritySolutionOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics = IoTSecuritySolutionsAnalyticsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics_aggregated_alerts = IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics_aggregated_alert = IoTSecuritySolutionsAnalyticsAggregatedAlertOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics_recommendation = IoTSecuritySolutionsAnalyticsRecommendationOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics_recommendations = IoTSecuritySolutionsAnalyticsRecommendationsOperations( + self._client, self.config, self._serialize, self._deserialize) self.regulatory_compliance_standards = RegulatoryComplianceStandardsOperations( self._client, self.config, self._serialize, self._deserialize) self.regulatory_compliance_controls = RegulatoryComplianceControlsOperations(