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 604180eb1c4d..1fcb2640bf36 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 @@ -23,6 +23,10 @@ from .operations import IotSecuritySolutionAnalyticsOperations from .operations import IotSecuritySolutionsAnalyticsAggregatedAlertOperations from .operations import IotSecuritySolutionsAnalyticsRecommendationOperations +from .operations import IotAlertTypesOperations +from .operations import IotAlertsOperations +from .operations import IotRecommendationTypesOperations +from .operations import IotRecommendationsOperations from .operations import LocationsOperations from .operations import Operations from .operations import TasksOperations @@ -46,10 +50,15 @@ from .operations import TopologyOperations from .operations import JitNetworkAccessPoliciesOperations from .operations import DiscoveredSecuritySolutionsOperations +from .operations import SecuritySolutionsReferenceDataOperations from .operations import ExternalSecuritySolutionsOperations from .operations import SecureScoresOperations from .operations import SecureScoreControlsOperations from .operations import SecureScoreControlDefinitionsOperations +from .operations import SecuritySolutionsOperations +from .operations import ConnectorsOperations +from .operations import IotDefenderSettingsOperations +from .operations import IotSensorsOperations from . import models @@ -79,6 +88,14 @@ class SecurityCenter(SDKClient): :vartype iot_security_solutions_analytics_aggregated_alert: azure.mgmt.security.operations.IotSecuritySolutionsAnalyticsAggregatedAlertOperations :ivar iot_security_solutions_analytics_recommendation: IotSecuritySolutionsAnalyticsRecommendation operations :vartype iot_security_solutions_analytics_recommendation: azure.mgmt.security.operations.IotSecuritySolutionsAnalyticsRecommendationOperations + :ivar iot_alert_types: IotAlertTypes operations + :vartype iot_alert_types: azure.mgmt.security.operations.IotAlertTypesOperations + :ivar iot_alerts: IotAlerts operations + :vartype iot_alerts: azure.mgmt.security.operations.IotAlertsOperations + :ivar iot_recommendation_types: IotRecommendationTypes operations + :vartype iot_recommendation_types: azure.mgmt.security.operations.IotRecommendationTypesOperations + :ivar iot_recommendations: IotRecommendations operations + :vartype iot_recommendations: azure.mgmt.security.operations.IotRecommendationsOperations :ivar locations: Locations operations :vartype locations: azure.mgmt.security.operations.LocationsOperations :ivar operations: Operations operations @@ -125,6 +142,8 @@ class SecurityCenter(SDKClient): :vartype jit_network_access_policies: azure.mgmt.security.operations.JitNetworkAccessPoliciesOperations :ivar discovered_security_solutions: DiscoveredSecuritySolutions operations :vartype discovered_security_solutions: azure.mgmt.security.operations.DiscoveredSecuritySolutionsOperations + :ivar security_solutions_reference_data: SecuritySolutionsReferenceData operations + :vartype security_solutions_reference_data: azure.mgmt.security.operations.SecuritySolutionsReferenceDataOperations :ivar external_security_solutions: ExternalSecuritySolutions operations :vartype external_security_solutions: azure.mgmt.security.operations.ExternalSecuritySolutionsOperations :ivar secure_scores: SecureScores operations @@ -133,6 +152,14 @@ class SecurityCenter(SDKClient): :vartype secure_score_controls: azure.mgmt.security.operations.SecureScoreControlsOperations :ivar secure_score_control_definitions: SecureScoreControlDefinitions operations :vartype secure_score_control_definitions: azure.mgmt.security.operations.SecureScoreControlDefinitionsOperations + :ivar security_solutions: SecuritySolutions operations + :vartype security_solutions: azure.mgmt.security.operations.SecuritySolutionsOperations + :ivar connectors: Connectors operations + :vartype connectors: azure.mgmt.security.operations.ConnectorsOperations + :ivar iot_defender_settings: IotDefenderSettings operations + :vartype iot_defender_settings: azure.mgmt.security.operations.IotDefenderSettingsOperations + :ivar iot_sensors: IotSensors operations + :vartype iot_sensors: azure.mgmt.security.operations.IotSensorsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -175,6 +202,14 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.iot_security_solutions_analytics_recommendation = IotSecuritySolutionsAnalyticsRecommendationOperations( self._client, self.config, self._serialize, self._deserialize) + self.iot_alert_types = IotAlertTypesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.iot_alerts = IotAlertsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.iot_recommendation_types = IotRecommendationTypesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.iot_recommendations = IotRecommendationsOperations( + self._client, self.config, self._serialize, self._deserialize) self.locations = LocationsOperations( self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( @@ -221,6 +256,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.discovered_security_solutions = DiscoveredSecuritySolutionsOperations( self._client, self.config, self._serialize, self._deserialize) + self.security_solutions_reference_data = SecuritySolutionsReferenceDataOperations( + self._client, self.config, self._serialize, self._deserialize) self.external_security_solutions = ExternalSecuritySolutionsOperations( self._client, self.config, self._serialize, self._deserialize) self.secure_scores = SecureScoresOperations( @@ -229,3 +266,11 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.secure_score_control_definitions = SecureScoreControlDefinitionsOperations( self._client, self.config, self._serialize, self._deserialize) + self.security_solutions = SecuritySolutionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.connectors = ConnectorsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.iot_defender_settings = IotDefenderSettingsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.iot_sensors = IotSensorsOperations( + self._client, self.config, self._serialize, self._deserialize) 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 0ec802c22392..b56e1146d6a5 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 @@ -14,6 +14,9 @@ from ._models_py3 import AadExternalSecuritySolution from ._models_py3 import AadSolutionProperties from ._models_py3 import ActiveConnectionsNotInAllowedRange + from ._models_py3 import AdaptiveApplicationControlGroup + from ._models_py3 import AdaptiveApplicationControlGroups + from ._models_py3 import AdaptiveApplicationControlIssueSummary from ._models_py3 import AdaptiveNetworkHardening from ._models_py3 import AdaptiveNetworkHardeningEnforceRequest from ._models_py3 import AdditionalData @@ -27,14 +30,12 @@ from ._models_py3 import AmqpC2DMessagesNotInAllowedRange from ._models_py3 import AmqpC2DRejectedMessagesNotInAllowedRange from ._models_py3 import AmqpD2CMessagesNotInAllowedRange - from ._models_py3 import AppWhitelistingGroup - from ._models_py3 import AppWhitelistingGroups - from ._models_py3 import AppWhitelistingIssueSummary from ._models_py3 import AscLocation from ._models_py3 import AssessmentLinks from ._models_py3 import AssessmentStatus from ._models_py3 import AtaExternalSecuritySolution from ._models_py3 import AtaSolutionProperties + from ._models_py3 import AuthenticationDetailsProperties from ._models_py3 import Automation from ._models_py3 import AutomationAction from ._models_py3 import AutomationActionEventHub @@ -46,6 +47,8 @@ from ._models_py3 import AutomationTriggeringRule from ._models_py3 import AutomationValidationStatus from ._models_py3 import AutoProvisioningSetting + from ._models_py3 import AwAssumeRoleAuthenticationDetailsProperties + from ._models_py3 import AwsCredsAuthenticationDetailsProperties from ._models_py3 import AzureResourceDetails from ._models_py3 import AzureResourceLink from ._models_py3 import CefExternalSecuritySolution @@ -57,6 +60,7 @@ from ._models_py3 import ConnectedResource from ._models_py3 import ConnectedWorkspace from ._models_py3 import ConnectionToIpNotAllowed + from ._models_py3 import ConnectorSetting from ._models_py3 import ContainerRegistryVulnerabilityProperties from ._models_py3 import CustomAlertRule from ._models_py3 import CVE @@ -73,12 +77,22 @@ from ._models_py3 import ExternalSecuritySolutionProperties from ._models_py3 import FailedLocalLoginsNotInAllowedRange from ._models_py3 import FileUploadsNotInAllowedRange + from ._models_py3 import GcpCredentialsDetailsProperties from ._models_py3 import HttpC2DMessagesNotInAllowedRange from ._models_py3 import HttpC2DRejectedMessagesNotInAllowedRange from ._models_py3 import HttpD2CMessagesNotInAllowedRange + from ._models_py3 import HybridComputeSettingsProperties from ._models_py3 import InformationProtectionKeyword from ._models_py3 import InformationProtectionPolicy from ._models_py3 import InformationType + from ._models_py3 import IotAlert + from ._models_py3 import IotAlertType + from ._models_py3 import IotAlertTypeList + from ._models_py3 import IotDefenderSettingsList + from ._models_py3 import IotDefenderSettingsModel + from ._models_py3 import IotRecommendation + from ._models_py3 import IotRecommendationType + from ._models_py3 import IotRecommendationTypeList from ._models_py3 import IoTSecurityAggregatedAlert from ._models_py3 import IoTSecurityAggregatedAlertPropertiesTopDevicesListItem from ._models_py3 import IoTSecurityAggregatedRecommendation @@ -89,6 +103,8 @@ from ._models_py3 import IoTSecuritySolutionAnalyticsModelList from ._models_py3 import IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem from ._models_py3 import IoTSecuritySolutionModel + from ._models_py3 import IotSensor + from ._models_py3 import IotSensorsList from ._models_py3 import IoTSeverityMetrics from ._models_py3 import JitNetworkAccessPolicy from ._models_py3 import JitNetworkAccessPolicyInitiatePort @@ -107,13 +123,24 @@ from ._models_py3 import MqttC2DRejectedMessagesNotInAllowedRange from ._models_py3 import MqttD2CMessagesNotInAllowedRange from ._models_py3 import OnPremiseResourceDetails + from ._models_py3 import OnPremiseSqlResourceDetails from ._models_py3 import Operation from ._models_py3 import OperationDisplay + from ._models_py3 import PackageDownloadInfo + from ._models_py3 import PackageDownloads + from ._models_py3 import PackageDownloadsCentralManager + from ._models_py3 import PackageDownloadsCentralManagerFull + from ._models_py3 import PackageDownloadsCentralManagerFullOvf + from ._models_py3 import PackageDownloadsSensor + from ._models_py3 import PackageDownloadsSensorFull + from ._models_py3 import PackageDownloadsSensorFullOvf + from ._models_py3 import PackageDownloadsThreatIntelligence from ._models_py3 import PathRecommendation from ._models_py3 import Pricing from ._models_py3 import PricingList from ._models_py3 import ProcessNotAllowed from ._models_py3 import ProtectionMode + from ._models_py3 import ProxyServerProperties from ._models_py3 import PublisherInfo from ._models_py3 import QueuePurgesNotInAllowedRange from ._models_py3 import RecommendationConfigurationProperties @@ -135,6 +162,9 @@ from ._models_py3 import SecurityAssessmentMetadataProperties from ._models_py3 import SecurityAssessmentPartnerData from ._models_py3 import SecurityContact + from ._models_py3 import SecuritySolution + from ._models_py3 import SecuritySolutionsReferenceData + from ._models_py3 import SecuritySolutionsReferenceDataList from ._models_py3 import SecuritySubAssessment from ._models_py3 import SecurityTask from ._models_py3 import SecurityTaskParameters @@ -142,6 +172,7 @@ from ._models_py3 import ServerVulnerabilityAssessment from ._models_py3 import ServerVulnerabilityAssessmentsList from ._models_py3 import ServerVulnerabilityProperties + from ._models_py3 import ServicePrincipalProperties from ._models_py3 import Setting from ._models_py3 import SettingResource from ._models_py3 import SqlServerVulnerabilityProperties @@ -156,6 +187,7 @@ from ._models_py3 import TopologySingleResourceChild from ._models_py3 import TopologySingleResourceParent from ._models_py3 import TrackedResource + from ._models_py3 import TrackedResourceLocation from ._models_py3 import TwinUpdatesNotInAllowedRange from ._models_py3 import UnauthorizedOperationsNotInAllowedRange from ._models_py3 import UpdateIotSecuritySolutionData @@ -169,6 +201,9 @@ from ._models import AadExternalSecuritySolution from ._models import AadSolutionProperties from ._models import ActiveConnectionsNotInAllowedRange + from ._models import AdaptiveApplicationControlGroup + from ._models import AdaptiveApplicationControlGroups + from ._models import AdaptiveApplicationControlIssueSummary from ._models import AdaptiveNetworkHardening from ._models import AdaptiveNetworkHardeningEnforceRequest from ._models import AdditionalData @@ -182,14 +217,12 @@ from ._models import AmqpC2DMessagesNotInAllowedRange from ._models import AmqpC2DRejectedMessagesNotInAllowedRange from ._models import AmqpD2CMessagesNotInAllowedRange - from ._models import AppWhitelistingGroup - from ._models import AppWhitelistingGroups - from ._models import AppWhitelistingIssueSummary from ._models import AscLocation from ._models import AssessmentLinks from ._models import AssessmentStatus from ._models import AtaExternalSecuritySolution from ._models import AtaSolutionProperties + from ._models import AuthenticationDetailsProperties from ._models import Automation from ._models import AutomationAction from ._models import AutomationActionEventHub @@ -201,6 +234,8 @@ from ._models import AutomationTriggeringRule from ._models import AutomationValidationStatus from ._models import AutoProvisioningSetting + from ._models import AwAssumeRoleAuthenticationDetailsProperties + from ._models import AwsCredsAuthenticationDetailsProperties from ._models import AzureResourceDetails from ._models import AzureResourceLink from ._models import CefExternalSecuritySolution @@ -212,6 +247,7 @@ from ._models import ConnectedResource from ._models import ConnectedWorkspace from ._models import ConnectionToIpNotAllowed + from ._models import ConnectorSetting from ._models import ContainerRegistryVulnerabilityProperties from ._models import CustomAlertRule from ._models import CVE @@ -228,12 +264,22 @@ from ._models import ExternalSecuritySolutionProperties from ._models import FailedLocalLoginsNotInAllowedRange from ._models import FileUploadsNotInAllowedRange + from ._models import GcpCredentialsDetailsProperties from ._models import HttpC2DMessagesNotInAllowedRange from ._models import HttpC2DRejectedMessagesNotInAllowedRange from ._models import HttpD2CMessagesNotInAllowedRange + from ._models import HybridComputeSettingsProperties from ._models import InformationProtectionKeyword from ._models import InformationProtectionPolicy from ._models import InformationType + from ._models import IotAlert + from ._models import IotAlertType + from ._models import IotAlertTypeList + from ._models import IotDefenderSettingsList + from ._models import IotDefenderSettingsModel + from ._models import IotRecommendation + from ._models import IotRecommendationType + from ._models import IotRecommendationTypeList from ._models import IoTSecurityAggregatedAlert from ._models import IoTSecurityAggregatedAlertPropertiesTopDevicesListItem from ._models import IoTSecurityAggregatedRecommendation @@ -244,6 +290,8 @@ from ._models import IoTSecuritySolutionAnalyticsModelList from ._models import IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem from ._models import IoTSecuritySolutionModel + from ._models import IotSensor + from ._models import IotSensorsList from ._models import IoTSeverityMetrics from ._models import JitNetworkAccessPolicy from ._models import JitNetworkAccessPolicyInitiatePort @@ -262,13 +310,24 @@ from ._models import MqttC2DRejectedMessagesNotInAllowedRange from ._models import MqttD2CMessagesNotInAllowedRange from ._models import OnPremiseResourceDetails + from ._models import OnPremiseSqlResourceDetails from ._models import Operation from ._models import OperationDisplay + from ._models import PackageDownloadInfo + from ._models import PackageDownloads + from ._models import PackageDownloadsCentralManager + from ._models import PackageDownloadsCentralManagerFull + from ._models import PackageDownloadsCentralManagerFullOvf + from ._models import PackageDownloadsSensor + from ._models import PackageDownloadsSensorFull + from ._models import PackageDownloadsSensorFullOvf + from ._models import PackageDownloadsThreatIntelligence from ._models import PathRecommendation from ._models import Pricing from ._models import PricingList from ._models import ProcessNotAllowed from ._models import ProtectionMode + from ._models import ProxyServerProperties from ._models import PublisherInfo from ._models import QueuePurgesNotInAllowedRange from ._models import RecommendationConfigurationProperties @@ -290,6 +349,9 @@ from ._models import SecurityAssessmentMetadataProperties from ._models import SecurityAssessmentPartnerData from ._models import SecurityContact + from ._models import SecuritySolution + from ._models import SecuritySolutionsReferenceData + from ._models import SecuritySolutionsReferenceDataList from ._models import SecuritySubAssessment from ._models import SecurityTask from ._models import SecurityTaskParameters @@ -297,6 +359,7 @@ from ._models import ServerVulnerabilityAssessment from ._models import ServerVulnerabilityAssessmentsList from ._models import ServerVulnerabilityProperties + from ._models import ServicePrincipalProperties from ._models import Setting from ._models import SettingResource from ._models import SqlServerVulnerabilityProperties @@ -311,6 +374,7 @@ from ._models import TopologySingleResourceChild from ._models import TopologySingleResourceParent from ._models import TrackedResource + from ._models import TrackedResourceLocation from ._models import TwinUpdatesNotInAllowedRange from ._models import UnauthorizedOperationsNotInAllowedRange from ._models import UpdateIotSecuritySolutionData @@ -328,10 +392,13 @@ from ._paged_models import AutoProvisioningSettingPaged from ._paged_models import CompliancePaged from ._paged_models import ComplianceResultPaged +from ._paged_models import ConnectorSettingPaged from ._paged_models import DeviceSecurityGroupPaged from ._paged_models import DiscoveredSecuritySolutionPaged from ._paged_models import ExternalSecuritySolutionPaged from ._paged_models import InformationProtectionPolicyPaged +from ._paged_models import IotAlertPaged +from ._paged_models import IotRecommendationPaged from ._paged_models import IoTSecurityAggregatedAlertPaged from ._paged_models import IoTSecurityAggregatedRecommendationPaged from ._paged_models import IoTSecuritySolutionModelPaged @@ -346,6 +413,7 @@ from ._paged_models import SecurityAssessmentMetadataPaged from ._paged_models import SecurityAssessmentPaged from ._paged_models import SecurityContactPaged +from ._paged_models import SecuritySolutionPaged from ._paged_models import SecuritySubAssessmentPaged from ._paged_models import SecurityTaskPaged from ._paged_models import SettingPaged @@ -362,6 +430,9 @@ RecommendationType, RecommendationConfigStatus, UnmaskedIpLoggingStatus, + AlertSeverity, + AlertIntent, + RecommendationSeverity, AutoProvision, Rank, AlertNotifications, @@ -388,6 +459,11 @@ AadConnectivityState, ExternalSecuritySolutionKind, ControlType, + ProvisioningState, + HybridComputeProvisioningState, + AuthenticationProvisioningState, + PermissionProperty, + VersionKind, ExpandEnum, ConnectionType, ExpandControlsEnum, @@ -398,6 +474,9 @@ 'AadExternalSecuritySolution', 'AadSolutionProperties', 'ActiveConnectionsNotInAllowedRange', + 'AdaptiveApplicationControlGroup', + 'AdaptiveApplicationControlGroups', + 'AdaptiveApplicationControlIssueSummary', 'AdaptiveNetworkHardening', 'AdaptiveNetworkHardeningEnforceRequest', 'AdditionalData', @@ -411,14 +490,12 @@ 'AmqpC2DMessagesNotInAllowedRange', 'AmqpC2DRejectedMessagesNotInAllowedRange', 'AmqpD2CMessagesNotInAllowedRange', - 'AppWhitelistingGroup', - 'AppWhitelistingGroups', - 'AppWhitelistingIssueSummary', 'AscLocation', 'AssessmentLinks', 'AssessmentStatus', 'AtaExternalSecuritySolution', 'AtaSolutionProperties', + 'AuthenticationDetailsProperties', 'Automation', 'AutomationAction', 'AutomationActionEventHub', @@ -430,6 +507,8 @@ 'AutomationTriggeringRule', 'AutomationValidationStatus', 'AutoProvisioningSetting', + 'AwAssumeRoleAuthenticationDetailsProperties', + 'AwsCredsAuthenticationDetailsProperties', 'AzureResourceDetails', 'AzureResourceLink', 'CefExternalSecuritySolution', @@ -441,6 +520,7 @@ 'ConnectedResource', 'ConnectedWorkspace', 'ConnectionToIpNotAllowed', + 'ConnectorSetting', 'ContainerRegistryVulnerabilityProperties', 'CustomAlertRule', 'CVE', @@ -457,12 +537,22 @@ 'ExternalSecuritySolutionProperties', 'FailedLocalLoginsNotInAllowedRange', 'FileUploadsNotInAllowedRange', + 'GcpCredentialsDetailsProperties', 'HttpC2DMessagesNotInAllowedRange', 'HttpC2DRejectedMessagesNotInAllowedRange', 'HttpD2CMessagesNotInAllowedRange', + 'HybridComputeSettingsProperties', 'InformationProtectionKeyword', 'InformationProtectionPolicy', 'InformationType', + 'IotAlert', + 'IotAlertType', + 'IotAlertTypeList', + 'IotDefenderSettingsList', + 'IotDefenderSettingsModel', + 'IotRecommendation', + 'IotRecommendationType', + 'IotRecommendationTypeList', 'IoTSecurityAggregatedAlert', 'IoTSecurityAggregatedAlertPropertiesTopDevicesListItem', 'IoTSecurityAggregatedRecommendation', @@ -473,6 +563,8 @@ 'IoTSecuritySolutionAnalyticsModelList', 'IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem', 'IoTSecuritySolutionModel', + 'IotSensor', + 'IotSensorsList', 'IoTSeverityMetrics', 'JitNetworkAccessPolicy', 'JitNetworkAccessPolicyInitiatePort', @@ -491,13 +583,24 @@ 'MqttC2DRejectedMessagesNotInAllowedRange', 'MqttD2CMessagesNotInAllowedRange', 'OnPremiseResourceDetails', + 'OnPremiseSqlResourceDetails', 'Operation', 'OperationDisplay', + 'PackageDownloadInfo', + 'PackageDownloads', + 'PackageDownloadsCentralManager', + 'PackageDownloadsCentralManagerFull', + 'PackageDownloadsCentralManagerFullOvf', + 'PackageDownloadsSensor', + 'PackageDownloadsSensorFull', + 'PackageDownloadsSensorFullOvf', + 'PackageDownloadsThreatIntelligence', 'PathRecommendation', 'Pricing', 'PricingList', 'ProcessNotAllowed', 'ProtectionMode', + 'ProxyServerProperties', 'PublisherInfo', 'QueuePurgesNotInAllowedRange', 'RecommendationConfigurationProperties', @@ -519,6 +622,9 @@ 'SecurityAssessmentMetadataProperties', 'SecurityAssessmentPartnerData', 'SecurityContact', + 'SecuritySolution', + 'SecuritySolutionsReferenceData', + 'SecuritySolutionsReferenceDataList', 'SecuritySubAssessment', 'SecurityTask', 'SecurityTaskParameters', @@ -526,6 +632,7 @@ 'ServerVulnerabilityAssessment', 'ServerVulnerabilityAssessmentsList', 'ServerVulnerabilityProperties', + 'ServicePrincipalProperties', 'Setting', 'SettingResource', 'SqlServerVulnerabilityProperties', @@ -540,6 +647,7 @@ 'TopologySingleResourceChild', 'TopologySingleResourceParent', 'TrackedResource', + 'TrackedResourceLocation', 'TwinUpdatesNotInAllowedRange', 'UnauthorizedOperationsNotInAllowedRange', 'UpdateIotSecuritySolutionData', @@ -555,6 +663,8 @@ 'IoTSecuritySolutionModelPaged', 'IoTSecurityAggregatedAlertPaged', 'IoTSecurityAggregatedRecommendationPaged', + 'IotAlertPaged', + 'IotRecommendationPaged', 'AscLocationPaged', 'OperationPaged', 'SecurityTaskPaged', @@ -580,6 +690,8 @@ 'SecureScoreItemPaged', 'SecureScoreControlDetailsPaged', 'SecureScoreControlDefinitionItemPaged', + 'SecuritySolutionPaged', + 'ConnectorSettingPaged', 'ResourceStatus', 'PricingTier', 'ReportedSeverity', @@ -590,6 +702,9 @@ 'RecommendationType', 'RecommendationConfigStatus', 'UnmaskedIpLoggingStatus', + 'AlertSeverity', + 'AlertIntent', + 'RecommendationSeverity', 'AutoProvision', 'Rank', 'AlertNotifications', @@ -616,6 +731,11 @@ 'AadConnectivityState', 'ExternalSecuritySolutionKind', 'ControlType', + 'ProvisioningState', + 'HybridComputeProvisioningState', + 'AuthenticationProvisioningState', + 'PermissionProperty', + 'VersionKind', 'ExpandEnum', 'ConnectionType', 'ExpandControlsEnum', diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py index d6d9e2596d17..582375222187 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py @@ -381,6 +381,129 @@ def __init__(self, **kwargs): self.rule_type = 'ActiveConnectionsNotInAllowedRange' +class AdaptiveApplicationControlGroup(Model): + """AdaptiveApplicationControlGroup. + + 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 location: Location where the resource is stored + :vartype location: str + :param enforcement_mode: Possible values include: 'Audit', 'Enforce', + 'None' + :type enforcement_mode: str or ~azure.mgmt.security.models.enum + :param protection_mode: + :type protection_mode: ~azure.mgmt.security.models.ProtectionMode + :ivar configuration_status: Possible values include: 'Configured', + 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + :vartype configuration_status: str or ~azure.mgmt.security.models.enum + :ivar recommendation_status: Possible values include: 'Recommended', + 'NotRecommended', 'NotAvailable', 'NoStatus' + :vartype recommendation_status: str or ~azure.mgmt.security.models.enum + :ivar issues: + :vartype issues: + list[~azure.mgmt.security.models.AdaptiveApplicationControlIssueSummary] + :ivar source_system: Possible values include: 'Azure_AppLocker', + 'Azure_AuditD', 'NonAzure_AppLocker', 'NonAzure_AuditD', 'None' + :vartype source_system: str or ~azure.mgmt.security.models.enum + :param vm_recommendations: + :type vm_recommendations: + list[~azure.mgmt.security.models.VmRecommendation] + :param path_recommendations: + :type path_recommendations: + list[~azure.mgmt.security.models.PathRecommendation] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'configuration_status': {'readonly': True}, + 'recommendation_status': {'readonly': True}, + 'issues': {'readonly': True}, + 'source_system': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'enforcement_mode': {'key': 'properties.enforcementMode', 'type': 'str'}, + 'protection_mode': {'key': 'properties.protectionMode', 'type': 'ProtectionMode'}, + 'configuration_status': {'key': 'properties.configurationStatus', 'type': 'str'}, + 'recommendation_status': {'key': 'properties.recommendationStatus', 'type': 'str'}, + 'issues': {'key': 'properties.issues', 'type': '[AdaptiveApplicationControlIssueSummary]'}, + 'source_system': {'key': 'properties.sourceSystem', 'type': 'str'}, + 'vm_recommendations': {'key': 'properties.vmRecommendations', 'type': '[VmRecommendation]'}, + 'path_recommendations': {'key': 'properties.pathRecommendations', 'type': '[PathRecommendation]'}, + } + + def __init__(self, **kwargs): + super(AdaptiveApplicationControlGroup, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.enforcement_mode = kwargs.get('enforcement_mode', None) + self.protection_mode = kwargs.get('protection_mode', None) + self.configuration_status = None + self.recommendation_status = None + self.issues = None + self.source_system = None + self.vm_recommendations = kwargs.get('vm_recommendations', None) + self.path_recommendations = kwargs.get('path_recommendations', None) + + +class AdaptiveApplicationControlGroups(Model): + """Represents a list of machine groups and set of rules that are recommended + by Azure Security Center to be allowed. + + :param value: + :type value: + list[~azure.mgmt.security.models.AdaptiveApplicationControlGroup] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AdaptiveApplicationControlGroup]'}, + } + + def __init__(self, **kwargs): + super(AdaptiveApplicationControlGroups, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class AdaptiveApplicationControlIssueSummary(Model): + """Represents a summary of the alerts of the machine group. + + :param issue: Possible values include: 'ViolationsAudited', + 'ViolationsBlocked', 'MsiAndScriptViolationsAudited', + 'MsiAndScriptViolationsBlocked', 'ExecutableViolationsAudited', + 'RulesViolatedManually' + :type issue: str or ~azure.mgmt.security.models.enum + :param number_of_vms: The number of machines in the group that have this + alert + :type number_of_vms: float + """ + + _attribute_map = { + 'issue': {'key': 'issue', 'type': 'str'}, + 'number_of_vms': {'key': 'numberOfVms', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(AdaptiveApplicationControlIssueSummary, self).__init__(**kwargs) + self.issue = kwargs.get('issue', None) + self.number_of_vms = kwargs.get('number_of_vms', None) + + class Resource(Model): """Describes an Azure resource. @@ -1139,128 +1262,6 @@ def __init__(self, **kwargs): self.rule_type = 'AmqpD2CMessagesNotInAllowedRange' -class AppWhitelistingGroup(Model): - """AppWhitelistingGroup. - - 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 location: Location where the resource is stored - :vartype location: str - :param enforcement_mode: Possible values include: 'Audit', 'Enforce', - 'None' - :type enforcement_mode: str or ~azure.mgmt.security.models.enum - :param protection_mode: - :type protection_mode: ~azure.mgmt.security.models.ProtectionMode - :ivar configuration_status: Possible values include: 'Configured', - 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' - :vartype configuration_status: str or ~azure.mgmt.security.models.enum - :ivar recommendation_status: Possible values include: 'Recommended', - 'NotRecommended', 'NotAvailable', 'NoStatus' - :vartype recommendation_status: str or ~azure.mgmt.security.models.enum - :ivar issues: - :vartype issues: - list[~azure.mgmt.security.models.AppWhitelistingIssueSummary] - :ivar source_system: Possible values include: 'Azure_AppLocker', - 'Azure_AuditD', 'NonAzure_AppLocker', 'NonAzure_AuditD', 'None' - :vartype source_system: str or ~azure.mgmt.security.models.enum - :param vm_recommendations: - :type vm_recommendations: - list[~azure.mgmt.security.models.VmRecommendation] - :param path_recommendations: - :type path_recommendations: - list[~azure.mgmt.security.models.PathRecommendation] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'configuration_status': {'readonly': True}, - 'recommendation_status': {'readonly': True}, - 'issues': {'readonly': True}, - 'source_system': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'enforcement_mode': {'key': 'properties.enforcementMode', 'type': 'str'}, - 'protection_mode': {'key': 'properties.protectionMode', 'type': 'ProtectionMode'}, - 'configuration_status': {'key': 'properties.configurationStatus', 'type': 'str'}, - 'recommendation_status': {'key': 'properties.recommendationStatus', 'type': 'str'}, - 'issues': {'key': 'properties.issues', 'type': '[AppWhitelistingIssueSummary]'}, - 'source_system': {'key': 'properties.sourceSystem', 'type': 'str'}, - 'vm_recommendations': {'key': 'properties.vmRecommendations', 'type': '[VmRecommendation]'}, - 'path_recommendations': {'key': 'properties.pathRecommendations', 'type': '[PathRecommendation]'}, - } - - def __init__(self, **kwargs): - super(AppWhitelistingGroup, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.enforcement_mode = kwargs.get('enforcement_mode', None) - self.protection_mode = kwargs.get('protection_mode', None) - self.configuration_status = None - self.recommendation_status = None - self.issues = None - self.source_system = None - self.vm_recommendations = kwargs.get('vm_recommendations', None) - self.path_recommendations = kwargs.get('path_recommendations', None) - - -class AppWhitelistingGroups(Model): - """Represents a list of VM/server groups and set of rules that are Recommended - by Azure Security Center to be allowed. - - :param value: - :type value: list[~azure.mgmt.security.models.AppWhitelistingGroup] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[AppWhitelistingGroup]'}, - } - - def __init__(self, **kwargs): - super(AppWhitelistingGroups, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class AppWhitelistingIssueSummary(Model): - """Represents a summary of the alerts of the VM/server group. - - :param issue: Possible values include: 'ViolationsAudited', - 'ViolationsBlocked', 'MsiAndScriptViolationsAudited', - 'MsiAndScriptViolationsBlocked', 'ExecutableViolationsAudited', - 'RulesViolatedManually' - :type issue: str or ~azure.mgmt.security.models.enum - :param number_of_vms: The number of machines in the VM/server group that - have this alert - :type number_of_vms: float - """ - - _attribute_map = { - 'issue': {'key': 'issue', 'type': 'str'}, - 'number_of_vms': {'key': 'numberOfVms', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(AppWhitelistingIssueSummary, self).__init__(**kwargs) - self.issue = kwargs.get('issue', None) - self.number_of_vms = kwargs.get('number_of_vms', None) - - class AscLocation(Resource): """The ASC location of the subscription is in the "name" field. @@ -1452,6 +1453,54 @@ def __init__(self, **kwargs): self.last_event_received = kwargs.get('last_event_received', None) +class AuthenticationDetailsProperties(Model): + """Settings for cloud authentication management. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AwsCredsAuthenticationDetailsProperties, + AwAssumeRoleAuthenticationDetailsProperties, + GcpCredentialsDetailsProperties + + 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 authentication_provisioning_state: State of the multi-cloud + connector. Possible values include: 'Valid', 'Invalid', 'Expired', + 'IncorrectPolicy' + :vartype authentication_provisioning_state: str or + ~azure.mgmt.security.models.AuthenticationProvisioningState + :ivar granted_permissions: The permissions detected in the cloud account. + :vartype granted_permissions: list[str or + ~azure.mgmt.security.models.PermissionProperty] + :param authentication_type: Required. Constant filled by server. + :type authentication_type: str + """ + + _validation = { + 'authentication_provisioning_state': {'readonly': True}, + 'granted_permissions': {'readonly': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'authentication_provisioning_state': {'key': 'authenticationProvisioningState', 'type': 'str'}, + 'granted_permissions': {'key': 'grantedPermissions', 'type': '[str]'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + } + + _subtype_map = { + 'authentication_type': {'awsCreds': 'AwsCredsAuthenticationDetailsProperties', 'awsAssumeRole': 'AwAssumeRoleAuthenticationDetailsProperties', 'gcpCredentials': 'GcpCredentialsDetailsProperties'} + } + + def __init__(self, **kwargs): + super(AuthenticationDetailsProperties, self).__init__(**kwargs) + self.authentication_provisioning_state = None + self.granted_permissions = None + self.authentication_type = None + + class TrackedResource(Model): """Describes an Azure tracked resource. @@ -1464,8 +1513,8 @@ class TrackedResource(Model): :vartype name: str :ivar type: Resource type :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str + :param location: Location where the resource is stored + :type location: str :param kind: Kind of the resource :type kind: str :param etag: Entity tag is used for comparing two or more entities from @@ -1479,7 +1528,6 @@ class TrackedResource(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'readonly': True}, } _attribute_map = { @@ -1497,7 +1545,7 @@ def __init__(self, **kwargs): self.id = None self.name = None self.type = None - self.location = None + self.location = kwargs.get('location', None) self.kind = kwargs.get('kind', None) self.etag = kwargs.get('etag', None) self.tags = kwargs.get('tags', None) @@ -1515,8 +1563,8 @@ class Automation(TrackedResource): :vartype name: str :ivar type: Resource type :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str + :param location: Location where the resource is stored + :type location: str :param kind: Kind of the resource :type kind: str :param etag: Entity tag is used for comparing two or more entities from @@ -1545,7 +1593,6 @@ class Automation(TrackedResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'readonly': True}, } _attribute_map = { @@ -1759,7 +1806,7 @@ class AutomationSource(Model): https://aka.ms/ASCAutomationSchemas. :param event_source: A valid event source type. Possible values include: - 'Assessments', 'Alerts' + 'Assessments', 'SubAssessments', 'Alerts' :type event_source: str or ~azure.mgmt.security.models.EventSource :param rule_sets: A set of rules which evaluate upon event interception. A logical disjunction is applied between defined rule sets (logical 'or'). @@ -1871,20 +1918,135 @@ def __init__(self, **kwargs): self.auto_provision = kwargs.get('auto_provision', None) -class ResourceDetails(Model): - """Details of the resource that was assessed. +class AwAssumeRoleAuthenticationDetailsProperties(AuthenticationDetailsProperties): + """AWS cloud account connector based assume role, the role enables delegating + access to your AWS resources. The role is composed of role arn and external + id, for more details, refer to Creating + a Role to Delegate Permissions to an IAM User (write only). - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: OnPremiseResourceDetails, AzureResourceDetails + 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 source: Required. Constant filled by server. - :type source: str + :ivar authentication_provisioning_state: State of the multi-cloud + connector. Possible values include: 'Valid', 'Invalid', 'Expired', + 'IncorrectPolicy' + :vartype authentication_provisioning_state: str or + ~azure.mgmt.security.models.AuthenticationProvisioningState + :ivar granted_permissions: The permissions detected in the cloud account. + :vartype granted_permissions: list[str or + ~azure.mgmt.security.models.PermissionProperty] + :param authentication_type: Required. Constant filled by server. + :type authentication_type: str + :ivar account_id: The ID of the cloud account + :vartype account_id: str + :param aws_assume_role_arn: Required. Assumed role ID is an identifier + that you can use to create temporary security credentials. + :type aws_assume_role_arn: str + :param aws_external_id: Required. A unique identifier that is required + when you assume a role in another account. + :type aws_external_id: str """ _validation = { - 'source': {'required': True}, + 'authentication_provisioning_state': {'readonly': True}, + 'granted_permissions': {'readonly': True}, + 'authentication_type': {'required': True}, + 'account_id': {'readonly': True}, + 'aws_assume_role_arn': {'required': True}, + 'aws_external_id': {'required': True}, + } + + _attribute_map = { + 'authentication_provisioning_state': {'key': 'authenticationProvisioningState', 'type': 'str'}, + 'granted_permissions': {'key': 'grantedPermissions', 'type': '[str]'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'aws_assume_role_arn': {'key': 'awsAssumeRoleArn', 'type': 'str'}, + 'aws_external_id': {'key': 'awsExternalId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AwAssumeRoleAuthenticationDetailsProperties, self).__init__(**kwargs) + self.account_id = None + self.aws_assume_role_arn = kwargs.get('aws_assume_role_arn', None) + self.aws_external_id = kwargs.get('aws_external_id', None) + self.authentication_type = 'awsAssumeRole' + + +class AwsCredsAuthenticationDetailsProperties(AuthenticationDetailsProperties): + """AWS cloud account connector based credentials, the credentials is composed + of access key id and secret key, for more details, refer to Creating + an IAM User in Your AWS Account (write only). + + 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 authentication_provisioning_state: State of the multi-cloud + connector. Possible values include: 'Valid', 'Invalid', 'Expired', + 'IncorrectPolicy' + :vartype authentication_provisioning_state: str or + ~azure.mgmt.security.models.AuthenticationProvisioningState + :ivar granted_permissions: The permissions detected in the cloud account. + :vartype granted_permissions: list[str or + ~azure.mgmt.security.models.PermissionProperty] + :param authentication_type: Required. Constant filled by server. + :type authentication_type: str + :ivar account_id: The ID of the cloud account + :vartype account_id: str + :param aws_access_key_id: Required. Public key element of the AWS + credential object (write only) + :type aws_access_key_id: str + :param aws_secret_access_key: Required. Secret key element of the AWS + credential object (write only) + :type aws_secret_access_key: str + """ + + _validation = { + 'authentication_provisioning_state': {'readonly': True}, + 'granted_permissions': {'readonly': True}, + 'authentication_type': {'required': True}, + 'account_id': {'readonly': True}, + 'aws_access_key_id': {'required': True}, + 'aws_secret_access_key': {'required': True}, + } + + _attribute_map = { + 'authentication_provisioning_state': {'key': 'authenticationProvisioningState', 'type': 'str'}, + 'granted_permissions': {'key': 'grantedPermissions', 'type': '[str]'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'aws_access_key_id': {'key': 'awsAccessKeyId', 'type': 'str'}, + 'aws_secret_access_key': {'key': 'awsSecretAccessKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AwsCredsAuthenticationDetailsProperties, self).__init__(**kwargs) + self.account_id = None + self.aws_access_key_id = kwargs.get('aws_access_key_id', None) + self.aws_secret_access_key = kwargs.get('aws_secret_access_key', None) + self.authentication_type = 'awsCreds' + + +class ResourceDetails(Model): + """Details of the resource that was assessed. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: OnPremiseResourceDetails, AzureResourceDetails + + All required parameters must be populated in order to send to Azure. + + :param source: Required. Constant filled by server. + :type source: str + """ + + _validation = { + 'source': {'required': True}, } _attribute_map = { @@ -2329,6 +2491,48 @@ def __init__(self, **kwargs): self.rule_type = 'ConnectionToIpNotAllowed' +class ConnectorSetting(Resource): + """The connector setting. + + 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 hybrid_compute_settings: Settings for hybrid compute management, + these settings are relevant only Arc autoProvision (Hybrid Compute). + :type hybrid_compute_settings: + ~azure.mgmt.security.models.HybridComputeSettingsProperties + :param authentication_details: Settings for authentication management, + these settings are relevant only for the cloud connector. + :type authentication_details: + ~azure.mgmt.security.models.AuthenticationDetailsProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'hybrid_compute_settings': {'key': 'properties.hybridComputeSettings', 'type': 'HybridComputeSettingsProperties'}, + 'authentication_details': {'key': 'properties.authenticationDetails', 'type': 'AuthenticationDetailsProperties'}, + } + + def __init__(self, **kwargs): + super(ConnectorSetting, self).__init__(**kwargs) + self.hybrid_compute_settings = kwargs.get('hybrid_compute_settings', None) + self.authentication_details = kwargs.get('authentication_details', None) + + class ContainerRegistryVulnerabilityProperties(AdditionalData): """Additional context fields for container registry Vulnerability assessment. @@ -2943,6 +3147,106 @@ def __init__(self, **kwargs): self.rule_type = 'FileUploadsNotInAllowedRange' +class GcpCredentialsDetailsProperties(AuthenticationDetailsProperties): + """GCP cloud account connector based service to service credentials, the + credentials is composed of organization id and json api key (write + only). + + 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 authentication_provisioning_state: State of the multi-cloud + connector. Possible values include: 'Valid', 'Invalid', 'Expired', + 'IncorrectPolicy' + :vartype authentication_provisioning_state: str or + ~azure.mgmt.security.models.AuthenticationProvisioningState + :ivar granted_permissions: The permissions detected in the cloud account. + :vartype granted_permissions: list[str or + ~azure.mgmt.security.models.PermissionProperty] + :param authentication_type: Required. Constant filled by server. + :type authentication_type: str + :param organization_id: Required. The Organization ID of the GCP cloud + account + :type organization_id: str + :param type: Required. Type field of the API key (write only) + :type type: str + :param project_id: Required. Project Id field of the API key (write only) + :type project_id: str + :param private_key_id: Required. Private key Id field of the API key + (write only) + :type private_key_id: str + :param private_key: Required. Private key field of the API key (write + only) + :type private_key: str + :param client_email: Required. Client email field of the API key (write + only) + :type client_email: str + :param client_id: Required. Client Id field of the API key (write only) + :type client_id: str + :param auth_uri: Required. Auth Uri field of the API key (write only) + :type auth_uri: str + :param token_uri: Required. Token Uri field of the API key (write only) + :type token_uri: str + :param auth_provider_x509_cert_url: Required. Auth provider x509 + certificate url field of the API key (write only) + :type auth_provider_x509_cert_url: str + :param client_x509_cert_url: Required. Client x509 certificate url field + of the API key (write only) + :type client_x509_cert_url: str + """ + + _validation = { + 'authentication_provisioning_state': {'readonly': True}, + 'granted_permissions': {'readonly': True}, + 'authentication_type': {'required': True}, + 'organization_id': {'required': True}, + 'type': {'required': True}, + 'project_id': {'required': True}, + 'private_key_id': {'required': True}, + 'private_key': {'required': True}, + 'client_email': {'required': True}, + 'client_id': {'required': True}, + 'auth_uri': {'required': True}, + 'token_uri': {'required': True}, + 'auth_provider_x509_cert_url': {'required': True}, + 'client_x509_cert_url': {'required': True}, + } + + _attribute_map = { + 'authentication_provisioning_state': {'key': 'authenticationProvisioningState', 'type': 'str'}, + 'granted_permissions': {'key': 'grantedPermissions', 'type': '[str]'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'organization_id': {'key': 'organizationId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'private_key_id': {'key': 'privateKeyId', 'type': 'str'}, + 'private_key': {'key': 'privateKey', 'type': 'str'}, + 'client_email': {'key': 'clientEmail', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'auth_uri': {'key': 'authUri', 'type': 'str'}, + 'token_uri': {'key': 'tokenUri', 'type': 'str'}, + 'auth_provider_x509_cert_url': {'key': 'authProviderX509CertUrl', 'type': 'str'}, + 'client_x509_cert_url': {'key': 'clientX509CertUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GcpCredentialsDetailsProperties, self).__init__(**kwargs) + self.organization_id = kwargs.get('organization_id', None) + self.type = kwargs.get('type', None) + self.project_id = kwargs.get('project_id', None) + self.private_key_id = kwargs.get('private_key_id', None) + self.private_key = kwargs.get('private_key', None) + self.client_email = kwargs.get('client_email', None) + self.client_id = kwargs.get('client_id', None) + self.auth_uri = kwargs.get('auth_uri', None) + self.token_uri = kwargs.get('token_uri', None) + self.auth_provider_x509_cert_url = kwargs.get('auth_provider_x509_cert_url', None) + self.client_x509_cert_url = kwargs.get('client_x509_cert_url', None) + self.authentication_type = 'gcpCredentials' + + class HttpC2DMessagesNotInAllowedRange(TimeWindowCustomAlertRule): """Number of cloud to device messages (HTTP protocol) is not in allowed range. @@ -3091,6 +3395,61 @@ def __init__(self, **kwargs): self.rule_type = 'HttpD2CMessagesNotInAllowedRange' +class HybridComputeSettingsProperties(Model): + """Settings for hybrid compute management. + + 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 hybrid_compute_provisioning_state: State of the service principal + and its secret. Possible values include: 'Valid', 'Invalid', 'Expired' + :vartype hybrid_compute_provisioning_state: str or + ~azure.mgmt.security.models.HybridComputeProvisioningState + :param auto_provision: Required. Whether or not to automatically install + Azure Arc (hybrid compute) agents on machines. Possible values include: + 'On', 'Off' + :type auto_provision: str or ~azure.mgmt.security.models.AutoProvision + :param resource_group_name: The name of the resource group where Arc + (Hybrid Compute) connectors are connected. + :type resource_group_name: str + :param region: The location where the meta data of machines will be stored + :type region: str + :param proxy_server: For a non-Azure machine that is not connected + directly to the internet, specify a proxy server that the non-Azure + machine can use. + :type proxy_server: ~azure.mgmt.security.models.ProxyServerProperties + :param service_principal: An object to access resources that are secured + by an Azure AD tenant. + :type service_principal: + ~azure.mgmt.security.models.ServicePrincipalProperties + """ + + _validation = { + 'hybrid_compute_provisioning_state': {'readonly': True}, + 'auto_provision': {'required': True}, + } + + _attribute_map = { + 'hybrid_compute_provisioning_state': {'key': 'hybridComputeProvisioningState', 'type': 'str'}, + 'auto_provision': {'key': 'autoProvision', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'proxy_server': {'key': 'proxyServer', 'type': 'ProxyServerProperties'}, + 'service_principal': {'key': 'servicePrincipal', 'type': 'ServicePrincipalProperties'}, + } + + def __init__(self, **kwargs): + super(HybridComputeSettingsProperties, self).__init__(**kwargs) + self.hybrid_compute_provisioning_state = None + self.auto_provision = kwargs.get('auto_provision', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.region = kwargs.get('region', None) + self.proxy_server = kwargs.get('proxy_server', None) + self.service_principal = kwargs.get('service_principal', None) + + class InformationProtectionKeyword(Model): """The information type keyword. @@ -3212,8 +3571,64 @@ def __init__(self, **kwargs): self.keywords = kwargs.get('keywords', None) -class IoTSecurityAggregatedAlert(Model): - """Security Solution Aggregated Alert information. +class IotAlert(Model): + """IoT alert. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar system_alert_id: Holds the product canonical identifier of the alert + within the scope of a product + :vartype system_alert_id: str + :ivar compromised_entity: Display name of the main entity being reported + on + :vartype compromised_entity: str + :ivar alert_type: The type name of the alert + :vartype alert_type: str + :ivar start_time_utc: The impact start time of the alert (the time of the + first event or activity included in the alert) + :vartype start_time_utc: str + :ivar end_time_utc: The impact end time of the alert (the time of the last + event or activity included in the alert) + :vartype end_time_utc: str + :param entities: A list of entities related to the alert + :type entities: list[object] + :param extended_properties: A bag of fields which extends the alert + information + :type extended_properties: object + """ + + _validation = { + 'system_alert_id': {'readonly': True}, + 'compromised_entity': {'readonly': True}, + 'alert_type': {'readonly': True}, + 'start_time_utc': {'readonly': True}, + 'end_time_utc': {'readonly': True}, + } + + _attribute_map = { + 'system_alert_id': {'key': 'properties.systemAlertId', 'type': 'str'}, + 'compromised_entity': {'key': 'properties.compromisedEntity', 'type': 'str'}, + 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, + 'start_time_utc': {'key': 'properties.startTimeUtc', 'type': 'str'}, + 'end_time_utc': {'key': 'properties.endTimeUtc', 'type': 'str'}, + 'entities': {'key': 'properties.entities', 'type': '[object]'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(IotAlert, self).__init__(**kwargs) + self.system_alert_id = None + self.compromised_entity = None + self.alert_type = None + self.start_time_utc = None + self.end_time_utc = None + self.entities = kwargs.get('entities', None) + self.extended_properties = kwargs.get('extended_properties', None) + + +class IotAlertType(Resource): + """IoT alert type. Variables are only populated by the server, and will be ignored when sending a request. @@ -3224,139 +3639,118 @@ class IoTSecurityAggregatedAlert(Model): :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. + :ivar alert_display_name: The display name of the alert :vartype alert_display_name: str - :ivar aggregated_date_utc: Date of detection. - :vartype aggregated_date_utc: date - :ivar vendor_name: Name of the organization that raised the alert. - :vartype vendor_name: str - :ivar reported_severity: Assessed alert severity. Possible values include: + :ivar severity: The severity of the 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 + :vartype severity: str or ~azure.mgmt.security.models.AlertSeverity :ivar description: Description of the suspected vulnerability and meaning. :vartype description: str - :ivar count: Number of alerts occurrences within the aggregated time - window. - :vartype count: int - :ivar effected_resource_type: Azure resource ID of the resource that - received 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: IoT Security solution alert response. - :vartype action_taken: str - :ivar log_analytics_query: Log analytics query for getting the list of - affected devices/alerts. - :vartype log_analytics_query: str - :ivar top_devices_list: 10 devices with the highest number of occurrences - of this alert type, on this day. - :vartype top_devices_list: - list[~azure.mgmt.security.models.IoTSecurityAggregatedAlertPropertiesTopDevicesListItem] + :ivar provider_name: The name of the alert provider or internal partner + :vartype provider_name: str + :ivar product_name: The name of the product which published this alert + :vartype product_name: str + :ivar product_component_name: The name of a component inside the product + which generated the alert + :vartype product_component_name: str + :ivar vendor_name: The name of the vendor that raise the alert + :vartype vendor_name: str + :ivar intent: Kill chain related intent behind the alert. Could contain + multiple enum values (separated by commas). Possible values include: + 'Unknown', 'PreAttack', 'InitialAccess', 'Persistence', + 'PrivilegeEscalation', 'DefenseEvasion', 'CredentialAccess', 'Discovery', + 'LateralMovement', 'Execution', 'Collection', 'Exfiltration', + 'CommandAndControl', 'Impact', 'Probing', 'Exploitation' + :vartype intent: str or ~azure.mgmt.security.models.AlertIntent + :ivar remediation_steps: Manual action items to take to remediate the + alert + :vartype remediation_steps: list[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}, + 'severity': {'readonly': True}, + 'description': {'readonly': True}, + 'provider_name': {'readonly': True}, + 'product_name': {'readonly': True}, + 'product_component_name': {'readonly': True}, 'vendor_name': {'readonly': True}, - 'reported_severity': {'readonly': True}, + 'intent': {'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}, - 'top_devices_list': {'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'}, + 'severity': {'key': 'properties.severity', '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'}, - 'top_devices_list': {'key': 'properties.topDevicesList', 'type': '[IoTSecurityAggregatedAlertPropertiesTopDevicesListItem]'}, + 'provider_name': {'key': 'properties.providerName', 'type': 'str'}, + 'product_name': {'key': 'properties.productName', 'type': 'str'}, + 'product_component_name': {'key': 'properties.productComponentName', 'type': 'str'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'intent': {'key': 'properties.intent', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', '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 + super(IotAlertType, self).__init__(**kwargs) self.alert_display_name = None - self.aggregated_date_utc = None + self.severity = None + self.description = None + self.provider_name = None + self.product_name = None + self.product_component_name = None self.vendor_name = None - self.reported_severity = None + self.intent = 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 - self.top_devices_list = None -class IoTSecurityAggregatedAlertPropertiesTopDevicesListItem(Model): - """IoTSecurityAggregatedAlertPropertiesTopDevicesListItem. +class IotAlertTypeList(Model): + """List of alert types. + + :param value: List data + :type value: list[~azure.mgmt.security.models.IotAlertType] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IotAlertType]'}, + } + + def __init__(self, **kwargs): + super(IotAlertTypeList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class IotDefenderSettingsList(Model): + """List of IoT Defender settings. Variables are only populated by the server, and will be ignored when sending a request. - :ivar device_id: Name of the device. - :vartype device_id: str - :ivar alerts_count: Number of alerts raised for this device. - :vartype alerts_count: int - :ivar last_occurrence: Most recent time this alert was raised for this - device, on this day. - :vartype last_occurrence: str + :ivar value: List data + :vartype value: list[~azure.mgmt.security.models.IotDefenderSettingsModel] """ _validation = { - 'device_id': {'readonly': True}, - 'alerts_count': {'readonly': True}, - 'last_occurrence': {'readonly': True}, + 'value': {'readonly': True}, } _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, - 'last_occurrence': {'key': 'lastOccurrence', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[IotDefenderSettingsModel]'}, } def __init__(self, **kwargs): - super(IoTSecurityAggregatedAlertPropertiesTopDevicesListItem, self).__init__(**kwargs) - self.device_id = None - self.alerts_count = None - self.last_occurrence = None + super(IotDefenderSettingsList, self).__init__(**kwargs) + self.value = None -class IoTSecurityAggregatedRecommendation(Model): - """IoT Security solution recommendation information. +class IotDefenderSettingsModel(Resource): + """IoT Defender settings. Variables are only populated by the server, and will be ignored when sending a request. @@ -3367,27 +3761,351 @@ class IoTSecurityAggregatedRecommendation(Model): :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 suspected vulnerability and meaning. - :vartype description: str - :ivar recommendation_type_id: Recommendation-type GUID. - :vartype recommendation_type_id: str - :ivar detected_by: Name of the organization that made the recommendation. - :vartype detected_by: str - :ivar remediation_steps: Recommended steps for remediation - :vartype remediation_steps: str - :ivar reported_severity: Assessed recommendation severity. Possible values - include: 'Informational', 'Low', 'Medium', 'High' - :vartype reported_severity: str or - ~azure.mgmt.security.models.ReportedSeverity - :ivar healthy_devices: Number of healthy devices within the IoT Security - solution. + :param properties: IoT Defender settings properties + :type properties: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(IotDefenderSettingsModel, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class IotRecommendation(Resource): + """IoT recommendation. + + 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 device_id: Identifier of the device being reported on + :vartype device_id: str + :ivar recommendation_type: The type name of the recommendation + :vartype recommendation_type: str + :ivar discovered_time_utc: The discovery time of the recommendation + :vartype discovered_time_utc: str + :param recommendation_additional_data: A bag of fields which extends the + recommendation information + :type recommendation_additional_data: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'device_id': {'readonly': True}, + 'recommendation_type': {'readonly': True}, + 'discovered_time_utc': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'device_id': {'key': 'properties.deviceId', 'type': 'str'}, + 'recommendation_type': {'key': 'properties.recommendationType', 'type': 'str'}, + 'discovered_time_utc': {'key': 'properties.discoveredTimeUtc', 'type': 'str'}, + 'recommendation_additional_data': {'key': 'properties.recommendationAdditionalData', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(IotRecommendation, self).__init__(**kwargs) + self.device_id = None + self.recommendation_type = None + self.discovered_time_utc = None + self.recommendation_additional_data = kwargs.get('recommendation_additional_data', None) + + +class IotRecommendationType(Resource): + """IoT recommendation type. + + 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 recommendation_display_name: The display name of the recommendation + :vartype recommendation_display_name: str + :ivar severity: The severity of the recommendation. Possible values + include: 'Unknown', 'NotApplicable', 'Healthy', 'OffByPolicy', 'Low', + 'Medium', 'High' + :vartype severity: str or + ~azure.mgmt.security.models.RecommendationSeverity + :ivar description: Description of the suspected vulnerability and meaning. + :vartype description: str + :ivar product_name: The name of the product which published this + recommendation + :vartype product_name: str + :ivar product_component_name: The name of a component inside the product + which generated the recommendation + :vartype product_component_name: str + :ivar vendor_name: The name of the vendor that raised the recommendation + :vartype vendor_name: str + :ivar control: The name of the recommendation's control category + :vartype control: str + :ivar remediation_steps: Manual action items to take to resolve the + recommendation + :vartype remediation_steps: list[str] + :ivar data_source: The alert's data source + :vartype data_source: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'recommendation_display_name': {'readonly': True}, + 'severity': {'readonly': True}, + 'description': {'readonly': True}, + 'product_name': {'readonly': True}, + 'product_component_name': {'readonly': True}, + 'vendor_name': {'readonly': True}, + 'control': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'data_source': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'recommendation_display_name': {'key': 'properties.recommendationDisplayName', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'product_name': {'key': 'properties.productName', 'type': 'str'}, + 'product_component_name': {'key': 'properties.productComponentName', 'type': 'str'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'control': {'key': 'properties.control', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': '[str]'}, + 'data_source': {'key': 'properties.dataSource', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IotRecommendationType, self).__init__(**kwargs) + self.recommendation_display_name = None + self.severity = None + self.description = None + self.product_name = None + self.product_component_name = None + self.vendor_name = None + self.control = None + self.remediation_steps = None + self.data_source = None + + +class IotRecommendationTypeList(Model): + """List of recommendation types. + + :param value: List data + :type value: list[~azure.mgmt.security.models.IotRecommendationType] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IotRecommendationType]'}, + } + + def __init__(self, **kwargs): + super(IotRecommendationTypeList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +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: Date of detection. + :vartype aggregated_date_utc: date + :ivar vendor_name: Name of the organization that raised the alert. + :vartype vendor_name: str + :ivar reported_severity: Assessed alert severity. 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 suspected vulnerability and meaning. + :vartype description: str + :ivar count: Number of alerts occurrences within the aggregated time + window. + :vartype count: int + :ivar effected_resource_type: Azure resource ID of the resource that + received 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: IoT Security solution alert response. + :vartype action_taken: str + :ivar log_analytics_query: Log analytics query for getting the list of + affected devices/alerts. + :vartype log_analytics_query: str + :ivar top_devices_list: 10 devices with the highest number of occurrences + of this alert type, on this day. + :vartype top_devices_list: + list[~azure.mgmt.security.models.IoTSecurityAggregatedAlertPropertiesTopDevicesListItem] + """ + + _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}, + 'top_devices_list': {'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'}, + 'top_devices_list': {'key': 'properties.topDevicesList', 'type': '[IoTSecurityAggregatedAlertPropertiesTopDevicesListItem]'}, + } + + 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 + self.top_devices_list = None + + +class IoTSecurityAggregatedAlertPropertiesTopDevicesListItem(Model): + """IoTSecurityAggregatedAlertPropertiesTopDevicesListItem. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar device_id: Name of the device. + :vartype device_id: str + :ivar alerts_count: Number of alerts raised for this device. + :vartype alerts_count: int + :ivar last_occurrence: Most recent time this alert was raised for this + device, on this day. + :vartype last_occurrence: str + """ + + _validation = { + 'device_id': {'readonly': True}, + 'alerts_count': {'readonly': True}, + 'last_occurrence': {'readonly': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + 'last_occurrence': {'key': 'lastOccurrence', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAggregatedAlertPropertiesTopDevicesListItem, self).__init__(**kwargs) + self.device_id = None + self.alerts_count = None + self.last_occurrence = None + + +class IoTSecurityAggregatedRecommendation(Model): + """IoT 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 suspected vulnerability and meaning. + :vartype description: str + :ivar recommendation_type_id: Recommendation-type GUID. + :vartype recommendation_type_id: str + :ivar detected_by: Name of the organization that made the recommendation. + :vartype detected_by: str + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar reported_severity: Assessed recommendation severity. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar healthy_devices: Number of healthy devices within the IoT Security + solution. :vartype healthy_devices: int :ivar unhealthy_device_count: Number of unhealthy devices within the IoT Security solution. @@ -3761,6 +4479,63 @@ def __init__(self, **kwargs): self.unmasked_ip_logging_status = kwargs.get('unmasked_ip_logging_status', "Disabled") +class IotSensor(Resource): + """IoT sensor. + + 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 properties: IoT sensor properties + :type properties: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(IotSensor, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class IotSensorsList(Model): + """List of IoT sensors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List data + :vartype value: list[~azure.mgmt.security.models.IotSensor] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IotSensor]'}, + } + + def __init__(self, **kwargs): + super(IotSensorsList, self).__init__(**kwargs) + self.value = None + + class IoTSeverityMetrics(Model): """IoT Security solution analytics severity metrics. @@ -4216,16 +4991,66 @@ class Location(Model): } _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Location, self).__init__(**kwargs) + self.location = None + + +class MqttC2DMessagesNotInAllowedRange(TimeWindowCustomAlertRule): + """Number of cloud to device messages (MQTT protocol) is not in allowed range. + + 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 display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Status of the custom alert. + :type is_enabled: bool + :param rule_type: Required. Constant filled by server. + :type rule_type: str + :param min_threshold: Required. The minimum threshold. + :type min_threshold: int + :param max_threshold: Required. The maximum threshold. + :type max_threshold: int + :param time_window_size: Required. The time window size in iso8601 format. + :type time_window_size: timedelta + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'min_threshold': {'required': True}, + 'max_threshold': {'required': True}, + 'time_window_size': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'min_threshold': {'key': 'minThreshold', 'type': 'int'}, + 'max_threshold': {'key': 'maxThreshold', 'type': 'int'}, + 'time_window_size': {'key': 'timeWindowSize', 'type': 'duration'}, } def __init__(self, **kwargs): - super(Location, self).__init__(**kwargs) - self.location = None + super(MqttC2DMessagesNotInAllowedRange, self).__init__(**kwargs) + self.rule_type = 'MqttC2DMessagesNotInAllowedRange' -class MqttC2DMessagesNotInAllowedRange(TimeWindowCustomAlertRule): - """Number of cloud to device messages (MQTT protocol) is not in allowed range. +class MqttC2DRejectedMessagesNotInAllowedRange(TimeWindowCustomAlertRule): + """Number of rejected cloud to device messages (MQTT protocol) is not in + allowed range. Variables are only populated by the server, and will be ignored when sending a request. @@ -4269,13 +5094,12 @@ class MqttC2DMessagesNotInAllowedRange(TimeWindowCustomAlertRule): } def __init__(self, **kwargs): - super(MqttC2DMessagesNotInAllowedRange, self).__init__(**kwargs) - self.rule_type = 'MqttC2DMessagesNotInAllowedRange' + super(MqttC2DRejectedMessagesNotInAllowedRange, self).__init__(**kwargs) + self.rule_type = 'MqttC2DRejectedMessagesNotInAllowedRange' -class MqttC2DRejectedMessagesNotInAllowedRange(TimeWindowCustomAlertRule): - """Number of rejected cloud to device messages (MQTT protocol) is not in - allowed range. +class MqttD2CMessagesNotInAllowedRange(TimeWindowCustomAlertRule): + """Number of device to cloud messages (MQTT protocol) is not in allowed range. Variables are only populated by the server, and will be ignored when sending a request. @@ -4319,177 +5143,461 @@ class MqttC2DRejectedMessagesNotInAllowedRange(TimeWindowCustomAlertRule): } def __init__(self, **kwargs): - super(MqttC2DRejectedMessagesNotInAllowedRange, self).__init__(**kwargs) - self.rule_type = 'MqttC2DRejectedMessagesNotInAllowedRange' + super(MqttD2CMessagesNotInAllowedRange, self).__init__(**kwargs) + self.rule_type = 'MqttD2CMessagesNotInAllowedRange' + + +class OnPremiseResourceDetails(ResourceDetails): + """Details of the On Premise resource that was assessed. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: OnPremiseSqlResourceDetails + + All required parameters must be populated in order to send to Azure. + + :param source: Required. Constant filled by server. + :type source: str + :param workspace_id: Required. Azure resource Id of the workspace the + machine is attached to + :type workspace_id: str + :param vmuuid: Required. The unique Id of the machine + :type vmuuid: str + :param source_computer_id: Required. The oms agent Id installed on the + machine + :type source_computer_id: str + :param machine_name: Required. The name of the machine + :type machine_name: str + """ + + _validation = { + 'source': {'required': True}, + 'workspace_id': {'required': True}, + 'vmuuid': {'required': True}, + 'source_computer_id': {'required': True}, + 'machine_name': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'vmuuid': {'key': 'vmuuid', 'type': 'str'}, + 'source_computer_id': {'key': 'sourceComputerId', 'type': 'str'}, + 'machine_name': {'key': 'machineName', 'type': 'str'}, + } + + _subtype_map = { + 'source': {'OnPremiseSql': 'OnPremiseSqlResourceDetails'} + } + + def __init__(self, **kwargs): + super(OnPremiseResourceDetails, self).__init__(**kwargs) + self.workspace_id = kwargs.get('workspace_id', None) + self.vmuuid = kwargs.get('vmuuid', None) + self.source_computer_id = kwargs.get('source_computer_id', None) + self.machine_name = kwargs.get('machine_name', None) + self.source = 'OnPremise' + + +class OnPremiseSqlResourceDetails(OnPremiseResourceDetails): + """Details of the On Premise Sql resource that was assessed. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. Constant filled by server. + :type source: str + :param workspace_id: Required. Azure resource Id of the workspace the + machine is attached to + :type workspace_id: str + :param vmuuid: Required. The unique Id of the machine + :type vmuuid: str + :param source_computer_id: Required. The oms agent Id installed on the + machine + :type source_computer_id: str + :param machine_name: Required. The name of the machine + :type machine_name: str + :param server_name: Required. The Sql server name installed on the machine + :type server_name: str + :param database_name: Required. The Sql database name installed on the + machine + :type database_name: str + """ + + _validation = { + 'source': {'required': True}, + 'workspace_id': {'required': True}, + 'vmuuid': {'required': True}, + 'source_computer_id': {'required': True}, + 'machine_name': {'required': True}, + 'server_name': {'required': True}, + 'database_name': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'vmuuid': {'key': 'vmuuid', 'type': 'str'}, + 'source_computer_id': {'key': 'sourceComputerId', 'type': 'str'}, + 'machine_name': {'key': 'machineName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OnPremiseSqlResourceDetails, self).__init__(**kwargs) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.source = 'OnPremiseSql' + + +class Operation(Model): + """Possible operation in the REST API of Microsoft.Security. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the operation + :vartype name: str + :ivar origin: Where the operation is originated + :vartype origin: str + :param display: + :type display: ~azure.mgmt.security.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.origin = None + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """Security operation display. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The resource provider for the operation. + :vartype provider: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar operation: The display name of the security operation. + :vartype operation: str + :ivar description: The description of the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class PackageDownloadInfo(Model): + """Information on a specific package download. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar version: Version number + :vartype version: str + :param link: Download link + :type link: str + :ivar version_kind: Kind of the version. Possible values include: + 'Latest', 'Previous' + :vartype version_kind: str or ~azure.mgmt.security.models.VersionKind + """ + + _validation = { + 'version': {'readonly': True}, + 'version_kind': {'readonly': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'link': {'key': 'link', 'type': 'str'}, + 'version_kind': {'key': 'versionKind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PackageDownloadInfo, self).__init__(**kwargs) + self.version = None + self.link = kwargs.get('link', None) + self.version_kind = None + + +class PackageDownloads(Model): + """Information about package downloads. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar sensor: Contains all Sensor binary downloads + :vartype sensor: ~azure.mgmt.security.models.PackageDownloadsSensor + :ivar central_manager: All downloads for Central Manager + :vartype central_manager: + ~azure.mgmt.security.models.PackageDownloadsCentralManager + :ivar threat_intelligence: All downloads for threat intelligence + :vartype threat_intelligence: + ~azure.mgmt.security.models.PackageDownloadsThreatIntelligence + """ + + _validation = { + 'sensor': {'readonly': True}, + 'central_manager': {'readonly': True}, + 'threat_intelligence': {'readonly': True}, + } + + _attribute_map = { + 'sensor': {'key': 'sensor', 'type': 'PackageDownloadsSensor'}, + 'central_manager': {'key': 'centralManager', 'type': 'PackageDownloadsCentralManager'}, + 'threat_intelligence': {'key': 'threatIntelligence', 'type': 'PackageDownloadsThreatIntelligence'}, + } + + def __init__(self, **kwargs): + super(PackageDownloads, self).__init__(**kwargs) + self.sensor = None + self.central_manager = None + self.threat_intelligence = None + + +class PackageDownloadsCentralManager(Model): + """All downloads for Central Manager. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar full: Contains full package downloads + :vartype full: + ~azure.mgmt.security.models.PackageDownloadsCentralManagerFull + :ivar upgrade: Central Manager upgrade package downloads (on existing + installations) + :vartype upgrade: list[~azure.mgmt.security.models.PackageDownloadInfo] + """ + + _validation = { + 'full': {'readonly': True}, + 'upgrade': {'readonly': True}, + } + + _attribute_map = { + 'full': {'key': 'full', 'type': 'PackageDownloadsCentralManagerFull'}, + 'upgrade': {'key': 'upgrade', 'type': '[PackageDownloadInfo]'}, + } + + def __init__(self, **kwargs): + super(PackageDownloadsCentralManager, self).__init__(**kwargs) + self.full = None + self.upgrade = None + + +class PackageDownloadsCentralManagerFull(Model): + """Contains full package downloads. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar iso: Contains all ISO full versions of the Central Manager + :vartype iso: list[~azure.mgmt.security.models.PackageDownloadInfo] + :ivar ovf: Contains all OVF (virtual machine) full versions of the Central + Manager + :vartype ovf: + ~azure.mgmt.security.models.PackageDownloadsCentralManagerFullOvf + """ + + _validation = { + 'iso': {'readonly': True}, + 'ovf': {'readonly': True}, + } + + _attribute_map = { + 'iso': {'key': 'iso', 'type': '[PackageDownloadInfo]'}, + 'ovf': {'key': 'ovf', 'type': 'PackageDownloadsCentralManagerFullOvf'}, + } + + def __init__(self, **kwargs): + super(PackageDownloadsCentralManagerFull, self).__init__(**kwargs) + self.iso = None + self.ovf = None -class MqttD2CMessagesNotInAllowedRange(TimeWindowCustomAlertRule): - """Number of device to cloud messages (MQTT protocol) is not in allowed range. +class PackageDownloadsCentralManagerFullOvf(Model): + """Contains all OVF (virtual machine) full versions of the Central Manager. 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 display_name: The display name of the custom alert. - :vartype display_name: str - :ivar description: The description of the custom alert. - :vartype description: str - :param is_enabled: Required. Status of the custom alert. - :type is_enabled: bool - :param rule_type: Required. Constant filled by server. - :type rule_type: str - :param min_threshold: Required. The minimum threshold. - :type min_threshold: int - :param max_threshold: Required. The maximum threshold. - :type max_threshold: int - :param time_window_size: Required. The time window size in iso8601 format. - :type time_window_size: timedelta + :ivar enterprise: The Enterprise package type + :vartype enterprise: list[~azure.mgmt.security.models.PackageDownloadInfo] + :ivar enterprise_high_availability: The EnterpriseHighAvailability package + type + :vartype enterprise_high_availability: + list[~azure.mgmt.security.models.PackageDownloadInfo] + :ivar medium: The Medium package type + :vartype medium: list[~azure.mgmt.security.models.PackageDownloadInfo] + :ivar medium_high_availability: The MediumHighAvailability package type + :vartype medium_high_availability: + list[~azure.mgmt.security.models.PackageDownloadInfo] """ _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'is_enabled': {'required': True}, - 'rule_type': {'required': True}, - 'min_threshold': {'required': True}, - 'max_threshold': {'required': True}, - 'time_window_size': {'required': True}, + 'enterprise': {'readonly': True}, + 'enterprise_high_availability': {'readonly': True}, + 'medium': {'readonly': True}, + 'medium_high_availability': {'readonly': True}, } _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'rule_type': {'key': 'ruleType', 'type': 'str'}, - 'min_threshold': {'key': 'minThreshold', 'type': 'int'}, - 'max_threshold': {'key': 'maxThreshold', 'type': 'int'}, - 'time_window_size': {'key': 'timeWindowSize', 'type': 'duration'}, + 'enterprise': {'key': 'enterprise', 'type': '[PackageDownloadInfo]'}, + 'enterprise_high_availability': {'key': 'enterpriseHighAvailability', 'type': '[PackageDownloadInfo]'}, + 'medium': {'key': 'medium', 'type': '[PackageDownloadInfo]'}, + 'medium_high_availability': {'key': 'mediumHighAvailability', 'type': '[PackageDownloadInfo]'}, } def __init__(self, **kwargs): - super(MqttD2CMessagesNotInAllowedRange, self).__init__(**kwargs) - self.rule_type = 'MqttD2CMessagesNotInAllowedRange' + super(PackageDownloadsCentralManagerFullOvf, self).__init__(**kwargs) + self.enterprise = None + self.enterprise_high_availability = None + self.medium = None + self.medium_high_availability = None -class OnPremiseResourceDetails(ResourceDetails): - """Details of the On Premise resource that was assessed. +class PackageDownloadsSensor(Model): + """Contains all Sensor binary downloads. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when + sending a request. - :param source: Required. Constant filled by server. - :type source: str - :param workspace_id: Required. Azure resource Id of the workspace the - machine is attached to - :type workspace_id: str - :param vmuuid: Required. The unique Id of the machine - :type vmuuid: str - :param source_computer_id: Required. The oms agent Id installed on the - machine - :type source_computer_id: str - :param machine_name: Required. The name of the machine - :type machine_name: str + :ivar full: Contains full package downloads + :vartype full: ~azure.mgmt.security.models.PackageDownloadsSensorFull + :param upgrade: Sensor upgrade package downloads (on existing + installations) + :type upgrade: list[~azure.mgmt.security.models.PackageDownloadInfo] """ _validation = { - 'source': {'required': True}, - 'workspace_id': {'required': True}, - 'vmuuid': {'required': True}, - 'source_computer_id': {'required': True}, - 'machine_name': {'required': True}, + 'full': {'readonly': True}, } _attribute_map = { - 'source': {'key': 'source', 'type': 'str'}, - 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, - 'vmuuid': {'key': 'vmuuid', 'type': 'str'}, - 'source_computer_id': {'key': 'sourceComputerId', 'type': 'str'}, - 'machine_name': {'key': 'machineName', 'type': 'str'}, + 'full': {'key': 'full', 'type': 'PackageDownloadsSensorFull'}, + 'upgrade': {'key': 'upgrade', 'type': '[PackageDownloadInfo]'}, } def __init__(self, **kwargs): - super(OnPremiseResourceDetails, self).__init__(**kwargs) - self.workspace_id = kwargs.get('workspace_id', None) - self.vmuuid = kwargs.get('vmuuid', None) - self.source_computer_id = kwargs.get('source_computer_id', None) - self.machine_name = kwargs.get('machine_name', None) - self.source = 'OnPremise' + super(PackageDownloadsSensor, self).__init__(**kwargs) + self.full = None + self.upgrade = kwargs.get('upgrade', None) -class Operation(Model): - """Possible operation in the REST API of Microsoft.Security. +class PackageDownloadsSensorFull(Model): + """Contains full package downloads. Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: Name of the operation - :vartype name: str - :ivar origin: Where the operation is originated - :vartype origin: str - :param display: - :type display: ~azure.mgmt.security.models.OperationDisplay + :ivar iso: Contains all ISO full versions for the sensor + :vartype iso: list[~azure.mgmt.security.models.PackageDownloadInfo] + :param ovf: Contains all OVF (virtual machine) full versions for the + sensor + :type ovf: ~azure.mgmt.security.models.PackageDownloadsSensorFullOvf """ _validation = { - 'name': {'readonly': True}, - 'origin': {'readonly': True}, + 'iso': {'readonly': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'iso': {'key': 'iso', 'type': '[PackageDownloadInfo]'}, + 'ovf': {'key': 'ovf', 'type': 'PackageDownloadsSensorFullOvf'}, } def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.origin = None - self.display = kwargs.get('display', None) + super(PackageDownloadsSensorFull, self).__init__(**kwargs) + self.iso = None + self.ovf = kwargs.get('ovf', None) -class OperationDisplay(Model): - """Security operation display. +class PackageDownloadsSensorFullOvf(Model): + """Contains all OVF (virtual machine) full versions for the sensor. Variables are only populated by the server, and will be ignored when sending a request. - :ivar provider: The resource provider for the operation. - :vartype provider: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar operation: The display name of the security operation. - :vartype operation: str - :ivar description: The description of the operation. - :vartype description: str + :ivar enterprise: Enterprise package type + :vartype enterprise: list[~azure.mgmt.security.models.PackageDownloadInfo] + :ivar medium: Medium package type + :vartype medium: list[~azure.mgmt.security.models.PackageDownloadInfo] + :ivar line: Line package type + :vartype line: list[~azure.mgmt.security.models.PackageDownloadInfo] """ _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, + 'enterprise': {'readonly': True}, + 'medium': {'readonly': True}, + 'line': {'readonly': True}, } _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, + 'enterprise': {'key': 'enterprise', 'type': '[PackageDownloadInfo]'}, + 'medium': {'key': 'medium', 'type': '[PackageDownloadInfo]'}, + 'line': {'key': 'line', 'type': '[PackageDownloadInfo]'}, } def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None + super(PackageDownloadsSensorFullOvf, self).__init__(**kwargs) + self.enterprise = None + self.medium = None + self.line = None + + +class PackageDownloadsThreatIntelligence(Model): + """All downloads for threat intelligence. + + :param link: Download link + :type link: str + """ + + _attribute_map = { + 'link': {'key': 'link', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PackageDownloadsThreatIntelligence, self).__init__(**kwargs) + self.link = kwargs.get('link', None) class PathRecommendation(Model): """Represents a path that is recommended to be allowed and its properties. - :param path: The full path to whitelist + :param path: The full path of the file, or an identifier of the + application :type path: str :param action: Possible values include: 'Recommended', 'Add', 'Remove' :type action: str or ~azure.mgmt.security.models.enum @@ -4499,7 +5607,7 @@ class PathRecommendation(Model): :type type: str or ~azure.mgmt.security.models.enum :param publisher_info: :type publisher_info: ~azure.mgmt.security.models.PublisherInfo - :param common: Whether the path is commonly run on the machine + :param common: Whether the application is commonly run on the machine :type common: bool :param user_sids: :type user_sids: list[str] @@ -4687,6 +5795,27 @@ def __init__(self, **kwargs): self.executable = kwargs.get('executable', None) +class ProxyServerProperties(Model): + """For a non-Azure machine that is not connected directly to the internet, + specify a proxy server that the non-Azure machine can use. + + :param ip: Proxy server IP + :type ip: str + :param port: Proxy server port + :type port: str + """ + + _attribute_map = { + 'ip': {'key': 'ip', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyServerProperties, self).__init__(**kwargs) + self.ip = kwargs.get('ip', None) + self.port = kwargs.get('port', None) + + class PublisherInfo(Model): """Represents the publisher information of a process/rule. @@ -5261,6 +6390,9 @@ class SecureScoreItem(Resource): :vartype max: int :ivar current: Current score :vartype current: float + :ivar weight: The weight for calculation of an aggregated score for + several scopes + :vartype weight: long """ _validation = { @@ -5270,6 +6402,7 @@ class SecureScoreItem(Resource): 'display_name': {'readonly': True}, 'max': {'readonly': True, 'minimum': 0}, 'current': {'readonly': True, 'minimum': 0}, + 'weight': {'readonly': True, 'minimum': 0}, } _attribute_map = { @@ -5279,6 +6412,7 @@ class SecureScoreItem(Resource): 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'max': {'key': 'properties.score.max', 'type': 'int'}, 'current': {'key': 'properties.score.current', 'type': 'float'}, + 'weight': {'key': 'properties.weight', 'type': 'long'}, } def __init__(self, **kwargs): @@ -5286,6 +6420,7 @@ def __init__(self, **kwargs): self.display_name = None self.max = None self.current = None + self.weight = None class SecurityAssessment(Resource): @@ -5648,6 +6783,164 @@ def __init__(self, **kwargs): self.alerts_to_admins = kwargs.get('alerts_to_admins', None) +class SecuritySolution(Model): + """SecuritySolution. + + 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 + :ivar location: Location where the resource is stored + :vartype location: str + :param security_family: Required. The security family of the security + solution. Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' + :type security_family: str or ~azure.mgmt.security.models.SecurityFamily + :param provisioning_state: Required. The security family provisioning + State. Possible values include: 'Succeeded', 'Failed', 'Updating' + :type provisioning_state: str or + ~azure.mgmt.security.models.ProvisioningState + :param template: Required. The security solutions' template + :type template: str + :param protection_status: Required. The security solutions' status + :type protection_status: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'security_family': {'required': True}, + 'provisioning_state': {'required': True}, + 'template': {'required': True}, + 'protection_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'security_family': {'key': 'properties.securityFamily', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'template': {'key': 'properties.template', 'type': 'str'}, + 'protection_status': {'key': 'properties.protectionStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecuritySolution, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.security_family = kwargs.get('security_family', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.template = kwargs.get('template', None) + self.protection_status = kwargs.get('protection_status', None) + + +class SecuritySolutionsReferenceData(Model): + """SecuritySolutionsReferenceData. + + 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 + :ivar location: Location where the resource is stored + :vartype location: str + :param security_family: Required. The security family of the security + solution. Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' + :type security_family: str or ~azure.mgmt.security.models.SecurityFamily + :param alert_vendor_name: Required. The security solutions' vendor name + :type alert_vendor_name: str + :param package_info_url: Required. The security solutions' package info + url + :type package_info_url: str + :param product_name: Required. The security solutions' product name + :type product_name: str + :param publisher: Required. The security solutions' publisher + :type publisher: str + :param publisher_display_name: Required. The security solutions' publisher + display name + :type publisher_display_name: str + :param template: Required. The security solutions' template + :type template: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'security_family': {'required': True}, + 'alert_vendor_name': {'required': True}, + 'package_info_url': {'required': True}, + 'product_name': {'required': True}, + 'publisher': {'required': True}, + 'publisher_display_name': {'required': True}, + 'template': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'security_family': {'key': 'properties.securityFamily', 'type': 'str'}, + 'alert_vendor_name': {'key': 'properties.alertVendorName', 'type': 'str'}, + 'package_info_url': {'key': 'properties.packageInfoUrl', 'type': 'str'}, + 'product_name': {'key': 'properties.productName', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'publisher_display_name': {'key': 'properties.publisherDisplayName', 'type': 'str'}, + 'template': {'key': 'properties.template', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecuritySolutionsReferenceData, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.security_family = kwargs.get('security_family', None) + self.alert_vendor_name = kwargs.get('alert_vendor_name', None) + self.package_info_url = kwargs.get('package_info_url', None) + self.product_name = kwargs.get('product_name', None) + self.publisher = kwargs.get('publisher', None) + self.publisher_display_name = kwargs.get('publisher_display_name', None) + self.template = kwargs.get('template', None) + + +class SecuritySolutionsReferenceDataList(Model): + """SecuritySolutionsReferenceDataList. + + :param value: + :type value: + list[~azure.mgmt.security.models.SecuritySolutionsReferenceData] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecuritySolutionsReferenceData]'}, + } + + def __init__(self, **kwargs): + super(SecuritySolutionsReferenceDataList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + class SecuritySubAssessment(Resource): """Security sub-assessment on a resource. @@ -5959,6 +7252,27 @@ def __init__(self, **kwargs): self.assessed_resource_type = 'ServerVulnerabilityAssessment' +class ServicePrincipalProperties(Model): + """Details of the service principal. + + :param application_id: Application id of service principal. + :type application_id: str + :param secret: A secret string that the application uses to prove its + identity, also can be referred to as application password (write only). + :type secret: str + """ + + _attribute_map = { + 'application_id': {'key': 'applicationId', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServicePrincipalProperties, self).__init__(**kwargs) + self.application_id = kwargs.get('application_id', None) + self.secret = kwargs.get('secret', None) + + class SqlServerVulnerabilityProperties(AdditionalData): """Details of the resource that was assessed. @@ -6255,6 +7569,22 @@ def __init__(self, **kwargs): self.resource_id = None +class TrackedResourceLocation(Model): + """Describes an Azure resource with location. + + :param location: Location where the resource is stored + :type location: str + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResourceLocation, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + + class TwinUpdatesNotInAllowedRange(TimeWindowCustomAlertRule): """Number of twin updates is not in allowed range. @@ -6459,7 +7789,7 @@ def __init__(self, **kwargs): class VmRecommendation(Model): - """Represents a machine that is part of a VM/server group. + """Represents a machine that is part of a machine group. :param configuration_status: Possible values include: 'Configured', 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py index 0a92ed90bee4..2b8989fdeddd 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py @@ -381,6 +381,129 @@ def __init__(self, *, is_enabled: bool, min_threshold: int, max_threshold: int, self.rule_type = 'ActiveConnectionsNotInAllowedRange' +class AdaptiveApplicationControlGroup(Model): + """AdaptiveApplicationControlGroup. + + 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 location: Location where the resource is stored + :vartype location: str + :param enforcement_mode: Possible values include: 'Audit', 'Enforce', + 'None' + :type enforcement_mode: str or ~azure.mgmt.security.models.enum + :param protection_mode: + :type protection_mode: ~azure.mgmt.security.models.ProtectionMode + :ivar configuration_status: Possible values include: 'Configured', + 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + :vartype configuration_status: str or ~azure.mgmt.security.models.enum + :ivar recommendation_status: Possible values include: 'Recommended', + 'NotRecommended', 'NotAvailable', 'NoStatus' + :vartype recommendation_status: str or ~azure.mgmt.security.models.enum + :ivar issues: + :vartype issues: + list[~azure.mgmt.security.models.AdaptiveApplicationControlIssueSummary] + :ivar source_system: Possible values include: 'Azure_AppLocker', + 'Azure_AuditD', 'NonAzure_AppLocker', 'NonAzure_AuditD', 'None' + :vartype source_system: str or ~azure.mgmt.security.models.enum + :param vm_recommendations: + :type vm_recommendations: + list[~azure.mgmt.security.models.VmRecommendation] + :param path_recommendations: + :type path_recommendations: + list[~azure.mgmt.security.models.PathRecommendation] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'configuration_status': {'readonly': True}, + 'recommendation_status': {'readonly': True}, + 'issues': {'readonly': True}, + 'source_system': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'enforcement_mode': {'key': 'properties.enforcementMode', 'type': 'str'}, + 'protection_mode': {'key': 'properties.protectionMode', 'type': 'ProtectionMode'}, + 'configuration_status': {'key': 'properties.configurationStatus', 'type': 'str'}, + 'recommendation_status': {'key': 'properties.recommendationStatus', 'type': 'str'}, + 'issues': {'key': 'properties.issues', 'type': '[AdaptiveApplicationControlIssueSummary]'}, + 'source_system': {'key': 'properties.sourceSystem', 'type': 'str'}, + 'vm_recommendations': {'key': 'properties.vmRecommendations', 'type': '[VmRecommendation]'}, + 'path_recommendations': {'key': 'properties.pathRecommendations', 'type': '[PathRecommendation]'}, + } + + def __init__(self, *, enforcement_mode=None, protection_mode=None, vm_recommendations=None, path_recommendations=None, **kwargs) -> None: + super(AdaptiveApplicationControlGroup, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.enforcement_mode = enforcement_mode + self.protection_mode = protection_mode + self.configuration_status = None + self.recommendation_status = None + self.issues = None + self.source_system = None + self.vm_recommendations = vm_recommendations + self.path_recommendations = path_recommendations + + +class AdaptiveApplicationControlGroups(Model): + """Represents a list of machine groups and set of rules that are recommended + by Azure Security Center to be allowed. + + :param value: + :type value: + list[~azure.mgmt.security.models.AdaptiveApplicationControlGroup] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AdaptiveApplicationControlGroup]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(AdaptiveApplicationControlGroups, self).__init__(**kwargs) + self.value = value + + +class AdaptiveApplicationControlIssueSummary(Model): + """Represents a summary of the alerts of the machine group. + + :param issue: Possible values include: 'ViolationsAudited', + 'ViolationsBlocked', 'MsiAndScriptViolationsAudited', + 'MsiAndScriptViolationsBlocked', 'ExecutableViolationsAudited', + 'RulesViolatedManually' + :type issue: str or ~azure.mgmt.security.models.enum + :param number_of_vms: The number of machines in the group that have this + alert + :type number_of_vms: float + """ + + _attribute_map = { + 'issue': {'key': 'issue', 'type': 'str'}, + 'number_of_vms': {'key': 'numberOfVms', 'type': 'float'}, + } + + def __init__(self, *, issue=None, number_of_vms: float=None, **kwargs) -> None: + super(AdaptiveApplicationControlIssueSummary, self).__init__(**kwargs) + self.issue = issue + self.number_of_vms = number_of_vms + + class Resource(Model): """Describes an Azure resource. @@ -1139,128 +1262,6 @@ def __init__(self, *, is_enabled: bool, min_threshold: int, max_threshold: int, self.rule_type = 'AmqpD2CMessagesNotInAllowedRange' -class AppWhitelistingGroup(Model): - """AppWhitelistingGroup. - - 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 location: Location where the resource is stored - :vartype location: str - :param enforcement_mode: Possible values include: 'Audit', 'Enforce', - 'None' - :type enforcement_mode: str or ~azure.mgmt.security.models.enum - :param protection_mode: - :type protection_mode: ~azure.mgmt.security.models.ProtectionMode - :ivar configuration_status: Possible values include: 'Configured', - 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' - :vartype configuration_status: str or ~azure.mgmt.security.models.enum - :ivar recommendation_status: Possible values include: 'Recommended', - 'NotRecommended', 'NotAvailable', 'NoStatus' - :vartype recommendation_status: str or ~azure.mgmt.security.models.enum - :ivar issues: - :vartype issues: - list[~azure.mgmt.security.models.AppWhitelistingIssueSummary] - :ivar source_system: Possible values include: 'Azure_AppLocker', - 'Azure_AuditD', 'NonAzure_AppLocker', 'NonAzure_AuditD', 'None' - :vartype source_system: str or ~azure.mgmt.security.models.enum - :param vm_recommendations: - :type vm_recommendations: - list[~azure.mgmt.security.models.VmRecommendation] - :param path_recommendations: - :type path_recommendations: - list[~azure.mgmt.security.models.PathRecommendation] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'configuration_status': {'readonly': True}, - 'recommendation_status': {'readonly': True}, - 'issues': {'readonly': True}, - 'source_system': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'enforcement_mode': {'key': 'properties.enforcementMode', 'type': 'str'}, - 'protection_mode': {'key': 'properties.protectionMode', 'type': 'ProtectionMode'}, - 'configuration_status': {'key': 'properties.configurationStatus', 'type': 'str'}, - 'recommendation_status': {'key': 'properties.recommendationStatus', 'type': 'str'}, - 'issues': {'key': 'properties.issues', 'type': '[AppWhitelistingIssueSummary]'}, - 'source_system': {'key': 'properties.sourceSystem', 'type': 'str'}, - 'vm_recommendations': {'key': 'properties.vmRecommendations', 'type': '[VmRecommendation]'}, - 'path_recommendations': {'key': 'properties.pathRecommendations', 'type': '[PathRecommendation]'}, - } - - def __init__(self, *, enforcement_mode=None, protection_mode=None, vm_recommendations=None, path_recommendations=None, **kwargs) -> None: - super(AppWhitelistingGroup, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.enforcement_mode = enforcement_mode - self.protection_mode = protection_mode - self.configuration_status = None - self.recommendation_status = None - self.issues = None - self.source_system = None - self.vm_recommendations = vm_recommendations - self.path_recommendations = path_recommendations - - -class AppWhitelistingGroups(Model): - """Represents a list of VM/server groups and set of rules that are Recommended - by Azure Security Center to be allowed. - - :param value: - :type value: list[~azure.mgmt.security.models.AppWhitelistingGroup] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[AppWhitelistingGroup]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(AppWhitelistingGroups, self).__init__(**kwargs) - self.value = value - - -class AppWhitelistingIssueSummary(Model): - """Represents a summary of the alerts of the VM/server group. - - :param issue: Possible values include: 'ViolationsAudited', - 'ViolationsBlocked', 'MsiAndScriptViolationsAudited', - 'MsiAndScriptViolationsBlocked', 'ExecutableViolationsAudited', - 'RulesViolatedManually' - :type issue: str or ~azure.mgmt.security.models.enum - :param number_of_vms: The number of machines in the VM/server group that - have this alert - :type number_of_vms: float - """ - - _attribute_map = { - 'issue': {'key': 'issue', 'type': 'str'}, - 'number_of_vms': {'key': 'numberOfVms', 'type': 'float'}, - } - - def __init__(self, *, issue=None, number_of_vms: float=None, **kwargs) -> None: - super(AppWhitelistingIssueSummary, self).__init__(**kwargs) - self.issue = issue - self.number_of_vms = number_of_vms - - class AscLocation(Resource): """The ASC location of the subscription is in the "name" field. @@ -1452,6 +1453,54 @@ def __init__(self, *, additional_properties=None, device_vendor: str=None, devic self.last_event_received = last_event_received +class AuthenticationDetailsProperties(Model): + """Settings for cloud authentication management. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AwsCredsAuthenticationDetailsProperties, + AwAssumeRoleAuthenticationDetailsProperties, + GcpCredentialsDetailsProperties + + 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 authentication_provisioning_state: State of the multi-cloud + connector. Possible values include: 'Valid', 'Invalid', 'Expired', + 'IncorrectPolicy' + :vartype authentication_provisioning_state: str or + ~azure.mgmt.security.models.AuthenticationProvisioningState + :ivar granted_permissions: The permissions detected in the cloud account. + :vartype granted_permissions: list[str or + ~azure.mgmt.security.models.PermissionProperty] + :param authentication_type: Required. Constant filled by server. + :type authentication_type: str + """ + + _validation = { + 'authentication_provisioning_state': {'readonly': True}, + 'granted_permissions': {'readonly': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'authentication_provisioning_state': {'key': 'authenticationProvisioningState', 'type': 'str'}, + 'granted_permissions': {'key': 'grantedPermissions', 'type': '[str]'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + } + + _subtype_map = { + 'authentication_type': {'awsCreds': 'AwsCredsAuthenticationDetailsProperties', 'awsAssumeRole': 'AwAssumeRoleAuthenticationDetailsProperties', 'gcpCredentials': 'GcpCredentialsDetailsProperties'} + } + + def __init__(self, **kwargs) -> None: + super(AuthenticationDetailsProperties, self).__init__(**kwargs) + self.authentication_provisioning_state = None + self.granted_permissions = None + self.authentication_type = None + + class TrackedResource(Model): """Describes an Azure tracked resource. @@ -1464,8 +1513,8 @@ class TrackedResource(Model): :vartype name: str :ivar type: Resource type :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str + :param location: Location where the resource is stored + :type location: str :param kind: Kind of the resource :type kind: str :param etag: Entity tag is used for comparing two or more entities from @@ -1479,7 +1528,6 @@ class TrackedResource(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'readonly': True}, } _attribute_map = { @@ -1492,12 +1540,12 @@ class TrackedResource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, kind: str=None, etag: str=None, tags=None, **kwargs) -> None: + def __init__(self, *, location: str=None, kind: str=None, etag: str=None, tags=None, **kwargs) -> None: super(TrackedResource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.location = None + self.location = location self.kind = kind self.etag = etag self.tags = tags @@ -1515,8 +1563,8 @@ class Automation(TrackedResource): :vartype name: str :ivar type: Resource type :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str + :param location: Location where the resource is stored + :type location: str :param kind: Kind of the resource :type kind: str :param etag: Entity tag is used for comparing two or more entities from @@ -1545,7 +1593,6 @@ class Automation(TrackedResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'readonly': True}, } _attribute_map = { @@ -1563,8 +1610,8 @@ class Automation(TrackedResource): 'actions': {'key': 'properties.actions', 'type': '[AutomationAction]'}, } - def __init__(self, *, kind: str=None, etag: str=None, tags=None, description: str=None, is_enabled: bool=None, scopes=None, sources=None, actions=None, **kwargs) -> None: - super(Automation, self).__init__(kind=kind, etag=etag, tags=tags, **kwargs) + def __init__(self, *, location: str=None, kind: str=None, etag: str=None, tags=None, description: str=None, is_enabled: bool=None, scopes=None, sources=None, actions=None, **kwargs) -> None: + super(Automation, self).__init__(location=location, kind=kind, etag=etag, tags=tags, **kwargs) self.description = description self.is_enabled = is_enabled self.scopes = scopes @@ -1759,7 +1806,7 @@ class AutomationSource(Model): https://aka.ms/ASCAutomationSchemas. :param event_source: A valid event source type. Possible values include: - 'Assessments', 'Alerts' + 'Assessments', 'SubAssessments', 'Alerts' :type event_source: str or ~azure.mgmt.security.models.EventSource :param rule_sets: A set of rules which evaluate upon event interception. A logical disjunction is applied between defined rule sets (logical 'or'). @@ -1871,20 +1918,135 @@ def __init__(self, *, auto_provision, **kwargs) -> None: self.auto_provision = auto_provision -class ResourceDetails(Model): - """Details of the resource that was assessed. +class AwAssumeRoleAuthenticationDetailsProperties(AuthenticationDetailsProperties): + """AWS cloud account connector based assume role, the role enables delegating + access to your AWS resources. The role is composed of role arn and external + id, for more details, refer to Creating + a Role to Delegate Permissions to an IAM User (write only). - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: OnPremiseResourceDetails, AzureResourceDetails + 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 source: Required. Constant filled by server. - :type source: str + :ivar authentication_provisioning_state: State of the multi-cloud + connector. Possible values include: 'Valid', 'Invalid', 'Expired', + 'IncorrectPolicy' + :vartype authentication_provisioning_state: str or + ~azure.mgmt.security.models.AuthenticationProvisioningState + :ivar granted_permissions: The permissions detected in the cloud account. + :vartype granted_permissions: list[str or + ~azure.mgmt.security.models.PermissionProperty] + :param authentication_type: Required. Constant filled by server. + :type authentication_type: str + :ivar account_id: The ID of the cloud account + :vartype account_id: str + :param aws_assume_role_arn: Required. Assumed role ID is an identifier + that you can use to create temporary security credentials. + :type aws_assume_role_arn: str + :param aws_external_id: Required. A unique identifier that is required + when you assume a role in another account. + :type aws_external_id: str """ _validation = { - 'source': {'required': True}, + 'authentication_provisioning_state': {'readonly': True}, + 'granted_permissions': {'readonly': True}, + 'authentication_type': {'required': True}, + 'account_id': {'readonly': True}, + 'aws_assume_role_arn': {'required': True}, + 'aws_external_id': {'required': True}, + } + + _attribute_map = { + 'authentication_provisioning_state': {'key': 'authenticationProvisioningState', 'type': 'str'}, + 'granted_permissions': {'key': 'grantedPermissions', 'type': '[str]'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'aws_assume_role_arn': {'key': 'awsAssumeRoleArn', 'type': 'str'}, + 'aws_external_id': {'key': 'awsExternalId', 'type': 'str'}, + } + + def __init__(self, *, aws_assume_role_arn: str, aws_external_id: str, **kwargs) -> None: + super(AwAssumeRoleAuthenticationDetailsProperties, self).__init__(**kwargs) + self.account_id = None + self.aws_assume_role_arn = aws_assume_role_arn + self.aws_external_id = aws_external_id + self.authentication_type = 'awsAssumeRole' + + +class AwsCredsAuthenticationDetailsProperties(AuthenticationDetailsProperties): + """AWS cloud account connector based credentials, the credentials is composed + of access key id and secret key, for more details, refer to Creating + an IAM User in Your AWS Account (write only). + + 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 authentication_provisioning_state: State of the multi-cloud + connector. Possible values include: 'Valid', 'Invalid', 'Expired', + 'IncorrectPolicy' + :vartype authentication_provisioning_state: str or + ~azure.mgmt.security.models.AuthenticationProvisioningState + :ivar granted_permissions: The permissions detected in the cloud account. + :vartype granted_permissions: list[str or + ~azure.mgmt.security.models.PermissionProperty] + :param authentication_type: Required. Constant filled by server. + :type authentication_type: str + :ivar account_id: The ID of the cloud account + :vartype account_id: str + :param aws_access_key_id: Required. Public key element of the AWS + credential object (write only) + :type aws_access_key_id: str + :param aws_secret_access_key: Required. Secret key element of the AWS + credential object (write only) + :type aws_secret_access_key: str + """ + + _validation = { + 'authentication_provisioning_state': {'readonly': True}, + 'granted_permissions': {'readonly': True}, + 'authentication_type': {'required': True}, + 'account_id': {'readonly': True}, + 'aws_access_key_id': {'required': True}, + 'aws_secret_access_key': {'required': True}, + } + + _attribute_map = { + 'authentication_provisioning_state': {'key': 'authenticationProvisioningState', 'type': 'str'}, + 'granted_permissions': {'key': 'grantedPermissions', 'type': '[str]'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'aws_access_key_id': {'key': 'awsAccessKeyId', 'type': 'str'}, + 'aws_secret_access_key': {'key': 'awsSecretAccessKey', 'type': 'str'}, + } + + def __init__(self, *, aws_access_key_id: str, aws_secret_access_key: str, **kwargs) -> None: + super(AwsCredsAuthenticationDetailsProperties, self).__init__(**kwargs) + self.account_id = None + self.aws_access_key_id = aws_access_key_id + self.aws_secret_access_key = aws_secret_access_key + self.authentication_type = 'awsCreds' + + +class ResourceDetails(Model): + """Details of the resource that was assessed. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: OnPremiseResourceDetails, AzureResourceDetails + + All required parameters must be populated in order to send to Azure. + + :param source: Required. Constant filled by server. + :type source: str + """ + + _validation = { + 'source': {'required': True}, } _attribute_map = { @@ -2329,6 +2491,48 @@ def __init__(self, *, is_enabled: bool, allowlist_values, **kwargs) -> None: self.rule_type = 'ConnectionToIpNotAllowed' +class ConnectorSetting(Resource): + """The connector setting. + + 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 hybrid_compute_settings: Settings for hybrid compute management, + these settings are relevant only Arc autoProvision (Hybrid Compute). + :type hybrid_compute_settings: + ~azure.mgmt.security.models.HybridComputeSettingsProperties + :param authentication_details: Settings for authentication management, + these settings are relevant only for the cloud connector. + :type authentication_details: + ~azure.mgmt.security.models.AuthenticationDetailsProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'hybrid_compute_settings': {'key': 'properties.hybridComputeSettings', 'type': 'HybridComputeSettingsProperties'}, + 'authentication_details': {'key': 'properties.authenticationDetails', 'type': 'AuthenticationDetailsProperties'}, + } + + def __init__(self, *, hybrid_compute_settings=None, authentication_details=None, **kwargs) -> None: + super(ConnectorSetting, self).__init__(**kwargs) + self.hybrid_compute_settings = hybrid_compute_settings + self.authentication_details = authentication_details + + class ContainerRegistryVulnerabilityProperties(AdditionalData): """Additional context fields for container registry Vulnerability assessment. @@ -2943,6 +3147,106 @@ def __init__(self, *, is_enabled: bool, min_threshold: int, max_threshold: int, self.rule_type = 'FileUploadsNotInAllowedRange' +class GcpCredentialsDetailsProperties(AuthenticationDetailsProperties): + """GCP cloud account connector based service to service credentials, the + credentials is composed of organization id and json api key (write + only). + + 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 authentication_provisioning_state: State of the multi-cloud + connector. Possible values include: 'Valid', 'Invalid', 'Expired', + 'IncorrectPolicy' + :vartype authentication_provisioning_state: str or + ~azure.mgmt.security.models.AuthenticationProvisioningState + :ivar granted_permissions: The permissions detected in the cloud account. + :vartype granted_permissions: list[str or + ~azure.mgmt.security.models.PermissionProperty] + :param authentication_type: Required. Constant filled by server. + :type authentication_type: str + :param organization_id: Required. The Organization ID of the GCP cloud + account + :type organization_id: str + :param type: Required. Type field of the API key (write only) + :type type: str + :param project_id: Required. Project Id field of the API key (write only) + :type project_id: str + :param private_key_id: Required. Private key Id field of the API key + (write only) + :type private_key_id: str + :param private_key: Required. Private key field of the API key (write + only) + :type private_key: str + :param client_email: Required. Client email field of the API key (write + only) + :type client_email: str + :param client_id: Required. Client Id field of the API key (write only) + :type client_id: str + :param auth_uri: Required. Auth Uri field of the API key (write only) + :type auth_uri: str + :param token_uri: Required. Token Uri field of the API key (write only) + :type token_uri: str + :param auth_provider_x509_cert_url: Required. Auth provider x509 + certificate url field of the API key (write only) + :type auth_provider_x509_cert_url: str + :param client_x509_cert_url: Required. Client x509 certificate url field + of the API key (write only) + :type client_x509_cert_url: str + """ + + _validation = { + 'authentication_provisioning_state': {'readonly': True}, + 'granted_permissions': {'readonly': True}, + 'authentication_type': {'required': True}, + 'organization_id': {'required': True}, + 'type': {'required': True}, + 'project_id': {'required': True}, + 'private_key_id': {'required': True}, + 'private_key': {'required': True}, + 'client_email': {'required': True}, + 'client_id': {'required': True}, + 'auth_uri': {'required': True}, + 'token_uri': {'required': True}, + 'auth_provider_x509_cert_url': {'required': True}, + 'client_x509_cert_url': {'required': True}, + } + + _attribute_map = { + 'authentication_provisioning_state': {'key': 'authenticationProvisioningState', 'type': 'str'}, + 'granted_permissions': {'key': 'grantedPermissions', 'type': '[str]'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'organization_id': {'key': 'organizationId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'private_key_id': {'key': 'privateKeyId', 'type': 'str'}, + 'private_key': {'key': 'privateKey', 'type': 'str'}, + 'client_email': {'key': 'clientEmail', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'auth_uri': {'key': 'authUri', 'type': 'str'}, + 'token_uri': {'key': 'tokenUri', 'type': 'str'}, + 'auth_provider_x509_cert_url': {'key': 'authProviderX509CertUrl', 'type': 'str'}, + 'client_x509_cert_url': {'key': 'clientX509CertUrl', 'type': 'str'}, + } + + def __init__(self, *, organization_id: str, type: str, project_id: str, private_key_id: str, private_key: str, client_email: str, client_id: str, auth_uri: str, token_uri: str, auth_provider_x509_cert_url: str, client_x509_cert_url: str, **kwargs) -> None: + super(GcpCredentialsDetailsProperties, self).__init__(**kwargs) + self.organization_id = organization_id + self.type = type + self.project_id = project_id + self.private_key_id = private_key_id + self.private_key = private_key + self.client_email = client_email + self.client_id = client_id + self.auth_uri = auth_uri + self.token_uri = token_uri + self.auth_provider_x509_cert_url = auth_provider_x509_cert_url + self.client_x509_cert_url = client_x509_cert_url + self.authentication_type = 'gcpCredentials' + + class HttpC2DMessagesNotInAllowedRange(TimeWindowCustomAlertRule): """Number of cloud to device messages (HTTP protocol) is not in allowed range. @@ -3091,6 +3395,61 @@ def __init__(self, *, is_enabled: bool, min_threshold: int, max_threshold: int, self.rule_type = 'HttpD2CMessagesNotInAllowedRange' +class HybridComputeSettingsProperties(Model): + """Settings for hybrid compute management. + + 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 hybrid_compute_provisioning_state: State of the service principal + and its secret. Possible values include: 'Valid', 'Invalid', 'Expired' + :vartype hybrid_compute_provisioning_state: str or + ~azure.mgmt.security.models.HybridComputeProvisioningState + :param auto_provision: Required. Whether or not to automatically install + Azure Arc (hybrid compute) agents on machines. Possible values include: + 'On', 'Off' + :type auto_provision: str or ~azure.mgmt.security.models.AutoProvision + :param resource_group_name: The name of the resource group where Arc + (Hybrid Compute) connectors are connected. + :type resource_group_name: str + :param region: The location where the meta data of machines will be stored + :type region: str + :param proxy_server: For a non-Azure machine that is not connected + directly to the internet, specify a proxy server that the non-Azure + machine can use. + :type proxy_server: ~azure.mgmt.security.models.ProxyServerProperties + :param service_principal: An object to access resources that are secured + by an Azure AD tenant. + :type service_principal: + ~azure.mgmt.security.models.ServicePrincipalProperties + """ + + _validation = { + 'hybrid_compute_provisioning_state': {'readonly': True}, + 'auto_provision': {'required': True}, + } + + _attribute_map = { + 'hybrid_compute_provisioning_state': {'key': 'hybridComputeProvisioningState', 'type': 'str'}, + 'auto_provision': {'key': 'autoProvision', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'proxy_server': {'key': 'proxyServer', 'type': 'ProxyServerProperties'}, + 'service_principal': {'key': 'servicePrincipal', 'type': 'ServicePrincipalProperties'}, + } + + def __init__(self, *, auto_provision, resource_group_name: str=None, region: str=None, proxy_server=None, service_principal=None, **kwargs) -> None: + super(HybridComputeSettingsProperties, self).__init__(**kwargs) + self.hybrid_compute_provisioning_state = None + self.auto_provision = auto_provision + self.resource_group_name = resource_group_name + self.region = region + self.proxy_server = proxy_server + self.service_principal = service_principal + + class InformationProtectionKeyword(Model): """The information type keyword. @@ -3212,8 +3571,64 @@ def __init__(self, *, display_name: str=None, description: str=None, order: int= self.keywords = keywords -class IoTSecurityAggregatedAlert(Model): - """Security Solution Aggregated Alert information. +class IotAlert(Model): + """IoT alert. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar system_alert_id: Holds the product canonical identifier of the alert + within the scope of a product + :vartype system_alert_id: str + :ivar compromised_entity: Display name of the main entity being reported + on + :vartype compromised_entity: str + :ivar alert_type: The type name of the alert + :vartype alert_type: str + :ivar start_time_utc: The impact start time of the alert (the time of the + first event or activity included in the alert) + :vartype start_time_utc: str + :ivar end_time_utc: The impact end time of the alert (the time of the last + event or activity included in the alert) + :vartype end_time_utc: str + :param entities: A list of entities related to the alert + :type entities: list[object] + :param extended_properties: A bag of fields which extends the alert + information + :type extended_properties: object + """ + + _validation = { + 'system_alert_id': {'readonly': True}, + 'compromised_entity': {'readonly': True}, + 'alert_type': {'readonly': True}, + 'start_time_utc': {'readonly': True}, + 'end_time_utc': {'readonly': True}, + } + + _attribute_map = { + 'system_alert_id': {'key': 'properties.systemAlertId', 'type': 'str'}, + 'compromised_entity': {'key': 'properties.compromisedEntity', 'type': 'str'}, + 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, + 'start_time_utc': {'key': 'properties.startTimeUtc', 'type': 'str'}, + 'end_time_utc': {'key': 'properties.endTimeUtc', 'type': 'str'}, + 'entities': {'key': 'properties.entities', 'type': '[object]'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': 'object'}, + } + + def __init__(self, *, entities=None, extended_properties=None, **kwargs) -> None: + super(IotAlert, self).__init__(**kwargs) + self.system_alert_id = None + self.compromised_entity = None + self.alert_type = None + self.start_time_utc = None + self.end_time_utc = None + self.entities = entities + self.extended_properties = extended_properties + + +class IotAlertType(Resource): + """IoT alert type. Variables are only populated by the server, and will be ignored when sending a request. @@ -3224,139 +3639,118 @@ class IoTSecurityAggregatedAlert(Model): :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. + :ivar alert_display_name: The display name of the alert :vartype alert_display_name: str - :ivar aggregated_date_utc: Date of detection. - :vartype aggregated_date_utc: date - :ivar vendor_name: Name of the organization that raised the alert. - :vartype vendor_name: str - :ivar reported_severity: Assessed alert severity. Possible values include: + :ivar severity: The severity of the 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 + :vartype severity: str or ~azure.mgmt.security.models.AlertSeverity :ivar description: Description of the suspected vulnerability and meaning. :vartype description: str - :ivar count: Number of alerts occurrences within the aggregated time - window. - :vartype count: int - :ivar effected_resource_type: Azure resource ID of the resource that - received 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: IoT Security solution alert response. - :vartype action_taken: str - :ivar log_analytics_query: Log analytics query for getting the list of - affected devices/alerts. - :vartype log_analytics_query: str - :ivar top_devices_list: 10 devices with the highest number of occurrences - of this alert type, on this day. - :vartype top_devices_list: - list[~azure.mgmt.security.models.IoTSecurityAggregatedAlertPropertiesTopDevicesListItem] + :ivar provider_name: The name of the alert provider or internal partner + :vartype provider_name: str + :ivar product_name: The name of the product which published this alert + :vartype product_name: str + :ivar product_component_name: The name of a component inside the product + which generated the alert + :vartype product_component_name: str + :ivar vendor_name: The name of the vendor that raise the alert + :vartype vendor_name: str + :ivar intent: Kill chain related intent behind the alert. Could contain + multiple enum values (separated by commas). Possible values include: + 'Unknown', 'PreAttack', 'InitialAccess', 'Persistence', + 'PrivilegeEscalation', 'DefenseEvasion', 'CredentialAccess', 'Discovery', + 'LateralMovement', 'Execution', 'Collection', 'Exfiltration', + 'CommandAndControl', 'Impact', 'Probing', 'Exploitation' + :vartype intent: str or ~azure.mgmt.security.models.AlertIntent + :ivar remediation_steps: Manual action items to take to remediate the + alert + :vartype remediation_steps: list[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}, + 'severity': {'readonly': True}, + 'description': {'readonly': True}, + 'provider_name': {'readonly': True}, + 'product_name': {'readonly': True}, + 'product_component_name': {'readonly': True}, 'vendor_name': {'readonly': True}, - 'reported_severity': {'readonly': True}, + 'intent': {'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}, - 'top_devices_list': {'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'}, + 'severity': {'key': 'properties.severity', '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'}, - 'top_devices_list': {'key': 'properties.topDevicesList', 'type': '[IoTSecurityAggregatedAlertPropertiesTopDevicesListItem]'}, + 'provider_name': {'key': 'properties.providerName', 'type': 'str'}, + 'product_name': {'key': 'properties.productName', 'type': 'str'}, + 'product_component_name': {'key': 'properties.productComponentName', 'type': 'str'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'intent': {'key': 'properties.intent', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', '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 + def __init__(self, **kwargs) -> None: + super(IotAlertType, self).__init__(**kwargs) self.alert_display_name = None - self.aggregated_date_utc = None + self.severity = None + self.description = None + self.provider_name = None + self.product_name = None + self.product_component_name = None self.vendor_name = None - self.reported_severity = None + self.intent = 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 - self.top_devices_list = None -class IoTSecurityAggregatedAlertPropertiesTopDevicesListItem(Model): - """IoTSecurityAggregatedAlertPropertiesTopDevicesListItem. +class IotAlertTypeList(Model): + """List of alert types. + + :param value: List data + :type value: list[~azure.mgmt.security.models.IotAlertType] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IotAlertType]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(IotAlertTypeList, self).__init__(**kwargs) + self.value = value + + +class IotDefenderSettingsList(Model): + """List of IoT Defender settings. Variables are only populated by the server, and will be ignored when sending a request. - :ivar device_id: Name of the device. - :vartype device_id: str - :ivar alerts_count: Number of alerts raised for this device. - :vartype alerts_count: int - :ivar last_occurrence: Most recent time this alert was raised for this - device, on this day. - :vartype last_occurrence: str + :ivar value: List data + :vartype value: list[~azure.mgmt.security.models.IotDefenderSettingsModel] """ _validation = { - 'device_id': {'readonly': True}, - 'alerts_count': {'readonly': True}, - 'last_occurrence': {'readonly': True}, + 'value': {'readonly': True}, } _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, - 'last_occurrence': {'key': 'lastOccurrence', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[IotDefenderSettingsModel]'}, } def __init__(self, **kwargs) -> None: - super(IoTSecurityAggregatedAlertPropertiesTopDevicesListItem, self).__init__(**kwargs) - self.device_id = None - self.alerts_count = None - self.last_occurrence = None + super(IotDefenderSettingsList, self).__init__(**kwargs) + self.value = None -class IoTSecurityAggregatedRecommendation(Model): - """IoT Security solution recommendation information. +class IotDefenderSettingsModel(Resource): + """IoT Defender settings. Variables are only populated by the server, and will be ignored when sending a request. @@ -3367,33 +3761,357 @@ class IoTSecurityAggregatedRecommendation(Model): :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 suspected vulnerability and meaning. - :vartype description: str - :ivar recommendation_type_id: Recommendation-type GUID. - :vartype recommendation_type_id: str - :ivar detected_by: Name of the organization that made the recommendation. - :vartype detected_by: str - :ivar remediation_steps: Recommended steps for remediation - :vartype remediation_steps: str - :ivar reported_severity: Assessed recommendation severity. Possible values - include: 'Informational', 'Low', 'Medium', 'High' - :vartype reported_severity: str or - ~azure.mgmt.security.models.ReportedSeverity - :ivar healthy_devices: Number of healthy devices within the IoT Security - solution. - :vartype healthy_devices: int - :ivar unhealthy_device_count: Number of unhealthy devices within the IoT - Security solution. - :vartype unhealthy_device_count: int - :ivar log_analytics_query: Log analytics query for getting the list of - affected devices/alerts. + :param properties: IoT Defender settings properties + :type properties: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(IotDefenderSettingsModel, self).__init__(**kwargs) + self.properties = properties + + +class IotRecommendation(Resource): + """IoT recommendation. + + 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 device_id: Identifier of the device being reported on + :vartype device_id: str + :ivar recommendation_type: The type name of the recommendation + :vartype recommendation_type: str + :ivar discovered_time_utc: The discovery time of the recommendation + :vartype discovered_time_utc: str + :param recommendation_additional_data: A bag of fields which extends the + recommendation information + :type recommendation_additional_data: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'device_id': {'readonly': True}, + 'recommendation_type': {'readonly': True}, + 'discovered_time_utc': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'device_id': {'key': 'properties.deviceId', 'type': 'str'}, + 'recommendation_type': {'key': 'properties.recommendationType', 'type': 'str'}, + 'discovered_time_utc': {'key': 'properties.discoveredTimeUtc', 'type': 'str'}, + 'recommendation_additional_data': {'key': 'properties.recommendationAdditionalData', 'type': 'object'}, + } + + def __init__(self, *, recommendation_additional_data=None, **kwargs) -> None: + super(IotRecommendation, self).__init__(**kwargs) + self.device_id = None + self.recommendation_type = None + self.discovered_time_utc = None + self.recommendation_additional_data = recommendation_additional_data + + +class IotRecommendationType(Resource): + """IoT recommendation type. + + 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 recommendation_display_name: The display name of the recommendation + :vartype recommendation_display_name: str + :ivar severity: The severity of the recommendation. Possible values + include: 'Unknown', 'NotApplicable', 'Healthy', 'OffByPolicy', 'Low', + 'Medium', 'High' + :vartype severity: str or + ~azure.mgmt.security.models.RecommendationSeverity + :ivar description: Description of the suspected vulnerability and meaning. + :vartype description: str + :ivar product_name: The name of the product which published this + recommendation + :vartype product_name: str + :ivar product_component_name: The name of a component inside the product + which generated the recommendation + :vartype product_component_name: str + :ivar vendor_name: The name of the vendor that raised the recommendation + :vartype vendor_name: str + :ivar control: The name of the recommendation's control category + :vartype control: str + :ivar remediation_steps: Manual action items to take to resolve the + recommendation + :vartype remediation_steps: list[str] + :ivar data_source: The alert's data source + :vartype data_source: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'recommendation_display_name': {'readonly': True}, + 'severity': {'readonly': True}, + 'description': {'readonly': True}, + 'product_name': {'readonly': True}, + 'product_component_name': {'readonly': True}, + 'vendor_name': {'readonly': True}, + 'control': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'data_source': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'recommendation_display_name': {'key': 'properties.recommendationDisplayName', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'product_name': {'key': 'properties.productName', 'type': 'str'}, + 'product_component_name': {'key': 'properties.productComponentName', 'type': 'str'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'control': {'key': 'properties.control', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': '[str]'}, + 'data_source': {'key': 'properties.dataSource', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(IotRecommendationType, self).__init__(**kwargs) + self.recommendation_display_name = None + self.severity = None + self.description = None + self.product_name = None + self.product_component_name = None + self.vendor_name = None + self.control = None + self.remediation_steps = None + self.data_source = None + + +class IotRecommendationTypeList(Model): + """List of recommendation types. + + :param value: List data + :type value: list[~azure.mgmt.security.models.IotRecommendationType] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IotRecommendationType]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(IotRecommendationTypeList, self).__init__(**kwargs) + self.value = value + + +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: Date of detection. + :vartype aggregated_date_utc: date + :ivar vendor_name: Name of the organization that raised the alert. + :vartype vendor_name: str + :ivar reported_severity: Assessed alert severity. 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 suspected vulnerability and meaning. + :vartype description: str + :ivar count: Number of alerts occurrences within the aggregated time + window. + :vartype count: int + :ivar effected_resource_type: Azure resource ID of the resource that + received 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: IoT Security solution alert response. + :vartype action_taken: str + :ivar log_analytics_query: Log analytics query for getting the list of + affected devices/alerts. + :vartype log_analytics_query: str + :ivar top_devices_list: 10 devices with the highest number of occurrences + of this alert type, on this day. + :vartype top_devices_list: + list[~azure.mgmt.security.models.IoTSecurityAggregatedAlertPropertiesTopDevicesListItem] + """ + + _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}, + 'top_devices_list': {'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'}, + 'top_devices_list': {'key': 'properties.topDevicesList', 'type': '[IoTSecurityAggregatedAlertPropertiesTopDevicesListItem]'}, + } + + 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 + self.top_devices_list = None + + +class IoTSecurityAggregatedAlertPropertiesTopDevicesListItem(Model): + """IoTSecurityAggregatedAlertPropertiesTopDevicesListItem. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar device_id: Name of the device. + :vartype device_id: str + :ivar alerts_count: Number of alerts raised for this device. + :vartype alerts_count: int + :ivar last_occurrence: Most recent time this alert was raised for this + device, on this day. + :vartype last_occurrence: str + """ + + _validation = { + 'device_id': {'readonly': True}, + 'alerts_count': {'readonly': True}, + 'last_occurrence': {'readonly': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + 'last_occurrence': {'key': 'lastOccurrence', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(IoTSecurityAggregatedAlertPropertiesTopDevicesListItem, self).__init__(**kwargs) + self.device_id = None + self.alerts_count = None + self.last_occurrence = None + + +class IoTSecurityAggregatedRecommendation(Model): + """IoT 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 suspected vulnerability and meaning. + :vartype description: str + :ivar recommendation_type_id: Recommendation-type GUID. + :vartype recommendation_type_id: str + :ivar detected_by: Name of the organization that made the recommendation. + :vartype detected_by: str + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar reported_severity: Assessed recommendation severity. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar healthy_devices: Number of healthy devices within the IoT Security + solution. + :vartype healthy_devices: int + :ivar unhealthy_device_count: Number of unhealthy devices within the IoT + Security solution. + :vartype unhealthy_device_count: int + :ivar log_analytics_query: Log analytics query for getting the list of + affected devices/alerts. :vartype log_analytics_query: str """ @@ -3761,6 +4479,63 @@ def __init__(self, *, display_name: str, iot_hubs, tags=None, location: str=None self.unmasked_ip_logging_status = unmasked_ip_logging_status +class IotSensor(Resource): + """IoT sensor. + + 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 properties: IoT sensor properties + :type properties: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(IotSensor, self).__init__(**kwargs) + self.properties = properties + + +class IotSensorsList(Model): + """List of IoT sensors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List data + :vartype value: list[~azure.mgmt.security.models.IotSensor] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IotSensor]'}, + } + + def __init__(self, **kwargs) -> None: + super(IotSensorsList, self).__init__(**kwargs) + self.value = None + + class IoTSeverityMetrics(Model): """IoT Security solution analytics severity metrics. @@ -4216,16 +4991,66 @@ class Location(Model): } _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Location, self).__init__(**kwargs) + self.location = None + + +class MqttC2DMessagesNotInAllowedRange(TimeWindowCustomAlertRule): + """Number of cloud to device messages (MQTT protocol) is not in allowed range. + + 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 display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Status of the custom alert. + :type is_enabled: bool + :param rule_type: Required. Constant filled by server. + :type rule_type: str + :param min_threshold: Required. The minimum threshold. + :type min_threshold: int + :param max_threshold: Required. The maximum threshold. + :type max_threshold: int + :param time_window_size: Required. The time window size in iso8601 format. + :type time_window_size: timedelta + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'min_threshold': {'required': True}, + 'max_threshold': {'required': True}, + 'time_window_size': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'min_threshold': {'key': 'minThreshold', 'type': 'int'}, + 'max_threshold': {'key': 'maxThreshold', 'type': 'int'}, + 'time_window_size': {'key': 'timeWindowSize', 'type': 'duration'}, } - def __init__(self, **kwargs) -> None: - super(Location, self).__init__(**kwargs) - self.location = None + def __init__(self, *, is_enabled: bool, min_threshold: int, max_threshold: int, time_window_size, **kwargs) -> None: + super(MqttC2DMessagesNotInAllowedRange, self).__init__(is_enabled=is_enabled, min_threshold=min_threshold, max_threshold=max_threshold, time_window_size=time_window_size, **kwargs) + self.rule_type = 'MqttC2DMessagesNotInAllowedRange' -class MqttC2DMessagesNotInAllowedRange(TimeWindowCustomAlertRule): - """Number of cloud to device messages (MQTT protocol) is not in allowed range. +class MqttC2DRejectedMessagesNotInAllowedRange(TimeWindowCustomAlertRule): + """Number of rejected cloud to device messages (MQTT protocol) is not in + allowed range. Variables are only populated by the server, and will be ignored when sending a request. @@ -4269,13 +5094,12 @@ class MqttC2DMessagesNotInAllowedRange(TimeWindowCustomAlertRule): } def __init__(self, *, is_enabled: bool, min_threshold: int, max_threshold: int, time_window_size, **kwargs) -> None: - super(MqttC2DMessagesNotInAllowedRange, self).__init__(is_enabled=is_enabled, min_threshold=min_threshold, max_threshold=max_threshold, time_window_size=time_window_size, **kwargs) - self.rule_type = 'MqttC2DMessagesNotInAllowedRange' + super(MqttC2DRejectedMessagesNotInAllowedRange, self).__init__(is_enabled=is_enabled, min_threshold=min_threshold, max_threshold=max_threshold, time_window_size=time_window_size, **kwargs) + self.rule_type = 'MqttC2DRejectedMessagesNotInAllowedRange' -class MqttC2DRejectedMessagesNotInAllowedRange(TimeWindowCustomAlertRule): - """Number of rejected cloud to device messages (MQTT protocol) is not in - allowed range. +class MqttD2CMessagesNotInAllowedRange(TimeWindowCustomAlertRule): + """Number of device to cloud messages (MQTT protocol) is not in allowed range. Variables are only populated by the server, and will be ignored when sending a request. @@ -4318,178 +5142,462 @@ class MqttC2DRejectedMessagesNotInAllowedRange(TimeWindowCustomAlertRule): 'time_window_size': {'key': 'timeWindowSize', 'type': 'duration'}, } - def __init__(self, *, is_enabled: bool, min_threshold: int, max_threshold: int, time_window_size, **kwargs) -> None: - super(MqttC2DRejectedMessagesNotInAllowedRange, self).__init__(is_enabled=is_enabled, min_threshold=min_threshold, max_threshold=max_threshold, time_window_size=time_window_size, **kwargs) - self.rule_type = 'MqttC2DRejectedMessagesNotInAllowedRange' + def __init__(self, *, is_enabled: bool, min_threshold: int, max_threshold: int, time_window_size, **kwargs) -> None: + super(MqttD2CMessagesNotInAllowedRange, self).__init__(is_enabled=is_enabled, min_threshold=min_threshold, max_threshold=max_threshold, time_window_size=time_window_size, **kwargs) + self.rule_type = 'MqttD2CMessagesNotInAllowedRange' + + +class OnPremiseResourceDetails(ResourceDetails): + """Details of the On Premise resource that was assessed. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: OnPremiseSqlResourceDetails + + All required parameters must be populated in order to send to Azure. + + :param source: Required. Constant filled by server. + :type source: str + :param workspace_id: Required. Azure resource Id of the workspace the + machine is attached to + :type workspace_id: str + :param vmuuid: Required. The unique Id of the machine + :type vmuuid: str + :param source_computer_id: Required. The oms agent Id installed on the + machine + :type source_computer_id: str + :param machine_name: Required. The name of the machine + :type machine_name: str + """ + + _validation = { + 'source': {'required': True}, + 'workspace_id': {'required': True}, + 'vmuuid': {'required': True}, + 'source_computer_id': {'required': True}, + 'machine_name': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'vmuuid': {'key': 'vmuuid', 'type': 'str'}, + 'source_computer_id': {'key': 'sourceComputerId', 'type': 'str'}, + 'machine_name': {'key': 'machineName', 'type': 'str'}, + } + + _subtype_map = { + 'source': {'OnPremiseSql': 'OnPremiseSqlResourceDetails'} + } + + def __init__(self, *, workspace_id: str, vmuuid: str, source_computer_id: str, machine_name: str, **kwargs) -> None: + super(OnPremiseResourceDetails, self).__init__(**kwargs) + self.workspace_id = workspace_id + self.vmuuid = vmuuid + self.source_computer_id = source_computer_id + self.machine_name = machine_name + self.source = 'OnPremise' + + +class OnPremiseSqlResourceDetails(OnPremiseResourceDetails): + """Details of the On Premise Sql resource that was assessed. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. Constant filled by server. + :type source: str + :param workspace_id: Required. Azure resource Id of the workspace the + machine is attached to + :type workspace_id: str + :param vmuuid: Required. The unique Id of the machine + :type vmuuid: str + :param source_computer_id: Required. The oms agent Id installed on the + machine + :type source_computer_id: str + :param machine_name: Required. The name of the machine + :type machine_name: str + :param server_name: Required. The Sql server name installed on the machine + :type server_name: str + :param database_name: Required. The Sql database name installed on the + machine + :type database_name: str + """ + + _validation = { + 'source': {'required': True}, + 'workspace_id': {'required': True}, + 'vmuuid': {'required': True}, + 'source_computer_id': {'required': True}, + 'machine_name': {'required': True}, + 'server_name': {'required': True}, + 'database_name': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'vmuuid': {'key': 'vmuuid', 'type': 'str'}, + 'source_computer_id': {'key': 'sourceComputerId', 'type': 'str'}, + 'machine_name': {'key': 'machineName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, *, workspace_id: str, vmuuid: str, source_computer_id: str, machine_name: str, server_name: str, database_name: str, **kwargs) -> None: + super(OnPremiseSqlResourceDetails, self).__init__(workspace_id=workspace_id, vmuuid=vmuuid, source_computer_id=source_computer_id, machine_name=machine_name, **kwargs) + self.server_name = server_name + self.database_name = database_name + self.source = 'OnPremiseSql' + + +class Operation(Model): + """Possible operation in the REST API of Microsoft.Security. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the operation + :vartype name: str + :ivar origin: Where the operation is originated + :vartype origin: str + :param display: + :type display: ~azure.mgmt.security.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.origin = None + self.display = display + + +class OperationDisplay(Model): + """Security operation display. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The resource provider for the operation. + :vartype provider: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar operation: The display name of the security operation. + :vartype operation: str + :ivar description: The description of the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class PackageDownloadInfo(Model): + """Information on a specific package download. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar version: Version number + :vartype version: str + :param link: Download link + :type link: str + :ivar version_kind: Kind of the version. Possible values include: + 'Latest', 'Previous' + :vartype version_kind: str or ~azure.mgmt.security.models.VersionKind + """ + + _validation = { + 'version': {'readonly': True}, + 'version_kind': {'readonly': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'link': {'key': 'link', 'type': 'str'}, + 'version_kind': {'key': 'versionKind', 'type': 'str'}, + } + + def __init__(self, *, link: str=None, **kwargs) -> None: + super(PackageDownloadInfo, self).__init__(**kwargs) + self.version = None + self.link = link + self.version_kind = None + + +class PackageDownloads(Model): + """Information about package downloads. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar sensor: Contains all Sensor binary downloads + :vartype sensor: ~azure.mgmt.security.models.PackageDownloadsSensor + :ivar central_manager: All downloads for Central Manager + :vartype central_manager: + ~azure.mgmt.security.models.PackageDownloadsCentralManager + :ivar threat_intelligence: All downloads for threat intelligence + :vartype threat_intelligence: + ~azure.mgmt.security.models.PackageDownloadsThreatIntelligence + """ + + _validation = { + 'sensor': {'readonly': True}, + 'central_manager': {'readonly': True}, + 'threat_intelligence': {'readonly': True}, + } + + _attribute_map = { + 'sensor': {'key': 'sensor', 'type': 'PackageDownloadsSensor'}, + 'central_manager': {'key': 'centralManager', 'type': 'PackageDownloadsCentralManager'}, + 'threat_intelligence': {'key': 'threatIntelligence', 'type': 'PackageDownloadsThreatIntelligence'}, + } + + def __init__(self, **kwargs) -> None: + super(PackageDownloads, self).__init__(**kwargs) + self.sensor = None + self.central_manager = None + self.threat_intelligence = None + + +class PackageDownloadsCentralManager(Model): + """All downloads for Central Manager. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar full: Contains full package downloads + :vartype full: + ~azure.mgmt.security.models.PackageDownloadsCentralManagerFull + :ivar upgrade: Central Manager upgrade package downloads (on existing + installations) + :vartype upgrade: list[~azure.mgmt.security.models.PackageDownloadInfo] + """ + + _validation = { + 'full': {'readonly': True}, + 'upgrade': {'readonly': True}, + } + + _attribute_map = { + 'full': {'key': 'full', 'type': 'PackageDownloadsCentralManagerFull'}, + 'upgrade': {'key': 'upgrade', 'type': '[PackageDownloadInfo]'}, + } + + def __init__(self, **kwargs) -> None: + super(PackageDownloadsCentralManager, self).__init__(**kwargs) + self.full = None + self.upgrade = None + + +class PackageDownloadsCentralManagerFull(Model): + """Contains full package downloads. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar iso: Contains all ISO full versions of the Central Manager + :vartype iso: list[~azure.mgmt.security.models.PackageDownloadInfo] + :ivar ovf: Contains all OVF (virtual machine) full versions of the Central + Manager + :vartype ovf: + ~azure.mgmt.security.models.PackageDownloadsCentralManagerFullOvf + """ + + _validation = { + 'iso': {'readonly': True}, + 'ovf': {'readonly': True}, + } + + _attribute_map = { + 'iso': {'key': 'iso', 'type': '[PackageDownloadInfo]'}, + 'ovf': {'key': 'ovf', 'type': 'PackageDownloadsCentralManagerFullOvf'}, + } + + def __init__(self, **kwargs) -> None: + super(PackageDownloadsCentralManagerFull, self).__init__(**kwargs) + self.iso = None + self.ovf = None -class MqttD2CMessagesNotInAllowedRange(TimeWindowCustomAlertRule): - """Number of device to cloud messages (MQTT protocol) is not in allowed range. +class PackageDownloadsCentralManagerFullOvf(Model): + """Contains all OVF (virtual machine) full versions of the Central Manager. 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 display_name: The display name of the custom alert. - :vartype display_name: str - :ivar description: The description of the custom alert. - :vartype description: str - :param is_enabled: Required. Status of the custom alert. - :type is_enabled: bool - :param rule_type: Required. Constant filled by server. - :type rule_type: str - :param min_threshold: Required. The minimum threshold. - :type min_threshold: int - :param max_threshold: Required. The maximum threshold. - :type max_threshold: int - :param time_window_size: Required. The time window size in iso8601 format. - :type time_window_size: timedelta + :ivar enterprise: The Enterprise package type + :vartype enterprise: list[~azure.mgmt.security.models.PackageDownloadInfo] + :ivar enterprise_high_availability: The EnterpriseHighAvailability package + type + :vartype enterprise_high_availability: + list[~azure.mgmt.security.models.PackageDownloadInfo] + :ivar medium: The Medium package type + :vartype medium: list[~azure.mgmt.security.models.PackageDownloadInfo] + :ivar medium_high_availability: The MediumHighAvailability package type + :vartype medium_high_availability: + list[~azure.mgmt.security.models.PackageDownloadInfo] """ _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'is_enabled': {'required': True}, - 'rule_type': {'required': True}, - 'min_threshold': {'required': True}, - 'max_threshold': {'required': True}, - 'time_window_size': {'required': True}, + 'enterprise': {'readonly': True}, + 'enterprise_high_availability': {'readonly': True}, + 'medium': {'readonly': True}, + 'medium_high_availability': {'readonly': True}, } _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'rule_type': {'key': 'ruleType', 'type': 'str'}, - 'min_threshold': {'key': 'minThreshold', 'type': 'int'}, - 'max_threshold': {'key': 'maxThreshold', 'type': 'int'}, - 'time_window_size': {'key': 'timeWindowSize', 'type': 'duration'}, + 'enterprise': {'key': 'enterprise', 'type': '[PackageDownloadInfo]'}, + 'enterprise_high_availability': {'key': 'enterpriseHighAvailability', 'type': '[PackageDownloadInfo]'}, + 'medium': {'key': 'medium', 'type': '[PackageDownloadInfo]'}, + 'medium_high_availability': {'key': 'mediumHighAvailability', 'type': '[PackageDownloadInfo]'}, } - def __init__(self, *, is_enabled: bool, min_threshold: int, max_threshold: int, time_window_size, **kwargs) -> None: - super(MqttD2CMessagesNotInAllowedRange, self).__init__(is_enabled=is_enabled, min_threshold=min_threshold, max_threshold=max_threshold, time_window_size=time_window_size, **kwargs) - self.rule_type = 'MqttD2CMessagesNotInAllowedRange' + def __init__(self, **kwargs) -> None: + super(PackageDownloadsCentralManagerFullOvf, self).__init__(**kwargs) + self.enterprise = None + self.enterprise_high_availability = None + self.medium = None + self.medium_high_availability = None -class OnPremiseResourceDetails(ResourceDetails): - """Details of the On Premise resource that was assessed. +class PackageDownloadsSensor(Model): + """Contains all Sensor binary downloads. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when + sending a request. - :param source: Required. Constant filled by server. - :type source: str - :param workspace_id: Required. Azure resource Id of the workspace the - machine is attached to - :type workspace_id: str - :param vmuuid: Required. The unique Id of the machine - :type vmuuid: str - :param source_computer_id: Required. The oms agent Id installed on the - machine - :type source_computer_id: str - :param machine_name: Required. The name of the machine - :type machine_name: str + :ivar full: Contains full package downloads + :vartype full: ~azure.mgmt.security.models.PackageDownloadsSensorFull + :param upgrade: Sensor upgrade package downloads (on existing + installations) + :type upgrade: list[~azure.mgmt.security.models.PackageDownloadInfo] """ _validation = { - 'source': {'required': True}, - 'workspace_id': {'required': True}, - 'vmuuid': {'required': True}, - 'source_computer_id': {'required': True}, - 'machine_name': {'required': True}, + 'full': {'readonly': True}, } _attribute_map = { - 'source': {'key': 'source', 'type': 'str'}, - 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, - 'vmuuid': {'key': 'vmuuid', 'type': 'str'}, - 'source_computer_id': {'key': 'sourceComputerId', 'type': 'str'}, - 'machine_name': {'key': 'machineName', 'type': 'str'}, + 'full': {'key': 'full', 'type': 'PackageDownloadsSensorFull'}, + 'upgrade': {'key': 'upgrade', 'type': '[PackageDownloadInfo]'}, } - def __init__(self, *, workspace_id: str, vmuuid: str, source_computer_id: str, machine_name: str, **kwargs) -> None: - super(OnPremiseResourceDetails, self).__init__(**kwargs) - self.workspace_id = workspace_id - self.vmuuid = vmuuid - self.source_computer_id = source_computer_id - self.machine_name = machine_name - self.source = 'OnPremise' + def __init__(self, *, upgrade=None, **kwargs) -> None: + super(PackageDownloadsSensor, self).__init__(**kwargs) + self.full = None + self.upgrade = upgrade -class Operation(Model): - """Possible operation in the REST API of Microsoft.Security. +class PackageDownloadsSensorFull(Model): + """Contains full package downloads. Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: Name of the operation - :vartype name: str - :ivar origin: Where the operation is originated - :vartype origin: str - :param display: - :type display: ~azure.mgmt.security.models.OperationDisplay + :ivar iso: Contains all ISO full versions for the sensor + :vartype iso: list[~azure.mgmt.security.models.PackageDownloadInfo] + :param ovf: Contains all OVF (virtual machine) full versions for the + sensor + :type ovf: ~azure.mgmt.security.models.PackageDownloadsSensorFullOvf """ _validation = { - 'name': {'readonly': True}, - 'origin': {'readonly': True}, + 'iso': {'readonly': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'iso': {'key': 'iso', 'type': '[PackageDownloadInfo]'}, + 'ovf': {'key': 'ovf', 'type': 'PackageDownloadsSensorFullOvf'}, } - def __init__(self, *, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.origin = None - self.display = display + def __init__(self, *, ovf=None, **kwargs) -> None: + super(PackageDownloadsSensorFull, self).__init__(**kwargs) + self.iso = None + self.ovf = ovf -class OperationDisplay(Model): - """Security operation display. +class PackageDownloadsSensorFullOvf(Model): + """Contains all OVF (virtual machine) full versions for the sensor. Variables are only populated by the server, and will be ignored when sending a request. - :ivar provider: The resource provider for the operation. - :vartype provider: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar operation: The display name of the security operation. - :vartype operation: str - :ivar description: The description of the operation. - :vartype description: str + :ivar enterprise: Enterprise package type + :vartype enterprise: list[~azure.mgmt.security.models.PackageDownloadInfo] + :ivar medium: Medium package type + :vartype medium: list[~azure.mgmt.security.models.PackageDownloadInfo] + :ivar line: Line package type + :vartype line: list[~azure.mgmt.security.models.PackageDownloadInfo] """ _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, + 'enterprise': {'readonly': True}, + 'medium': {'readonly': True}, + 'line': {'readonly': True}, } _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, + 'enterprise': {'key': 'enterprise', 'type': '[PackageDownloadInfo]'}, + 'medium': {'key': 'medium', 'type': '[PackageDownloadInfo]'}, + 'line': {'key': 'line', 'type': '[PackageDownloadInfo]'}, } def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None + super(PackageDownloadsSensorFullOvf, self).__init__(**kwargs) + self.enterprise = None + self.medium = None + self.line = None + + +class PackageDownloadsThreatIntelligence(Model): + """All downloads for threat intelligence. + + :param link: Download link + :type link: str + """ + + _attribute_map = { + 'link': {'key': 'link', 'type': 'str'}, + } + + def __init__(self, *, link: str=None, **kwargs) -> None: + super(PackageDownloadsThreatIntelligence, self).__init__(**kwargs) + self.link = link class PathRecommendation(Model): """Represents a path that is recommended to be allowed and its properties. - :param path: The full path to whitelist + :param path: The full path of the file, or an identifier of the + application :type path: str :param action: Possible values include: 'Recommended', 'Add', 'Remove' :type action: str or ~azure.mgmt.security.models.enum @@ -4499,7 +5607,7 @@ class PathRecommendation(Model): :type type: str or ~azure.mgmt.security.models.enum :param publisher_info: :type publisher_info: ~azure.mgmt.security.models.PublisherInfo - :param common: Whether the path is commonly run on the machine + :param common: Whether the application is commonly run on the machine :type common: bool :param user_sids: :type user_sids: list[str] @@ -4687,6 +5795,27 @@ def __init__(self, *, exe=None, msi=None, script=None, executable=None, **kwargs self.executable = executable +class ProxyServerProperties(Model): + """For a non-Azure machine that is not connected directly to the internet, + specify a proxy server that the non-Azure machine can use. + + :param ip: Proxy server IP + :type ip: str + :param port: Proxy server port + :type port: str + """ + + _attribute_map = { + 'ip': {'key': 'ip', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'str'}, + } + + def __init__(self, *, ip: str=None, port: str=None, **kwargs) -> None: + super(ProxyServerProperties, self).__init__(**kwargs) + self.ip = ip + self.port = port + + class PublisherInfo(Model): """Represents the publisher information of a process/rule. @@ -5261,6 +6390,9 @@ class SecureScoreItem(Resource): :vartype max: int :ivar current: Current score :vartype current: float + :ivar weight: The weight for calculation of an aggregated score for + several scopes + :vartype weight: long """ _validation = { @@ -5270,6 +6402,7 @@ class SecureScoreItem(Resource): 'display_name': {'readonly': True}, 'max': {'readonly': True, 'minimum': 0}, 'current': {'readonly': True, 'minimum': 0}, + 'weight': {'readonly': True, 'minimum': 0}, } _attribute_map = { @@ -5279,6 +6412,7 @@ class SecureScoreItem(Resource): 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'max': {'key': 'properties.score.max', 'type': 'int'}, 'current': {'key': 'properties.score.current', 'type': 'float'}, + 'weight': {'key': 'properties.weight', 'type': 'long'}, } def __init__(self, **kwargs) -> None: @@ -5286,6 +6420,7 @@ def __init__(self, **kwargs) -> None: self.display_name = None self.max = None self.current = None + self.weight = None class SecurityAssessment(Resource): @@ -5648,6 +6783,164 @@ def __init__(self, *, email: str, alert_notifications, alerts_to_admins, phone: self.alerts_to_admins = alerts_to_admins +class SecuritySolution(Model): + """SecuritySolution. + + 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 + :ivar location: Location where the resource is stored + :vartype location: str + :param security_family: Required. The security family of the security + solution. Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' + :type security_family: str or ~azure.mgmt.security.models.SecurityFamily + :param provisioning_state: Required. The security family provisioning + State. Possible values include: 'Succeeded', 'Failed', 'Updating' + :type provisioning_state: str or + ~azure.mgmt.security.models.ProvisioningState + :param template: Required. The security solutions' template + :type template: str + :param protection_status: Required. The security solutions' status + :type protection_status: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'security_family': {'required': True}, + 'provisioning_state': {'required': True}, + 'template': {'required': True}, + 'protection_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'security_family': {'key': 'properties.securityFamily', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'template': {'key': 'properties.template', 'type': 'str'}, + 'protection_status': {'key': 'properties.protectionStatus', 'type': 'str'}, + } + + def __init__(self, *, security_family, provisioning_state, template: str, protection_status: str, **kwargs) -> None: + super(SecuritySolution, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.security_family = security_family + self.provisioning_state = provisioning_state + self.template = template + self.protection_status = protection_status + + +class SecuritySolutionsReferenceData(Model): + """SecuritySolutionsReferenceData. + + 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 + :ivar location: Location where the resource is stored + :vartype location: str + :param security_family: Required. The security family of the security + solution. Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' + :type security_family: str or ~azure.mgmt.security.models.SecurityFamily + :param alert_vendor_name: Required. The security solutions' vendor name + :type alert_vendor_name: str + :param package_info_url: Required. The security solutions' package info + url + :type package_info_url: str + :param product_name: Required. The security solutions' product name + :type product_name: str + :param publisher: Required. The security solutions' publisher + :type publisher: str + :param publisher_display_name: Required. The security solutions' publisher + display name + :type publisher_display_name: str + :param template: Required. The security solutions' template + :type template: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'security_family': {'required': True}, + 'alert_vendor_name': {'required': True}, + 'package_info_url': {'required': True}, + 'product_name': {'required': True}, + 'publisher': {'required': True}, + 'publisher_display_name': {'required': True}, + 'template': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'security_family': {'key': 'properties.securityFamily', 'type': 'str'}, + 'alert_vendor_name': {'key': 'properties.alertVendorName', 'type': 'str'}, + 'package_info_url': {'key': 'properties.packageInfoUrl', 'type': 'str'}, + 'product_name': {'key': 'properties.productName', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'publisher_display_name': {'key': 'properties.publisherDisplayName', 'type': 'str'}, + 'template': {'key': 'properties.template', 'type': 'str'}, + } + + def __init__(self, *, security_family, alert_vendor_name: str, package_info_url: str, product_name: str, publisher: str, publisher_display_name: str, template: str, **kwargs) -> None: + super(SecuritySolutionsReferenceData, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.security_family = security_family + self.alert_vendor_name = alert_vendor_name + self.package_info_url = package_info_url + self.product_name = product_name + self.publisher = publisher + self.publisher_display_name = publisher_display_name + self.template = template + + +class SecuritySolutionsReferenceDataList(Model): + """SecuritySolutionsReferenceDataList. + + :param value: + :type value: + list[~azure.mgmt.security.models.SecuritySolutionsReferenceData] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecuritySolutionsReferenceData]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(SecuritySolutionsReferenceDataList, self).__init__(**kwargs) + self.value = value + + class SecuritySubAssessment(Resource): """Security sub-assessment on a resource. @@ -5959,6 +7252,27 @@ def __init__(self, **kwargs) -> None: self.assessed_resource_type = 'ServerVulnerabilityAssessment' +class ServicePrincipalProperties(Model): + """Details of the service principal. + + :param application_id: Application id of service principal. + :type application_id: str + :param secret: A secret string that the application uses to prove its + identity, also can be referred to as application password (write only). + :type secret: str + """ + + _attribute_map = { + 'application_id': {'key': 'applicationId', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + } + + def __init__(self, *, application_id: str=None, secret: str=None, **kwargs) -> None: + super(ServicePrincipalProperties, self).__init__(**kwargs) + self.application_id = application_id + self.secret = secret + + class SqlServerVulnerabilityProperties(AdditionalData): """Details of the resource that was assessed. @@ -6255,6 +7569,22 @@ def __init__(self, **kwargs) -> None: self.resource_id = None +class TrackedResourceLocation(Model): + """Describes an Azure resource with location. + + :param location: Location where the resource is stored + :type location: str + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(TrackedResourceLocation, self).__init__(**kwargs) + self.location = location + + class TwinUpdatesNotInAllowedRange(TimeWindowCustomAlertRule): """Number of twin updates is not in allowed range. @@ -6459,7 +7789,7 @@ def __init__(self, **kwargs) -> None: class VmRecommendation(Model): - """Represents a machine that is part of a VM/server group. + """Represents a machine that is part of a machine group. :param configuration_status: Possible values include: 'Configured', 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py index c470a56ff2ad..5995b29bea6d 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py @@ -103,6 +103,32 @@ class IoTSecurityAggregatedRecommendationPaged(Paged): def __init__(self, *args, **kwargs): super(IoTSecurityAggregatedRecommendationPaged, self).__init__(*args, **kwargs) +class IotAlertPaged(Paged): + """ + A paging container for iterating over a list of :class:`IotAlert ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IotAlert]'} + } + + def __init__(self, *args, **kwargs): + + super(IotAlertPaged, self).__init__(*args, **kwargs) +class IotRecommendationPaged(Paged): + """ + A paging container for iterating over a list of :class:`IotRecommendation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IotRecommendation]'} + } + + def __init__(self, *args, **kwargs): + + super(IotRecommendationPaged, self).__init__(*args, **kwargs) class AscLocationPaged(Paged): """ A paging container for iterating over a list of :class:`AscLocation ` object @@ -428,3 +454,29 @@ class SecureScoreControlDefinitionItemPaged(Paged): def __init__(self, *args, **kwargs): super(SecureScoreControlDefinitionItemPaged, self).__init__(*args, **kwargs) +class SecuritySolutionPaged(Paged): + """ + A paging container for iterating over a list of :class:`SecuritySolution ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SecuritySolution]'} + } + + def __init__(self, *args, **kwargs): + + super(SecuritySolutionPaged, self).__init__(*args, **kwargs) +class ConnectorSettingPaged(Paged): + """ + A paging container for iterating over a list of :class:`ConnectorSetting ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ConnectorSetting]'} + } + + def __init__(self, *args, **kwargs): + + super(ConnectorSettingPaged, self).__init__(*args, **kwargs) 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 80839b6b303a..63b0b5488342 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 @@ -88,6 +88,45 @@ class UnmaskedIpLoggingStatus(str, Enum): enabled = "Enabled" #: Unmasked IP logging is enabled +class AlertSeverity(str, Enum): + + informational = "Informational" + low = "Low" + medium = "Medium" + high = "High" + + +class AlertIntent(str, Enum): + + unknown = "Unknown" + pre_attack = "PreAttack" + initial_access = "InitialAccess" + persistence = "Persistence" + privilege_escalation = "PrivilegeEscalation" + defense_evasion = "DefenseEvasion" + credential_access = "CredentialAccess" + discovery = "Discovery" + lateral_movement = "LateralMovement" + execution = "Execution" + collection = "Collection" + exfiltration = "Exfiltration" + command_and_control = "CommandAndControl" + impact = "Impact" + probing = "Probing" + exploitation = "Exploitation" + + +class RecommendationSeverity(str, Enum): + + unknown = "Unknown" + not_applicable = "NotApplicable" + healthy = "Healthy" + off_by_policy = "OffByPolicy" + low = "Low" + medium = "Medium" + high = "High" + + class AutoProvision(str, Enum): on = "On" #: Install missing security agent on VMs automatically @@ -140,6 +179,7 @@ class Severity(str, Enum): class EventSource(str, Enum): assessments = "Assessments" + sub_assessments = "SubAssessments" alerts = "Alerts" @@ -281,6 +321,42 @@ class ControlType(str, Enum): custom = "Custom" #: Non Azure Security Center managed assessments +class ProvisioningState(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + updating = "Updating" + + +class HybridComputeProvisioningState(str, Enum): + + valid = "Valid" #: Valid service principal details. + invalid = "Invalid" #: Invalid service principal details. + expired = "Expired" #: the service principal details are expired + + +class AuthenticationProvisioningState(str, Enum): + + valid = "Valid" #: Valid connector + invalid = "Invalid" #: Invalid connector + expired = "Expired" #: the connection is expired + incorrect_policy = "IncorrectPolicy" #: Incorrect policy of the connector + + +class PermissionProperty(str, Enum): + + awsaws_security_hub_read_only_access = "AWS::AWSSecurityHubReadOnlyAccess" #: This permission provides read only access to AWS Security Hub resources. + aws_security_audit = "AWS::SecurityAudit" #: This permission grants access to read security configuration metadata. + aws_amazon_ssm_automation_role = "AWS::AmazonSSMAutomationRole" #: The permission provides for EC2 Automation service to execute activities defined within Automation documents. + gcp_security_center_admin_viewer = "GCP::Security Center Admin Viewer" #: This permission provides read only access to GCP Security Command Center. + + +class VersionKind(str, Enum): + + latest = "Latest" + previous = "Previous" + + class ExpandEnum(str, Enum): links = "links" #: All links associated with an assessment 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 149a68ddb81e..41f8c690df7f 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 @@ -19,6 +19,10 @@ from ._iot_security_solution_analytics_operations import IotSecuritySolutionAnalyticsOperations from ._iot_security_solutions_analytics_aggregated_alert_operations import IotSecuritySolutionsAnalyticsAggregatedAlertOperations from ._iot_security_solutions_analytics_recommendation_operations import IotSecuritySolutionsAnalyticsRecommendationOperations +from ._iot_alert_types_operations import IotAlertTypesOperations +from ._iot_alerts_operations import IotAlertsOperations +from ._iot_recommendation_types_operations import IotRecommendationTypesOperations +from ._iot_recommendations_operations import IotRecommendationsOperations from ._locations_operations import LocationsOperations from ._operations import Operations from ._tasks_operations import TasksOperations @@ -42,10 +46,15 @@ from ._topology_operations import TopologyOperations from ._jit_network_access_policies_operations import JitNetworkAccessPoliciesOperations from ._discovered_security_solutions_operations import DiscoveredSecuritySolutionsOperations +from ._security_solutions_reference_data_operations import SecuritySolutionsReferenceDataOperations from ._external_security_solutions_operations import ExternalSecuritySolutionsOperations from ._secure_scores_operations import SecureScoresOperations from ._secure_score_controls_operations import SecureScoreControlsOperations from ._secure_score_control_definitions_operations import SecureScoreControlDefinitionsOperations +from ._security_solutions_operations import SecuritySolutionsOperations +from ._connectors_operations import ConnectorsOperations +from ._iot_defender_settings_operations import IotDefenderSettingsOperations +from ._iot_sensors_operations import IotSensorsOperations __all__ = [ 'ComplianceResultsOperations', @@ -58,6 +67,10 @@ 'IotSecuritySolutionAnalyticsOperations', 'IotSecuritySolutionsAnalyticsAggregatedAlertOperations', 'IotSecuritySolutionsAnalyticsRecommendationOperations', + 'IotAlertTypesOperations', + 'IotAlertsOperations', + 'IotRecommendationTypesOperations', + 'IotRecommendationsOperations', 'LocationsOperations', 'Operations', 'TasksOperations', @@ -81,8 +94,13 @@ 'TopologyOperations', 'JitNetworkAccessPoliciesOperations', 'DiscoveredSecuritySolutionsOperations', + 'SecuritySolutionsReferenceDataOperations', 'ExternalSecuritySolutionsOperations', 'SecureScoresOperations', 'SecureScoreControlsOperations', 'SecureScoreControlDefinitionsOperations', + 'SecuritySolutionsOperations', + 'ConnectorsOperations', + 'IotDefenderSettingsOperations', + 'IotSensorsOperations', ] diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_adaptive_application_controls_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_adaptive_application_controls_operations.py index 8ad6c49ff327..7ec60dfcafb1 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_adaptive_application_controls_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_adaptive_application_controls_operations.py @@ -41,8 +41,7 @@ def __init__(self, client, config, serializer, deserializer): def list( self, include_path_recommendations=None, summary=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of application control VM/server groups for the - subscription. + """Gets a list of application control machine groups for the subscription. :param include_path_recommendations: Include the policy rules :type include_path_recommendations: bool @@ -53,9 +52,10 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: AppWhitelistingGroups or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.AppWhitelistingGroups or - ~msrest.pipeline.ClientRawResponse + :return: AdaptiveApplicationControlGroups or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.AdaptiveApplicationControlGroups + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -94,7 +94,7 @@ def list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AppWhitelistingGroups', response) + deserialized = self._deserialize('AdaptiveApplicationControlGroups', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -107,15 +107,16 @@ def get( self, group_name, custom_headers=None, raw=False, **operation_config): """Gets an application control VM/server group. - :param group_name: Name of an application control VM/server group + :param group_name: Name of an application control machine group :type group_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: AppWhitelistingGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.AppWhitelistingGroup or + :return: AdaptiveApplicationControlGroup or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.AdaptiveApplicationControlGroup or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ @@ -153,7 +154,7 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AppWhitelistingGroup', response) + deserialized = self._deserialize('AdaptiveApplicationControlGroup', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -164,19 +165,21 @@ def get( def put( self, group_name, body, custom_headers=None, raw=False, **operation_config): - """Update an application control VM/server group. + """Update an application control machine group. - :param group_name: Name of an application control VM/server group + :param group_name: Name of an application control machine group :type group_name: str :param body: - :type body: ~azure.mgmt.security.models.AppWhitelistingGroup + :type body: + ~azure.mgmt.security.models.AdaptiveApplicationControlGroup :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: AppWhitelistingGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.AppWhitelistingGroup or + :return: AdaptiveApplicationControlGroup or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.AdaptiveApplicationControlGroup or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ @@ -205,7 +208,7 @@ def put( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(body, 'AppWhitelistingGroup') + body_content = self._serialize.body(body, 'AdaptiveApplicationControlGroup') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -218,7 +221,7 @@ def put( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AppWhitelistingGroup', response) + deserialized = self._deserialize('AdaptiveApplicationControlGroup', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -229,9 +232,9 @@ def put( def delete( self, group_name, custom_headers=None, raw=False, **operation_config): - """Delete an application control VM/server group. + """Delete an application control machine group. - :param group_name: Name of an application control VM/server group + :param group_name: Name of an application control machine group :type group_name: str :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/operations/_connectors_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_connectors_operations.py new file mode 100644 index 000000000000..3b41670485db --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_connectors_operations.py @@ -0,0 +1,289 @@ +# 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 ConnectorsOperations(object): + """ConnectorsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :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: "2020-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-01-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Cloud accounts connectors of a subscription. + + :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 ConnectorSetting + :rtype: + ~azure.mgmt.security.models.ConnectorSettingPaged[~azure.mgmt.security.models.ConnectorSetting] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + 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') + + 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + header_dict = None + if raw: + header_dict = {} + deserialized = models.ConnectorSettingPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/connectors'} + + def get( + self, connector_name, custom_headers=None, raw=False, **operation_config): + """Details of a specific cloud account connector. + + :param connector_name: Name of the cloud account connector + :type connector_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: ConnectorSetting or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.ConnectorSetting 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}$'), + 'connectorName': self._serialize.url("connector_name", connector_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('ConnectorSetting', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/connectors/{connectorName}'} + + def create_or_update( + self, connector_name, hybrid_compute_settings=None, authentication_details=None, custom_headers=None, raw=False, **operation_config): + """Create a cloud account connector or update an existing one. Connect to + your AWS cloud account using either account credentials or role-based + authentication. + + :param connector_name: Name of the cloud account connector + :type connector_name: str + :param hybrid_compute_settings: Settings for hybrid compute + management, these settings are relevant only Arc autoProvision (Hybrid + Compute). + :type hybrid_compute_settings: + ~azure.mgmt.security.models.HybridComputeSettingsProperties + :param authentication_details: Settings for authentication management, + these settings are relevant only for the cloud connector. + :type authentication_details: + ~azure.mgmt.security.models.AuthenticationDetailsProperties + :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: ConnectorSetting or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.ConnectorSetting or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + connector_setting = models.ConnectorSetting(hybrid_compute_settings=hybrid_compute_settings, authentication_details=authentication_details) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'connectorName': self._serialize.url("connector_name", connector_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(connector_setting, 'ConnectorSetting') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectorSetting', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/connectors/{connectorName}'} + + def delete( + self, connector_name, custom_headers=None, raw=False, **operation_config): + """Delete a cloud account connector from a subscription. + + :param connector_name: Name of the cloud account connector + :type connector_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}$'), + 'connectorName': self._serialize.url("connector_name", connector_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}/providers/Microsoft.Security/connectors/{connectorName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_alert_types_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_alert_types_operations.py new file mode 100644 index 000000000000..7cf80ec7889b --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_alert_types_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 IotAlertTypesOperations(object): + """IotAlertTypesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """List IoT alert types. + + :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 name of the IoT Security solution. + :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: IotAlertTypeList or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IotAlertTypeList or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # 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') + + # 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('IotAlertTypeList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/iotAlertTypes'} + + def get( + self, resource_group_name, solution_name, iot_alert_type_name, custom_headers=None, raw=False, **operation_config): + """Get IoT alert type. + + :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 name of the IoT Security solution. + :type solution_name: str + :param iot_alert_type_name: Name of the alert type + :type iot_alert_type_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: IotAlertType or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IotAlertType 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'), + 'iotAlertTypeName': self._serialize.url("iot_alert_type_name", iot_alert_type_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('IotAlertType', 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}/iotAlertTypes/{iotAlertTypeName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_alerts_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_alerts_operations.py new file mode 100644 index 000000000000..9b7400574cae --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_alerts_operations.py @@ -0,0 +1,200 @@ +# 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 IotAlertsOperations(object): + """IotAlertsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list( + self, resource_group_name, solution_name, min_start_time_utc=None, max_start_time_utc=None, alert_type=None, limit=None, skip_token=None, custom_headers=None, raw=False, **operation_config): + """List IoT alerts. + + :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 name of the IoT Security solution. + :type solution_name: str + :param min_start_time_utc: Filter by minimum startTimeUtc (ISO 8601 + format) + :type min_start_time_utc: str + :param max_start_time_utc: Filter by maximum startTimeUtc (ISO 8601 + format) + :type max_start_time_utc: str + :param alert_type: Filter by alert type + :type alert_type: str + :param limit: Limit the number of items returned in a single page + :type limit: int + :param skip_token: Skip token used for pagination + :type skip_token: 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 IotAlert + :rtype: + ~azure.mgmt.security.models.IotAlertPaged[~azure.mgmt.security.models.IotAlert] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + 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 min_start_time_utc is not None: + query_parameters['startTimeUtc>'] = self._serialize.query("min_start_time_utc", min_start_time_utc, 'str') + if max_start_time_utc is not None: + query_parameters['startTimeUtc<'] = self._serialize.query("max_start_time_utc", max_start_time_utc, 'str') + if alert_type is not None: + query_parameters['alertType'] = self._serialize.query("alert_type", alert_type, 'str') + if limit is not None: + query_parameters['$limit'] = self._serialize.query("limit", limit, 'int') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, '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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + header_dict = None + if raw: + header_dict = {} + deserialized = models.IotAlertPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/iotAlerts'} + + def get( + self, resource_group_name, solution_name, iot_alert_id, custom_headers=None, raw=False, **operation_config): + """Get IoT alert. + + :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 name of the IoT Security solution. + :type solution_name: str + :param iot_alert_id: Id of the alert + :type iot_alert_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IotAlert or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IotAlert 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'), + 'iotAlertId': self._serialize.url("iot_alert_id", iot_alert_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IotAlert', 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}/iotAlerts/{iotAlertId}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_defender_settings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_defender_settings_operations.py new file mode 100644 index 000000000000..da321b92a5b4 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_defender_settings_operations.py @@ -0,0 +1,309 @@ +# 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 IotDefenderSettingsOperations(object): + """IotDefenderSettingsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :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: "2020-08-06-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-08-06-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List IoT Defender Settings. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IotDefenderSettingsList or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IotDefenderSettingsList or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # 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') + + # 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('IotDefenderSettingsList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings'} + + def get( + self, custom_headers=None, raw=False, **operation_config): + """Get IoT Defender Settings. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IotDefenderSettingsModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IotDefenderSettingsModel 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}$') + } + 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('IotDefenderSettingsModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings/default'} + + def create_or_update( + self, custom_headers=None, raw=False, **operation_config): + """Create or update IoT Defender settings. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IotDefenderSettingsModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IotDefenderSettingsModel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + 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.put(url, query_parameters, header_parameters) + 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('IotDefenderSettingsModel', response) + if response.status_code == 201: + deserialized = self._deserialize('IotDefenderSettingsModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings/default'} + + def delete( + self, custom_headers=None, raw=False, **operation_config): + """Delete IoT Defender settings. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: 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}$') + } + 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}/providers/Microsoft.Security/iotDefenderSettings/default'} + + def package_downloads_method( + self, custom_headers=None, raw=False, **operation_config): + """Information about downloadable packages. + + :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: PackageDownloads or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.PackageDownloads or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.package_downloads_method.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') + + # 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.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 + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PackageDownloads', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + package_downloads_method.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings/default/packageDownloads'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_recommendation_types_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_recommendation_types_operations.py new file mode 100644 index 000000000000..743ca835bbab --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_recommendation_types_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 IotRecommendationTypesOperations(object): + """IotRecommendationTypesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """List IoT recommendation types. + + :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 name of the IoT Security solution. + :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: IotRecommendationTypeList or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IotRecommendationTypeList or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # 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') + + # 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('IotRecommendationTypeList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/iotRecommendationTypes'} + + def get( + self, resource_group_name, solution_name, iot_recommendation_type_name, custom_headers=None, raw=False, **operation_config): + """Get IoT recommendation type. + + :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 name of the IoT Security solution. + :type solution_name: str + :param iot_recommendation_type_name: Name of the recommendation type + :type iot_recommendation_type_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: IotRecommendationType or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IotRecommendationType 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'), + 'iotRecommendationTypeName': self._serialize.url("iot_recommendation_type_name", iot_recommendation_type_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('IotRecommendationType', 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}/iotRecommendationTypes/{iotRecommendationTypeName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_recommendations_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_recommendations_operations.py new file mode 100644 index 000000000000..87dfb87e18e1 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_recommendations_operations.py @@ -0,0 +1,190 @@ +# 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 IotRecommendationsOperations(object): + """IotRecommendationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list( + self, resource_group_name, solution_name, recommendation_type=None, limit=None, skip_token=None, custom_headers=None, raw=False, **operation_config): + """List IoT recommendations. + + :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 name of the IoT Security solution. + :type solution_name: str + :param recommendation_type: Filter by recommendation type + :type recommendation_type: str + :param limit: Limit the number of items returned in a single page + :type limit: int + :param skip_token: Skip token used for pagination + :type skip_token: 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 IotRecommendation + :rtype: + ~azure.mgmt.security.models.IotRecommendationPaged[~azure.mgmt.security.models.IotRecommendation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + 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 recommendation_type is not None: + query_parameters['recommendationType'] = self._serialize.query("recommendation_type", recommendation_type, 'str') + if limit is not None: + query_parameters['$limit'] = self._serialize.query("limit", limit, 'int') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, '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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + header_dict = None + if raw: + header_dict = {} + deserialized = models.IotRecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/iotRecommendations'} + + def get( + self, resource_group_name, solution_name, iot_recommendation_id, custom_headers=None, raw=False, **operation_config): + """Get IoT recommendation. + + :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 name of the IoT Security solution. + :type solution_name: str + :param iot_recommendation_id: Id of the recommendation + :type iot_recommendation_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IotRecommendation or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IotRecommendation 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'), + 'iotRecommendationId': self._serialize.url("iot_recommendation_id", iot_recommendation_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IotRecommendation', 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}/iotRecommendations/{iotRecommendationId}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_sensors_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_sensors_operations.py new file mode 100644 index 000000000000..ccc324d30f8a --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_sensors_operations.py @@ -0,0 +1,333 @@ +# 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 IotSensorsOperations(object): + """IotSensorsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :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: "2020-08-06-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-08-06-preview" + + self.config = config + + def list( + self, scope, custom_headers=None, raw=False, **operation_config): + """List IoT sensors. + + :param scope: Scope of the query, can be subscription + (/subscriptions/326b1ffa-8ac7-4034-8437-69bef733dede) or IoT Hub + (/providers/Microsoft.Devices/iotHubs/myHub) + :type scope: 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: IotSensorsList or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IotSensorsList or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + } + 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('IotSensorsList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/{scope}/providers/Microsoft.Security/iotSensors'} + + def get( + self, scope, iot_sensor_name, custom_headers=None, raw=False, **operation_config): + """Get IoT sensor. + + :param scope: Scope of the query, can be subscription + (/subscriptions/326b1ffa-8ac7-4034-8437-69bef733dede) or IoT Hub + (/providers/Microsoft.Devices/iotHubs/myHub) + :type scope: str + :param iot_sensor_name: Name of the IoT sensor + :type iot_sensor_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: IotSensor or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IotSensor or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'iotSensorName': self._serialize.url("iot_sensor_name", iot_sensor_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('IotSensor', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}'} + + def create_or_update( + self, scope, iot_sensor_name, custom_headers=None, raw=False, **operation_config): + """Create or update IoT sensor. + + :param scope: Scope of the query, can be subscription + (/subscriptions/326b1ffa-8ac7-4034-8437-69bef733dede) or IoT Hub + (/providers/Microsoft.Devices/iotHubs/myHub) + :type scope: str + :param iot_sensor_name: Name of the IoT sensor + :type iot_sensor_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: IotSensor or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IotSensor or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'iotSensorName': self._serialize.url("iot_sensor_name", iot_sensor_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.put(url, query_parameters, header_parameters) + 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('IotSensor', response) + if response.status_code == 201: + deserialized = self._deserialize('IotSensor', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}'} + + def delete( + self, scope, iot_sensor_name, custom_headers=None, raw=False, **operation_config): + """Delete IoT sensor. + + :param scope: Scope of the query, can be subscription + (/subscriptions/326b1ffa-8ac7-4034-8437-69bef733dede) or IoT Hub + (/providers/Microsoft.Devices/iotHubs/myHub) + :type scope: str + :param iot_sensor_name: Name of the IoT sensor + :type iot_sensor_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 = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'iotSensorName': self._serialize.url("iot_sensor_name", iot_sensor_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': '/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}'} + + def download_activation( + self, scope, iot_sensor_name, custom_headers=None, raw=False, **operation_config): + """Download sensor activation file. + + :param scope: Scope of the query, can be subscription + (/subscriptions/326b1ffa-8ac7-4034-8437-69bef733dede) or IoT Hub + (/providers/Microsoft.Devices/iotHubs/myHub) + :type scope: str + :param iot_sensor_name: Name of the IoT sensor + :type iot_sensor_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.download_activation.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'iotSensorName': self._serialize.url("iot_sensor_name", iot_sensor_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 + download_activation.metadata = {'url': '/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}/downloadActivation'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_security_solutions_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_security_solutions_operations.py new file mode 100644 index 000000000000..dd85fc63920b --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_security_solutions_operations.py @@ -0,0 +1,169 @@ +# 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 SecuritySolutionsOperations(object): + """SecuritySolutionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :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: "2020-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-01-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of Security Solutions for the subscription. + + :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 SecuritySolution + :rtype: + ~azure.mgmt.security.models.SecuritySolutionPaged[~azure.mgmt.security.models.SecuritySolution] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + 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') + + 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + header_dict = None + if raw: + header_dict = {} + deserialized = models.SecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/securitySolutions'} + + def get( + self, resource_group_name, security_solution_name, custom_headers=None, raw=False, **operation_config): + """Gets a specific 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 security_solution_name: Name of security solution. + :type security_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: SecuritySolution or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.SecuritySolution 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\._\(\)]+$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'securitySolutionName': self._serialize.url("security_solution_name", security_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('SecuritySolution', 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/locations/{ascLocation}/securitySolutions/{securitySolutionName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_security_solutions_reference_data_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_security_solutions_reference_data_operations.py new file mode 100644 index 000000000000..b3c6ece9ddd9 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_security_solutions_reference_data_operations.py @@ -0,0 +1,154 @@ +# 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 SecuritySolutionsReferenceDataOperations(object): + """SecuritySolutionsReferenceDataOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :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: "2020-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-01-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of all supported Security Solutions for the subscription. + + :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: SecuritySolutionsReferenceDataList or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.SecuritySolutionsReferenceDataList + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # 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') + + # 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('SecuritySolutionsReferenceDataList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/securitySolutionsReferenceData'} + + def list_by_home_region( + self, custom_headers=None, raw=False, **operation_config): + """Gets list of all supported Security Solutions for subscription and + location. + + :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: SecuritySolutionsReferenceDataList or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.SecuritySolutionsReferenceDataList + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_by_home_region.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}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, '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('SecuritySolutionsReferenceDataList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/securitySolutionsReferenceData'}