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..2cc3bc40b13b 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,13 @@ 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 . import models @@ -79,6 +86,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 +140,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 +150,10 @@ 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 :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -175,6 +196,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 +250,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 +260,7 @@ 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) 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..5442803a675e 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,20 @@ 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 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 @@ -114,6 +126,7 @@ 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 +148,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 +158,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 @@ -169,6 +186,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 +202,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 +219,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 +232,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 +249,20 @@ 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 IotRecommendation + from ._models import IotRecommendationType + from ._models import IotRecommendationTypeList from ._models import IoTSecurityAggregatedAlert from ._models import IoTSecurityAggregatedAlertPropertiesTopDevicesListItem from ._models import IoTSecurityAggregatedRecommendation @@ -269,6 +298,7 @@ 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 +320,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 +330,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 @@ -328,10 +362,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 +383,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 +400,9 @@ RecommendationType, RecommendationConfigStatus, UnmaskedIpLoggingStatus, + AlertSeverity, + AlertIntent, + RecommendationSeverity, AutoProvision, Rank, AlertNotifications, @@ -388,6 +429,10 @@ AadConnectivityState, ExternalSecuritySolutionKind, ControlType, + ProvisioningState, + HybridComputeProvisioningState, + AuthenticationProvisioningState, + PermissionProperty, ExpandEnum, ConnectionType, ExpandControlsEnum, @@ -398,6 +443,9 @@ 'AadExternalSecuritySolution', 'AadSolutionProperties', 'ActiveConnectionsNotInAllowedRange', + 'AdaptiveApplicationControlGroup', + 'AdaptiveApplicationControlGroups', + 'AdaptiveApplicationControlIssueSummary', 'AdaptiveNetworkHardening', 'AdaptiveNetworkHardeningEnforceRequest', 'AdditionalData', @@ -411,14 +459,12 @@ 'AmqpC2DMessagesNotInAllowedRange', 'AmqpC2DRejectedMessagesNotInAllowedRange', 'AmqpD2CMessagesNotInAllowedRange', - 'AppWhitelistingGroup', - 'AppWhitelistingGroups', - 'AppWhitelistingIssueSummary', 'AscLocation', 'AssessmentLinks', 'AssessmentStatus', 'AtaExternalSecuritySolution', 'AtaSolutionProperties', + 'AuthenticationDetailsProperties', 'Automation', 'AutomationAction', 'AutomationActionEventHub', @@ -430,6 +476,8 @@ 'AutomationTriggeringRule', 'AutomationValidationStatus', 'AutoProvisioningSetting', + 'AwAssumeRoleAuthenticationDetailsProperties', + 'AwsCredsAuthenticationDetailsProperties', 'AzureResourceDetails', 'AzureResourceLink', 'CefExternalSecuritySolution', @@ -441,6 +489,7 @@ 'ConnectedResource', 'ConnectedWorkspace', 'ConnectionToIpNotAllowed', + 'ConnectorSetting', 'ContainerRegistryVulnerabilityProperties', 'CustomAlertRule', 'CVE', @@ -457,12 +506,20 @@ 'ExternalSecuritySolutionProperties', 'FailedLocalLoginsNotInAllowedRange', 'FileUploadsNotInAllowedRange', + 'GcpCredentialsDetailsProperties', 'HttpC2DMessagesNotInAllowedRange', 'HttpC2DRejectedMessagesNotInAllowedRange', 'HttpD2CMessagesNotInAllowedRange', + 'HybridComputeSettingsProperties', 'InformationProtectionKeyword', 'InformationProtectionPolicy', 'InformationType', + 'IotAlert', + 'IotAlertType', + 'IotAlertTypeList', + 'IotRecommendation', + 'IotRecommendationType', + 'IotRecommendationTypeList', 'IoTSecurityAggregatedAlert', 'IoTSecurityAggregatedAlertPropertiesTopDevicesListItem', 'IoTSecurityAggregatedRecommendation', @@ -498,6 +555,7 @@ 'PricingList', 'ProcessNotAllowed', 'ProtectionMode', + 'ProxyServerProperties', 'PublisherInfo', 'QueuePurgesNotInAllowedRange', 'RecommendationConfigurationProperties', @@ -519,6 +577,9 @@ 'SecurityAssessmentMetadataProperties', 'SecurityAssessmentPartnerData', 'SecurityContact', + 'SecuritySolution', + 'SecuritySolutionsReferenceData', + 'SecuritySolutionsReferenceDataList', 'SecuritySubAssessment', 'SecurityTask', 'SecurityTaskParameters', @@ -526,6 +587,7 @@ 'ServerVulnerabilityAssessment', 'ServerVulnerabilityAssessmentsList', 'ServerVulnerabilityProperties', + 'ServicePrincipalProperties', 'Setting', 'SettingResource', 'SqlServerVulnerabilityProperties', @@ -555,6 +617,8 @@ 'IoTSecuritySolutionModelPaged', 'IoTSecurityAggregatedAlertPaged', 'IoTSecurityAggregatedRecommendationPaged', + 'IotAlertPaged', + 'IotRecommendationPaged', 'AscLocationPaged', 'OperationPaged', 'SecurityTaskPaged', @@ -580,6 +644,8 @@ 'SecureScoreItemPaged', 'SecureScoreControlDetailsPaged', 'SecureScoreControlDefinitionItemPaged', + 'SecuritySolutionPaged', + 'ConnectorSettingPaged', 'ResourceStatus', 'PricingTier', 'ReportedSeverity', @@ -590,6 +656,9 @@ 'RecommendationType', 'RecommendationConfigStatus', 'UnmaskedIpLoggingStatus', + 'AlertSeverity', + 'AlertIntent', + 'RecommendationSeverity', 'AutoProvision', 'Rank', 'AlertNotifications', @@ -616,6 +685,10 @@ 'AadConnectivityState', 'ExternalSecuritySolutionKind', 'ControlType', + 'ProvisioningState', + 'HybridComputeProvisioningState', + 'AuthenticationProvisioningState', + 'PermissionProperty', '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..6b4e95f9de5f 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. @@ -1871,44 +1920,159 @@ 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 = { - 'source': {'key': 'source', 'type': 'str'}, - } - - _subtype_map = { - 'source': {'OnPremise': 'OnPremiseResourceDetails', 'Azure': 'AzureResourceDetails'} + '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(ResourceDetails, self).__init__(**kwargs) - self.source = None + 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 AzureResourceDetails(ResourceDetails): - """Details of the Azure resource that was assessed. +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. - :param source: Required. Constant filled by server. + :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 = { + 'source': {'key': 'source', 'type': 'str'}, + } + + _subtype_map = { + 'source': {'OnPremise': 'OnPremiseResourceDetails', 'Azure': 'AzureResourceDetails'} + } + + def __init__(self, **kwargs): + super(ResourceDetails, self).__init__(**kwargs) + self.source = None + + +class AzureResourceDetails(ResourceDetails): + """Details of the Azure resource that was assessed. + + 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 id: Azure resource Id of the assessed resource :vartype id: str @@ -2329,6 +2493,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 +3149,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. @@ -3077,51 +3383,403 @@ class HttpD2CMessagesNotInAllowedRange(TimeWindowCustomAlertRule): } _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'}, + '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(HttpD2CMessagesNotInAllowedRange, self).__init__(**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. + + :param pattern: The keyword pattern. + :type pattern: str + :param custom: Indicates whether the keyword is custom or not. + :type custom: bool + :param can_be_numeric: Indicates whether the keyword can be applied on + numeric types or not. + :type can_be_numeric: bool + :param excluded: Indicates whether the keyword is excluded or not. + :type excluded: bool + """ + + _attribute_map = { + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'custom': {'key': 'custom', 'type': 'bool'}, + 'can_be_numeric': {'key': 'canBeNumeric', 'type': 'bool'}, + 'excluded': {'key': 'excluded', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(InformationProtectionKeyword, self).__init__(**kwargs) + self.pattern = kwargs.get('pattern', None) + self.custom = kwargs.get('custom', None) + self.can_be_numeric = kwargs.get('can_be_numeric', None) + self.excluded = kwargs.get('excluded', None) + + +class InformationProtectionPolicy(Resource): + """Information protection policy. + + 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 last_modified_utc: Describes the last UTC time the policy was + modified. + :vartype last_modified_utc: datetime + :ivar version: Describes the version of the policy. + :vartype version: str + :param labels: Dictionary of sensitivity labels. + :type labels: dict[str, ~azure.mgmt.security.models.SensitivityLabel] + :param information_types: The sensitivity information types. + :type information_types: dict[str, + ~azure.mgmt.security.models.InformationType] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_modified_utc': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_modified_utc': {'key': 'properties.lastModifiedUtc', 'type': 'iso-8601'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'labels': {'key': 'properties.labels', 'type': '{SensitivityLabel}'}, + 'information_types': {'key': 'properties.informationTypes', 'type': '{InformationType}'}, + } + + def __init__(self, **kwargs): + super(InformationProtectionPolicy, self).__init__(**kwargs) + self.last_modified_utc = None + self.version = None + self.labels = kwargs.get('labels', None) + self.information_types = kwargs.get('information_types', None) + + +class InformationType(Model): + """The information type. + + :param display_name: The name of the information type. + :type display_name: str + :param description: The description of the information type. + :type description: str + :param order: The order of the information type. + :type order: int + :param recommended_label_id: The recommended label id to be associated + with this information type. + :type recommended_label_id: str + :param enabled: Indicates whether the information type is enabled or not. + :type enabled: bool + :param custom: Indicates whether the information type is custom or not. + :type custom: bool + :param keywords: The information type keywords. + :type keywords: + list[~azure.mgmt.security.models.InformationProtectionKeyword] + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'recommended_label_id': {'key': 'recommendedLabelId', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'custom': {'key': 'custom', 'type': 'bool'}, + 'keywords': {'key': 'keywords', 'type': '[InformationProtectionKeyword]'}, + } + + def __init__(self, **kwargs): + super(InformationType, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.order = kwargs.get('order', None) + self.recommended_label_id = kwargs.get('recommended_label_id', None) + self.enabled = kwargs.get('enabled', None) + self.custom = kwargs.get('custom', None) + self.keywords = kwargs.get('keywords', None) + + +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. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar alert_display_name: The display name of the alert + :vartype alert_display_name: str + :ivar severity: The severity of the alert. Possible values include: + 'Informational', 'Low', 'Medium', 'High' + :vartype severity: str or ~azure.mgmt.security.models.AlertSeverity + :ivar description: Description of the suspected vulnerability and meaning. + :vartype description: str + :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_display_name': {'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}, + 'intent': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + '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(IotAlertType, self).__init__(**kwargs) + self.alert_display_name = 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.intent = None + self.remediation_steps = None + + +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(HttpD2CMessagesNotInAllowedRange, self).__init__(**kwargs) - self.rule_type = 'HttpD2CMessagesNotInAllowedRange' + super(IotAlertTypeList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) -class InformationProtectionKeyword(Model): - """The information type keyword. +class IotRecommendation(Resource): + """IoT recommendation. - :param pattern: The keyword pattern. - :type pattern: str - :param custom: Indicates whether the keyword is custom or not. - :type custom: bool - :param can_be_numeric: Indicates whether the keyword can be applied on - numeric types or not. - :type can_be_numeric: bool - :param excluded: Indicates whether the keyword is excluded or not. - :type excluded: bool + 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 = { - 'pattern': {'key': 'pattern', 'type': 'str'}, - 'custom': {'key': 'custom', 'type': 'bool'}, - 'can_be_numeric': {'key': 'canBeNumeric', 'type': 'bool'}, - 'excluded': {'key': 'excluded', 'type': 'bool'}, + '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(InformationProtectionKeyword, self).__init__(**kwargs) - self.pattern = kwargs.get('pattern', None) - self.custom = kwargs.get('custom', None) - self.can_be_numeric = kwargs.get('can_be_numeric', None) - self.excluded = kwargs.get('excluded', None) + 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 InformationProtectionPolicy(Resource): - """Information protection policy. +class IotRecommendationType(Resource): + """IoT recommendation type. Variables are only populated by the server, and will be ignored when sending a request. @@ -3132,84 +3790,89 @@ class InformationProtectionPolicy(Resource): :vartype name: str :ivar type: Resource type :vartype type: str - :ivar last_modified_utc: Describes the last UTC time the policy was - modified. - :vartype last_modified_utc: datetime - :ivar version: Describes the version of the policy. - :vartype version: str - :param labels: Dictionary of sensitivity labels. - :type labels: dict[str, ~azure.mgmt.security.models.SensitivityLabel] - :param information_types: The sensitivity information types. - :type information_types: dict[str, - ~azure.mgmt.security.models.InformationType] + :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}, - 'last_modified_utc': {'readonly': True}, - 'version': {'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'}, - 'last_modified_utc': {'key': 'properties.lastModifiedUtc', 'type': 'iso-8601'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'labels': {'key': 'properties.labels', 'type': '{SensitivityLabel}'}, - 'information_types': {'key': 'properties.informationTypes', 'type': '{InformationType}'}, + '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(InformationProtectionPolicy, self).__init__(**kwargs) - self.last_modified_utc = None - self.version = None - self.labels = kwargs.get('labels', None) - self.information_types = kwargs.get('information_types', 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 InformationType(Model): - """The information type. +class IotRecommendationTypeList(Model): + """List of recommendation types. - :param display_name: The name of the information type. - :type display_name: str - :param description: The description of the information type. - :type description: str - :param order: The order of the information type. - :type order: int - :param recommended_label_id: The recommended label id to be associated - with this information type. - :type recommended_label_id: str - :param enabled: Indicates whether the information type is enabled or not. - :type enabled: bool - :param custom: Indicates whether the information type is custom or not. - :type custom: bool - :param keywords: The information type keywords. - :type keywords: - list[~azure.mgmt.security.models.InformationProtectionKeyword] + :param value: List data + :type value: list[~azure.mgmt.security.models.IotRecommendationType] """ _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'int'}, - 'recommended_label_id': {'key': 'recommendedLabelId', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'custom': {'key': 'custom', 'type': 'bool'}, - 'keywords': {'key': 'keywords', 'type': '[InformationProtectionKeyword]'}, + 'value': {'key': 'value', 'type': '[IotRecommendationType]'}, } def __init__(self, **kwargs): - super(InformationType, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.description = kwargs.get('description', None) - self.order = kwargs.get('order', None) - self.recommended_label_id = kwargs.get('recommended_label_id', None) - self.enabled = kwargs.get('enabled', None) - self.custom = kwargs.get('custom', None) - self.keywords = kwargs.get('keywords', None) + super(IotRecommendationTypeList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) class IoTSecurityAggregatedAlert(Model): @@ -4489,7 +5152,8 @@ def __init__(self, **kwargs): 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 +5163,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 +5351,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. @@ -5648,6 +6333,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 +6802,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. @@ -6459,7 +7323,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..018cceec7350 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. @@ -1871,37 +1920,152 @@ 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 = { - 'source': {'key': 'source', 'type': 'str'}, - } - - _subtype_map = { - 'source': {'OnPremise': 'OnPremiseResourceDetails', 'Azure': 'AzureResourceDetails'} + '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) -> None: - super(ResourceDetails, self).__init__(**kwargs) - self.source = None + 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 AzureResourceDetails(ResourceDetails): - """Details of the Azure resource that was assessed. +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 = { + 'source': {'key': 'source', 'type': 'str'}, + } + + _subtype_map = { + 'source': {'OnPremise': 'OnPremiseResourceDetails', 'Azure': 'AzureResourceDetails'} + } + + def __init__(self, **kwargs) -> None: + super(ResourceDetails, self).__init__(**kwargs) + self.source = None + + +class AzureResourceDetails(ResourceDetails): + """Details of the Azure resource that was assessed. Variables are only populated by the server, and will be ignored when sending a request. @@ -2329,6 +2493,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 +3149,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. @@ -3077,51 +3383,403 @@ class HttpD2CMessagesNotInAllowedRange(TimeWindowCustomAlertRule): } _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'}, + '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, *, is_enabled: bool, min_threshold: int, max_threshold: int, time_window_size, **kwargs) -> None: + super(HttpD2CMessagesNotInAllowedRange, self).__init__(is_enabled=is_enabled, min_threshold=min_threshold, max_threshold=max_threshold, time_window_size=time_window_size, **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, *, 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. + + :param pattern: The keyword pattern. + :type pattern: str + :param custom: Indicates whether the keyword is custom or not. + :type custom: bool + :param can_be_numeric: Indicates whether the keyword can be applied on + numeric types or not. + :type can_be_numeric: bool + :param excluded: Indicates whether the keyword is excluded or not. + :type excluded: bool + """ + + _attribute_map = { + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'custom': {'key': 'custom', 'type': 'bool'}, + 'can_be_numeric': {'key': 'canBeNumeric', 'type': 'bool'}, + 'excluded': {'key': 'excluded', 'type': 'bool'}, + } + + def __init__(self, *, pattern: str=None, custom: bool=None, can_be_numeric: bool=None, excluded: bool=None, **kwargs) -> None: + super(InformationProtectionKeyword, self).__init__(**kwargs) + self.pattern = pattern + self.custom = custom + self.can_be_numeric = can_be_numeric + self.excluded = excluded + + +class InformationProtectionPolicy(Resource): + """Information protection policy. + + 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 last_modified_utc: Describes the last UTC time the policy was + modified. + :vartype last_modified_utc: datetime + :ivar version: Describes the version of the policy. + :vartype version: str + :param labels: Dictionary of sensitivity labels. + :type labels: dict[str, ~azure.mgmt.security.models.SensitivityLabel] + :param information_types: The sensitivity information types. + :type information_types: dict[str, + ~azure.mgmt.security.models.InformationType] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_modified_utc': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_modified_utc': {'key': 'properties.lastModifiedUtc', 'type': 'iso-8601'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'labels': {'key': 'properties.labels', 'type': '{SensitivityLabel}'}, + 'information_types': {'key': 'properties.informationTypes', 'type': '{InformationType}'}, + } + + def __init__(self, *, labels=None, information_types=None, **kwargs) -> None: + super(InformationProtectionPolicy, self).__init__(**kwargs) + self.last_modified_utc = None + self.version = None + self.labels = labels + self.information_types = information_types + + +class InformationType(Model): + """The information type. + + :param display_name: The name of the information type. + :type display_name: str + :param description: The description of the information type. + :type description: str + :param order: The order of the information type. + :type order: int + :param recommended_label_id: The recommended label id to be associated + with this information type. + :type recommended_label_id: str + :param enabled: Indicates whether the information type is enabled or not. + :type enabled: bool + :param custom: Indicates whether the information type is custom or not. + :type custom: bool + :param keywords: The information type keywords. + :type keywords: + list[~azure.mgmt.security.models.InformationProtectionKeyword] + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'recommended_label_id': {'key': 'recommendedLabelId', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'custom': {'key': 'custom', 'type': 'bool'}, + 'keywords': {'key': 'keywords', 'type': '[InformationProtectionKeyword]'}, + } + + def __init__(self, *, display_name: str=None, description: str=None, order: int=None, recommended_label_id: str=None, enabled: bool=None, custom: bool=None, keywords=None, **kwargs) -> None: + super(InformationType, self).__init__(**kwargs) + self.display_name = display_name + self.description = description + self.order = order + self.recommended_label_id = recommended_label_id + self.enabled = enabled + self.custom = custom + self.keywords = keywords + + +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. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar alert_display_name: The display name of the alert + :vartype alert_display_name: str + :ivar severity: The severity of the alert. Possible values include: + 'Informational', 'Low', 'Medium', 'High' + :vartype severity: str or ~azure.mgmt.security.models.AlertSeverity + :ivar description: Description of the suspected vulnerability and meaning. + :vartype description: str + :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_display_name': {'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}, + 'intent': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + '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) -> None: + super(IotAlertType, self).__init__(**kwargs) + self.alert_display_name = 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.intent = None + self.remediation_steps = None + + +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, *, is_enabled: bool, min_threshold: int, max_threshold: int, time_window_size, **kwargs) -> None: - super(HttpD2CMessagesNotInAllowedRange, self).__init__(is_enabled=is_enabled, min_threshold=min_threshold, max_threshold=max_threshold, time_window_size=time_window_size, **kwargs) - self.rule_type = 'HttpD2CMessagesNotInAllowedRange' + def __init__(self, *, value=None, **kwargs) -> None: + super(IotAlertTypeList, self).__init__(**kwargs) + self.value = value -class InformationProtectionKeyword(Model): - """The information type keyword. +class IotRecommendation(Resource): + """IoT recommendation. - :param pattern: The keyword pattern. - :type pattern: str - :param custom: Indicates whether the keyword is custom or not. - :type custom: bool - :param can_be_numeric: Indicates whether the keyword can be applied on - numeric types or not. - :type can_be_numeric: bool - :param excluded: Indicates whether the keyword is excluded or not. - :type excluded: bool + 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 = { - 'pattern': {'key': 'pattern', 'type': 'str'}, - 'custom': {'key': 'custom', 'type': 'bool'}, - 'can_be_numeric': {'key': 'canBeNumeric', 'type': 'bool'}, - 'excluded': {'key': 'excluded', 'type': 'bool'}, + '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, *, pattern: str=None, custom: bool=None, can_be_numeric: bool=None, excluded: bool=None, **kwargs) -> None: - super(InformationProtectionKeyword, self).__init__(**kwargs) - self.pattern = pattern - self.custom = custom - self.can_be_numeric = can_be_numeric - self.excluded = excluded + 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 InformationProtectionPolicy(Resource): - """Information protection policy. +class IotRecommendationType(Resource): + """IoT recommendation type. Variables are only populated by the server, and will be ignored when sending a request. @@ -3132,84 +3790,89 @@ class InformationProtectionPolicy(Resource): :vartype name: str :ivar type: Resource type :vartype type: str - :ivar last_modified_utc: Describes the last UTC time the policy was - modified. - :vartype last_modified_utc: datetime - :ivar version: Describes the version of the policy. - :vartype version: str - :param labels: Dictionary of sensitivity labels. - :type labels: dict[str, ~azure.mgmt.security.models.SensitivityLabel] - :param information_types: The sensitivity information types. - :type information_types: dict[str, - ~azure.mgmt.security.models.InformationType] + :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}, - 'last_modified_utc': {'readonly': True}, - 'version': {'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'}, - 'last_modified_utc': {'key': 'properties.lastModifiedUtc', 'type': 'iso-8601'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'labels': {'key': 'properties.labels', 'type': '{SensitivityLabel}'}, - 'information_types': {'key': 'properties.informationTypes', 'type': '{InformationType}'}, + '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, *, labels=None, information_types=None, **kwargs) -> None: - super(InformationProtectionPolicy, self).__init__(**kwargs) - self.last_modified_utc = None - self.version = None - self.labels = labels - self.information_types = information_types + 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 InformationType(Model): - """The information type. +class IotRecommendationTypeList(Model): + """List of recommendation types. - :param display_name: The name of the information type. - :type display_name: str - :param description: The description of the information type. - :type description: str - :param order: The order of the information type. - :type order: int - :param recommended_label_id: The recommended label id to be associated - with this information type. - :type recommended_label_id: str - :param enabled: Indicates whether the information type is enabled or not. - :type enabled: bool - :param custom: Indicates whether the information type is custom or not. - :type custom: bool - :param keywords: The information type keywords. - :type keywords: - list[~azure.mgmt.security.models.InformationProtectionKeyword] + :param value: List data + :type value: list[~azure.mgmt.security.models.IotRecommendationType] """ _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'int'}, - 'recommended_label_id': {'key': 'recommendedLabelId', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'custom': {'key': 'custom', 'type': 'bool'}, - 'keywords': {'key': 'keywords', 'type': '[InformationProtectionKeyword]'}, + 'value': {'key': 'value', 'type': '[IotRecommendationType]'}, } - def __init__(self, *, display_name: str=None, description: str=None, order: int=None, recommended_label_id: str=None, enabled: bool=None, custom: bool=None, keywords=None, **kwargs) -> None: - super(InformationType, self).__init__(**kwargs) - self.display_name = display_name - self.description = description - self.order = order - self.recommended_label_id = recommended_label_id - self.enabled = enabled - self.custom = custom - self.keywords = keywords + def __init__(self, *, value=None, **kwargs) -> None: + super(IotRecommendationTypeList, self).__init__(**kwargs) + self.value = value class IoTSecurityAggregatedAlert(Model): @@ -4489,7 +5152,8 @@ def __init__(self, **kwargs) -> 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 +5163,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 +5351,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. @@ -5648,6 +6333,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 +6802,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. @@ -6459,7 +7323,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..26a8fa2efdef 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 @@ -281,6 +320,36 @@ 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 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..262bc1b8f81c 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,13 @@ 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 __all__ = [ 'ComplianceResultsOperations', @@ -58,6 +65,10 @@ 'IotSecuritySolutionAnalyticsOperations', 'IotSecuritySolutionsAnalyticsAggregatedAlertOperations', 'IotSecuritySolutionsAnalyticsRecommendationOperations', + 'IotAlertTypesOperations', + 'IotAlertsOperations', + 'IotRecommendationTypesOperations', + 'IotRecommendationsOperations', 'LocationsOperations', 'Operations', 'TasksOperations', @@ -81,8 +92,11 @@ 'TopologyOperations', 'JitNetworkAccessPoliciesOperations', 'DiscoveredSecuritySolutionsOperations', + 'SecuritySolutionsReferenceDataOperations', 'ExternalSecuritySolutionsOperations', 'SecureScoresOperations', 'SecureScoreControlsOperations', 'SecureScoreControlDefinitionsOperations', + 'SecuritySolutionsOperations', + 'ConnectorsOperations', ] 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_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/_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'}