diff --git a/sdk/security/azure-mgmt-security/HISTORY.rst b/sdk/security/azure-mgmt-security/HISTORY.rst index 557b6e935083..e8b3d3babd74 100644 --- a/sdk/security/azure-mgmt-security/HISTORY.rst +++ b/sdk/security/azure-mgmt-security/HISTORY.rst @@ -3,6 +3,40 @@ Release History =============== +0.3.0 (2019-08-01) +++++++++++++++++++ + +**Features** + +- Model JitNetworkAccessPolicyVirtualMachine has a new parameter public_ip_address +- Model JitNetworkAccessRequestPort has a new parameter mapped_port +- Added operation group RegulatoryComplianceControlsOperations +- Added operation group ComplianceResultsOperations +- Added operation group ServerVulnerabilityAssessmentOperations +- Added operation group IoTSecuritySolutionsResourceGroupOperations +- Added operation group AdaptiveApplicationControlsOperations +- Added operation group IoTSecuritySolutionsOperations +- Added operation group IotSecuritySolutionOperations +- Added operation group RegulatoryComplianceStandardsOperations +- Added operation group IoTSecuritySolutionsAnalyticsOperations +- Added operation group IoTSecuritySolutionsAnalyticsAggregatedAlertOperations +- Added operation group IoTSecuritySolutionsAnalyticsRecommendationsOperations +- Added operation group RegulatoryComplianceAssessmentsOperations +- Added operation group IoTSecuritySolutionsAnalyticsRecommendationOperations +- Added operation group IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations + +**General breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes if from some import. +In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place. + +- SecurityCenter cannot be imported from `azure.mgmt.security.security_center` anymore (import from `azure.mgmt.security` works like before) +- SecurityCenterConfiguration import has been moved from `azure.mgmt.security.security_center` to `azure.mgmt.security` +- A model `MyClass` from a "models" sub-module cannot be imported anymore using `azure.mgmt.security.models.my_class` (import from `azure.mgmt.security.models` works like before) +- An operation class `MyClassOperations` from an `operations` sub-module cannot be imported anymore using `azure.mgmt.security.operations.my_class_operations` (import from `azure.mgmt.security.operations` works like before) + +Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process. + 0.2.0 (2019-04-16) ++++++++++++++++++ diff --git a/sdk/security/azure-mgmt-security/README.rst b/sdk/security/azure-mgmt-security/README.rst index 0d810d257cf9..dc352b08abcb 100644 --- a/sdk/security/azure-mgmt-security/README.rst +++ b/sdk/security/azure-mgmt-security/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Security Center Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/__init__.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/__init__.py index 4a59cad125c7..905fe754f6b2 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/__init__.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .security_center import SecurityCenter -from .version import VERSION +from ._configuration import SecurityCenterConfiguration +from ._security_center import SecurityCenter +__all__ = ['SecurityCenter', 'SecurityCenterConfiguration'] -__all__ = ['SecurityCenter'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/_configuration.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/_configuration.py new file mode 100644 index 000000000000..9aa2b7aa11ce --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/_configuration.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class SecurityCenterConfiguration(AzureConfiguration): + """Configuration for SecurityCenter + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID + :type subscription_id: str + :param asc_location: The location where ASC stores the data of the + subscription. can be retrieved from Get locations + :type asc_location: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, asc_location, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if asc_location is None: + raise ValueError("Parameter 'asc_location' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(SecurityCenterConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-security/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + self.asc_location = asc_location 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 similarity index 51% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/_security_center.py index 38888caff012..932778ae90fd 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 @@ -11,64 +11,39 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.pricings_operations import PricingsOperations -from .operations.alerts_operations import AlertsOperations -from .operations.settings_operations import SettingsOperations -from .operations.allowed_connections_operations import AllowedConnectionsOperations -from .operations.discovered_security_solutions_operations import DiscoveredSecuritySolutionsOperations -from .operations.external_security_solutions_operations import ExternalSecuritySolutionsOperations -from .operations.jit_network_access_policies_operations import JitNetworkAccessPoliciesOperations -from .operations.locations_operations import LocationsOperations -from .operations.operations import Operations -from .operations.tasks_operations import TasksOperations -from .operations.topology_operations import TopologyOperations -from .operations.advanced_threat_protection_operations import AdvancedThreatProtectionOperations -from .operations.auto_provisioning_settings_operations import AutoProvisioningSettingsOperations -from .operations.compliances_operations import CompliancesOperations -from .operations.information_protection_policies_operations import InformationProtectionPoliciesOperations -from .operations.security_contacts_operations import SecurityContactsOperations -from .operations.workspace_settings_operations import WorkspaceSettingsOperations -from . import models - - -class SecurityCenterConfiguration(AzureConfiguration): - """Configuration for SecurityCenter - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID - :type subscription_id: str - :param asc_location: The location where ASC stores the data of the - subscription. can be retrieved from Get locations - :type asc_location: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, asc_location, base_url=None): - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if asc_location is None: - raise ValueError("Parameter 'asc_location' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(SecurityCenterConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-security/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - self.asc_location = asc_location +from ._configuration import SecurityCenterConfiguration +from .operations import ComplianceResultsOperations +from .operations import PricingsOperations +from .operations import AlertsOperations +from .operations import SettingsOperations +from .operations import DeviceSecurityGroupsOperations +from .operations import IotSecuritySolutionOperations +from .operations import IotSecuritySolutionAnalyticsOperations +from .operations import IotSecuritySolutionsAnalyticsAggregatedAlertOperations +from .operations import IotSecuritySolutionsAnalyticsRecommendationOperations +from .operations import AllowedConnectionsOperations +from .operations import DiscoveredSecuritySolutionsOperations +from .operations import ExternalSecuritySolutionsOperations +from .operations import JitNetworkAccessPoliciesOperations +from .operations import AdaptiveApplicationControlsOperations +from .operations import LocationsOperations +from .operations import Operations +from .operations import TasksOperations +from .operations import TopologyOperations +from .operations import AdvancedThreatProtectionOperations +from .operations import AutoProvisioningSettingsOperations +from .operations import CompliancesOperations +from .operations import InformationProtectionPoliciesOperations +from .operations import SecurityContactsOperations +from .operations import WorkspaceSettingsOperations +from .operations import RegulatoryComplianceStandardsOperations +from .operations import RegulatoryComplianceControlsOperations +from .operations import RegulatoryComplianceAssessmentsOperations +from .operations import ServerVulnerabilityAssessmentOperations +from .operations import SubAssessmentsOperations +from .operations import AutomationsOperations +from . import models class SecurityCenter(SDKClient): @@ -77,12 +52,24 @@ class SecurityCenter(SDKClient): :ivar config: Configuration for client. :vartype config: SecurityCenterConfiguration + :ivar compliance_results: ComplianceResults operations + :vartype compliance_results: azure.mgmt.security.operations.ComplianceResultsOperations :ivar pricings: Pricings operations :vartype pricings: azure.mgmt.security.operations.PricingsOperations :ivar alerts: Alerts operations :vartype alerts: azure.mgmt.security.operations.AlertsOperations :ivar settings: Settings operations :vartype settings: azure.mgmt.security.operations.SettingsOperations + :ivar device_security_groups: DeviceSecurityGroups operations + :vartype device_security_groups: azure.mgmt.security.operations.DeviceSecurityGroupsOperations + :ivar iot_security_solution: IotSecuritySolution operations + :vartype iot_security_solution: azure.mgmt.security.operations.IotSecuritySolutionOperations + :ivar iot_security_solution_analytics: IotSecuritySolutionAnalytics operations + :vartype iot_security_solution_analytics: azure.mgmt.security.operations.IotSecuritySolutionAnalyticsOperations + :ivar iot_security_solutions_analytics_aggregated_alert: IotSecuritySolutionsAnalyticsAggregatedAlert operations + :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 allowed_connections: AllowedConnections operations :vartype allowed_connections: azure.mgmt.security.operations.AllowedConnectionsOperations :ivar discovered_security_solutions: DiscoveredSecuritySolutions operations @@ -91,6 +78,8 @@ class SecurityCenter(SDKClient): :vartype external_security_solutions: azure.mgmt.security.operations.ExternalSecuritySolutionsOperations :ivar jit_network_access_policies: JitNetworkAccessPolicies operations :vartype jit_network_access_policies: azure.mgmt.security.operations.JitNetworkAccessPoliciesOperations + :ivar adaptive_application_controls: AdaptiveApplicationControls operations + :vartype adaptive_application_controls: azure.mgmt.security.operations.AdaptiveApplicationControlsOperations :ivar locations: Locations operations :vartype locations: azure.mgmt.security.operations.LocationsOperations :ivar operations: Operations operations @@ -111,6 +100,18 @@ class SecurityCenter(SDKClient): :vartype security_contacts: azure.mgmt.security.operations.SecurityContactsOperations :ivar workspace_settings: WorkspaceSettings operations :vartype workspace_settings: azure.mgmt.security.operations.WorkspaceSettingsOperations + :ivar regulatory_compliance_standards: RegulatoryComplianceStandards operations + :vartype regulatory_compliance_standards: azure.mgmt.security.operations.RegulatoryComplianceStandardsOperations + :ivar regulatory_compliance_controls: RegulatoryComplianceControls operations + :vartype regulatory_compliance_controls: azure.mgmt.security.operations.RegulatoryComplianceControlsOperations + :ivar regulatory_compliance_assessments: RegulatoryComplianceAssessments operations + :vartype regulatory_compliance_assessments: azure.mgmt.security.operations.RegulatoryComplianceAssessmentsOperations + :ivar server_vulnerability_assessment: ServerVulnerabilityAssessment operations + :vartype server_vulnerability_assessment: azure.mgmt.security.operations.ServerVulnerabilityAssessmentOperations + :ivar sub_assessments: SubAssessments operations + :vartype sub_assessments: azure.mgmt.security.operations.SubAssessmentsOperations + :ivar automations: Automations operations + :vartype automations: azure.mgmt.security.operations.AutomationsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -133,12 +134,24 @@ def __init__( self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) + self.compliance_results = ComplianceResultsOperations( + self._client, self.config, self._serialize, self._deserialize) self.pricings = PricingsOperations( self._client, self.config, self._serialize, self._deserialize) self.alerts = AlertsOperations( self._client, self.config, self._serialize, self._deserialize) self.settings = SettingsOperations( self._client, self.config, self._serialize, self._deserialize) + self.device_security_groups = DeviceSecurityGroupsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.iot_security_solution = IotSecuritySolutionOperations( + self._client, self.config, self._serialize, self._deserialize) + self.iot_security_solution_analytics = IotSecuritySolutionAnalyticsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.iot_security_solutions_analytics_aggregated_alert = IotSecuritySolutionsAnalyticsAggregatedAlertOperations( + self._client, self.config, self._serialize, self._deserialize) + self.iot_security_solutions_analytics_recommendation = IotSecuritySolutionsAnalyticsRecommendationOperations( + self._client, self.config, self._serialize, self._deserialize) self.allowed_connections = AllowedConnectionsOperations( self._client, self.config, self._serialize, self._deserialize) self.discovered_security_solutions = DiscoveredSecuritySolutionsOperations( @@ -147,6 +160,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.jit_network_access_policies = JitNetworkAccessPoliciesOperations( self._client, self.config, self._serialize, self._deserialize) + self.adaptive_application_controls = AdaptiveApplicationControlsOperations( + self._client, self.config, self._serialize, self._deserialize) self.locations = LocationsOperations( self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( @@ -167,3 +182,15 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.workspace_settings = WorkspaceSettingsOperations( self._client, self.config, self._serialize, self._deserialize) + self.regulatory_compliance_standards = RegulatoryComplianceStandardsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.regulatory_compliance_controls = RegulatoryComplianceControlsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.regulatory_compliance_assessments = RegulatoryComplianceAssessmentsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.server_vulnerability_assessment = ServerVulnerabilityAssessmentOperations( + self._client, self.config, self._serialize, self._deserialize) + self.sub_assessments = SubAssessmentsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.automations = AutomationsOperations( + 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 791f6ade36e2..f3bc298bf748 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 @@ -10,134 +10,286 @@ # -------------------------------------------------------------------------- try: - from .pricing_py3 import Pricing - from .pricing_list_py3 import PricingList - from .asc_location_py3 import AscLocation - from .resource_py3 import Resource - from .alert_entity_py3 import AlertEntity - from .alert_confidence_reason_py3 import AlertConfidenceReason - from .alert_py3 import Alert - from .setting_py3 import Setting - from .data_export_setting_py3 import DataExportSetting - from .setting_resource_py3 import SettingResource - from .connected_resource_py3 import ConnectedResource - from .connectable_resource_py3 import ConnectableResource - from .allowed_connections_resource_py3 import AllowedConnectionsResource - from .location_py3 import Location - from .discovered_security_solution_py3 import DiscoveredSecuritySolution - from .external_security_solution_py3 import ExternalSecuritySolution - from .cef_solution_properties_py3 import CefSolutionProperties - from .cef_external_security_solution_py3 import CefExternalSecuritySolution - from .ata_solution_properties_py3 import AtaSolutionProperties - from .ata_external_security_solution_py3 import AtaExternalSecuritySolution - from .connected_workspace_py3 import ConnectedWorkspace - from .aad_solution_properties_py3 import AadSolutionProperties - from .aad_external_security_solution_py3 import AadExternalSecuritySolution - from .external_security_solution_kind1_py3 import ExternalSecuritySolutionKind1 - from .external_security_solution_properties_py3 import ExternalSecuritySolutionProperties - from .aad_connectivity_state1_py3 import AadConnectivityState1 - from .jit_network_access_port_rule_py3 import JitNetworkAccessPortRule - from .jit_network_access_policy_virtual_machine_py3 import JitNetworkAccessPolicyVirtualMachine - from .jit_network_access_request_port_py3 import JitNetworkAccessRequestPort - from .jit_network_access_request_virtual_machine_py3 import JitNetworkAccessRequestVirtualMachine - from .jit_network_access_request_py3 import JitNetworkAccessRequest - from .jit_network_access_policy_py3 import JitNetworkAccessPolicy - from .jit_network_access_policy_initiate_port_py3 import JitNetworkAccessPolicyInitiatePort - from .jit_network_access_policy_initiate_virtual_machine_py3 import JitNetworkAccessPolicyInitiateVirtualMachine - from .jit_network_access_policy_initiate_request_py3 import JitNetworkAccessPolicyInitiateRequest - from .kind_py3 import Kind - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .security_task_parameters_py3 import SecurityTaskParameters - from .security_task_py3 import SecurityTask - from .topology_single_resource_parent_py3 import TopologySingleResourceParent - from .topology_single_resource_child_py3 import TopologySingleResourceChild - from .topology_single_resource_py3 import TopologySingleResource - from .topology_resource_py3 import TopologyResource - from .advanced_threat_protection_setting_py3 import AdvancedThreatProtectionSetting - from .auto_provisioning_setting_py3 import AutoProvisioningSetting - from .compliance_segment_py3 import ComplianceSegment - from .compliance_py3 import Compliance - from .sensitivity_label_py3 import SensitivityLabel - from .information_protection_keyword_py3 import InformationProtectionKeyword - from .information_type_py3 import InformationType - from .information_protection_policy_py3 import InformationProtectionPolicy - from .security_contact_py3 import SecurityContact - from .workspace_setting_py3 import WorkspaceSetting + from ._models_py3 import AadConnectivityState1 + from ._models_py3 import AadExternalSecuritySolution + from ._models_py3 import AadSolutionProperties + from ._models_py3 import AdditionalData + from ._models_py3 import AdvancedThreatProtectionSetting + from ._models_py3 import Alert + from ._models_py3 import AlertConfidenceReason + from ._models_py3 import AlertEntity + from ._models_py3 import AllowedConnectionsResource + from ._models_py3 import AllowlistCustomAlertRule + from ._models_py3 import AppWhitelistingGroup + from ._models_py3 import AppWhitelistingGroups + from ._models_py3 import AppWhitelistingIssueSummary + from ._models_py3 import AppWhitelistingPutGroupData + from ._models_py3 import AscLocation + from ._models_py3 import AtaExternalSecuritySolution + from ._models_py3 import AtaSolutionProperties + from ._models_py3 import Automation + from ._models_py3 import AutomationAction + from ._models_py3 import AutomationActionEventHub + from ._models_py3 import AutomationActionEventHubInput + from ._models_py3 import AutomationActionEventHubOutput + from ._models_py3 import AutomationActionLogicApp + from ._models_py3 import AutomationActionLogicAppInput + from ._models_py3 import AutomationActionLogicAppOutput + from ._models_py3 import AutomationActionWorkspace + from ._models_py3 import AutomationMetadata + from ._models_py3 import AutomationRuleSet + from ._models_py3 import AutomationScope + from ._models_py3 import AutomationSource + from ._models_py3 import AutomationTriggeringRule + from ._models_py3 import AutomationValidationStatus + from ._models_py3 import AutoProvisioningSetting + from ._models_py3 import AwsResourceDetails + from ._models_py3 import AzureResourceDetails + from ._models_py3 import CefExternalSecuritySolution + from ._models_py3 import CefSolutionProperties + from ._models_py3 import Compliance + from ._models_py3 import ComplianceResult + from ._models_py3 import ComplianceSegment + from ._models_py3 import ConnectableResource + from ._models_py3 import ConnectedResource + from ._models_py3 import ConnectedWorkspace + from ._models_py3 import ContainerRegistryVulnerabilityProperties + from ._models_py3 import CustomAlertRule + from ._models_py3 import CVE + from ._models_py3 import CVSS + from ._models_py3 import DataExportSetting + from ._models_py3 import DenylistCustomAlertRule + from ._models_py3 import DeviceSecurityGroup + from ._models_py3 import DiscoveredSecuritySolution + from ._models_py3 import ETag + from ._models_py3 import ExternalSecuritySolution + from ._models_py3 import ExternalSecuritySolutionKind1 + from ._models_py3 import ExternalSecuritySolutionProperties + from ._models_py3 import InformationProtectionKeyword + from ._models_py3 import InformationProtectionPolicy + from ._models_py3 import InformationType + from ._models_py3 import IoTSecurityAggregatedAlert + from ._models_py3 import IoTSecurityAggregatedAlertPropertiesTopDevicesListItem + from ._models_py3 import IoTSecurityAggregatedRecommendation + from ._models_py3 import IoTSecurityAlertedDevice + from ._models_py3 import IoTSecurityDeviceAlert + from ._models_py3 import IoTSecurityDeviceRecommendation + from ._models_py3 import IoTSecuritySolutionAnalyticsModel + from ._models_py3 import IoTSecuritySolutionAnalyticsModelList + from ._models_py3 import IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem + from ._models_py3 import IoTSecuritySolutionModel + from ._models_py3 import IoTSeverityMetrics + from ._models_py3 import JitNetworkAccessPolicy + from ._models_py3 import JitNetworkAccessPolicyInitiatePort + from ._models_py3 import JitNetworkAccessPolicyInitiateRequest + from ._models_py3 import JitNetworkAccessPolicyInitiateVirtualMachine + from ._models_py3 import JitNetworkAccessPolicyVirtualMachine + from ._models_py3 import JitNetworkAccessPortRule + from ._models_py3 import JitNetworkAccessRequest + from ._models_py3 import JitNetworkAccessRequestPort + from ._models_py3 import JitNetworkAccessRequestVirtualMachine + from ._models_py3 import Kind + from ._models_py3 import ListCustomAlertRule + from ._models_py3 import Location + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import PathRecommendation + from ._models_py3 import Pricing + from ._models_py3 import PricingList + from ._models_py3 import ProtectionMode + from ._models_py3 import PublisherInfo + from ._models_py3 import RecommendationConfigurationProperties + from ._models_py3 import RegulatoryComplianceAssessment + from ._models_py3 import RegulatoryComplianceControl + from ._models_py3 import RegulatoryComplianceStandard + from ._models_py3 import Resource + from ._models_py3 import ResourceDetails + from ._models_py3 import SecurityContact + from ._models_py3 import SecuritySubAssessment + from ._models_py3 import SecurityTask + from ._models_py3 import SecurityTaskParameters + from ._models_py3 import SensitivityLabel + from ._models_py3 import ServerVulnerabilityAssessment + from ._models_py3 import ServerVulnerabilityAssessmentsList + from ._models_py3 import ServerVulnerabilityProperties + from ._models_py3 import Setting + from ._models_py3 import SettingResource + from ._models_py3 import SqlServerVulnerabilityProperties + from ._models_py3 import SubAssessmentStatus + from ._models_py3 import Tags + from ._models_py3 import TagsResource + from ._models_py3 import ThresholdCustomAlertRule + from ._models_py3 import TimeWindowCustomAlertRule + from ._models_py3 import TopologyResource + from ._models_py3 import TopologySingleResource + from ._models_py3 import TopologySingleResourceChild + from ._models_py3 import TopologySingleResourceParent + from ._models_py3 import TrackedResource + from ._models_py3 import UpdateIotSecuritySolutionData + from ._models_py3 import UserDefinedResourcesProperties + from ._models_py3 import UserRecommendation + from ._models_py3 import VendorReference + from ._models_py3 import VmRecommendation + from ._models_py3 import WorkspaceSetting except (SyntaxError, ImportError): - from .pricing import Pricing - from .pricing_list import PricingList - from .asc_location import AscLocation - from .resource import Resource - from .alert_entity import AlertEntity - from .alert_confidence_reason import AlertConfidenceReason - from .alert import Alert - from .setting import Setting - from .data_export_setting import DataExportSetting - from .setting_resource import SettingResource - from .connected_resource import ConnectedResource - from .connectable_resource import ConnectableResource - from .allowed_connections_resource import AllowedConnectionsResource - from .location import Location - from .discovered_security_solution import DiscoveredSecuritySolution - from .external_security_solution import ExternalSecuritySolution - from .cef_solution_properties import CefSolutionProperties - from .cef_external_security_solution import CefExternalSecuritySolution - from .ata_solution_properties import AtaSolutionProperties - from .ata_external_security_solution import AtaExternalSecuritySolution - from .connected_workspace import ConnectedWorkspace - from .aad_solution_properties import AadSolutionProperties - from .aad_external_security_solution import AadExternalSecuritySolution - from .external_security_solution_kind1 import ExternalSecuritySolutionKind1 - from .external_security_solution_properties import ExternalSecuritySolutionProperties - from .aad_connectivity_state1 import AadConnectivityState1 - from .jit_network_access_port_rule import JitNetworkAccessPortRule - from .jit_network_access_policy_virtual_machine import JitNetworkAccessPolicyVirtualMachine - from .jit_network_access_request_port import JitNetworkAccessRequestPort - from .jit_network_access_request_virtual_machine import JitNetworkAccessRequestVirtualMachine - from .jit_network_access_request import JitNetworkAccessRequest - from .jit_network_access_policy import JitNetworkAccessPolicy - from .jit_network_access_policy_initiate_port import JitNetworkAccessPolicyInitiatePort - from .jit_network_access_policy_initiate_virtual_machine import JitNetworkAccessPolicyInitiateVirtualMachine - from .jit_network_access_policy_initiate_request import JitNetworkAccessPolicyInitiateRequest - from .kind import Kind - from .operation_display import OperationDisplay - from .operation import Operation - from .security_task_parameters import SecurityTaskParameters - from .security_task import SecurityTask - from .topology_single_resource_parent import TopologySingleResourceParent - from .topology_single_resource_child import TopologySingleResourceChild - from .topology_single_resource import TopologySingleResource - from .topology_resource import TopologyResource - from .advanced_threat_protection_setting import AdvancedThreatProtectionSetting - from .auto_provisioning_setting import AutoProvisioningSetting - from .compliance_segment import ComplianceSegment - from .compliance import Compliance - from .sensitivity_label import SensitivityLabel - from .information_protection_keyword import InformationProtectionKeyword - from .information_type import InformationType - from .information_protection_policy import InformationProtectionPolicy - from .security_contact import SecurityContact - from .workspace_setting import WorkspaceSetting -from .alert_paged import AlertPaged -from .setting_paged import SettingPaged -from .allowed_connections_resource_paged import AllowedConnectionsResourcePaged -from .discovered_security_solution_paged import DiscoveredSecuritySolutionPaged -from .external_security_solution_paged import ExternalSecuritySolutionPaged -from .jit_network_access_policy_paged import JitNetworkAccessPolicyPaged -from .asc_location_paged import AscLocationPaged -from .operation_paged import OperationPaged -from .security_task_paged import SecurityTaskPaged -from .topology_resource_paged import TopologyResourcePaged -from .auto_provisioning_setting_paged import AutoProvisioningSettingPaged -from .compliance_paged import CompliancePaged -from .information_protection_policy_paged import InformationProtectionPolicyPaged -from .security_contact_paged import SecurityContactPaged -from .workspace_setting_paged import WorkspaceSettingPaged -from .security_center_enums import ( + from ._models import AadConnectivityState1 + from ._models import AadExternalSecuritySolution + from ._models import AadSolutionProperties + from ._models import AdditionalData + from ._models import AdvancedThreatProtectionSetting + from ._models import Alert + from ._models import AlertConfidenceReason + from ._models import AlertEntity + from ._models import AllowedConnectionsResource + from ._models import AllowlistCustomAlertRule + from ._models import AppWhitelistingGroup + from ._models import AppWhitelistingGroups + from ._models import AppWhitelistingIssueSummary + from ._models import AppWhitelistingPutGroupData + from ._models import AscLocation + from ._models import AtaExternalSecuritySolution + from ._models import AtaSolutionProperties + from ._models import Automation + from ._models import AutomationAction + from ._models import AutomationActionEventHub + from ._models import AutomationActionEventHubInput + from ._models import AutomationActionEventHubOutput + from ._models import AutomationActionLogicApp + from ._models import AutomationActionLogicAppInput + from ._models import AutomationActionLogicAppOutput + from ._models import AutomationActionWorkspace + from ._models import AutomationMetadata + from ._models import AutomationRuleSet + from ._models import AutomationScope + from ._models import AutomationSource + from ._models import AutomationTriggeringRule + from ._models import AutomationValidationStatus + from ._models import AutoProvisioningSetting + from ._models import AwsResourceDetails + from ._models import AzureResourceDetails + from ._models import CefExternalSecuritySolution + from ._models import CefSolutionProperties + from ._models import Compliance + from ._models import ComplianceResult + from ._models import ComplianceSegment + from ._models import ConnectableResource + from ._models import ConnectedResource + from ._models import ConnectedWorkspace + from ._models import ContainerRegistryVulnerabilityProperties + from ._models import CustomAlertRule + from ._models import CVE + from ._models import CVSS + from ._models import DataExportSetting + from ._models import DenylistCustomAlertRule + from ._models import DeviceSecurityGroup + from ._models import DiscoveredSecuritySolution + from ._models import ETag + from ._models import ExternalSecuritySolution + from ._models import ExternalSecuritySolutionKind1 + from ._models import ExternalSecuritySolutionProperties + from ._models import InformationProtectionKeyword + from ._models import InformationProtectionPolicy + from ._models import InformationType + from ._models import IoTSecurityAggregatedAlert + from ._models import IoTSecurityAggregatedAlertPropertiesTopDevicesListItem + from ._models import IoTSecurityAggregatedRecommendation + from ._models import IoTSecurityAlertedDevice + from ._models import IoTSecurityDeviceAlert + from ._models import IoTSecurityDeviceRecommendation + from ._models import IoTSecuritySolutionAnalyticsModel + from ._models import IoTSecuritySolutionAnalyticsModelList + from ._models import IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem + from ._models import IoTSecuritySolutionModel + from ._models import IoTSeverityMetrics + from ._models import JitNetworkAccessPolicy + from ._models import JitNetworkAccessPolicyInitiatePort + from ._models import JitNetworkAccessPolicyInitiateRequest + from ._models import JitNetworkAccessPolicyInitiateVirtualMachine + from ._models import JitNetworkAccessPolicyVirtualMachine + from ._models import JitNetworkAccessPortRule + from ._models import JitNetworkAccessRequest + from ._models import JitNetworkAccessRequestPort + from ._models import JitNetworkAccessRequestVirtualMachine + from ._models import Kind + from ._models import ListCustomAlertRule + from ._models import Location + from ._models import Operation + from ._models import OperationDisplay + from ._models import PathRecommendation + from ._models import Pricing + from ._models import PricingList + from ._models import ProtectionMode + from ._models import PublisherInfo + from ._models import RecommendationConfigurationProperties + from ._models import RegulatoryComplianceAssessment + from ._models import RegulatoryComplianceControl + from ._models import RegulatoryComplianceStandard + from ._models import Resource + from ._models import ResourceDetails + from ._models import SecurityContact + from ._models import SecuritySubAssessment + from ._models import SecurityTask + from ._models import SecurityTaskParameters + from ._models import SensitivityLabel + from ._models import ServerVulnerabilityAssessment + from ._models import ServerVulnerabilityAssessmentsList + from ._models import ServerVulnerabilityProperties + from ._models import Setting + from ._models import SettingResource + from ._models import SqlServerVulnerabilityProperties + from ._models import SubAssessmentStatus + from ._models import Tags + from ._models import TagsResource + from ._models import ThresholdCustomAlertRule + from ._models import TimeWindowCustomAlertRule + from ._models import TopologyResource + from ._models import TopologySingleResource + from ._models import TopologySingleResourceChild + from ._models import TopologySingleResourceParent + from ._models import TrackedResource + from ._models import UpdateIotSecuritySolutionData + from ._models import UserDefinedResourcesProperties + from ._models import UserRecommendation + from ._models import VendorReference + from ._models import VmRecommendation + from ._models import WorkspaceSetting +from ._paged_models import AlertPaged +from ._paged_models import AllowedConnectionsResourcePaged +from ._paged_models import AscLocationPaged +from ._paged_models import AutomationPaged +from ._paged_models import AutoProvisioningSettingPaged +from ._paged_models import CompliancePaged +from ._paged_models import ComplianceResultPaged +from ._paged_models import DeviceSecurityGroupPaged +from ._paged_models import DiscoveredSecuritySolutionPaged +from ._paged_models import ExternalSecuritySolutionPaged +from ._paged_models import InformationProtectionPolicyPaged +from ._paged_models import IoTSecurityAggregatedAlertPaged +from ._paged_models import IoTSecurityAggregatedRecommendationPaged +from ._paged_models import IoTSecuritySolutionModelPaged +from ._paged_models import JitNetworkAccessPolicyPaged +from ._paged_models import OperationPaged +from ._paged_models import RegulatoryComplianceAssessmentPaged +from ._paged_models import RegulatoryComplianceControlPaged +from ._paged_models import RegulatoryComplianceStandardPaged +from ._paged_models import SecurityContactPaged +from ._paged_models import SecuritySubAssessmentPaged +from ._paged_models import SecurityTaskPaged +from ._paged_models import SettingPaged +from ._paged_models import TopologyResourcePaged +from ._paged_models import WorkspaceSettingPaged +from ._security_center_enums import ( + ResourceStatus, PricingTier, ReportedSeverity, SettingKind, + ValueType, + SecuritySolutionStatus, + ExportData, + DataSource, + RecommendationType, + RecommendationConfigStatus, + UnmaskedIpLoggingStatus, SecurityFamily, AadConnectivityState, ExternalSecuritySolutionKind, @@ -147,66 +299,144 @@ AutoProvision, AlertNotifications, AlertsToAdmins, + State, + SubAssessmentStatusCode, + Severity, + EventSource, + PropertyType, + Operator, ConnectionType, ) __all__ = [ - 'Pricing', - 'PricingList', - 'AscLocation', - 'Resource', - 'AlertEntity', - 'AlertConfidenceReason', + 'AadConnectivityState1', + 'AadExternalSecuritySolution', + 'AadSolutionProperties', + 'AdditionalData', + 'AdvancedThreatProtectionSetting', 'Alert', - 'Setting', - 'DataExportSetting', - 'SettingResource', - 'ConnectedResource', - 'ConnectableResource', + 'AlertConfidenceReason', + 'AlertEntity', 'AllowedConnectionsResource', - 'Location', - 'DiscoveredSecuritySolution', - 'ExternalSecuritySolution', - 'CefSolutionProperties', - 'CefExternalSecuritySolution', - 'AtaSolutionProperties', + 'AllowlistCustomAlertRule', + 'AppWhitelistingGroup', + 'AppWhitelistingGroups', + 'AppWhitelistingIssueSummary', + 'AppWhitelistingPutGroupData', + 'AscLocation', 'AtaExternalSecuritySolution', + 'AtaSolutionProperties', + 'Automation', + 'AutomationAction', + 'AutomationActionEventHub', + 'AutomationActionEventHubInput', + 'AutomationActionEventHubOutput', + 'AutomationActionLogicApp', + 'AutomationActionLogicAppInput', + 'AutomationActionLogicAppOutput', + 'AutomationActionWorkspace', + 'AutomationMetadata', + 'AutomationRuleSet', + 'AutomationScope', + 'AutomationSource', + 'AutomationTriggeringRule', + 'AutomationValidationStatus', + 'AutoProvisioningSetting', + 'AwsResourceDetails', + 'AzureResourceDetails', + 'CefExternalSecuritySolution', + 'CefSolutionProperties', + 'Compliance', + 'ComplianceResult', + 'ComplianceSegment', + 'ConnectableResource', + 'ConnectedResource', 'ConnectedWorkspace', - 'AadSolutionProperties', - 'AadExternalSecuritySolution', + 'ContainerRegistryVulnerabilityProperties', + 'CustomAlertRule', + 'CVE', + 'CVSS', + 'DataExportSetting', + 'DenylistCustomAlertRule', + 'DeviceSecurityGroup', + 'DiscoveredSecuritySolution', + 'ETag', + 'ExternalSecuritySolution', 'ExternalSecuritySolutionKind1', 'ExternalSecuritySolutionProperties', - 'AadConnectivityState1', - 'JitNetworkAccessPortRule', - 'JitNetworkAccessPolicyVirtualMachine', - 'JitNetworkAccessRequestPort', - 'JitNetworkAccessRequestVirtualMachine', - 'JitNetworkAccessRequest', + 'InformationProtectionKeyword', + 'InformationProtectionPolicy', + 'InformationType', + 'IoTSecurityAggregatedAlert', + 'IoTSecurityAggregatedAlertPropertiesTopDevicesListItem', + 'IoTSecurityAggregatedRecommendation', + 'IoTSecurityAlertedDevice', + 'IoTSecurityDeviceAlert', + 'IoTSecurityDeviceRecommendation', + 'IoTSecuritySolutionAnalyticsModel', + 'IoTSecuritySolutionAnalyticsModelList', + 'IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem', + 'IoTSecuritySolutionModel', + 'IoTSeverityMetrics', 'JitNetworkAccessPolicy', 'JitNetworkAccessPolicyInitiatePort', - 'JitNetworkAccessPolicyInitiateVirtualMachine', 'JitNetworkAccessPolicyInitiateRequest', + 'JitNetworkAccessPolicyInitiateVirtualMachine', + 'JitNetworkAccessPolicyVirtualMachine', + 'JitNetworkAccessPortRule', + 'JitNetworkAccessRequest', + 'JitNetworkAccessRequestPort', + 'JitNetworkAccessRequestVirtualMachine', 'Kind', - 'OperationDisplay', + 'ListCustomAlertRule', + 'Location', 'Operation', - 'SecurityTaskParameters', + 'OperationDisplay', + 'PathRecommendation', + 'Pricing', + 'PricingList', + 'ProtectionMode', + 'PublisherInfo', + 'RecommendationConfigurationProperties', + 'RegulatoryComplianceAssessment', + 'RegulatoryComplianceControl', + 'RegulatoryComplianceStandard', + 'Resource', + 'ResourceDetails', + 'SecurityContact', + 'SecuritySubAssessment', 'SecurityTask', - 'TopologySingleResourceParent', - 'TopologySingleResourceChild', - 'TopologySingleResource', - 'TopologyResource', - 'AdvancedThreatProtectionSetting', - 'AutoProvisioningSetting', - 'ComplianceSegment', - 'Compliance', + 'SecurityTaskParameters', 'SensitivityLabel', - 'InformationProtectionKeyword', - 'InformationType', - 'InformationProtectionPolicy', - 'SecurityContact', + 'ServerVulnerabilityAssessment', + 'ServerVulnerabilityAssessmentsList', + 'ServerVulnerabilityProperties', + 'Setting', + 'SettingResource', + 'SqlServerVulnerabilityProperties', + 'SubAssessmentStatus', + 'Tags', + 'TagsResource', + 'ThresholdCustomAlertRule', + 'TimeWindowCustomAlertRule', + 'TopologyResource', + 'TopologySingleResource', + 'TopologySingleResourceChild', + 'TopologySingleResourceParent', + 'TrackedResource', + 'UpdateIotSecuritySolutionData', + 'UserDefinedResourcesProperties', + 'UserRecommendation', + 'VendorReference', + 'VmRecommendation', 'WorkspaceSetting', + 'ComplianceResultPaged', 'AlertPaged', 'SettingPaged', + 'DeviceSecurityGroupPaged', + 'IoTSecuritySolutionModelPaged', + 'IoTSecurityAggregatedAlertPaged', + 'IoTSecurityAggregatedRecommendationPaged', 'AllowedConnectionsResourcePaged', 'DiscoveredSecuritySolutionPaged', 'ExternalSecuritySolutionPaged', @@ -220,9 +450,22 @@ 'InformationProtectionPolicyPaged', 'SecurityContactPaged', 'WorkspaceSettingPaged', + 'RegulatoryComplianceStandardPaged', + 'RegulatoryComplianceControlPaged', + 'RegulatoryComplianceAssessmentPaged', + 'SecuritySubAssessmentPaged', + 'AutomationPaged', + 'ResourceStatus', 'PricingTier', 'ReportedSeverity', 'SettingKind', + 'ValueType', + 'SecuritySolutionStatus', + 'ExportData', + 'DataSource', + 'RecommendationType', + 'RecommendationConfigStatus', + 'UnmaskedIpLoggingStatus', 'SecurityFamily', 'AadConnectivityState', 'ExternalSecuritySolutionKind', @@ -232,5 +475,11 @@ 'AutoProvision', 'AlertNotifications', 'AlertsToAdmins', + 'State', + 'SubAssessmentStatusCode', + 'Severity', + 'EventSource', + 'PropertyType', + 'Operator', 'ConnectionType', ] 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 new file mode 100644 index 000000000000..f9c16f1ed295 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py @@ -0,0 +1,4847 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AadConnectivityState1(Model): + """Describes an Azure resource with kind. + + :param connectivity_state: The connectivity state of the external AAD + solution . Possible values include: 'Discovered', 'NotLicensed', + 'Connected' + :type connectivity_state: str or + ~azure.mgmt.security.models.AadConnectivityState + """ + + _attribute_map = { + 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AadConnectivityState1, self).__init__(**kwargs) + self.connectivity_state = kwargs.get('connectivity_state', None) + + +class ExternalSecuritySolution(Model): + """Represents a security solution external to Azure Security Center which + sends information to an OMS workspace and whose data is displayed by Azure + Security Center. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CefExternalSecuritySolution, AtaExternalSecuritySolution, + AadExternalSecuritySolution + + 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 kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'CEF': 'CefExternalSecuritySolution', 'ATA': 'AtaExternalSecuritySolution', 'AAD': 'AadExternalSecuritySolution'} + } + + def __init__(self, **kwargs): + super(ExternalSecuritySolution, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.kind = None + + +class AadExternalSecuritySolution(ExternalSecuritySolution): + """Represents an AAD identity protection solution which sends logs to an OMS + workspace. + + 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 kind: Required. Constant filled by server. + :type kind: str + :param properties: + :type properties: ~azure.mgmt.security.models.AadSolutionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AadSolutionProperties'}, + } + + def __init__(self, **kwargs): + super(AadExternalSecuritySolution, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.kind = 'AAD' + + +class AadSolutionProperties(Model): + """The external security solution properties for AAD solutions. + + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + :param connectivity_state: The connectivity state of the external AAD + solution . Possible values include: 'Discovered', 'NotLicensed', + 'Connected' + :type connectivity_state: str or + ~azure.mgmt.security.models.AadConnectivityState + """ + + _attribute_map = { + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AadSolutionProperties, self).__init__(**kwargs) + self.device_vendor = kwargs.get('device_vendor', None) + self.device_type = kwargs.get('device_type', None) + self.workspace = kwargs.get('workspace', None) + self.connectivity_state = kwargs.get('connectivity_state', None) + + +class AdditionalData(Model): + """Details of the sub-assessment. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SqlServerVulnerabilityProperties, + ContainerRegistryVulnerabilityProperties, ServerVulnerabilityProperties + + All required parameters must be populated in order to send to Azure. + + :param assessed_resource_type: Required. Constant filled by server. + :type assessed_resource_type: str + """ + + _validation = { + 'assessed_resource_type': {'required': True}, + } + + _attribute_map = { + 'assessed_resource_type': {'key': 'assessedResourceType', 'type': 'str'}, + } + + _subtype_map = { + 'assessed_resource_type': {'SqlServerVulnerability': 'SqlServerVulnerabilityProperties', 'ContainerRegistryVulnerability': 'ContainerRegistryVulnerabilityProperties', 'ServerVulnerabilityAssessment': 'ServerVulnerabilityProperties'} + } + + def __init__(self, **kwargs): + super(AdditionalData, self).__init__(**kwargs) + self.assessed_resource_type = None + + +class Resource(Model): + """Describes an Azure resource. + + 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 + """ + + _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'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AdvancedThreatProtectionSetting(Resource): + """The Advanced Threat Protection resource. + + 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 is_enabled: Indicates whether Advanced Threat Protection is + enabled. + :type is_enabled: bool + """ + + _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'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AdvancedThreatProtectionSetting, self).__init__(**kwargs) + self.is_enabled = kwargs.get('is_enabled', None) + + +class Alert(Resource): + """Security alert. + + 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 state: State of the alert (Active, Dismissed etc.) + :vartype state: str + :ivar reported_time_utc: The time the incident was reported to + Microsoft.Security in UTC + :vartype reported_time_utc: datetime + :ivar vendor_name: Name of the vendor that discovered the incident + :vartype vendor_name: str + :ivar alert_name: Name of the alert type + :vartype alert_name: str + :ivar alert_display_name: Display name of the alert type + :vartype alert_display_name: str + :ivar detected_time_utc: The time the incident was detected by the vendor + :vartype detected_time_utc: datetime + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar remediation_steps: Recommended steps to reradiate the incident + :vartype remediation_steps: str + :ivar action_taken: The action that was taken as a response to the alert + (Active, Blocked etc.) + :vartype action_taken: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar compromised_entity: The entity that the incident happened on + :vartype compromised_entity: str + :ivar associated_resource: Azure resource ID of the associated resource + :vartype associated_resource: str + :param extended_properties: + :type extended_properties: dict[str, object] + :ivar system_source: The type of the alerted resource (Azure, Non-Azure) + :vartype system_source: str + :ivar can_be_investigated: Whether this alert can be investigated with + Azure Security Center + :vartype can_be_investigated: bool + :ivar is_incident: Whether this alert is for incident type or not + (otherwise - single alert) + :vartype is_incident: bool + :param entities: objects that are related to this alerts + :type entities: list[~azure.mgmt.security.models.AlertEntity] + :ivar confidence_score: level of confidence we have on the alert + :vartype confidence_score: float + :param confidence_reasons: reasons the alert got the confidenceScore value + :type confidence_reasons: + list[~azure.mgmt.security.models.AlertConfidenceReason] + :ivar subscription_id: Azure subscription ID of the resource that had the + security alert or the subscription ID of the workspace that this resource + reports to + :vartype subscription_id: str + :ivar instance_id: Instance ID of the alert. + :vartype instance_id: str + :ivar workspace_arm_id: Azure resource ID of the workspace that the alert + was reported to. + :vartype workspace_arm_id: str + :ivar correlation_key: Alerts with the same CorrelationKey will be grouped + together in Ibiza. + :vartype correlation_key: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'reported_time_utc': {'readonly': True}, + 'vendor_name': {'readonly': True}, + 'alert_name': {'readonly': True}, + 'alert_display_name': {'readonly': True}, + 'detected_time_utc': {'readonly': True}, + 'description': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'action_taken': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'compromised_entity': {'readonly': True}, + 'associated_resource': {'readonly': True}, + 'system_source': {'readonly': True}, + 'can_be_investigated': {'readonly': True}, + 'is_incident': {'readonly': True}, + 'confidence_score': {'readonly': True, 'maximum': 1, 'minimum': 0}, + 'subscription_id': {'readonly': True}, + 'instance_id': {'readonly': True}, + 'workspace_arm_id': {'readonly': True}, + 'correlation_key': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'reported_time_utc': {'key': 'properties.reportedTimeUtc', 'type': 'iso-8601'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'alert_name': {'key': 'properties.alertName', 'type': 'str'}, + 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, + 'detected_time_utc': {'key': 'properties.detectedTimeUtc', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'compromised_entity': {'key': 'properties.compromisedEntity', 'type': 'str'}, + 'associated_resource': {'key': 'properties.associatedResource', 'type': 'str'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{object}'}, + 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, + 'can_be_investigated': {'key': 'properties.canBeInvestigated', 'type': 'bool'}, + 'is_incident': {'key': 'properties.isIncident', 'type': 'bool'}, + 'entities': {'key': 'properties.entities', 'type': '[AlertEntity]'}, + 'confidence_score': {'key': 'properties.confidenceScore', 'type': 'float'}, + 'confidence_reasons': {'key': 'properties.confidenceReasons', 'type': '[AlertConfidenceReason]'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, + 'workspace_arm_id': {'key': 'properties.workspaceArmId', 'type': 'str'}, + 'correlation_key': {'key': 'properties.correlationKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Alert, self).__init__(**kwargs) + self.state = None + self.reported_time_utc = None + self.vendor_name = None + self.alert_name = None + self.alert_display_name = None + self.detected_time_utc = None + self.description = None + self.remediation_steps = None + self.action_taken = None + self.reported_severity = None + self.compromised_entity = None + self.associated_resource = None + self.extended_properties = kwargs.get('extended_properties', None) + self.system_source = None + self.can_be_investigated = None + self.is_incident = None + self.entities = kwargs.get('entities', None) + self.confidence_score = None + self.confidence_reasons = kwargs.get('confidence_reasons', None) + self.subscription_id = None + self.instance_id = None + self.workspace_arm_id = None + self.correlation_key = None + + +class AlertConfidenceReason(Model): + """Factors that increase our confidence that the alert is a true positive. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Type of confidence factor + :vartype type: str + :ivar reason: description of the confidence reason + :vartype reason: str + """ + + _validation = { + 'type': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AlertConfidenceReason, self).__init__(**kwargs) + self.type = None + self.reason = None + + +class AlertEntity(Model): + """Changing set of properties depending on the entity type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar type: Type of entity + :vartype type: str + """ + + _validation = { + 'type': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AlertEntity, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.type = None + + +class AllowedConnectionsResource(Model): + """The resource whose properties describes the allowed traffic between Azure + resources. + + 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 + :ivar calculated_date_time: The UTC time on which the allowed connections + resource was calculated + :vartype calculated_date_time: datetime + :ivar connectable_resources: List of connectable resources + :vartype connectable_resources: + list[~azure.mgmt.security.models.ConnectableResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'calculated_date_time': {'readonly': True}, + 'connectable_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, + 'connectable_resources': {'key': 'properties.connectableResources', 'type': '[ConnectableResource]'}, + } + + def __init__(self, **kwargs): + super(AllowedConnectionsResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.calculated_date_time = None + self.connectable_resources = None + + +class CustomAlertRule(Model): + """A custom alert rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Status of the custom alert. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomAlertRule, self).__init__(**kwargs) + self.display_name = None + self.description = None + self.is_enabled = kwargs.get('is_enabled', None) + self.rule_type = kwargs.get('rule_type', None) + + +class ListCustomAlertRule(CustomAlertRule): + """A List custom alert rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Status of the custom alert. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + :ivar value_type: The value type of the items in the list. Possible values + include: 'IpCidr', 'String' + :vartype value_type: str or ~azure.mgmt.security.models.ValueType + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'value_type': {'readonly': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'value_type': {'key': 'valueType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ListCustomAlertRule, self).__init__(**kwargs) + self.value_type = None + + +class AllowlistCustomAlertRule(ListCustomAlertRule): + """A custom alert rule that checks if a value (depends on the custom alert + type) is allowed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Status of the custom alert. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + :ivar value_type: The value type of the items in the list. Possible values + include: 'IpCidr', 'String' + :vartype value_type: str or ~azure.mgmt.security.models.ValueType + :param allowlist_values: Required. The values to allow. The format of the + values depends on the rule type. + :type allowlist_values: list[str] + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'value_type': {'readonly': True}, + 'allowlist_values': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'value_type': {'key': 'valueType', 'type': 'str'}, + 'allowlist_values': {'key': 'allowlistValues', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(AllowlistCustomAlertRule, self).__init__(**kwargs) + self.allowlist_values = kwargs.get('allowlist_values', None) + + +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 + :param configuration_status: Possible values include: 'Configured', + 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + :type configuration_status: str or ~azure.mgmt.security.models.enum + :param recommendation_status: Possible values include: 'Recommended', + 'NotRecommended', 'NotAvailable', 'NoStatus' + :type recommendation_status: str or ~azure.mgmt.security.models.enum + :param issues: + :type issues: + list[~azure.mgmt.security.models.AppWhitelistingIssueSummary] + :param source_system: Possible values include: 'Azure_AppLocker', + 'Azure_AuditD', 'NonAzure_AppLocker', 'NonAzure_AuditD', 'None' + :type 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}, + } + + _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 = kwargs.get('configuration_status', None) + self.recommendation_status = kwargs.get('recommendation_status', None) + self.issues = kwargs.get('issues', None) + self.source_system = kwargs.get('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 AppWhitelistingPutGroupData(Model): + """The altered data of the recommended VM/server group policy. + + :param enforcement_mode: The enforcement mode of the group. Can also be + defined per collection type by using ProtectionMode. Possible values + include: 'Audit', 'Enforce', 'None' + :type enforcement_mode: str or ~azure.mgmt.security.models.enum + :param protection_mode: The protection mode of the group per collection + type. Can also be defined for all collection types by using + EnforcementMode + :type protection_mode: ~azure.mgmt.security.models.ProtectionMode + :param vm_recommendations: + :type vm_recommendations: + list[~azure.mgmt.security.models.VmRecommendation] + :param path_recommendations: + :type path_recommendations: + list[~azure.mgmt.security.models.PathRecommendation] + """ + + _attribute_map = { + 'enforcement_mode': {'key': 'enforcementMode', 'type': 'str'}, + 'protection_mode': {'key': 'protectionMode', 'type': 'ProtectionMode'}, + 'vm_recommendations': {'key': 'vmRecommendations', 'type': '[VmRecommendation]'}, + 'path_recommendations': {'key': 'pathRecommendations', 'type': '[PathRecommendation]'}, + } + + def __init__(self, **kwargs): + super(AppWhitelistingPutGroupData, self).__init__(**kwargs) + self.enforcement_mode = kwargs.get('enforcement_mode', None) + self.protection_mode = kwargs.get('protection_mode', None) + self.vm_recommendations = kwargs.get('vm_recommendations', None) + self.path_recommendations = kwargs.get('path_recommendations', None) + + +class AscLocation(Resource): + """The ASC location of the subscription is in the "name" field. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param properties: + :type properties: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AscLocation, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AtaExternalSecuritySolution(ExternalSecuritySolution): + """Represents an ATA security solution which sends logs to an OMS workspace. + + 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 kind: Required. Constant filled by server. + :type kind: str + :param properties: + :type properties: ~azure.mgmt.security.models.AtaSolutionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AtaSolutionProperties'}, + } + + def __init__(self, **kwargs): + super(AtaExternalSecuritySolution, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.kind = 'ATA' + + +class ExternalSecuritySolutionProperties(Model): + """The solution properties (correspond to the solution kind). + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + } + + def __init__(self, **kwargs): + super(ExternalSecuritySolutionProperties, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.device_vendor = kwargs.get('device_vendor', None) + self.device_type = kwargs.get('device_type', None) + self.workspace = kwargs.get('workspace', None) + + +class AtaSolutionProperties(ExternalSecuritySolutionProperties): + """The external security solution properties for ATA solutions. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + :param last_event_received: + :type last_event_received: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AtaSolutionProperties, self).__init__(**kwargs) + self.last_event_received = kwargs.get('last_event_received', None) + + +class TrackedResource(Model): + """Describes an Azure tracked resource. + + 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 kind: Kind of the resource + :type kind: str + :param etag: Entity tag is used for comparing two or more entities from + the same requested resource. + :type etag: str + :param tags: A list of key value pairs that describe the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.kind = kwargs.get('kind', None) + self.etag = kwargs.get('etag', None) + self.tags = kwargs.get('tags', None) + + +class Automation(TrackedResource): + """The security automation resource. + + 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 kind: Kind of the resource + :type kind: str + :param etag: Entity tag is used for comparing two or more entities from + the same requested resource. + :type etag: str + :param tags: A list of key value pairs that describe the resource. + :type tags: dict[str, str] + :param description: The security automation description. + :type description: str + :param is_enabled: Indicates whether the security automation is enabled. + :type is_enabled: bool + :param metadata: The metadata of the security automation resource. + :type metadata: ~azure.mgmt.security.models.AutomationMetadata + :param scopes: A collection of scopes on which the security automations + logic is applied. Supported scopes are the subscription itself or a + resource group under that subscription. The automation will only apply on + defined scopes. + :type scopes: list[~azure.mgmt.security.models.AutomationScope] + :param sources: A collection of the source event types which evaluate the + security automation set of rules. + :type sources: list[~azure.mgmt.security.models.AutomationSource] + :param actions: A collection of the actions which are triggered if all the + configured rules evaluations, within at least one rule set, are true. + :type actions: list[~azure.mgmt.security.models.AutomationAction] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'metadata': {'key': 'properties.metadata', 'type': 'AutomationMetadata'}, + 'scopes': {'key': 'properties.scopes', 'type': '[AutomationScope]'}, + 'sources': {'key': 'properties.sources', 'type': '[AutomationSource]'}, + 'actions': {'key': 'properties.actions', 'type': '[AutomationAction]'}, + } + + def __init__(self, **kwargs): + super(Automation, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.is_enabled = kwargs.get('is_enabled', None) + self.metadata = kwargs.get('metadata', None) + self.scopes = kwargs.get('scopes', None) + self.sources = kwargs.get('sources', None) + self.actions = kwargs.get('actions', None) + + +class AutomationAction(Model): + """The action that should be triggered. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AutomationActionLogicApp, AutomationActionEventHub, + AutomationActionWorkspace + + All required parameters must be populated in order to send to Azure. + + :param action_type: Required. Constant filled by server. + :type action_type: str + """ + + _validation = { + 'action_type': {'required': True}, + } + + _attribute_map = { + 'action_type': {'key': 'actionType', 'type': 'str'}, + } + + _subtype_map = { + 'action_type': {'LogicApp': 'AutomationActionLogicApp', 'EventHub': 'AutomationActionEventHub', 'Workspace': 'AutomationActionWorkspace'} + } + + def __init__(self, **kwargs): + super(AutomationAction, self).__init__(**kwargs) + self.action_type = None + + +class AutomationActionEventHub(AutomationAction): + """The target Event Hub to which event data will be exported. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AutomationActionEventHubInput, + AutomationActionEventHubOutput + + All required parameters must be populated in order to send to Azure. + + :param action_type: Required. Constant filled by server. + :type action_type: str + :param event_hub_resource_id: The target Event Hub Azure Resource ID. + :type event_hub_resource_id: str + """ + + _validation = { + 'action_type': {'required': True}, + } + + _attribute_map = { + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'event_hub_resource_id': {'key': 'eventHubResourceId', 'type': 'str'}, + } + + _subtype_map = { + 'action_type': {'EventHub': 'AutomationActionEventHubInput', 'EventHub': 'AutomationActionEventHubOutput'} + } + + def __init__(self, **kwargs): + super(AutomationActionEventHub, self).__init__(**kwargs) + self.event_hub_resource_id = kwargs.get('event_hub_resource_id', None) + self.action_type = 'EventHub' + + +class AutomationActionEventHubInput(AutomationActionEventHub): + """The target Event Hub to which event data will be exported. + + All required parameters must be populated in order to send to Azure. + + :param action_type: Required. Constant filled by server. + :type action_type: str + :param event_hub_resource_id: The target Event Hub Azure Resource ID. + :type event_hub_resource_id: str + :param connection_string: The target Event Hub connection string + :type connection_string: str + """ + + _validation = { + 'action_type': {'required': True}, + } + + _attribute_map = { + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'event_hub_resource_id': {'key': 'eventHubResourceId', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AutomationActionEventHubInput, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.action_type = 'EventHub' + + +class AutomationActionEventHubOutput(AutomationActionEventHub): + """The target Event Hub to which event data will be exported. + + All required parameters must be populated in order to send to Azure. + + :param action_type: Required. Constant filled by server. + :type action_type: str + :param event_hub_resource_id: The target Event Hub Azure Resource ID. + :type event_hub_resource_id: str + :param sas_policy_name: The target Event Hub SAS policy name. + :type sas_policy_name: str + """ + + _validation = { + 'action_type': {'required': True}, + } + + _attribute_map = { + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'event_hub_resource_id': {'key': 'eventHubResourceId', 'type': 'str'}, + 'sas_policy_name': {'key': 'sasPolicyName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AutomationActionEventHubOutput, self).__init__(**kwargs) + self.sas_policy_name = kwargs.get('sas_policy_name', None) + self.action_type = 'EventHub' + + +class AutomationActionLogicApp(AutomationAction): + """The logic app action that should be triggered. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AutomationActionLogicAppInput, + AutomationActionLogicAppOutput + + All required parameters must be populated in order to send to Azure. + + :param action_type: Required. Constant filled by server. + :type action_type: str + :param logic_app_resource_id: The triggered Logic App Azure Resource ID. + This can also reside on other subscriptions, given that you have + permissions to trigger the Logic App + :type logic_app_resource_id: str + """ + + _validation = { + 'action_type': {'required': True}, + } + + _attribute_map = { + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'logic_app_resource_id': {'key': 'logicAppResourceId', 'type': 'str'}, + } + + _subtype_map = { + 'action_type': {'LogicApp': 'AutomationActionLogicAppInput', 'LogicApp': 'AutomationActionLogicAppOutput'} + } + + def __init__(self, **kwargs): + super(AutomationActionLogicApp, self).__init__(**kwargs) + self.logic_app_resource_id = kwargs.get('logic_app_resource_id', None) + self.action_type = 'LogicApp' + + +class AutomationActionLogicAppInput(AutomationActionLogicApp): + """The logic app action that should be triggered. + + All required parameters must be populated in order to send to Azure. + + :param action_type: Required. Constant filled by server. + :type action_type: str + :param logic_app_resource_id: The triggered Logic App Azure Resource ID. + This can also reside on other subscriptions, given that you have + permissions to trigger the Logic App + :type logic_app_resource_id: str + :param uri: The Logic App trigger URI endpoint. + :type uri: str + """ + + _validation = { + 'action_type': {'required': True}, + } + + _attribute_map = { + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'logic_app_resource_id': {'key': 'logicAppResourceId', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AutomationActionLogicAppInput, self).__init__(**kwargs) + self.uri = kwargs.get('uri', None) + self.action_type = 'LogicApp' + + +class AutomationActionLogicAppOutput(AutomationActionLogicApp): + """The logic app action that should be triggered. + + All required parameters must be populated in order to send to Azure. + + :param action_type: Required. Constant filled by server. + :type action_type: str + :param logic_app_resource_id: The triggered Logic App Azure Resource ID. + This can also reside on other subscriptions, given that you have + permissions to trigger the Logic App + :type logic_app_resource_id: str + """ + + _validation = { + 'action_type': {'required': True}, + } + + _attribute_map = { + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'logic_app_resource_id': {'key': 'logicAppResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AutomationActionLogicAppOutput, self).__init__(**kwargs) + self.action_type = 'LogicApp' + + +class AutomationActionWorkspace(AutomationAction): + """The Log Analytics Workspace to which event data will be exported. Security + alerts data will reside in the 'SecurityAlert' table and the assessments + data will reside in the 'SecurityRecommendation' table (under the + 'Security'/'SecurityCenterFree' solutions). Note that in order to view the + data in the workspace, the Security Center Log Analytics free/standard + solution needs to be enabled on that workspace. + + All required parameters must be populated in order to send to Azure. + + :param action_type: Required. Constant filled by server. + :type action_type: str + :param workspace_resource_id: The fully qualified Log Analytics Workspace + Azure Resource ID. + :type workspace_resource_id: str + """ + + _validation = { + 'action_type': {'required': True}, + } + + _attribute_map = { + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'workspace_resource_id': {'key': 'workspaceResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AutomationActionWorkspace, self).__init__(**kwargs) + self.workspace_resource_id = kwargs.get('workspace_resource_id', None) + self.action_type = 'Workspace' + + +class AutomationMetadata(Model): + """The metadata of the security automation resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar created_date_time_utc: The security automation creation date. + :vartype created_date_time_utc: datetime + :ivar created_by: The AAD object ID of the entity that created the + security automation. + :vartype created_by: str + :ivar last_updated_date_time_utc: The security automation last updated + date. + :vartype last_updated_date_time_utc: datetime + :ivar last_updated_by: The AAD object ID of the entity that last updated + the security automation. + :vartype last_updated_by: str + """ + + _validation = { + 'created_date_time_utc': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_updated_date_time_utc': {'readonly': True}, + 'last_updated_by': {'readonly': True}, + } + + _attribute_map = { + 'created_date_time_utc': {'key': 'createdDateTimeUtc', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_updated_date_time_utc': {'key': 'lastUpdatedDateTimeUtc', 'type': 'iso-8601'}, + 'last_updated_by': {'key': 'lastUpdatedBy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AutomationMetadata, self).__init__(**kwargs) + self.created_date_time_utc = None + self.created_by = None + self.last_updated_date_time_utc = None + self.last_updated_by = None + + +class AutomationRuleSet(Model): + """A rule set which evaluates all its rules upon an event interception. Only + when all the included rules in the rule set will be evaluated as 'true', + will the event trigger the defined actions. + + :param rules: + :type rules: list[~azure.mgmt.security.models.AutomationTriggeringRule] + """ + + _attribute_map = { + 'rules': {'key': 'rules', 'type': '[AutomationTriggeringRule]'}, + } + + def __init__(self, **kwargs): + super(AutomationRuleSet, self).__init__(**kwargs) + self.rules = kwargs.get('rules', None) + + +class AutomationScope(Model): + """A single automation scope. + + :param description: The resources scope description. + :type description: str + :param scope_path: The resources scope path. Can be the subscription on + which the automation is defined on or a resource group under that + subscription (fully qualified Azure resource IDs). + :type scope_path: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'scope_path': {'key': 'scopePath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AutomationScope, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.scope_path = kwargs.get('scope_path', None) + + +class AutomationSource(Model): + """The source event types which evaluate the security automation set of rules. + For example - security alerts and security assessments. To learn more about + the supported security events data models schemas - please visit + https://aka.ms/ASCAutomationSchemas. + + :param event_source: A valid event source type. Possible values include: + 'Assessments', 'Alerts' + :type event_source: str or ~azure.mgmt.security.models.EventSource + :param rule_sets: A set of rules which evaluate upon event interception. A + logical disjunction is applied between defined rule sets (logical 'or'). + :type rule_sets: list[~azure.mgmt.security.models.AutomationRuleSet] + """ + + _attribute_map = { + 'event_source': {'key': 'eventSource', 'type': 'str'}, + 'rule_sets': {'key': 'ruleSets', 'type': '[AutomationRuleSet]'}, + } + + def __init__(self, **kwargs): + super(AutomationSource, self).__init__(**kwargs) + self.event_source = kwargs.get('event_source', None) + self.rule_sets = kwargs.get('rule_sets', None) + + +class AutomationTriggeringRule(Model): + """A rule which is evaluated upon event interception. The rule is configured + by comparing a specific value from the event model to an expected value. + This comparison is done by using one of the supported operators set. + + :param property_jpath: The JPath of the entity model property that should + be checked. + :type property_jpath: str + :param property_type: The data type of the compared operands (string, + integer, floating point number or a boolean [true/false]]. Possible values + include: 'String', 'Integer', 'Number', 'Boolean' + :type property_type: str or ~azure.mgmt.security.models.PropertyType + :param expected_value: The expected value. + :type expected_value: str + :param operator: A valid comparer operator to use. Possible values + include: 'Equals', 'GreaterThan', 'GreaterThanOrEqualTo', 'LesserThan', + 'LesserThanOrEqualTo', 'NotEquals', 'Contains', 'StartsWith', 'EndsWith' + :type operator: str or ~azure.mgmt.security.models.Operator + """ + + _attribute_map = { + 'property_jpath': {'key': 'propertyJPath', 'type': 'str'}, + 'property_type': {'key': 'propertyType', 'type': 'str'}, + 'expected_value': {'key': 'expectedValue', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AutomationTriggeringRule, self).__init__(**kwargs) + self.property_jpath = kwargs.get('property_jpath', None) + self.property_type = kwargs.get('property_type', None) + self.expected_value = kwargs.get('expected_value', None) + self.operator = kwargs.get('operator', None) + + +class AutomationValidationStatus(Model): + """The security automation model state property bag. + + :param is_valid: Indicates whether the model is valid or not. + :type is_valid: bool + :param message: The validation message. + :type message: str + """ + + _attribute_map = { + 'is_valid': {'key': 'isValid', 'type': 'bool'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AutomationValidationStatus, self).__init__(**kwargs) + self.is_valid = kwargs.get('is_valid', None) + self.message = kwargs.get('message', None) + + +class AutoProvisioningSetting(Resource): + """Auto provisioning setting. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param auto_provision: Required. Describes what kind of security agent + provisioning action to take. Possible values include: 'On', 'Off' + :type auto_provision: str or ~azure.mgmt.security.models.AutoProvision + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'auto_provision': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'auto_provision': {'key': 'properties.autoProvision', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AutoProvisioningSetting, self).__init__(**kwargs) + self.auto_provision = kwargs.get('auto_provision', None) + + +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: AzureResourceDetails, AwsResourceDetails + + 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': {'Azure': 'AzureResourceDetails', 'Aws': 'AwsResourceDetails'} + } + + def __init__(self, **kwargs): + super(ResourceDetails, self).__init__(**kwargs) + self.source = None + + +class AwsResourceDetails(ResourceDetails): + """Details of the 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 account_id: AWS account ID + :vartype account_id: str + :ivar aws_resource_id: AWS resource ID. can be ARN or other + :vartype aws_resource_id: str + """ + + _validation = { + 'source': {'required': True}, + 'account_id': {'readonly': True}, + 'aws_resource_id': {'readonly': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'aws_resource_id': {'key': 'awsResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AwsResourceDetails, self).__init__(**kwargs) + self.account_id = None + self.aws_resource_id = None + self.source = 'Aws' + + +class AzureResourceDetails(ResourceDetails): + """Details of the 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 + """ + + _validation = { + 'source': {'required': True}, + 'id': {'readonly': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureResourceDetails, self).__init__(**kwargs) + self.id = None + self.source = 'Azure' + + +class CefExternalSecuritySolution(ExternalSecuritySolution): + """Represents a security solution which sends CEF logs to an OMS workspace. + + 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 kind: Required. Constant filled by server. + :type kind: str + :param properties: + :type properties: ~azure.mgmt.security.models.CefSolutionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CefSolutionProperties'}, + } + + def __init__(self, **kwargs): + super(CefExternalSecuritySolution, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.kind = 'CEF' + + +class CefSolutionProperties(ExternalSecuritySolutionProperties): + """The external security solution properties for CEF solutions. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + :param hostname: + :type hostname: str + :param agent: + :type agent: str + :param last_event_received: + :type last_event_received: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + 'hostname': {'key': 'hostname', 'type': 'str'}, + 'agent': {'key': 'agent', 'type': 'str'}, + 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CefSolutionProperties, self).__init__(**kwargs) + self.hostname = kwargs.get('hostname', None) + self.agent = kwargs.get('agent', None) + self.last_event_received = kwargs.get('last_event_received', None) + + +class CloudError(Model): + """Error response structure. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :vartype code: str + :ivar message: A message describing the error, intended to be suitable for + display in a user interface. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'error.code', 'type': 'str'}, + 'message': {'key': 'error.message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.code = None + self.message = None + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class Compliance(Resource): + """Compliance of a scope. + + 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 assessment_timestamp_utc_date: The timestamp when the Compliance + calculation was conducted. + :vartype assessment_timestamp_utc_date: datetime + :ivar resource_count: The resource count of the given subscription for + which the Compliance calculation was conducted (needed for Management + Group Compliance calculation). + :vartype resource_count: int + :ivar assessment_result: An array of segment, which is the actually the + compliance assessment. + :vartype assessment_result: + list[~azure.mgmt.security.models.ComplianceSegment] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'assessment_timestamp_utc_date': {'readonly': True}, + 'resource_count': {'readonly': True}, + 'assessment_result': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'assessment_timestamp_utc_date': {'key': 'properties.assessmentTimestampUtcDate', 'type': 'iso-8601'}, + 'resource_count': {'key': 'properties.resourceCount', 'type': 'int'}, + 'assessment_result': {'key': 'properties.assessmentResult', 'type': '[ComplianceSegment]'}, + } + + def __init__(self, **kwargs): + super(Compliance, self).__init__(**kwargs) + self.assessment_timestamp_utc_date = None + self.resource_count = None + self.assessment_result = None + + +class ComplianceResult(Resource): + """a compliance result. + + 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 resource_status: The status of the resource regarding a single + assessment. Possible values include: 'Healthy', 'NotApplicable', + 'OffByPolicy', 'NotHealthy' + :vartype resource_status: str or + ~azure.mgmt.security.models.ResourceStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resource_status': {'key': 'properties.resourceStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComplianceResult, self).__init__(**kwargs) + self.resource_status = None + + +class ComplianceSegment(Model): + """A segment of a compliance assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar segment_type: The segment type, e.g. compliant, non-compliance, + insufficient coverage, N/A, etc. + :vartype segment_type: str + :ivar percentage: The size (%) of the segment. + :vartype percentage: float + """ + + _validation = { + 'segment_type': {'readonly': True}, + 'percentage': {'readonly': True}, + } + + _attribute_map = { + 'segment_type': {'key': 'segmentType', 'type': 'str'}, + 'percentage': {'key': 'percentage', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ComplianceSegment, self).__init__(**kwargs) + self.segment_type = None + self.percentage = None + + +class ConnectableResource(Model): + """Describes the allowed inbound and outbound traffic of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The Azure resource id + :vartype id: str + :ivar inbound_connected_resources: The list of Azure resources that the + resource has inbound allowed connection from + :vartype inbound_connected_resources: + list[~azure.mgmt.security.models.ConnectedResource] + :ivar outbound_connected_resources: The list of Azure resources that the + resource has outbound allowed connection to + :vartype outbound_connected_resources: + list[~azure.mgmt.security.models.ConnectedResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'inbound_connected_resources': {'readonly': True}, + 'outbound_connected_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'inbound_connected_resources': {'key': 'inboundConnectedResources', 'type': '[ConnectedResource]'}, + 'outbound_connected_resources': {'key': 'outboundConnectedResources', 'type': '[ConnectedResource]'}, + } + + def __init__(self, **kwargs): + super(ConnectableResource, self).__init__(**kwargs) + self.id = None + self.inbound_connected_resources = None + self.outbound_connected_resources = None + + +class ConnectedResource(Model): + """Describes properties of a connected resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connected_resource_id: The Azure resource id of the connected + resource + :vartype connected_resource_id: str + :ivar tcp_ports: The allowed tcp ports + :vartype tcp_ports: str + :ivar udp_ports: The allowed udp ports + :vartype udp_ports: str + """ + + _validation = { + 'connected_resource_id': {'readonly': True}, + 'tcp_ports': {'readonly': True}, + 'udp_ports': {'readonly': True}, + } + + _attribute_map = { + 'connected_resource_id': {'key': 'connectedResourceId', 'type': 'str'}, + 'tcp_ports': {'key': 'tcpPorts', 'type': 'str'}, + 'udp_ports': {'key': 'udpPorts', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectedResource, self).__init__(**kwargs) + self.connected_resource_id = None + self.tcp_ports = None + self.udp_ports = None + + +class ConnectedWorkspace(Model): + """Represents an OMS workspace to which the solution is connected. + + :param id: Azure resource ID of the connected OMS workspace + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectedWorkspace, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ContainerRegistryVulnerabilityProperties(AdditionalData): + """Additional context fields for container registry Vulnerability assessment. + + 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 assessed_resource_type: Required. Constant filled by server. + :type assessed_resource_type: str + :ivar type: Vulnerability Type. e.g: Vulnerability, Potential + Vulnerability, Information Gathered, Vulnerability + :vartype type: str + :ivar cvss: Dictionary from cvss version to cvss details object + :vartype cvss: dict[str, ~azure.mgmt.security.models.CVSS] + :ivar patchable: Indicates whether a patch is available or not + :vartype patchable: bool + :ivar cve: List of CVEs + :vartype cve: list[~azure.mgmt.security.models.CVE] + :ivar published_time: Published time + :vartype published_time: datetime + :ivar vendor_references: + :vartype vendor_references: + list[~azure.mgmt.security.models.VendorReference] + :ivar repository_name: Name of the repository which the vulnerable image + belongs to + :vartype repository_name: str + :ivar image_digest: Digest of the vulnerable image + :vartype image_digest: str + """ + + _validation = { + 'assessed_resource_type': {'required': True}, + 'type': {'readonly': True}, + 'cvss': {'readonly': True}, + 'patchable': {'readonly': True}, + 'cve': {'readonly': True}, + 'published_time': {'readonly': True}, + 'vendor_references': {'readonly': True}, + 'repository_name': {'readonly': True}, + 'image_digest': {'readonly': True}, + } + + _attribute_map = { + 'assessed_resource_type': {'key': 'assessedResourceType', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'cvss': {'key': 'cvss', 'type': '{CVSS}'}, + 'patchable': {'key': 'patchable', 'type': 'bool'}, + 'cve': {'key': 'cve', 'type': '[CVE]'}, + 'published_time': {'key': 'publishedTime', 'type': 'iso-8601'}, + 'vendor_references': {'key': 'vendorReferences', 'type': '[VendorReference]'}, + 'repository_name': {'key': 'repositoryName', 'type': 'str'}, + 'image_digest': {'key': 'imageDigest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerRegistryVulnerabilityProperties, self).__init__(**kwargs) + self.type = None + self.cvss = None + self.patchable = None + self.cve = None + self.published_time = None + self.vendor_references = None + self.repository_name = None + self.image_digest = None + self.assessed_resource_type = 'ContainerRegistryVulnerability' + + +class CVE(Model): + """CVE details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar title: CVE title + :vartype title: str + :ivar link: Link url + :vartype link: str + """ + + _validation = { + 'title': {'readonly': True}, + 'link': {'readonly': True}, + } + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'link': {'key': 'link', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CVE, self).__init__(**kwargs) + self.title = None + self.link = None + + +class CVSS(Model): + """CVSS details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar base: CVSS base + :vartype base: float + """ + + _validation = { + 'base': {'readonly': True}, + } + + _attribute_map = { + 'base': {'key': 'base', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(CVSS, self).__init__(**kwargs) + self.base = None + + +class SettingResource(Resource): + """The kind of the security setting. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SettingResource, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + + +class Setting(SettingResource): + """Represents a security setting in Azure Security Center. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Setting, self).__init__(**kwargs) + + +class DataExportSetting(Setting): + """Represents a data export setting. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + :param enabled: Required. Is the data export setting is enabled + :type enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'enabled': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DataExportSetting, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + + +class DenylistCustomAlertRule(ListCustomAlertRule): + """A custom alert rule that checks if a value (depends on the custom alert + type) is denied. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Status of the custom alert. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + :ivar value_type: The value type of the items in the list. Possible values + include: 'IpCidr', 'String' + :vartype value_type: str or ~azure.mgmt.security.models.ValueType + :param denylist_values: Required. The values to deny. The format of the + values depends on the rule type. + :type denylist_values: list[str] + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'value_type': {'readonly': True}, + 'denylist_values': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'value_type': {'key': 'valueType', 'type': 'str'}, + 'denylist_values': {'key': 'denylistValues', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DenylistCustomAlertRule, self).__init__(**kwargs) + self.denylist_values = kwargs.get('denylist_values', None) + + +class DeviceSecurityGroup(Resource): + """The device security group resource. + + 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 threshold_rules: The list of custom alert threshold rules. + :type threshold_rules: + list[~azure.mgmt.security.models.ThresholdCustomAlertRule] + :param time_window_rules: The list of custom alert time-window rules. + :type time_window_rules: + list[~azure.mgmt.security.models.TimeWindowCustomAlertRule] + :param allowlist_rules: The allow-list custom alert rules. + :type allowlist_rules: + list[~azure.mgmt.security.models.AllowlistCustomAlertRule] + :param denylist_rules: The deny-list custom alert rules. + :type denylist_rules: + list[~azure.mgmt.security.models.DenylistCustomAlertRule] + """ + + _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'}, + 'threshold_rules': {'key': 'properties.thresholdRules', 'type': '[ThresholdCustomAlertRule]'}, + 'time_window_rules': {'key': 'properties.timeWindowRules', 'type': '[TimeWindowCustomAlertRule]'}, + 'allowlist_rules': {'key': 'properties.allowlistRules', 'type': '[AllowlistCustomAlertRule]'}, + 'denylist_rules': {'key': 'properties.denylistRules', 'type': '[DenylistCustomAlertRule]'}, + } + + def __init__(self, **kwargs): + super(DeviceSecurityGroup, self).__init__(**kwargs) + self.threshold_rules = kwargs.get('threshold_rules', None) + self.time_window_rules = kwargs.get('time_window_rules', None) + self.allowlist_rules = kwargs.get('allowlist_rules', None) + self.denylist_rules = kwargs.get('denylist_rules', None) + + +class DiscoveredSecuritySolution(Model): + """DiscoveredSecuritySolution. + + 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 discovered + solution. Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' + :type security_family: str or ~azure.mgmt.security.models.SecurityFamily + :param offer: Required. The security solutions' image offer + :type offer: str + :param publisher: Required. The security solutions' image publisher + :type publisher: str + :param sku: Required. The security solutions' image sku + :type sku: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'security_family': {'required': True}, + 'offer': {'required': True}, + 'publisher': {'required': True}, + 'sku': {'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'}, + 'offer': {'key': 'properties.offer', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DiscoveredSecuritySolution, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.security_family = kwargs.get('security_family', None) + self.offer = kwargs.get('offer', None) + self.publisher = kwargs.get('publisher', None) + self.sku = kwargs.get('sku', None) + + +class ETag(Model): + """Entity tag is used for comparing two or more entities from the same + requested resource. + + :param etag: Entity tag is used for comparing two or more entities from + the same requested resource. + :type etag: str + """ + + _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ETag, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + + +class ExternalSecuritySolutionKind1(Model): + """Describes an Azure resource with kind. + + :param kind: The kind of the external solution. Possible values include: + 'CEF', 'ATA', 'AAD' + :type kind: str or + ~azure.mgmt.security.models.ExternalSecuritySolutionKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExternalSecuritySolutionKind1, self).__init__(**kwargs) + self.kind = kwargs.get('kind', 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 + :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}, + } + + _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'}, + '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.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 order: The order of the information type. + :type order: float + :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'}, + 'order': {'key': 'order', 'type': 'float'}, + '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.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 IoTSecurityAggregatedAlert(Model): + """Security Solution Aggregated Alert information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar alert_type: Name of the alert type. + :vartype alert_type: str + :ivar alert_display_name: Display name of the alert type. + :vartype alert_display_name: str + :ivar aggregated_date_utc: Date of detection. + :vartype aggregated_date_utc: date + :ivar vendor_name: Name of the organization that raised the alert. + :vartype vendor_name: str + :ivar reported_severity: Assessed alert severity. Possible values include: + 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar remediation_steps: Recommended steps for remediation. + :vartype remediation_steps: str + :ivar description: Description of the suspected vulnerability and meaning. + :vartype description: str + :ivar count: Number of alerts occurrences within the aggregated time + window. + :vartype count: int + :ivar effected_resource_type: Azure resource ID of the resource that + received the alerts. + :vartype effected_resource_type: str + :ivar system_source: The type of the alerted resource (Azure, Non-Azure). + :vartype system_source: str + :ivar action_taken: IoT Security solution alert response. + :vartype action_taken: str + :ivar log_analytics_query: Log analytics query for getting the list of + affected devices/alerts. + :vartype log_analytics_query: str + :ivar top_devices_list: 10 devices with the highest number of occurrences + of this alert type, on this day. + :vartype top_devices_list: + list[~azure.mgmt.security.models.IoTSecurityAggregatedAlertPropertiesTopDevicesListItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'alert_type': {'readonly': True}, + 'alert_display_name': {'readonly': True}, + 'aggregated_date_utc': {'readonly': True}, + 'vendor_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'description': {'readonly': True}, + 'count': {'readonly': True}, + 'effected_resource_type': {'readonly': True}, + 'system_source': {'readonly': True}, + 'action_taken': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + 'top_devices_list': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, + 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, + 'aggregated_date_utc': {'key': 'properties.aggregatedDateUtc', 'type': 'date'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'count': {'key': 'properties.count', 'type': 'int'}, + 'effected_resource_type': {'key': 'properties.effectedResourceType', 'type': 'str'}, + 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, + 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + 'top_devices_list': {'key': 'properties.topDevicesList', 'type': '[IoTSecurityAggregatedAlertPropertiesTopDevicesListItem]'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAggregatedAlert, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + self.alert_type = None + self.alert_display_name = None + self.aggregated_date_utc = None + self.vendor_name = None + self.reported_severity = None + self.remediation_steps = None + self.description = None + self.count = None + self.effected_resource_type = None + self.system_source = None + self.action_taken = None + self.log_analytics_query = None + self.top_devices_list = None + + +class IoTSecurityAggregatedAlertPropertiesTopDevicesListItem(Model): + """IoTSecurityAggregatedAlertPropertiesTopDevicesListItem. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar device_id: Name of the device. + :vartype device_id: str + :ivar alerts_count: Number of alerts raised for this device. + :vartype alerts_count: int + :ivar last_occurrence: Most recent time this alert was raised for this + device, on this day. + :vartype last_occurrence: str + """ + + _validation = { + 'device_id': {'readonly': True}, + 'alerts_count': {'readonly': True}, + 'last_occurrence': {'readonly': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + 'last_occurrence': {'key': 'lastOccurrence', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAggregatedAlertPropertiesTopDevicesListItem, self).__init__(**kwargs) + self.device_id = None + self.alerts_count = None + self.last_occurrence = None + + +class IoTSecurityAggregatedRecommendation(Model): + """IoT Security solution recommendation information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param recommendation_name: Name of the recommendation. + :type recommendation_name: str + :ivar recommendation_display_name: Display name of the recommendation + type. + :vartype recommendation_display_name: str + :ivar description: Description of the suspected vulnerability and meaning. + :vartype description: str + :ivar recommendation_type_id: Recommendation-type GUID. + :vartype recommendation_type_id: str + :ivar detected_by: Name of the organization that made the recommendation. + :vartype detected_by: str + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar reported_severity: Assessed recommendation severity. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar healthy_devices: Number of healthy devices within the IoT Security + solution. + :vartype healthy_devices: int + :ivar unhealthy_device_count: Number of unhealthy devices within the IoT + Security solution. + :vartype unhealthy_device_count: int + :ivar log_analytics_query: Log analytics query for getting the list of + affected devices/alerts. + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'recommendation_display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'recommendation_type_id': {'readonly': True}, + 'detected_by': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'healthy_devices': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'recommendation_name': {'key': 'properties.recommendationName', 'type': 'str'}, + 'recommendation_display_name': {'key': 'properties.recommendationDisplayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'recommendation_type_id': {'key': 'properties.recommendationTypeId', 'type': 'str'}, + 'detected_by': {'key': 'properties.detectedBy', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'healthy_devices': {'key': 'properties.healthyDevices', 'type': 'int'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAggregatedRecommendation, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + self.recommendation_name = kwargs.get('recommendation_name', None) + self.recommendation_display_name = None + self.description = None + self.recommendation_type_id = None + self.detected_by = None + self.remediation_steps = None + self.reported_severity = None + self.healthy_devices = None + self.unhealthy_device_count = None + self.log_analytics_query = None + + +class IoTSecurityAlertedDevice(Model): + """Statistical information about the number of alerts per device during last + set number of days. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar device_id: Device identifier. + :vartype device_id: str + :ivar alerts_count: Number of alerts raised for this device. + :vartype alerts_count: int + """ + + _validation = { + 'device_id': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAlertedDevice, self).__init__(**kwargs) + self.device_id = None + self.alerts_count = None + + +class IoTSecurityDeviceAlert(Model): + """Statistical information about the number of alerts per alert type during + last set number of days. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_display_name: Display name of the alert + :vartype alert_display_name: str + :ivar reported_severity: Assessed Alert severity. Possible values include: + 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar alerts_count: Number of alerts raised for this alert type. + :vartype alerts_count: int + """ + + _validation = { + 'alert_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'alert_display_name': {'key': 'alertDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceAlert, self).__init__(**kwargs) + self.alert_display_name = None + self.reported_severity = None + self.alerts_count = None + + +class IoTSecurityDeviceRecommendation(Model): + """Statistical information about the number of recommendations per device, per + recommendation type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar recommendation_display_name: Display name of the recommendation. + :vartype recommendation_display_name: str + :ivar reported_severity: Assessed recommendation severity. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar devices_count: Number of devices with this recommendation. + :vartype devices_count: int + """ + + _validation = { + 'recommendation_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'devices_count': {'readonly': True}, + } + + _attribute_map = { + 'recommendation_display_name': {'key': 'recommendationDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'devices_count': {'key': 'devicesCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceRecommendation, self).__init__(**kwargs) + self.recommendation_display_name = None + self.reported_severity = None + self.devices_count = None + + +class IoTSecuritySolutionAnalyticsModel(Resource): + """Security analytics of your IoT Security solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar metrics: Security analytics of your IoT Security solution. + :vartype metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + :ivar unhealthy_device_count: Number of unhealthy devices within your IoT + Security solution. + :vartype unhealthy_device_count: int + :ivar devices_metrics: List of device metrics by the aggregation date. + :vartype devices_metrics: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem] + :param top_alerted_devices: List of the 3 devices with the most alerts. + :type top_alerted_devices: + list[~azure.mgmt.security.models.IoTSecurityAlertedDevice] + :param most_prevalent_device_alerts: List of the 3 most prevalent device + alerts. + :type most_prevalent_device_alerts: + list[~azure.mgmt.security.models.IoTSecurityDeviceAlert] + :param most_prevalent_device_recommendations: List of the 3 most prevalent + device recommendations. + :type most_prevalent_device_recommendations: + list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metrics': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'devices_metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'metrics': {'key': 'properties.metrics', 'type': 'IoTSeverityMetrics'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'devices_metrics': {'key': 'properties.devicesMetrics', 'type': '[IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem]'}, + 'top_alerted_devices': {'key': 'properties.topAlertedDevices', 'type': '[IoTSecurityAlertedDevice]'}, + 'most_prevalent_device_alerts': {'key': 'properties.mostPrevalentDeviceAlerts', 'type': '[IoTSecurityDeviceAlert]'}, + 'most_prevalent_device_recommendations': {'key': 'properties.mostPrevalentDeviceRecommendations', 'type': '[IoTSecurityDeviceRecommendation]'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionAnalyticsModel, self).__init__(**kwargs) + self.metrics = None + self.unhealthy_device_count = None + self.devices_metrics = None + self.top_alerted_devices = kwargs.get('top_alerted_devices', None) + self.most_prevalent_device_alerts = kwargs.get('most_prevalent_device_alerts', None) + self.most_prevalent_device_recommendations = kwargs.get('most_prevalent_device_recommendations', None) + + +class IoTSecuritySolutionAnalyticsModelList(Model): + """List of Security analytics of your IoT Security solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of Security analytics of your IoT Security + solution + :type value: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel] + :ivar next_link: When there is too much alert data for one page, use this + URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecuritySolutionAnalyticsModel]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionAnalyticsModelList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem(Model): + """IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem. + + :param date_property: Aggregation of IoT Security solution device alert + metrics by date. + :type date_property: datetime + :param devices_metrics: Device alert count by severity. + :type devices_metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'devices_metrics': {'key': 'devicesMetrics', 'type': 'IoTSeverityMetrics'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, self).__init__(**kwargs) + self.date_property = kwargs.get('date_property', None) + self.devices_metrics = kwargs.get('devices_metrics', None) + + +class IoTSecuritySolutionModel(Model): + """IoT Security solution configuration and resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param location: The resource location. + :type location: str + :param workspace: Required. Workspace resource ID + :type workspace: str + :param display_name: Required. Resource display name. + :type display_name: str + :param status: Status of the IoT Security solution. Possible values + include: 'Enabled', 'Disabled'. Default value: "Enabled" . + :type status: str or ~azure.mgmt.security.models.SecuritySolutionStatus + :param export: List of additional options for exporting to workspace data. + :type export: list[str or ~azure.mgmt.security.models.ExportData] + :param disabled_data_sources: Disabled data sources. Disabling these data + sources compromises the system. + :type disabled_data_sources: list[str or + ~azure.mgmt.security.models.DataSource] + :param iot_hubs: Required. IoT Hub resource IDs + :type iot_hubs: list[str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :ivar auto_discovered_resources: List of resources that were automatically + discovered as relevant to the security solution. + :vartype auto_discovered_resources: list[str] + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + :param unmasked_ip_logging_status: Unmasked IP address logging status. + Possible values include: 'Disabled', 'Enabled'. Default value: "Disabled" + . + :type unmasked_ip_logging_status: str or + ~azure.mgmt.security.models.UnmaskedIpLoggingStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'workspace': {'required': True}, + 'display_name': {'required': True}, + 'iot_hubs': {'required': True}, + 'auto_discovered_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'workspace': {'key': 'properties.workspace', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'export': {'key': 'properties.export', 'type': '[str]'}, + 'disabled_data_sources': {'key': 'properties.disabledDataSources', 'type': '[str]'}, + 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[str]'}, + 'user_defined_resources': {'key': 'properties.userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'auto_discovered_resources': {'key': 'properties.autoDiscoveredResources', 'type': '[str]'}, + 'recommendations_configuration': {'key': 'properties.recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + 'unmasked_ip_logging_status': {'key': 'properties.unmaskedIpLoggingStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + self.workspace = kwargs.get('workspace', None) + self.display_name = kwargs.get('display_name', None) + self.status = kwargs.get('status', "Enabled") + self.export = kwargs.get('export', None) + self.disabled_data_sources = kwargs.get('disabled_data_sources', None) + self.iot_hubs = kwargs.get('iot_hubs', None) + self.user_defined_resources = kwargs.get('user_defined_resources', None) + self.auto_discovered_resources = None + self.recommendations_configuration = kwargs.get('recommendations_configuration', None) + self.unmasked_ip_logging_status = kwargs.get('unmasked_ip_logging_status', "Disabled") + + +class IoTSeverityMetrics(Model): + """IoT Security solution analytics severity metrics. + + :param high: Count of high severity alerts/recommendations. + :type high: int + :param medium: Count of medium severity alerts/recommendations. + :type medium: int + :param low: Count of low severity alerts/recommendations. + :type low: int + """ + + _attribute_map = { + 'high': {'key': 'high', 'type': 'int'}, + 'medium': {'key': 'medium', 'type': 'int'}, + 'low': {'key': 'low', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSeverityMetrics, self).__init__(**kwargs) + self.high = kwargs.get('high', None) + self.medium = kwargs.get('medium', None) + self.low = kwargs.get('low', None) + + +class JitNetworkAccessPolicy(Model): + """JitNetworkAccessPolicy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Kind of the resource + :type kind: str + :ivar location: Location where the resource is stored + :vartype location: str + :param virtual_machines: Required. Configurations for + Microsoft.Compute/virtualMachines resource type. + :type virtual_machines: + list[~azure.mgmt.security.models.JitNetworkAccessPolicyVirtualMachine] + :param requests: + :type requests: list[~azure.mgmt.security.models.JitNetworkAccessRequest] + :ivar provisioning_state: Gets the provisioning state of the Just-in-Time + policy. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'virtual_machines': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[JitNetworkAccessPolicyVirtualMachine]'}, + 'requests': {'key': 'properties.requests', 'type': '[JitNetworkAccessRequest]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessPolicy, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.kind = kwargs.get('kind', None) + self.location = None + self.virtual_machines = kwargs.get('virtual_machines', None) + self.requests = kwargs.get('requests', None) + self.provisioning_state = None + + +class JitNetworkAccessPolicyInitiatePort(Model): + """JitNetworkAccessPolicyInitiatePort. + + All required parameters must be populated in order to send to Azure. + + :param number: Required. + :type number: int + :param allowed_source_address_prefix: Source of the allowed traffic. If + omitted, the request will be for the source IP address of the initiate + request. + :type allowed_source_address_prefix: str + :param end_time_utc: Required. The time to close the request in UTC + :type end_time_utc: datetime + """ + + _validation = { + 'number': {'required': True}, + 'end_time_utc': {'required': True}, + } + + _attribute_map = { + 'number': {'key': 'number', 'type': 'int'}, + 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, + 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessPolicyInitiatePort, self).__init__(**kwargs) + self.number = kwargs.get('number', None) + self.allowed_source_address_prefix = kwargs.get('allowed_source_address_prefix', None) + self.end_time_utc = kwargs.get('end_time_utc', None) + + +class JitNetworkAccessPolicyInitiateRequest(Model): + """JitNetworkAccessPolicyInitiateRequest. + + All required parameters must be populated in order to send to Azure. + + :param virtual_machines: Required. A list of virtual machines & ports to + open access for + :type virtual_machines: + list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiateVirtualMachine] + :param justification: The justification for making the initiate request + :type justification: str + """ + + _validation = { + 'virtual_machines': {'required': True}, + } + + _attribute_map = { + 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessPolicyInitiateVirtualMachine]'}, + 'justification': {'key': 'justification', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessPolicyInitiateRequest, self).__init__(**kwargs) + self.virtual_machines = kwargs.get('virtual_machines', None) + self.justification = kwargs.get('justification', None) + + +class JitNetworkAccessPolicyInitiateVirtualMachine(Model): + """JitNetworkAccessPolicyInitiateVirtualMachine. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of the virtual machine that is linked to + this policy + :type id: str + :param ports: Required. The ports to open for the resource with the `id` + :type ports: + list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiatePort] + """ + + _validation = { + 'id': {'required': True}, + 'ports': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPolicyInitiatePort]'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessPolicyInitiateVirtualMachine, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.ports = kwargs.get('ports', None) + + +class JitNetworkAccessPolicyVirtualMachine(Model): + """JitNetworkAccessPolicyVirtualMachine. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of the virtual machine that is linked to + this policy + :type id: str + :param ports: Required. Port configurations for the virtual machine + :type ports: list[~azure.mgmt.security.models.JitNetworkAccessPortRule] + :param public_ip_address: Public IP address of the Azure Firewall that is + linked to this policy, if applicable + :type public_ip_address: str + """ + + _validation = { + 'id': {'required': True}, + 'ports': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPortRule]'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessPolicyVirtualMachine, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.ports = kwargs.get('ports', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + + +class JitNetworkAccessPortRule(Model): + """JitNetworkAccessPortRule. + + All required parameters must be populated in order to send to Azure. + + :param number: Required. + :type number: int + :param protocol: Required. Possible values include: 'TCP', 'UDP', 'All' + :type protocol: str or ~azure.mgmt.security.models.Protocol + :param allowed_source_address_prefix: Mutually exclusive with the + "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, + for example "192.168.0.3" or "192.168.0.0/16". + :type allowed_source_address_prefix: str + :param allowed_source_address_prefixes: Mutually exclusive with the + "allowedSourceAddressPrefix" parameter. + :type allowed_source_address_prefixes: list[str] + :param max_request_access_duration: Required. Maximum duration requests + can be made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 + day + :type max_request_access_duration: str + """ + + _validation = { + 'number': {'required': True}, + 'protocol': {'required': True}, + 'max_request_access_duration': {'required': True}, + } + + _attribute_map = { + 'number': {'key': 'number', 'type': 'int'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, + 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, + 'max_request_access_duration': {'key': 'maxRequestAccessDuration', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessPortRule, self).__init__(**kwargs) + self.number = kwargs.get('number', None) + self.protocol = kwargs.get('protocol', None) + self.allowed_source_address_prefix = kwargs.get('allowed_source_address_prefix', None) + self.allowed_source_address_prefixes = kwargs.get('allowed_source_address_prefixes', None) + self.max_request_access_duration = kwargs.get('max_request_access_duration', None) + + +class JitNetworkAccessRequest(Model): + """JitNetworkAccessRequest. + + All required parameters must be populated in order to send to Azure. + + :param virtual_machines: Required. + :type virtual_machines: + list[~azure.mgmt.security.models.JitNetworkAccessRequestVirtualMachine] + :param start_time_utc: Required. The start time of the request in UTC + :type start_time_utc: datetime + :param requestor: Required. The identity of the person who made the + request + :type requestor: str + :param justification: The justification for making the initiate request + :type justification: str + """ + + _validation = { + 'virtual_machines': {'required': True}, + 'start_time_utc': {'required': True}, + 'requestor': {'required': True}, + } + + _attribute_map = { + 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessRequestVirtualMachine]'}, + 'start_time_utc': {'key': 'startTimeUtc', 'type': 'iso-8601'}, + 'requestor': {'key': 'requestor', 'type': 'str'}, + 'justification': {'key': 'justification', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessRequest, self).__init__(**kwargs) + self.virtual_machines = kwargs.get('virtual_machines', None) + self.start_time_utc = kwargs.get('start_time_utc', None) + self.requestor = kwargs.get('requestor', None) + self.justification = kwargs.get('justification', None) + + +class JitNetworkAccessRequestPort(Model): + """JitNetworkAccessRequestPort. + + All required parameters must be populated in order to send to Azure. + + :param number: Required. + :type number: int + :param allowed_source_address_prefix: Mutually exclusive with the + "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, + for example "192.168.0.3" or "192.168.0.0/16". + :type allowed_source_address_prefix: str + :param allowed_source_address_prefixes: Mutually exclusive with the + "allowedSourceAddressPrefix" parameter. + :type allowed_source_address_prefixes: list[str] + :param end_time_utc: Required. The date & time at which the request ends + in UTC + :type end_time_utc: datetime + :param status: Required. The status of the port. Possible values include: + 'Revoked', 'Initiated' + :type status: str or ~azure.mgmt.security.models.Status + :param status_reason: Required. A description of why the `status` has its + value. Possible values include: 'Expired', 'UserRequested', + 'NewerRequestInitiated' + :type status_reason: str or ~azure.mgmt.security.models.StatusReason + :param mapped_port: The port which is mapped to this port's `number` in + the Azure Firewall, if applicable + :type mapped_port: int + """ + + _validation = { + 'number': {'required': True}, + 'end_time_utc': {'required': True}, + 'status': {'required': True}, + 'status_reason': {'required': True}, + } + + _attribute_map = { + 'number': {'key': 'number', 'type': 'int'}, + 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, + 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, + 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_reason': {'key': 'statusReason', 'type': 'str'}, + 'mapped_port': {'key': 'mappedPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessRequestPort, self).__init__(**kwargs) + self.number = kwargs.get('number', None) + self.allowed_source_address_prefix = kwargs.get('allowed_source_address_prefix', None) + self.allowed_source_address_prefixes = kwargs.get('allowed_source_address_prefixes', None) + self.end_time_utc = kwargs.get('end_time_utc', None) + self.status = kwargs.get('status', None) + self.status_reason = kwargs.get('status_reason', None) + self.mapped_port = kwargs.get('mapped_port', None) + + +class JitNetworkAccessRequestVirtualMachine(Model): + """JitNetworkAccessRequestVirtualMachine. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of the virtual machine that is linked to + this policy + :type id: str + :param ports: Required. The ports that were opened for the virtual machine + :type ports: list[~azure.mgmt.security.models.JitNetworkAccessRequestPort] + """ + + _validation = { + 'id': {'required': True}, + 'ports': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[JitNetworkAccessRequestPort]'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessRequestVirtualMachine, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.ports = kwargs.get('ports', None) + + +class Kind(Model): + """Describes an Azure resource with kind. + + :param kind: Kind of the resource + :type kind: str + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Kind, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + + +class Location(Model): + """Describes an Azure resource with location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: Location where the resource is stored + :vartype location: str + """ + + _validation = { + 'location': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Location, self).__init__(**kwargs) + self.location = None + + +class Operation(Model): + """Possible operation in the REST API of Microsoft.Security. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the operation + :vartype name: str + :ivar origin: Where the operation is originated + :vartype origin: str + :param display: + :type display: ~azure.mgmt.security.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.origin = None + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """Security operation display. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The resource provider for the operation. + :vartype provider: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar operation: The display name of the security operation. + :vartype operation: str + :ivar description: The description of the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class PathRecommendation(Model): + """Represents a path that is recommended to be allowed and its properties. + + :param path: The full path to whitelist + :type path: str + :param action: Possible values include: 'Recommended', 'Add', 'Remove' + :type action: str or ~azure.mgmt.security.models.enum + :param type: Possible values include: 'File', 'FileHash', + 'PublisherSignature', 'ProductSignature', 'BinarySignature', + 'VersionAndAboveSignature' + :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 + :type common: bool + :param user_sids: + :type user_sids: list[str] + :param usernames: + :type usernames: list[~azure.mgmt.security.models.UserRecommendation] + :param file_type: Possible values include: 'Exe', 'Dll', 'Msi', 'Script', + 'Executable', 'Unknown' + :type file_type: str or ~azure.mgmt.security.models.enum + :param configuration_status: Possible values include: 'Configured', + 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + :type configuration_status: str or ~azure.mgmt.security.models.enum + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'publisher_info': {'key': 'publisherInfo', 'type': 'PublisherInfo'}, + 'common': {'key': 'common', 'type': 'bool'}, + 'user_sids': {'key': 'userSids', 'type': '[str]'}, + 'usernames': {'key': 'usernames', 'type': '[UserRecommendation]'}, + 'file_type': {'key': 'fileType', 'type': 'str'}, + 'configuration_status': {'key': 'configurationStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PathRecommendation, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.action = kwargs.get('action', None) + self.type = kwargs.get('type', None) + self.publisher_info = kwargs.get('publisher_info', None) + self.common = kwargs.get('common', None) + self.user_sids = kwargs.get('user_sids', None) + self.usernames = kwargs.get('usernames', None) + self.file_type = kwargs.get('file_type', None) + self.configuration_status = kwargs.get('configuration_status', None) + + +class Pricing(Resource): + """Azure Security Center is provided in two pricing tiers: free and standard, + with the standard tier available with a trial period. The standard tier + offers advanced security capabilities, while the free tier offers basic + security features. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param pricing_tier: Required. The pricing tier value. Azure Security + Center is provided in two pricing tiers: free and standard, with the + standard tier available with a trial period. The standard tier offers + advanced security capabilities, while the free tier offers basic security + features. Possible values include: 'Free', 'Standard' + :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier + :ivar free_trial_remaining_time: The duration left for the subscriptions + free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). + :vartype free_trial_remaining_time: timedelta + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'pricing_tier': {'required': True}, + 'free_trial_remaining_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pricing_tier': {'key': 'properties.pricingTier', 'type': 'str'}, + 'free_trial_remaining_time': {'key': 'properties.freeTrialRemainingTime', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(Pricing, self).__init__(**kwargs) + self.pricing_tier = kwargs.get('pricing_tier', None) + self.free_trial_remaining_time = None + + +class PricingList(Model): + """List of pricing configurations response. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of pricing configurations + :type value: list[~azure.mgmt.security.models.Pricing] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Pricing]'}, + } + + def __init__(self, **kwargs): + super(PricingList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ProtectionMode(Model): + """The protection mode of the collection/file types. Exe/Msi/Script are used + for Windows, Executable is used for Linux. + + :param exe: Possible values include: 'Audit', 'Enforce', 'None' + :type exe: str or ~azure.mgmt.security.models.enum + :param msi: Possible values include: 'Audit', 'Enforce', 'None' + :type msi: str or ~azure.mgmt.security.models.enum + :param script: Possible values include: 'Audit', 'Enforce', 'None' + :type script: str or ~azure.mgmt.security.models.enum + :param executable: Possible values include: 'Audit', 'Enforce', 'None' + :type executable: str or ~azure.mgmt.security.models.enum + """ + + _attribute_map = { + 'exe': {'key': 'exe', 'type': 'str'}, + 'msi': {'key': 'msi', 'type': 'str'}, + 'script': {'key': 'script', 'type': 'str'}, + 'executable': {'key': 'executable', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProtectionMode, self).__init__(**kwargs) + self.exe = kwargs.get('exe', None) + self.msi = kwargs.get('msi', None) + self.script = kwargs.get('script', None) + self.executable = kwargs.get('executable', None) + + +class PublisherInfo(Model): + """Represents the publisher information of a process/rule. + + :param publisher_name: The Subject field of the x.509 certificate used to + sign the code, using the following fields - O = Organization, L = + Locality, S = State or Province, and C = Country + :type publisher_name: str + :param product_name: The product name taken from the file's version + resource + :type product_name: str + :param binary_name: The "OriginalName" field taken from the file's version + resource + :type binary_name: str + :param version: The binary file version taken from the file's version + resource + :type version: str + """ + + _attribute_map = { + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'product_name': {'key': 'productName', 'type': 'str'}, + 'binary_name': {'key': 'binaryName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PublisherInfo, self).__init__(**kwargs) + self.publisher_name = kwargs.get('publisher_name', None) + self.product_name = kwargs.get('product_name', None) + self.binary_name = kwargs.get('binary_name', None) + self.version = kwargs.get('version', None) + + +class RecommendationConfigurationProperties(Model): + """The type of IoT Security recommendation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param recommendation_type: Required. The type of IoT Security + recommendation. Possible values include: 'IoT_ACRAuthentication', + 'IoT_AgentSendsUnutilizedMessages', 'IoT_Baseline', + 'IoT_EdgeHubMemOptimize', 'IoT_EdgeLoggingOptions', + 'IoT_InconsistentModuleSettings', 'IoT_InstallAgent', + 'IoT_IPFilter_DenyAll', 'IoT_IPFilter_PermissiveRule', 'IoT_OpenPorts', + 'IoT_PermissiveFirewallPolicy', 'IoT_PermissiveInputFirewallRules', + 'IoT_PermissiveOutputFirewallRules', 'IoT_PrivilegedDockerOptions', + 'IoT_SharedCredentials', 'IoT_VulnerableTLSCipherSuite' + :type recommendation_type: str or + ~azure.mgmt.security.models.RecommendationType + :ivar name: + :vartype name: str + :param status: Required. Recommendation status. When the recommendation + status is disabled recommendations are not generated. Possible values + include: 'Disabled', 'Enabled'. Default value: "Enabled" . + :type status: str or + ~azure.mgmt.security.models.RecommendationConfigStatus + """ + + _validation = { + 'recommendation_type': {'required': True}, + 'name': {'readonly': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'recommendation_type': {'key': 'recommendationType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecommendationConfigurationProperties, self).__init__(**kwargs) + self.recommendation_type = kwargs.get('recommendation_type', None) + self.name = None + self.status = kwargs.get('status', "Enabled") + + +class RegulatoryComplianceAssessment(Resource): + """Regulatory compliance assessment details and state. + + 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 description: The description of the regulatory compliance assessment + :vartype description: str + :ivar assessment_type: The expected type of assessment contained in the + AssessmentDetailsLink + :vartype assessment_type: str + :ivar assessment_details_link: Link to more detailed assessment results + data. The response type will be according to the assessmentType field + :vartype assessment_details_link: str + :param state: Aggregative state based on the assessment's scanned + resources states. Possible values include: 'Passed', 'Failed', 'Skipped', + 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_resources: The given assessment's related resources count + with passed state. + :vartype passed_resources: int + :ivar failed_resources: The given assessment's related resources count + with failed state. + :vartype failed_resources: int + :ivar skipped_resources: The given assessment's related resources count + with skipped state. + :vartype skipped_resources: int + :ivar unsupported_resources: The given assessment's related resources + count with unsupported state. + :vartype unsupported_resources: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'assessment_type': {'readonly': True}, + 'assessment_details_link': {'readonly': True}, + 'passed_resources': {'readonly': True}, + 'failed_resources': {'readonly': True}, + 'skipped_resources': {'readonly': True}, + 'unsupported_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'assessment_type': {'key': 'properties.assessmentType', 'type': 'str'}, + 'assessment_details_link': {'key': 'properties.assessmentDetailsLink', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_resources': {'key': 'properties.passedResources', 'type': 'int'}, + 'failed_resources': {'key': 'properties.failedResources', 'type': 'int'}, + 'skipped_resources': {'key': 'properties.skippedResources', 'type': 'int'}, + 'unsupported_resources': {'key': 'properties.unsupportedResources', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RegulatoryComplianceAssessment, self).__init__(**kwargs) + self.description = None + self.assessment_type = None + self.assessment_details_link = None + self.state = kwargs.get('state', None) + self.passed_resources = None + self.failed_resources = None + self.skipped_resources = None + self.unsupported_resources = None + + +class RegulatoryComplianceControl(Resource): + """Regulatory compliance control details and state. + + 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 description: The description of the regulatory compliance control + :vartype description: str + :param state: Aggregative state based on the control's supported + assessments states. Possible values include: 'Passed', 'Failed', + 'Skipped', 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_assessments: The number of supported regulatory compliance + assessments of the given control with a passed state + :vartype passed_assessments: int + :ivar failed_assessments: The number of supported regulatory compliance + assessments of the given control with a failed state + :vartype failed_assessments: int + :ivar skipped_assessments: The number of supported regulatory compliance + assessments of the given control with a skipped state + :vartype skipped_assessments: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'passed_assessments': {'readonly': True}, + 'failed_assessments': {'readonly': True}, + 'skipped_assessments': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_assessments': {'key': 'properties.passedAssessments', 'type': 'int'}, + 'failed_assessments': {'key': 'properties.failedAssessments', 'type': 'int'}, + 'skipped_assessments': {'key': 'properties.skippedAssessments', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RegulatoryComplianceControl, self).__init__(**kwargs) + self.description = None + self.state = kwargs.get('state', None) + self.passed_assessments = None + self.failed_assessments = None + self.skipped_assessments = None + + +class RegulatoryComplianceStandard(Resource): + """Regulatory compliance standard details and state. + + 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 state: Aggregative state based on the standard's supported controls + states. Possible values include: 'Passed', 'Failed', 'Skipped', + 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_controls: The number of supported regulatory compliance + controls of the given standard with a passed state + :vartype passed_controls: int + :ivar failed_controls: The number of supported regulatory compliance + controls of the given standard with a failed state + :vartype failed_controls: int + :ivar skipped_controls: The number of supported regulatory compliance + controls of the given standard with a skipped state + :vartype skipped_controls: int + :ivar unsupported_controls: The number of regulatory compliance controls + of the given standard which are unsupported by automated assessments + :vartype unsupported_controls: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'passed_controls': {'readonly': True}, + 'failed_controls': {'readonly': True}, + 'skipped_controls': {'readonly': True}, + 'unsupported_controls': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_controls': {'key': 'properties.passedControls', 'type': 'int'}, + 'failed_controls': {'key': 'properties.failedControls', 'type': 'int'}, + 'skipped_controls': {'key': 'properties.skippedControls', 'type': 'int'}, + 'unsupported_controls': {'key': 'properties.unsupportedControls', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RegulatoryComplianceStandard, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.passed_controls = None + self.failed_controls = None + self.skipped_controls = None + self.unsupported_controls = None + + +class SecurityContact(Resource): + """Contact details for security issues. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param email: Required. The email of this security contact + :type email: str + :param phone: The phone number of this security contact + :type phone: str + :param alert_notifications: Required. Whether to send security alerts + notifications to the security contact. Possible values include: 'On', + 'Off' + :type alert_notifications: str or + ~azure.mgmt.security.models.AlertNotifications + :param alerts_to_admins: Required. Whether to send security alerts + notifications to subscription admins. Possible values include: 'On', 'Off' + :type alerts_to_admins: str or ~azure.mgmt.security.models.AlertsToAdmins + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'email': {'required': True}, + 'alert_notifications': {'required': True}, + 'alerts_to_admins': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'email': {'key': 'properties.email', 'type': 'str'}, + 'phone': {'key': 'properties.phone', 'type': 'str'}, + 'alert_notifications': {'key': 'properties.alertNotifications', 'type': 'str'}, + 'alerts_to_admins': {'key': 'properties.alertsToAdmins', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecurityContact, self).__init__(**kwargs) + self.email = kwargs.get('email', None) + self.phone = kwargs.get('phone', None) + self.alert_notifications = kwargs.get('alert_notifications', None) + self.alerts_to_admins = kwargs.get('alerts_to_admins', None) + + +class SecuritySubAssessment(Resource): + """Security sub-assessment on a resource. + + 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 security_sub_assessment_id: Vulnerability ID + :vartype security_sub_assessment_id: str + :ivar display_name: User friendly display name of the sub-assessment + :vartype display_name: str + :param status: + :type status: ~azure.mgmt.security.models.SubAssessmentStatus + :ivar remediation: Information on how to remediate this sub-assessment + :vartype remediation: str + :ivar impact: Description of the impact of this sub-assessment + :vartype impact: str + :ivar category: Category of the sub-assessment + :vartype category: str + :ivar description: Human readable description of the assessment status + :vartype description: str + :ivar time_generated: The date and time the sub-assessment was generated + :vartype time_generated: datetime + :param resource_details: + :type resource_details: ~azure.mgmt.security.models.ResourceDetails + :param additional_data: + :type additional_data: ~azure.mgmt.security.models.AdditionalData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'security_sub_assessment_id': {'readonly': True}, + 'display_name': {'readonly': True}, + 'remediation': {'readonly': True}, + 'impact': {'readonly': True}, + 'category': {'readonly': True}, + 'description': {'readonly': True}, + 'time_generated': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'security_sub_assessment_id': {'key': 'properties.id', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'SubAssessmentStatus'}, + 'remediation': {'key': 'properties.remediation', 'type': 'str'}, + 'impact': {'key': 'properties.impact', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'time_generated': {'key': 'properties.timeGenerated', 'type': 'iso-8601'}, + 'resource_details': {'key': 'properties.resourceDetails', 'type': 'ResourceDetails'}, + 'additional_data': {'key': 'properties.additionalData', 'type': 'AdditionalData'}, + } + + def __init__(self, **kwargs): + super(SecuritySubAssessment, self).__init__(**kwargs) + self.security_sub_assessment_id = None + self.display_name = None + self.status = kwargs.get('status', None) + self.remediation = None + self.impact = None + self.category = None + self.description = None + self.time_generated = None + self.resource_details = kwargs.get('resource_details', None) + self.additional_data = kwargs.get('additional_data', None) + + +class SecurityTask(Resource): + """Security task that we recommend to do in order to strengthen security. + + 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 state: State of the task (Active, Resolved etc.) + :vartype state: str + :ivar creation_time_utc: The time this task was discovered in UTC + :vartype creation_time_utc: datetime + :param security_task_parameters: + :type security_task_parameters: + ~azure.mgmt.security.models.SecurityTaskParameters + :ivar last_state_change_time_utc: The time this task's details were last + changed in UTC + :vartype last_state_change_time_utc: datetime + :ivar sub_state: Additional data on the state of the task + :vartype sub_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_time_utc': {'readonly': True}, + 'last_state_change_time_utc': {'readonly': True}, + 'sub_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'creation_time_utc': {'key': 'properties.creationTimeUtc', 'type': 'iso-8601'}, + 'security_task_parameters': {'key': 'properties.securityTaskParameters', 'type': 'SecurityTaskParameters'}, + 'last_state_change_time_utc': {'key': 'properties.lastStateChangeTimeUtc', 'type': 'iso-8601'}, + 'sub_state': {'key': 'properties.subState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecurityTask, self).__init__(**kwargs) + self.state = None + self.creation_time_utc = None + self.security_task_parameters = kwargs.get('security_task_parameters', None) + self.last_state_change_time_utc = None + self.sub_state = None + + +class SecurityTaskParameters(Model): + """Changing set of properties, depending on the task type that is derived from + the name field. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar name: Name of the task type + :vartype name: str + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecurityTaskParameters, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.name = None + + +class SensitivityLabel(Model): + """The sensitivity label. + + :param display_name: The name of the sensitivity label. + :type display_name: str + :param order: The order of the sensitivity label. + :type order: float + :param enabled: Indicates whether the label is enabled or not. + :type enabled: bool + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'float'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SensitivityLabel, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.order = kwargs.get('order', None) + self.enabled = kwargs.get('enabled', None) + + +class ServerVulnerabilityAssessment(Resource): + """Describes the server vulnerability assessment details on a resource. + + 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 provisioning_state: The provisioningState of the vulnerability + assessment capability on the VM. Possible values include: 'Succeeded', + 'Failed', 'Canceled', 'Provisioning', 'Deprovisioning' + :vartype provisioning_state: str or ~azure.mgmt.security.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerVulnerabilityAssessment, self).__init__(**kwargs) + self.provisioning_state = None + + +class ServerVulnerabilityAssessmentsList(Model): + """List of server vulnerability assessments. + + :param value: + :type value: + list[~azure.mgmt.security.models.ServerVulnerabilityAssessment] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServerVulnerabilityAssessment]'}, + } + + def __init__(self, **kwargs): + super(ServerVulnerabilityAssessmentsList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ServerVulnerabilityProperties(AdditionalData): + """Additional context fields for server vulnerability assessment. + + 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 assessed_resource_type: Required. Constant filled by server. + :type assessed_resource_type: str + :ivar type: Vulnerability Type. e.g: Vulnerability, Potential + Vulnerability, Information Gathered + :vartype type: str + :ivar cvss: Dictionary from cvss version to cvss details object + :vartype cvss: dict[str, ~azure.mgmt.security.models.CVSS] + :ivar patchable: Indicates whether a patch is available or not + :vartype patchable: bool + :ivar cve: List of CVEs + :vartype cve: list[~azure.mgmt.security.models.CVE] + :ivar threat: Threat name + :vartype threat: str + :ivar published_time: Published time + :vartype published_time: datetime + :ivar vendor_references: + :vartype vendor_references: + list[~azure.mgmt.security.models.VendorReference] + """ + + _validation = { + 'assessed_resource_type': {'required': True}, + 'type': {'readonly': True}, + 'cvss': {'readonly': True}, + 'patchable': {'readonly': True}, + 'cve': {'readonly': True}, + 'threat': {'readonly': True}, + 'published_time': {'readonly': True}, + 'vendor_references': {'readonly': True}, + } + + _attribute_map = { + 'assessed_resource_type': {'key': 'assessedResourceType', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'cvss': {'key': 'cvss', 'type': '{CVSS}'}, + 'patchable': {'key': 'patchable', 'type': 'bool'}, + 'cve': {'key': 'cve', 'type': '[CVE]'}, + 'threat': {'key': 'threat', 'type': 'str'}, + 'published_time': {'key': 'publishedTime', 'type': 'iso-8601'}, + 'vendor_references': {'key': 'vendorReferences', 'type': '[VendorReference]'}, + } + + def __init__(self, **kwargs): + super(ServerVulnerabilityProperties, self).__init__(**kwargs) + self.type = None + self.cvss = None + self.patchable = None + self.cve = None + self.threat = None + self.published_time = None + self.vendor_references = None + self.assessed_resource_type = 'ServerVulnerabilityAssessment' + + +class SqlServerVulnerabilityProperties(AdditionalData): + """Details of the 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 assessed_resource_type: Required. Constant filled by server. + :type assessed_resource_type: str + :ivar type: The resource type the sub assessment refers to in its resource + details + :vartype type: str + :ivar query: The T-SQL query that runs on your SQL database to perform the + particular check + :vartype query: str + """ + + _validation = { + 'assessed_resource_type': {'required': True}, + 'type': {'readonly': True}, + 'query': {'readonly': True}, + } + + _attribute_map = { + 'assessed_resource_type': {'key': 'assessedResourceType', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SqlServerVulnerabilityProperties, self).__init__(**kwargs) + self.type = None + self.query = None + self.assessed_resource_type = 'SqlServerVulnerability' + + +class SubAssessmentStatus(Model): + """Status of the sub-assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Programmatic code for the status of the assessment. Possible + values include: 'Healthy', 'Unhealthy', 'NotApplicable' + :vartype code: str or ~azure.mgmt.security.models.SubAssessmentStatusCode + :ivar cause: Programmatic code for the cause of the assessment status + :vartype cause: str + :ivar description: Human readable description of the assessment status + :vartype description: str + :ivar severity: The sub-assessment severity level. Possible values + include: 'Low', 'Medium', 'High' + :vartype severity: str or ~azure.mgmt.security.models.Severity + """ + + _validation = { + 'code': {'readonly': True}, + 'cause': {'readonly': True}, + 'description': {'readonly': True}, + 'severity': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'cause': {'key': 'cause', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubAssessmentStatus, self).__init__(**kwargs) + self.code = None + self.cause = None + self.description = None + self.severity = None + + +class Tags(Model): + """A list of key value pairs that describe the resource. + + :param tags: A list of key value pairs that describe the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Tags, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class TagsResource(Model): + """A container holding only the Tags for a resource, allowing the user to + update the tags. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TagsResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class ThresholdCustomAlertRule(CustomAlertRule): + """A custom alert rule that checks if a value (depends on the custom alert + type) is within the given range. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Status of the custom alert. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + :param min_threshold: Required. The minimum threshold. + :type min_threshold: int + :param max_threshold: Required. The maximum threshold. + :type max_threshold: int + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'min_threshold': {'required': True}, + 'max_threshold': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'min_threshold': {'key': 'minThreshold', 'type': 'int'}, + 'max_threshold': {'key': 'maxThreshold', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ThresholdCustomAlertRule, self).__init__(**kwargs) + self.min_threshold = kwargs.get('min_threshold', None) + self.max_threshold = kwargs.get('max_threshold', None) + + +class TimeWindowCustomAlertRule(ThresholdCustomAlertRule): + """A custom alert rule that checks if the number of activities (depends on the + custom alert type) in a time window is within the given range. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Status of the custom alert. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + :param min_threshold: Required. The minimum threshold. + :type min_threshold: int + :param max_threshold: Required. The maximum threshold. + :type max_threshold: int + :param time_window_size: Required. The time window size in iso8601 format. + :type time_window_size: timedelta + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'min_threshold': {'required': True}, + 'max_threshold': {'required': True}, + 'time_window_size': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'min_threshold': {'key': 'minThreshold', 'type': 'int'}, + 'max_threshold': {'key': 'maxThreshold', 'type': 'int'}, + 'time_window_size': {'key': 'timeWindowSize', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(TimeWindowCustomAlertRule, self).__init__(**kwargs) + self.time_window_size = kwargs.get('time_window_size', None) + + +class TopologyResource(Model): + """TopologyResource. + + 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 + :ivar calculated_date_time: The UTC time on which the topology was + calculated + :vartype calculated_date_time: datetime + :ivar topology_resources: Azure resources which are part of this topology + resource + :vartype topology_resources: + list[~azure.mgmt.security.models.TopologySingleResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'calculated_date_time': {'readonly': True}, + 'topology_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, + 'topology_resources': {'key': 'properties.topologyResources', 'type': '[TopologySingleResource]'}, + } + + def __init__(self, **kwargs): + super(TopologyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.calculated_date_time = None + self.topology_resources = None + + +class TopologySingleResource(Model): + """TopologySingleResource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_id: Azure resource id + :vartype resource_id: str + :ivar severity: The security severity of the resource + :vartype severity: str + :ivar recommendations_exist: Indicates if the resource has security + recommendations + :vartype recommendations_exist: bool + :ivar network_zones: Indicates the resource connectivity level to the + Internet (InternetFacing, Internal ,etc.) + :vartype network_zones: str + :ivar topology_score: Score of the resource based on its security severity + :vartype topology_score: int + :ivar location: The location of this resource + :vartype location: str + :ivar parents: Azure resources connected to this resource which are in + higher level in the topology view + :vartype parents: + list[~azure.mgmt.security.models.TopologySingleResourceParent] + :ivar children: Azure resources connected to this resource which are in + lower level in the topology view + :vartype children: + list[~azure.mgmt.security.models.TopologySingleResourceChild] + """ + + _validation = { + 'resource_id': {'readonly': True}, + 'severity': {'readonly': True}, + 'recommendations_exist': {'readonly': True}, + 'network_zones': {'readonly': True}, + 'topology_score': {'readonly': True}, + 'location': {'readonly': True}, + 'parents': {'readonly': True}, + 'children': {'readonly': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + 'recommendations_exist': {'key': 'recommendationsExist', 'type': 'bool'}, + 'network_zones': {'key': 'networkZones', 'type': 'str'}, + 'topology_score': {'key': 'topologyScore', 'type': 'int'}, + 'location': {'key': 'location', 'type': 'str'}, + 'parents': {'key': 'parents', 'type': '[TopologySingleResourceParent]'}, + 'children': {'key': 'children', 'type': '[TopologySingleResourceChild]'}, + } + + def __init__(self, **kwargs): + super(TopologySingleResource, self).__init__(**kwargs) + self.resource_id = None + self.severity = None + self.recommendations_exist = None + self.network_zones = None + self.topology_score = None + self.location = None + self.parents = None + self.children = None + + +class TopologySingleResourceChild(Model): + """TopologySingleResourceChild. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_id: Azure resource id which serves as child resource in + topology view + :vartype resource_id: str + """ + + _validation = { + 'resource_id': {'readonly': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TopologySingleResourceChild, self).__init__(**kwargs) + self.resource_id = None + + +class TopologySingleResourceParent(Model): + """TopologySingleResourceParent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_id: Azure resource id which serves as parent resource in + topology view + :vartype resource_id: str + """ + + _validation = { + 'resource_id': {'readonly': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TopologySingleResourceParent, self).__init__(**kwargs) + self.resource_id = None + + +class UpdateIotSecuritySolutionData(TagsResource): + """UpdateIotSecuritySolutionData. + + :param tags: Resource tags + :type tags: dict[str, str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'user_defined_resources': {'key': 'properties.userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'recommendations_configuration': {'key': 'properties.recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, **kwargs): + super(UpdateIotSecuritySolutionData, self).__init__(**kwargs) + self.user_defined_resources = kwargs.get('user_defined_resources', None) + self.recommendations_configuration = kwargs.get('recommendations_configuration', None) + + +class UserDefinedResourcesProperties(Model): + """Properties of the IoT Security solution's user defined resources. + + All required parameters must be populated in order to send to Azure. + + :param query: Required. Azure Resource Graph query which represents the + security solution's user defined resources. Required to start with "where + type != "Microsoft.Devices/IotHubs"" + :type query: str + :param query_subscriptions: Required. List of Azure subscription ids on + which the user defined resources query should be executed. + :type query_subscriptions: list[str] + """ + + _validation = { + 'query': {'required': True}, + 'query_subscriptions': {'required': True}, + } + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'}, + 'query_subscriptions': {'key': 'querySubscriptions', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(UserDefinedResourcesProperties, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.query_subscriptions = kwargs.get('query_subscriptions', None) + + +class UserRecommendation(Model): + """Represents a user that is recommended to be allowed for a certain rule. + + :param username: Represents a user that is recommended to be allowed for a + certain rule + :type username: str + :param recommendation_action: Possible values include: 'Recommended', + 'Add', 'Remove' + :type recommendation_action: str or ~azure.mgmt.security.models.enum + """ + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'recommendation_action': {'key': 'recommendationAction', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserRecommendation, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.recommendation_action = kwargs.get('recommendation_action', None) + + +class VendorReference(Model): + """Vendor reference. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar title: Link title + :vartype title: str + :ivar link: Link url + :vartype link: str + """ + + _validation = { + 'title': {'readonly': True}, + 'link': {'readonly': True}, + } + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'link': {'key': 'link', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VendorReference, self).__init__(**kwargs) + self.title = None + self.link = None + + +class VmRecommendation(Model): + """Represents a machine that is part of a VM/server group. + + :param configuration_status: Possible values include: 'Configured', + 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + :type configuration_status: str or ~azure.mgmt.security.models.enum + :param recommendation_action: Possible values include: 'Recommended', + 'Add', 'Remove' + :type recommendation_action: str or ~azure.mgmt.security.models.enum + :param resource_id: + :type resource_id: str + """ + + _attribute_map = { + 'configuration_status': {'key': 'configurationStatus', 'type': 'str'}, + 'recommendation_action': {'key': 'recommendationAction', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VmRecommendation, self).__init__(**kwargs) + self.configuration_status = kwargs.get('configuration_status', None) + self.recommendation_action = kwargs.get('recommendation_action', None) + self.resource_id = kwargs.get('resource_id', None) + + +class WorkspaceSetting(Resource): + """Configures where to store the OMS agent data for workspaces under a scope. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param workspace_id: Required. The full Azure ID of the workspace to save + the data in + :type workspace_id: str + :param scope: Required. All the VMs in this scope will send their security + data to the mentioned workspace unless overridden by a setting with more + specific scope + :type scope: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'workspace_id': {'required': True}, + 'scope': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkspaceSetting, self).__init__(**kwargs) + self.workspace_id = kwargs.get('workspace_id', None) + self.scope = kwargs.get('scope', None) 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 new file mode 100644 index 000000000000..4de16c26c6f1 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py @@ -0,0 +1,4847 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AadConnectivityState1(Model): + """Describes an Azure resource with kind. + + :param connectivity_state: The connectivity state of the external AAD + solution . Possible values include: 'Discovered', 'NotLicensed', + 'Connected' + :type connectivity_state: str or + ~azure.mgmt.security.models.AadConnectivityState + """ + + _attribute_map = { + 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, + } + + def __init__(self, *, connectivity_state=None, **kwargs) -> None: + super(AadConnectivityState1, self).__init__(**kwargs) + self.connectivity_state = connectivity_state + + +class ExternalSecuritySolution(Model): + """Represents a security solution external to Azure Security Center which + sends information to an OMS workspace and whose data is displayed by Azure + Security Center. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CefExternalSecuritySolution, AtaExternalSecuritySolution, + AadExternalSecuritySolution + + 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 kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'CEF': 'CefExternalSecuritySolution', 'ATA': 'AtaExternalSecuritySolution', 'AAD': 'AadExternalSecuritySolution'} + } + + def __init__(self, **kwargs) -> None: + super(ExternalSecuritySolution, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.kind = None + + +class AadExternalSecuritySolution(ExternalSecuritySolution): + """Represents an AAD identity protection solution which sends logs to an OMS + workspace. + + 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 kind: Required. Constant filled by server. + :type kind: str + :param properties: + :type properties: ~azure.mgmt.security.models.AadSolutionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AadSolutionProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AadExternalSecuritySolution, self).__init__(**kwargs) + self.properties = properties + self.kind = 'AAD' + + +class AadSolutionProperties(Model): + """The external security solution properties for AAD solutions. + + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + :param connectivity_state: The connectivity state of the external AAD + solution . Possible values include: 'Discovered', 'NotLicensed', + 'Connected' + :type connectivity_state: str or + ~azure.mgmt.security.models.AadConnectivityState + """ + + _attribute_map = { + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, + } + + def __init__(self, *, device_vendor: str=None, device_type: str=None, workspace=None, connectivity_state=None, **kwargs) -> None: + super(AadSolutionProperties, self).__init__(**kwargs) + self.device_vendor = device_vendor + self.device_type = device_type + self.workspace = workspace + self.connectivity_state = connectivity_state + + +class AdditionalData(Model): + """Details of the sub-assessment. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SqlServerVulnerabilityProperties, + ContainerRegistryVulnerabilityProperties, ServerVulnerabilityProperties + + All required parameters must be populated in order to send to Azure. + + :param assessed_resource_type: Required. Constant filled by server. + :type assessed_resource_type: str + """ + + _validation = { + 'assessed_resource_type': {'required': True}, + } + + _attribute_map = { + 'assessed_resource_type': {'key': 'assessedResourceType', 'type': 'str'}, + } + + _subtype_map = { + 'assessed_resource_type': {'SqlServerVulnerability': 'SqlServerVulnerabilityProperties', 'ContainerRegistryVulnerability': 'ContainerRegistryVulnerabilityProperties', 'ServerVulnerabilityAssessment': 'ServerVulnerabilityProperties'} + } + + def __init__(self, **kwargs) -> None: + super(AdditionalData, self).__init__(**kwargs) + self.assessed_resource_type = None + + +class Resource(Model): + """Describes an Azure resource. + + 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 + """ + + _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'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AdvancedThreatProtectionSetting(Resource): + """The Advanced Threat Protection resource. + + 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 is_enabled: Indicates whether Advanced Threat Protection is + enabled. + :type is_enabled: bool + """ + + _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'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + } + + def __init__(self, *, is_enabled: bool=None, **kwargs) -> None: + super(AdvancedThreatProtectionSetting, self).__init__(**kwargs) + self.is_enabled = is_enabled + + +class Alert(Resource): + """Security alert. + + 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 state: State of the alert (Active, Dismissed etc.) + :vartype state: str + :ivar reported_time_utc: The time the incident was reported to + Microsoft.Security in UTC + :vartype reported_time_utc: datetime + :ivar vendor_name: Name of the vendor that discovered the incident + :vartype vendor_name: str + :ivar alert_name: Name of the alert type + :vartype alert_name: str + :ivar alert_display_name: Display name of the alert type + :vartype alert_display_name: str + :ivar detected_time_utc: The time the incident was detected by the vendor + :vartype detected_time_utc: datetime + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar remediation_steps: Recommended steps to reradiate the incident + :vartype remediation_steps: str + :ivar action_taken: The action that was taken as a response to the alert + (Active, Blocked etc.) + :vartype action_taken: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar compromised_entity: The entity that the incident happened on + :vartype compromised_entity: str + :ivar associated_resource: Azure resource ID of the associated resource + :vartype associated_resource: str + :param extended_properties: + :type extended_properties: dict[str, object] + :ivar system_source: The type of the alerted resource (Azure, Non-Azure) + :vartype system_source: str + :ivar can_be_investigated: Whether this alert can be investigated with + Azure Security Center + :vartype can_be_investigated: bool + :ivar is_incident: Whether this alert is for incident type or not + (otherwise - single alert) + :vartype is_incident: bool + :param entities: objects that are related to this alerts + :type entities: list[~azure.mgmt.security.models.AlertEntity] + :ivar confidence_score: level of confidence we have on the alert + :vartype confidence_score: float + :param confidence_reasons: reasons the alert got the confidenceScore value + :type confidence_reasons: + list[~azure.mgmt.security.models.AlertConfidenceReason] + :ivar subscription_id: Azure subscription ID of the resource that had the + security alert or the subscription ID of the workspace that this resource + reports to + :vartype subscription_id: str + :ivar instance_id: Instance ID of the alert. + :vartype instance_id: str + :ivar workspace_arm_id: Azure resource ID of the workspace that the alert + was reported to. + :vartype workspace_arm_id: str + :ivar correlation_key: Alerts with the same CorrelationKey will be grouped + together in Ibiza. + :vartype correlation_key: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'reported_time_utc': {'readonly': True}, + 'vendor_name': {'readonly': True}, + 'alert_name': {'readonly': True}, + 'alert_display_name': {'readonly': True}, + 'detected_time_utc': {'readonly': True}, + 'description': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'action_taken': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'compromised_entity': {'readonly': True}, + 'associated_resource': {'readonly': True}, + 'system_source': {'readonly': True}, + 'can_be_investigated': {'readonly': True}, + 'is_incident': {'readonly': True}, + 'confidence_score': {'readonly': True, 'maximum': 1, 'minimum': 0}, + 'subscription_id': {'readonly': True}, + 'instance_id': {'readonly': True}, + 'workspace_arm_id': {'readonly': True}, + 'correlation_key': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'reported_time_utc': {'key': 'properties.reportedTimeUtc', 'type': 'iso-8601'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'alert_name': {'key': 'properties.alertName', 'type': 'str'}, + 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, + 'detected_time_utc': {'key': 'properties.detectedTimeUtc', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'compromised_entity': {'key': 'properties.compromisedEntity', 'type': 'str'}, + 'associated_resource': {'key': 'properties.associatedResource', 'type': 'str'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{object}'}, + 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, + 'can_be_investigated': {'key': 'properties.canBeInvestigated', 'type': 'bool'}, + 'is_incident': {'key': 'properties.isIncident', 'type': 'bool'}, + 'entities': {'key': 'properties.entities', 'type': '[AlertEntity]'}, + 'confidence_score': {'key': 'properties.confidenceScore', 'type': 'float'}, + 'confidence_reasons': {'key': 'properties.confidenceReasons', 'type': '[AlertConfidenceReason]'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, + 'workspace_arm_id': {'key': 'properties.workspaceArmId', 'type': 'str'}, + 'correlation_key': {'key': 'properties.correlationKey', 'type': 'str'}, + } + + def __init__(self, *, extended_properties=None, entities=None, confidence_reasons=None, **kwargs) -> None: + super(Alert, self).__init__(**kwargs) + self.state = None + self.reported_time_utc = None + self.vendor_name = None + self.alert_name = None + self.alert_display_name = None + self.detected_time_utc = None + self.description = None + self.remediation_steps = None + self.action_taken = None + self.reported_severity = None + self.compromised_entity = None + self.associated_resource = None + self.extended_properties = extended_properties + self.system_source = None + self.can_be_investigated = None + self.is_incident = None + self.entities = entities + self.confidence_score = None + self.confidence_reasons = confidence_reasons + self.subscription_id = None + self.instance_id = None + self.workspace_arm_id = None + self.correlation_key = None + + +class AlertConfidenceReason(Model): + """Factors that increase our confidence that the alert is a true positive. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Type of confidence factor + :vartype type: str + :ivar reason: description of the confidence reason + :vartype reason: str + """ + + _validation = { + 'type': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AlertConfidenceReason, self).__init__(**kwargs) + self.type = None + self.reason = None + + +class AlertEntity(Model): + """Changing set of properties depending on the entity type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar type: Type of entity + :vartype type: str + """ + + _validation = { + 'type': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(AlertEntity, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.type = None + + +class AllowedConnectionsResource(Model): + """The resource whose properties describes the allowed traffic between Azure + resources. + + 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 + :ivar calculated_date_time: The UTC time on which the allowed connections + resource was calculated + :vartype calculated_date_time: datetime + :ivar connectable_resources: List of connectable resources + :vartype connectable_resources: + list[~azure.mgmt.security.models.ConnectableResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'calculated_date_time': {'readonly': True}, + 'connectable_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, + 'connectable_resources': {'key': 'properties.connectableResources', 'type': '[ConnectableResource]'}, + } + + def __init__(self, **kwargs) -> None: + super(AllowedConnectionsResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.calculated_date_time = None + self.connectable_resources = None + + +class CustomAlertRule(Model): + """A custom alert rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Status of the custom alert. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + } + + def __init__(self, *, is_enabled: bool, rule_type: str, **kwargs) -> None: + super(CustomAlertRule, self).__init__(**kwargs) + self.display_name = None + self.description = None + self.is_enabled = is_enabled + self.rule_type = rule_type + + +class ListCustomAlertRule(CustomAlertRule): + """A List custom alert rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Status of the custom alert. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + :ivar value_type: The value type of the items in the list. Possible values + include: 'IpCidr', 'String' + :vartype value_type: str or ~azure.mgmt.security.models.ValueType + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'value_type': {'readonly': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'value_type': {'key': 'valueType', 'type': 'str'}, + } + + def __init__(self, *, is_enabled: bool, rule_type: str, **kwargs) -> None: + super(ListCustomAlertRule, self).__init__(is_enabled=is_enabled, rule_type=rule_type, **kwargs) + self.value_type = None + + +class AllowlistCustomAlertRule(ListCustomAlertRule): + """A custom alert rule that checks if a value (depends on the custom alert + type) is allowed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Status of the custom alert. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + :ivar value_type: The value type of the items in the list. Possible values + include: 'IpCidr', 'String' + :vartype value_type: str or ~azure.mgmt.security.models.ValueType + :param allowlist_values: Required. The values to allow. The format of the + values depends on the rule type. + :type allowlist_values: list[str] + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'value_type': {'readonly': True}, + 'allowlist_values': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'value_type': {'key': 'valueType', 'type': 'str'}, + 'allowlist_values': {'key': 'allowlistValues', 'type': '[str]'}, + } + + def __init__(self, *, is_enabled: bool, rule_type: str, allowlist_values, **kwargs) -> None: + super(AllowlistCustomAlertRule, self).__init__(is_enabled=is_enabled, rule_type=rule_type, **kwargs) + self.allowlist_values = allowlist_values + + +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 + :param configuration_status: Possible values include: 'Configured', + 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + :type configuration_status: str or ~azure.mgmt.security.models.enum + :param recommendation_status: Possible values include: 'Recommended', + 'NotRecommended', 'NotAvailable', 'NoStatus' + :type recommendation_status: str or ~azure.mgmt.security.models.enum + :param issues: + :type issues: + list[~azure.mgmt.security.models.AppWhitelistingIssueSummary] + :param source_system: Possible values include: 'Azure_AppLocker', + 'Azure_AuditD', 'NonAzure_AppLocker', 'NonAzure_AuditD', 'None' + :type 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}, + } + + _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, configuration_status=None, recommendation_status=None, issues=None, source_system=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 = configuration_status + self.recommendation_status = recommendation_status + self.issues = issues + self.source_system = source_system + 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 AppWhitelistingPutGroupData(Model): + """The altered data of the recommended VM/server group policy. + + :param enforcement_mode: The enforcement mode of the group. Can also be + defined per collection type by using ProtectionMode. Possible values + include: 'Audit', 'Enforce', 'None' + :type enforcement_mode: str or ~azure.mgmt.security.models.enum + :param protection_mode: The protection mode of the group per collection + type. Can also be defined for all collection types by using + EnforcementMode + :type protection_mode: ~azure.mgmt.security.models.ProtectionMode + :param vm_recommendations: + :type vm_recommendations: + list[~azure.mgmt.security.models.VmRecommendation] + :param path_recommendations: + :type path_recommendations: + list[~azure.mgmt.security.models.PathRecommendation] + """ + + _attribute_map = { + 'enforcement_mode': {'key': 'enforcementMode', 'type': 'str'}, + 'protection_mode': {'key': 'protectionMode', 'type': 'ProtectionMode'}, + 'vm_recommendations': {'key': 'vmRecommendations', 'type': '[VmRecommendation]'}, + 'path_recommendations': {'key': 'pathRecommendations', 'type': '[PathRecommendation]'}, + } + + def __init__(self, *, enforcement_mode=None, protection_mode=None, vm_recommendations=None, path_recommendations=None, **kwargs) -> None: + super(AppWhitelistingPutGroupData, self).__init__(**kwargs) + self.enforcement_mode = enforcement_mode + self.protection_mode = protection_mode + self.vm_recommendations = vm_recommendations + self.path_recommendations = path_recommendations + + +class AscLocation(Resource): + """The ASC location of the subscription is in the "name" field. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param properties: + :type properties: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AscLocation, self).__init__(**kwargs) + self.properties = properties + + +class AtaExternalSecuritySolution(ExternalSecuritySolution): + """Represents an ATA security solution which sends logs to an OMS workspace. + + 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 kind: Required. Constant filled by server. + :type kind: str + :param properties: + :type properties: ~azure.mgmt.security.models.AtaSolutionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AtaSolutionProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AtaExternalSecuritySolution, self).__init__(**kwargs) + self.properties = properties + self.kind = 'ATA' + + +class ExternalSecuritySolutionProperties(Model): + """The solution properties (correspond to the solution kind). + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + } + + def __init__(self, *, additional_properties=None, device_vendor: str=None, device_type: str=None, workspace=None, **kwargs) -> None: + super(ExternalSecuritySolutionProperties, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.device_vendor = device_vendor + self.device_type = device_type + self.workspace = workspace + + +class AtaSolutionProperties(ExternalSecuritySolutionProperties): + """The external security solution properties for ATA solutions. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + :param last_event_received: + :type last_event_received: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, device_vendor: str=None, device_type: str=None, workspace=None, last_event_received: str=None, **kwargs) -> None: + super(AtaSolutionProperties, self).__init__(additional_properties=additional_properties, device_vendor=device_vendor, device_type=device_type, workspace=workspace, **kwargs) + self.last_event_received = last_event_received + + +class TrackedResource(Model): + """Describes an Azure tracked resource. + + 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 kind: Kind of the resource + :type kind: str + :param etag: Entity tag is used for comparing two or more entities from + the same requested resource. + :type etag: str + :param tags: A list of key value pairs that describe the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, kind: str=None, etag: str=None, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.kind = kind + self.etag = etag + self.tags = tags + + +class Automation(TrackedResource): + """The security automation resource. + + 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 kind: Kind of the resource + :type kind: str + :param etag: Entity tag is used for comparing two or more entities from + the same requested resource. + :type etag: str + :param tags: A list of key value pairs that describe the resource. + :type tags: dict[str, str] + :param description: The security automation description. + :type description: str + :param is_enabled: Indicates whether the security automation is enabled. + :type is_enabled: bool + :param metadata: The metadata of the security automation resource. + :type metadata: ~azure.mgmt.security.models.AutomationMetadata + :param scopes: A collection of scopes on which the security automations + logic is applied. Supported scopes are the subscription itself or a + resource group under that subscription. The automation will only apply on + defined scopes. + :type scopes: list[~azure.mgmt.security.models.AutomationScope] + :param sources: A collection of the source event types which evaluate the + security automation set of rules. + :type sources: list[~azure.mgmt.security.models.AutomationSource] + :param actions: A collection of the actions which are triggered if all the + configured rules evaluations, within at least one rule set, are true. + :type actions: list[~azure.mgmt.security.models.AutomationAction] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'metadata': {'key': 'properties.metadata', 'type': 'AutomationMetadata'}, + 'scopes': {'key': 'properties.scopes', 'type': '[AutomationScope]'}, + 'sources': {'key': 'properties.sources', 'type': '[AutomationSource]'}, + 'actions': {'key': 'properties.actions', 'type': '[AutomationAction]'}, + } + + def __init__(self, *, kind: str=None, etag: str=None, tags=None, description: str=None, is_enabled: bool=None, metadata=None, scopes=None, sources=None, actions=None, **kwargs) -> None: + super(Automation, self).__init__(kind=kind, etag=etag, tags=tags, **kwargs) + self.description = description + self.is_enabled = is_enabled + self.metadata = metadata + self.scopes = scopes + self.sources = sources + self.actions = actions + + +class AutomationAction(Model): + """The action that should be triggered. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AutomationActionLogicApp, AutomationActionEventHub, + AutomationActionWorkspace + + All required parameters must be populated in order to send to Azure. + + :param action_type: Required. Constant filled by server. + :type action_type: str + """ + + _validation = { + 'action_type': {'required': True}, + } + + _attribute_map = { + 'action_type': {'key': 'actionType', 'type': 'str'}, + } + + _subtype_map = { + 'action_type': {'LogicApp': 'AutomationActionLogicApp', 'EventHub': 'AutomationActionEventHub', 'Workspace': 'AutomationActionWorkspace'} + } + + def __init__(self, **kwargs) -> None: + super(AutomationAction, self).__init__(**kwargs) + self.action_type = None + + +class AutomationActionEventHub(AutomationAction): + """The target Event Hub to which event data will be exported. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AutomationActionEventHubInput, + AutomationActionEventHubOutput + + All required parameters must be populated in order to send to Azure. + + :param action_type: Required. Constant filled by server. + :type action_type: str + :param event_hub_resource_id: The target Event Hub Azure Resource ID. + :type event_hub_resource_id: str + """ + + _validation = { + 'action_type': {'required': True}, + } + + _attribute_map = { + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'event_hub_resource_id': {'key': 'eventHubResourceId', 'type': 'str'}, + } + + _subtype_map = { + 'action_type': {'EventHub': 'AutomationActionEventHubInput', 'EventHub': 'AutomationActionEventHubOutput'} + } + + def __init__(self, *, event_hub_resource_id: str=None, **kwargs) -> None: + super(AutomationActionEventHub, self).__init__(**kwargs) + self.event_hub_resource_id = event_hub_resource_id + self.action_type = 'EventHub' + + +class AutomationActionEventHubInput(AutomationActionEventHub): + """The target Event Hub to which event data will be exported. + + All required parameters must be populated in order to send to Azure. + + :param action_type: Required. Constant filled by server. + :type action_type: str + :param event_hub_resource_id: The target Event Hub Azure Resource ID. + :type event_hub_resource_id: str + :param connection_string: The target Event Hub connection string + :type connection_string: str + """ + + _validation = { + 'action_type': {'required': True}, + } + + _attribute_map = { + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'event_hub_resource_id': {'key': 'eventHubResourceId', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + } + + def __init__(self, *, event_hub_resource_id: str=None, connection_string: str=None, **kwargs) -> None: + super(AutomationActionEventHubInput, self).__init__(event_hub_resource_id=event_hub_resource_id, **kwargs) + self.connection_string = connection_string + self.action_type = 'EventHub' + + +class AutomationActionEventHubOutput(AutomationActionEventHub): + """The target Event Hub to which event data will be exported. + + All required parameters must be populated in order to send to Azure. + + :param action_type: Required. Constant filled by server. + :type action_type: str + :param event_hub_resource_id: The target Event Hub Azure Resource ID. + :type event_hub_resource_id: str + :param sas_policy_name: The target Event Hub SAS policy name. + :type sas_policy_name: str + """ + + _validation = { + 'action_type': {'required': True}, + } + + _attribute_map = { + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'event_hub_resource_id': {'key': 'eventHubResourceId', 'type': 'str'}, + 'sas_policy_name': {'key': 'sasPolicyName', 'type': 'str'}, + } + + def __init__(self, *, event_hub_resource_id: str=None, sas_policy_name: str=None, **kwargs) -> None: + super(AutomationActionEventHubOutput, self).__init__(event_hub_resource_id=event_hub_resource_id, **kwargs) + self.sas_policy_name = sas_policy_name + self.action_type = 'EventHub' + + +class AutomationActionLogicApp(AutomationAction): + """The logic app action that should be triggered. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AutomationActionLogicAppInput, + AutomationActionLogicAppOutput + + All required parameters must be populated in order to send to Azure. + + :param action_type: Required. Constant filled by server. + :type action_type: str + :param logic_app_resource_id: The triggered Logic App Azure Resource ID. + This can also reside on other subscriptions, given that you have + permissions to trigger the Logic App + :type logic_app_resource_id: str + """ + + _validation = { + 'action_type': {'required': True}, + } + + _attribute_map = { + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'logic_app_resource_id': {'key': 'logicAppResourceId', 'type': 'str'}, + } + + _subtype_map = { + 'action_type': {'LogicApp': 'AutomationActionLogicAppInput', 'LogicApp': 'AutomationActionLogicAppOutput'} + } + + def __init__(self, *, logic_app_resource_id: str=None, **kwargs) -> None: + super(AutomationActionLogicApp, self).__init__(**kwargs) + self.logic_app_resource_id = logic_app_resource_id + self.action_type = 'LogicApp' + + +class AutomationActionLogicAppInput(AutomationActionLogicApp): + """The logic app action that should be triggered. + + All required parameters must be populated in order to send to Azure. + + :param action_type: Required. Constant filled by server. + :type action_type: str + :param logic_app_resource_id: The triggered Logic App Azure Resource ID. + This can also reside on other subscriptions, given that you have + permissions to trigger the Logic App + :type logic_app_resource_id: str + :param uri: The Logic App trigger URI endpoint. + :type uri: str + """ + + _validation = { + 'action_type': {'required': True}, + } + + _attribute_map = { + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'logic_app_resource_id': {'key': 'logicAppResourceId', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, *, logic_app_resource_id: str=None, uri: str=None, **kwargs) -> None: + super(AutomationActionLogicAppInput, self).__init__(logic_app_resource_id=logic_app_resource_id, **kwargs) + self.uri = uri + self.action_type = 'LogicApp' + + +class AutomationActionLogicAppOutput(AutomationActionLogicApp): + """The logic app action that should be triggered. + + All required parameters must be populated in order to send to Azure. + + :param action_type: Required. Constant filled by server. + :type action_type: str + :param logic_app_resource_id: The triggered Logic App Azure Resource ID. + This can also reside on other subscriptions, given that you have + permissions to trigger the Logic App + :type logic_app_resource_id: str + """ + + _validation = { + 'action_type': {'required': True}, + } + + _attribute_map = { + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'logic_app_resource_id': {'key': 'logicAppResourceId', 'type': 'str'}, + } + + def __init__(self, *, logic_app_resource_id: str=None, **kwargs) -> None: + super(AutomationActionLogicAppOutput, self).__init__(logic_app_resource_id=logic_app_resource_id, **kwargs) + self.action_type = 'LogicApp' + + +class AutomationActionWorkspace(AutomationAction): + """The Log Analytics Workspace to which event data will be exported. Security + alerts data will reside in the 'SecurityAlert' table and the assessments + data will reside in the 'SecurityRecommendation' table (under the + 'Security'/'SecurityCenterFree' solutions). Note that in order to view the + data in the workspace, the Security Center Log Analytics free/standard + solution needs to be enabled on that workspace. + + All required parameters must be populated in order to send to Azure. + + :param action_type: Required. Constant filled by server. + :type action_type: str + :param workspace_resource_id: The fully qualified Log Analytics Workspace + Azure Resource ID. + :type workspace_resource_id: str + """ + + _validation = { + 'action_type': {'required': True}, + } + + _attribute_map = { + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'workspace_resource_id': {'key': 'workspaceResourceId', 'type': 'str'}, + } + + def __init__(self, *, workspace_resource_id: str=None, **kwargs) -> None: + super(AutomationActionWorkspace, self).__init__(**kwargs) + self.workspace_resource_id = workspace_resource_id + self.action_type = 'Workspace' + + +class AutomationMetadata(Model): + """The metadata of the security automation resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar created_date_time_utc: The security automation creation date. + :vartype created_date_time_utc: datetime + :ivar created_by: The AAD object ID of the entity that created the + security automation. + :vartype created_by: str + :ivar last_updated_date_time_utc: The security automation last updated + date. + :vartype last_updated_date_time_utc: datetime + :ivar last_updated_by: The AAD object ID of the entity that last updated + the security automation. + :vartype last_updated_by: str + """ + + _validation = { + 'created_date_time_utc': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_updated_date_time_utc': {'readonly': True}, + 'last_updated_by': {'readonly': True}, + } + + _attribute_map = { + 'created_date_time_utc': {'key': 'createdDateTimeUtc', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_updated_date_time_utc': {'key': 'lastUpdatedDateTimeUtc', 'type': 'iso-8601'}, + 'last_updated_by': {'key': 'lastUpdatedBy', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AutomationMetadata, self).__init__(**kwargs) + self.created_date_time_utc = None + self.created_by = None + self.last_updated_date_time_utc = None + self.last_updated_by = None + + +class AutomationRuleSet(Model): + """A rule set which evaluates all its rules upon an event interception. Only + when all the included rules in the rule set will be evaluated as 'true', + will the event trigger the defined actions. + + :param rules: + :type rules: list[~azure.mgmt.security.models.AutomationTriggeringRule] + """ + + _attribute_map = { + 'rules': {'key': 'rules', 'type': '[AutomationTriggeringRule]'}, + } + + def __init__(self, *, rules=None, **kwargs) -> None: + super(AutomationRuleSet, self).__init__(**kwargs) + self.rules = rules + + +class AutomationScope(Model): + """A single automation scope. + + :param description: The resources scope description. + :type description: str + :param scope_path: The resources scope path. Can be the subscription on + which the automation is defined on or a resource group under that + subscription (fully qualified Azure resource IDs). + :type scope_path: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'scope_path': {'key': 'scopePath', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, scope_path: str=None, **kwargs) -> None: + super(AutomationScope, self).__init__(**kwargs) + self.description = description + self.scope_path = scope_path + + +class AutomationSource(Model): + """The source event types which evaluate the security automation set of rules. + For example - security alerts and security assessments. To learn more about + the supported security events data models schemas - please visit + https://aka.ms/ASCAutomationSchemas. + + :param event_source: A valid event source type. Possible values include: + 'Assessments', 'Alerts' + :type event_source: str or ~azure.mgmt.security.models.EventSource + :param rule_sets: A set of rules which evaluate upon event interception. A + logical disjunction is applied between defined rule sets (logical 'or'). + :type rule_sets: list[~azure.mgmt.security.models.AutomationRuleSet] + """ + + _attribute_map = { + 'event_source': {'key': 'eventSource', 'type': 'str'}, + 'rule_sets': {'key': 'ruleSets', 'type': '[AutomationRuleSet]'}, + } + + def __init__(self, *, event_source=None, rule_sets=None, **kwargs) -> None: + super(AutomationSource, self).__init__(**kwargs) + self.event_source = event_source + self.rule_sets = rule_sets + + +class AutomationTriggeringRule(Model): + """A rule which is evaluated upon event interception. The rule is configured + by comparing a specific value from the event model to an expected value. + This comparison is done by using one of the supported operators set. + + :param property_jpath: The JPath of the entity model property that should + be checked. + :type property_jpath: str + :param property_type: The data type of the compared operands (string, + integer, floating point number or a boolean [true/false]]. Possible values + include: 'String', 'Integer', 'Number', 'Boolean' + :type property_type: str or ~azure.mgmt.security.models.PropertyType + :param expected_value: The expected value. + :type expected_value: str + :param operator: A valid comparer operator to use. Possible values + include: 'Equals', 'GreaterThan', 'GreaterThanOrEqualTo', 'LesserThan', + 'LesserThanOrEqualTo', 'NotEquals', 'Contains', 'StartsWith', 'EndsWith' + :type operator: str or ~azure.mgmt.security.models.Operator + """ + + _attribute_map = { + 'property_jpath': {'key': 'propertyJPath', 'type': 'str'}, + 'property_type': {'key': 'propertyType', 'type': 'str'}, + 'expected_value': {'key': 'expectedValue', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + } + + def __init__(self, *, property_jpath: str=None, property_type=None, expected_value: str=None, operator=None, **kwargs) -> None: + super(AutomationTriggeringRule, self).__init__(**kwargs) + self.property_jpath = property_jpath + self.property_type = property_type + self.expected_value = expected_value + self.operator = operator + + +class AutomationValidationStatus(Model): + """The security automation model state property bag. + + :param is_valid: Indicates whether the model is valid or not. + :type is_valid: bool + :param message: The validation message. + :type message: str + """ + + _attribute_map = { + 'is_valid': {'key': 'isValid', 'type': 'bool'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, is_valid: bool=None, message: str=None, **kwargs) -> None: + super(AutomationValidationStatus, self).__init__(**kwargs) + self.is_valid = is_valid + self.message = message + + +class AutoProvisioningSetting(Resource): + """Auto provisioning setting. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param auto_provision: Required. Describes what kind of security agent + provisioning action to take. Possible values include: 'On', 'Off' + :type auto_provision: str or ~azure.mgmt.security.models.AutoProvision + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'auto_provision': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'auto_provision': {'key': 'properties.autoProvision', 'type': 'str'}, + } + + def __init__(self, *, auto_provision, **kwargs) -> None: + super(AutoProvisioningSetting, self).__init__(**kwargs) + self.auto_provision = auto_provision + + +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: AzureResourceDetails, AwsResourceDetails + + 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': {'Azure': 'AzureResourceDetails', 'Aws': 'AwsResourceDetails'} + } + + def __init__(self, **kwargs) -> None: + super(ResourceDetails, self).__init__(**kwargs) + self.source = None + + +class AwsResourceDetails(ResourceDetails): + """Details of the 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 account_id: AWS account ID + :vartype account_id: str + :ivar aws_resource_id: AWS resource ID. can be ARN or other + :vartype aws_resource_id: str + """ + + _validation = { + 'source': {'required': True}, + 'account_id': {'readonly': True}, + 'aws_resource_id': {'readonly': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'aws_resource_id': {'key': 'awsResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AwsResourceDetails, self).__init__(**kwargs) + self.account_id = None + self.aws_resource_id = None + self.source = 'Aws' + + +class AzureResourceDetails(ResourceDetails): + """Details of the 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 + """ + + _validation = { + 'source': {'required': True}, + 'id': {'readonly': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AzureResourceDetails, self).__init__(**kwargs) + self.id = None + self.source = 'Azure' + + +class CefExternalSecuritySolution(ExternalSecuritySolution): + """Represents a security solution which sends CEF logs to an OMS workspace. + + 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 kind: Required. Constant filled by server. + :type kind: str + :param properties: + :type properties: ~azure.mgmt.security.models.CefSolutionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CefSolutionProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(CefExternalSecuritySolution, self).__init__(**kwargs) + self.properties = properties + self.kind = 'CEF' + + +class CefSolutionProperties(ExternalSecuritySolutionProperties): + """The external security solution properties for CEF solutions. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + :param hostname: + :type hostname: str + :param agent: + :type agent: str + :param last_event_received: + :type last_event_received: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + 'hostname': {'key': 'hostname', 'type': 'str'}, + 'agent': {'key': 'agent', 'type': 'str'}, + 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, device_vendor: str=None, device_type: str=None, workspace=None, hostname: str=None, agent: str=None, last_event_received: str=None, **kwargs) -> None: + super(CefSolutionProperties, self).__init__(additional_properties=additional_properties, device_vendor=device_vendor, device_type=device_type, workspace=workspace, **kwargs) + self.hostname = hostname + self.agent = agent + self.last_event_received = last_event_received + + +class CloudError(Model): + """Error response structure. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :vartype code: str + :ivar message: A message describing the error, intended to be suitable for + display in a user interface. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'error.code', 'type': 'str'}, + 'message': {'key': 'error.message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.code = None + self.message = None + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class Compliance(Resource): + """Compliance of a scope. + + 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 assessment_timestamp_utc_date: The timestamp when the Compliance + calculation was conducted. + :vartype assessment_timestamp_utc_date: datetime + :ivar resource_count: The resource count of the given subscription for + which the Compliance calculation was conducted (needed for Management + Group Compliance calculation). + :vartype resource_count: int + :ivar assessment_result: An array of segment, which is the actually the + compliance assessment. + :vartype assessment_result: + list[~azure.mgmt.security.models.ComplianceSegment] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'assessment_timestamp_utc_date': {'readonly': True}, + 'resource_count': {'readonly': True}, + 'assessment_result': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'assessment_timestamp_utc_date': {'key': 'properties.assessmentTimestampUtcDate', 'type': 'iso-8601'}, + 'resource_count': {'key': 'properties.resourceCount', 'type': 'int'}, + 'assessment_result': {'key': 'properties.assessmentResult', 'type': '[ComplianceSegment]'}, + } + + def __init__(self, **kwargs) -> None: + super(Compliance, self).__init__(**kwargs) + self.assessment_timestamp_utc_date = None + self.resource_count = None + self.assessment_result = None + + +class ComplianceResult(Resource): + """a compliance result. + + 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 resource_status: The status of the resource regarding a single + assessment. Possible values include: 'Healthy', 'NotApplicable', + 'OffByPolicy', 'NotHealthy' + :vartype resource_status: str or + ~azure.mgmt.security.models.ResourceStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resource_status': {'key': 'properties.resourceStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ComplianceResult, self).__init__(**kwargs) + self.resource_status = None + + +class ComplianceSegment(Model): + """A segment of a compliance assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar segment_type: The segment type, e.g. compliant, non-compliance, + insufficient coverage, N/A, etc. + :vartype segment_type: str + :ivar percentage: The size (%) of the segment. + :vartype percentage: float + """ + + _validation = { + 'segment_type': {'readonly': True}, + 'percentage': {'readonly': True}, + } + + _attribute_map = { + 'segment_type': {'key': 'segmentType', 'type': 'str'}, + 'percentage': {'key': 'percentage', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(ComplianceSegment, self).__init__(**kwargs) + self.segment_type = None + self.percentage = None + + +class ConnectableResource(Model): + """Describes the allowed inbound and outbound traffic of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The Azure resource id + :vartype id: str + :ivar inbound_connected_resources: The list of Azure resources that the + resource has inbound allowed connection from + :vartype inbound_connected_resources: + list[~azure.mgmt.security.models.ConnectedResource] + :ivar outbound_connected_resources: The list of Azure resources that the + resource has outbound allowed connection to + :vartype outbound_connected_resources: + list[~azure.mgmt.security.models.ConnectedResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'inbound_connected_resources': {'readonly': True}, + 'outbound_connected_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'inbound_connected_resources': {'key': 'inboundConnectedResources', 'type': '[ConnectedResource]'}, + 'outbound_connected_resources': {'key': 'outboundConnectedResources', 'type': '[ConnectedResource]'}, + } + + def __init__(self, **kwargs) -> None: + super(ConnectableResource, self).__init__(**kwargs) + self.id = None + self.inbound_connected_resources = None + self.outbound_connected_resources = None + + +class ConnectedResource(Model): + """Describes properties of a connected resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connected_resource_id: The Azure resource id of the connected + resource + :vartype connected_resource_id: str + :ivar tcp_ports: The allowed tcp ports + :vartype tcp_ports: str + :ivar udp_ports: The allowed udp ports + :vartype udp_ports: str + """ + + _validation = { + 'connected_resource_id': {'readonly': True}, + 'tcp_ports': {'readonly': True}, + 'udp_ports': {'readonly': True}, + } + + _attribute_map = { + 'connected_resource_id': {'key': 'connectedResourceId', 'type': 'str'}, + 'tcp_ports': {'key': 'tcpPorts', 'type': 'str'}, + 'udp_ports': {'key': 'udpPorts', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ConnectedResource, self).__init__(**kwargs) + self.connected_resource_id = None + self.tcp_ports = None + self.udp_ports = None + + +class ConnectedWorkspace(Model): + """Represents an OMS workspace to which the solution is connected. + + :param id: Azure resource ID of the connected OMS workspace + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(ConnectedWorkspace, self).__init__(**kwargs) + self.id = id + + +class ContainerRegistryVulnerabilityProperties(AdditionalData): + """Additional context fields for container registry Vulnerability assessment. + + 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 assessed_resource_type: Required. Constant filled by server. + :type assessed_resource_type: str + :ivar type: Vulnerability Type. e.g: Vulnerability, Potential + Vulnerability, Information Gathered, Vulnerability + :vartype type: str + :ivar cvss: Dictionary from cvss version to cvss details object + :vartype cvss: dict[str, ~azure.mgmt.security.models.CVSS] + :ivar patchable: Indicates whether a patch is available or not + :vartype patchable: bool + :ivar cve: List of CVEs + :vartype cve: list[~azure.mgmt.security.models.CVE] + :ivar published_time: Published time + :vartype published_time: datetime + :ivar vendor_references: + :vartype vendor_references: + list[~azure.mgmt.security.models.VendorReference] + :ivar repository_name: Name of the repository which the vulnerable image + belongs to + :vartype repository_name: str + :ivar image_digest: Digest of the vulnerable image + :vartype image_digest: str + """ + + _validation = { + 'assessed_resource_type': {'required': True}, + 'type': {'readonly': True}, + 'cvss': {'readonly': True}, + 'patchable': {'readonly': True}, + 'cve': {'readonly': True}, + 'published_time': {'readonly': True}, + 'vendor_references': {'readonly': True}, + 'repository_name': {'readonly': True}, + 'image_digest': {'readonly': True}, + } + + _attribute_map = { + 'assessed_resource_type': {'key': 'assessedResourceType', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'cvss': {'key': 'cvss', 'type': '{CVSS}'}, + 'patchable': {'key': 'patchable', 'type': 'bool'}, + 'cve': {'key': 'cve', 'type': '[CVE]'}, + 'published_time': {'key': 'publishedTime', 'type': 'iso-8601'}, + 'vendor_references': {'key': 'vendorReferences', 'type': '[VendorReference]'}, + 'repository_name': {'key': 'repositoryName', 'type': 'str'}, + 'image_digest': {'key': 'imageDigest', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ContainerRegistryVulnerabilityProperties, self).__init__(**kwargs) + self.type = None + self.cvss = None + self.patchable = None + self.cve = None + self.published_time = None + self.vendor_references = None + self.repository_name = None + self.image_digest = None + self.assessed_resource_type = 'ContainerRegistryVulnerability' + + +class CVE(Model): + """CVE details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar title: CVE title + :vartype title: str + :ivar link: Link url + :vartype link: str + """ + + _validation = { + 'title': {'readonly': True}, + 'link': {'readonly': True}, + } + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'link': {'key': 'link', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CVE, self).__init__(**kwargs) + self.title = None + self.link = None + + +class CVSS(Model): + """CVSS details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar base: CVSS base + :vartype base: float + """ + + _validation = { + 'base': {'readonly': True}, + } + + _attribute_map = { + 'base': {'key': 'base', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(CVSS, self).__init__(**kwargs) + self.base = None + + +class SettingResource(Resource): + """The kind of the security setting. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind, **kwargs) -> None: + super(SettingResource, self).__init__(**kwargs) + self.kind = kind + + +class Setting(SettingResource): + """Represents a security setting in Azure Security Center. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind, **kwargs) -> None: + super(Setting, self).__init__(kind=kind, **kwargs) + + +class DataExportSetting(Setting): + """Represents a data export setting. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + :param enabled: Required. Is the data export setting is enabled + :type enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'enabled': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, *, kind, enabled: bool, **kwargs) -> None: + super(DataExportSetting, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + + +class DenylistCustomAlertRule(ListCustomAlertRule): + """A custom alert rule that checks if a value (depends on the custom alert + type) is denied. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Status of the custom alert. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + :ivar value_type: The value type of the items in the list. Possible values + include: 'IpCidr', 'String' + :vartype value_type: str or ~azure.mgmt.security.models.ValueType + :param denylist_values: Required. The values to deny. The format of the + values depends on the rule type. + :type denylist_values: list[str] + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'value_type': {'readonly': True}, + 'denylist_values': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'value_type': {'key': 'valueType', 'type': 'str'}, + 'denylist_values': {'key': 'denylistValues', 'type': '[str]'}, + } + + def __init__(self, *, is_enabled: bool, rule_type: str, denylist_values, **kwargs) -> None: + super(DenylistCustomAlertRule, self).__init__(is_enabled=is_enabled, rule_type=rule_type, **kwargs) + self.denylist_values = denylist_values + + +class DeviceSecurityGroup(Resource): + """The device security group resource. + + 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 threshold_rules: The list of custom alert threshold rules. + :type threshold_rules: + list[~azure.mgmt.security.models.ThresholdCustomAlertRule] + :param time_window_rules: The list of custom alert time-window rules. + :type time_window_rules: + list[~azure.mgmt.security.models.TimeWindowCustomAlertRule] + :param allowlist_rules: The allow-list custom alert rules. + :type allowlist_rules: + list[~azure.mgmt.security.models.AllowlistCustomAlertRule] + :param denylist_rules: The deny-list custom alert rules. + :type denylist_rules: + list[~azure.mgmt.security.models.DenylistCustomAlertRule] + """ + + _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'}, + 'threshold_rules': {'key': 'properties.thresholdRules', 'type': '[ThresholdCustomAlertRule]'}, + 'time_window_rules': {'key': 'properties.timeWindowRules', 'type': '[TimeWindowCustomAlertRule]'}, + 'allowlist_rules': {'key': 'properties.allowlistRules', 'type': '[AllowlistCustomAlertRule]'}, + 'denylist_rules': {'key': 'properties.denylistRules', 'type': '[DenylistCustomAlertRule]'}, + } + + def __init__(self, *, threshold_rules=None, time_window_rules=None, allowlist_rules=None, denylist_rules=None, **kwargs) -> None: + super(DeviceSecurityGroup, self).__init__(**kwargs) + self.threshold_rules = threshold_rules + self.time_window_rules = time_window_rules + self.allowlist_rules = allowlist_rules + self.denylist_rules = denylist_rules + + +class DiscoveredSecuritySolution(Model): + """DiscoveredSecuritySolution. + + 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 discovered + solution. Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' + :type security_family: str or ~azure.mgmt.security.models.SecurityFamily + :param offer: Required. The security solutions' image offer + :type offer: str + :param publisher: Required. The security solutions' image publisher + :type publisher: str + :param sku: Required. The security solutions' image sku + :type sku: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'security_family': {'required': True}, + 'offer': {'required': True}, + 'publisher': {'required': True}, + 'sku': {'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'}, + 'offer': {'key': 'properties.offer', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + } + + def __init__(self, *, security_family, offer: str, publisher: str, sku: str, **kwargs) -> None: + super(DiscoveredSecuritySolution, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.security_family = security_family + self.offer = offer + self.publisher = publisher + self.sku = sku + + +class ETag(Model): + """Entity tag is used for comparing two or more entities from the same + requested resource. + + :param etag: Entity tag is used for comparing two or more entities from + the same requested resource. + :type etag: str + """ + + _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, etag: str=None, **kwargs) -> None: + super(ETag, self).__init__(**kwargs) + self.etag = etag + + +class ExternalSecuritySolutionKind1(Model): + """Describes an Azure resource with kind. + + :param kind: The kind of the external solution. Possible values include: + 'CEF', 'ATA', 'AAD' + :type kind: str or + ~azure.mgmt.security.models.ExternalSecuritySolutionKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind=None, **kwargs) -> None: + super(ExternalSecuritySolutionKind1, self).__init__(**kwargs) + self.kind = kind + + +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 + :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}, + } + + _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'}, + '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.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 order: The order of the information type. + :type order: float + :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'}, + 'order': {'key': 'order', 'type': 'float'}, + '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, order: float=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.order = order + self.recommended_label_id = recommended_label_id + self.enabled = enabled + self.custom = custom + self.keywords = keywords + + +class IoTSecurityAggregatedAlert(Model): + """Security Solution Aggregated Alert information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar alert_type: Name of the alert type. + :vartype alert_type: str + :ivar alert_display_name: Display name of the alert type. + :vartype alert_display_name: str + :ivar aggregated_date_utc: Date of detection. + :vartype aggregated_date_utc: date + :ivar vendor_name: Name of the organization that raised the alert. + :vartype vendor_name: str + :ivar reported_severity: Assessed alert severity. Possible values include: + 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar remediation_steps: Recommended steps for remediation. + :vartype remediation_steps: str + :ivar description: Description of the suspected vulnerability and meaning. + :vartype description: str + :ivar count: Number of alerts occurrences within the aggregated time + window. + :vartype count: int + :ivar effected_resource_type: Azure resource ID of the resource that + received the alerts. + :vartype effected_resource_type: str + :ivar system_source: The type of the alerted resource (Azure, Non-Azure). + :vartype system_source: str + :ivar action_taken: IoT Security solution alert response. + :vartype action_taken: str + :ivar log_analytics_query: Log analytics query for getting the list of + affected devices/alerts. + :vartype log_analytics_query: str + :ivar top_devices_list: 10 devices with the highest number of occurrences + of this alert type, on this day. + :vartype top_devices_list: + list[~azure.mgmt.security.models.IoTSecurityAggregatedAlertPropertiesTopDevicesListItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'alert_type': {'readonly': True}, + 'alert_display_name': {'readonly': True}, + 'aggregated_date_utc': {'readonly': True}, + 'vendor_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'description': {'readonly': True}, + 'count': {'readonly': True}, + 'effected_resource_type': {'readonly': True}, + 'system_source': {'readonly': True}, + 'action_taken': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + 'top_devices_list': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, + 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, + 'aggregated_date_utc': {'key': 'properties.aggregatedDateUtc', 'type': 'date'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'count': {'key': 'properties.count', 'type': 'int'}, + 'effected_resource_type': {'key': 'properties.effectedResourceType', 'type': 'str'}, + 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, + 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + 'top_devices_list': {'key': 'properties.topDevicesList', 'type': '[IoTSecurityAggregatedAlertPropertiesTopDevicesListItem]'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(IoTSecurityAggregatedAlert, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + self.alert_type = None + self.alert_display_name = None + self.aggregated_date_utc = None + self.vendor_name = None + self.reported_severity = None + self.remediation_steps = None + self.description = None + self.count = None + self.effected_resource_type = None + self.system_source = None + self.action_taken = None + self.log_analytics_query = None + self.top_devices_list = None + + +class IoTSecurityAggregatedAlertPropertiesTopDevicesListItem(Model): + """IoTSecurityAggregatedAlertPropertiesTopDevicesListItem. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar device_id: Name of the device. + :vartype device_id: str + :ivar alerts_count: Number of alerts raised for this device. + :vartype alerts_count: int + :ivar last_occurrence: Most recent time this alert was raised for this + device, on this day. + :vartype last_occurrence: str + """ + + _validation = { + 'device_id': {'readonly': True}, + 'alerts_count': {'readonly': True}, + 'last_occurrence': {'readonly': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + 'last_occurrence': {'key': 'lastOccurrence', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(IoTSecurityAggregatedAlertPropertiesTopDevicesListItem, self).__init__(**kwargs) + self.device_id = None + self.alerts_count = None + self.last_occurrence = None + + +class IoTSecurityAggregatedRecommendation(Model): + """IoT Security solution recommendation information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param recommendation_name: Name of the recommendation. + :type recommendation_name: str + :ivar recommendation_display_name: Display name of the recommendation + type. + :vartype recommendation_display_name: str + :ivar description: Description of the suspected vulnerability and meaning. + :vartype description: str + :ivar recommendation_type_id: Recommendation-type GUID. + :vartype recommendation_type_id: str + :ivar detected_by: Name of the organization that made the recommendation. + :vartype detected_by: str + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar reported_severity: Assessed recommendation severity. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar healthy_devices: Number of healthy devices within the IoT Security + solution. + :vartype healthy_devices: int + :ivar unhealthy_device_count: Number of unhealthy devices within the IoT + Security solution. + :vartype unhealthy_device_count: int + :ivar log_analytics_query: Log analytics query for getting the list of + affected devices/alerts. + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'recommendation_display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'recommendation_type_id': {'readonly': True}, + 'detected_by': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'healthy_devices': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'recommendation_name': {'key': 'properties.recommendationName', 'type': 'str'}, + 'recommendation_display_name': {'key': 'properties.recommendationDisplayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'recommendation_type_id': {'key': 'properties.recommendationTypeId', 'type': 'str'}, + 'detected_by': {'key': 'properties.detectedBy', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'healthy_devices': {'key': 'properties.healthyDevices', 'type': 'int'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, *, tags=None, recommendation_name: str=None, **kwargs) -> None: + super(IoTSecurityAggregatedRecommendation, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + self.recommendation_name = recommendation_name + self.recommendation_display_name = None + self.description = None + self.recommendation_type_id = None + self.detected_by = None + self.remediation_steps = None + self.reported_severity = None + self.healthy_devices = None + self.unhealthy_device_count = None + self.log_analytics_query = None + + +class IoTSecurityAlertedDevice(Model): + """Statistical information about the number of alerts per device during last + set number of days. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar device_id: Device identifier. + :vartype device_id: str + :ivar alerts_count: Number of alerts raised for this device. + :vartype alerts_count: int + """ + + _validation = { + 'device_id': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(IoTSecurityAlertedDevice, self).__init__(**kwargs) + self.device_id = None + self.alerts_count = None + + +class IoTSecurityDeviceAlert(Model): + """Statistical information about the number of alerts per alert type during + last set number of days. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_display_name: Display name of the alert + :vartype alert_display_name: str + :ivar reported_severity: Assessed Alert severity. Possible values include: + 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar alerts_count: Number of alerts raised for this alert type. + :vartype alerts_count: int + """ + + _validation = { + 'alert_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'alert_display_name': {'key': 'alertDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(IoTSecurityDeviceAlert, self).__init__(**kwargs) + self.alert_display_name = None + self.reported_severity = None + self.alerts_count = None + + +class IoTSecurityDeviceRecommendation(Model): + """Statistical information about the number of recommendations per device, per + recommendation type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar recommendation_display_name: Display name of the recommendation. + :vartype recommendation_display_name: str + :ivar reported_severity: Assessed recommendation severity. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar devices_count: Number of devices with this recommendation. + :vartype devices_count: int + """ + + _validation = { + 'recommendation_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'devices_count': {'readonly': True}, + } + + _attribute_map = { + 'recommendation_display_name': {'key': 'recommendationDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'devices_count': {'key': 'devicesCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(IoTSecurityDeviceRecommendation, self).__init__(**kwargs) + self.recommendation_display_name = None + self.reported_severity = None + self.devices_count = None + + +class IoTSecuritySolutionAnalyticsModel(Resource): + """Security analytics of your IoT Security solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar metrics: Security analytics of your IoT Security solution. + :vartype metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + :ivar unhealthy_device_count: Number of unhealthy devices within your IoT + Security solution. + :vartype unhealthy_device_count: int + :ivar devices_metrics: List of device metrics by the aggregation date. + :vartype devices_metrics: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem] + :param top_alerted_devices: List of the 3 devices with the most alerts. + :type top_alerted_devices: + list[~azure.mgmt.security.models.IoTSecurityAlertedDevice] + :param most_prevalent_device_alerts: List of the 3 most prevalent device + alerts. + :type most_prevalent_device_alerts: + list[~azure.mgmt.security.models.IoTSecurityDeviceAlert] + :param most_prevalent_device_recommendations: List of the 3 most prevalent + device recommendations. + :type most_prevalent_device_recommendations: + list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metrics': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'devices_metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'metrics': {'key': 'properties.metrics', 'type': 'IoTSeverityMetrics'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'devices_metrics': {'key': 'properties.devicesMetrics', 'type': '[IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem]'}, + 'top_alerted_devices': {'key': 'properties.topAlertedDevices', 'type': '[IoTSecurityAlertedDevice]'}, + 'most_prevalent_device_alerts': {'key': 'properties.mostPrevalentDeviceAlerts', 'type': '[IoTSecurityDeviceAlert]'}, + 'most_prevalent_device_recommendations': {'key': 'properties.mostPrevalentDeviceRecommendations', 'type': '[IoTSecurityDeviceRecommendation]'}, + } + + def __init__(self, *, top_alerted_devices=None, most_prevalent_device_alerts=None, most_prevalent_device_recommendations=None, **kwargs) -> None: + super(IoTSecuritySolutionAnalyticsModel, self).__init__(**kwargs) + self.metrics = None + self.unhealthy_device_count = None + self.devices_metrics = None + self.top_alerted_devices = top_alerted_devices + self.most_prevalent_device_alerts = most_prevalent_device_alerts + self.most_prevalent_device_recommendations = most_prevalent_device_recommendations + + +class IoTSecuritySolutionAnalyticsModelList(Model): + """List of Security analytics of your IoT Security solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of Security analytics of your IoT Security + solution + :type value: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel] + :ivar next_link: When there is too much alert data for one page, use this + URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecuritySolutionAnalyticsModel]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecuritySolutionAnalyticsModelList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem(Model): + """IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem. + + :param date_property: Aggregation of IoT Security solution device alert + metrics by date. + :type date_property: datetime + :param devices_metrics: Device alert count by severity. + :type devices_metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'devices_metrics': {'key': 'devicesMetrics', 'type': 'IoTSeverityMetrics'}, + } + + def __init__(self, *, date_property=None, devices_metrics=None, **kwargs) -> None: + super(IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, self).__init__(**kwargs) + self.date_property = date_property + self.devices_metrics = devices_metrics + + +class IoTSecuritySolutionModel(Model): + """IoT Security solution configuration and resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param location: The resource location. + :type location: str + :param workspace: Required. Workspace resource ID + :type workspace: str + :param display_name: Required. Resource display name. + :type display_name: str + :param status: Status of the IoT Security solution. Possible values + include: 'Enabled', 'Disabled'. Default value: "Enabled" . + :type status: str or ~azure.mgmt.security.models.SecuritySolutionStatus + :param export: List of additional options for exporting to workspace data. + :type export: list[str or ~azure.mgmt.security.models.ExportData] + :param disabled_data_sources: Disabled data sources. Disabling these data + sources compromises the system. + :type disabled_data_sources: list[str or + ~azure.mgmt.security.models.DataSource] + :param iot_hubs: Required. IoT Hub resource IDs + :type iot_hubs: list[str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :ivar auto_discovered_resources: List of resources that were automatically + discovered as relevant to the security solution. + :vartype auto_discovered_resources: list[str] + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + :param unmasked_ip_logging_status: Unmasked IP address logging status. + Possible values include: 'Disabled', 'Enabled'. Default value: "Disabled" + . + :type unmasked_ip_logging_status: str or + ~azure.mgmt.security.models.UnmaskedIpLoggingStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'workspace': {'required': True}, + 'display_name': {'required': True}, + 'iot_hubs': {'required': True}, + 'auto_discovered_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'workspace': {'key': 'properties.workspace', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'export': {'key': 'properties.export', 'type': '[str]'}, + 'disabled_data_sources': {'key': 'properties.disabledDataSources', 'type': '[str]'}, + 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[str]'}, + 'user_defined_resources': {'key': 'properties.userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'auto_discovered_resources': {'key': 'properties.autoDiscoveredResources', 'type': '[str]'}, + 'recommendations_configuration': {'key': 'properties.recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + 'unmasked_ip_logging_status': {'key': 'properties.unmaskedIpLoggingStatus', 'type': 'str'}, + } + + def __init__(self, *, workspace: str, display_name: str, iot_hubs, tags=None, location: str=None, status="Enabled", export=None, disabled_data_sources=None, user_defined_resources=None, recommendations_configuration=None, unmasked_ip_logging_status="Disabled", **kwargs) -> None: + super(IoTSecuritySolutionModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + self.location = location + self.workspace = workspace + self.display_name = display_name + self.status = status + self.export = export + self.disabled_data_sources = disabled_data_sources + self.iot_hubs = iot_hubs + self.user_defined_resources = user_defined_resources + self.auto_discovered_resources = None + self.recommendations_configuration = recommendations_configuration + self.unmasked_ip_logging_status = unmasked_ip_logging_status + + +class IoTSeverityMetrics(Model): + """IoT Security solution analytics severity metrics. + + :param high: Count of high severity alerts/recommendations. + :type high: int + :param medium: Count of medium severity alerts/recommendations. + :type medium: int + :param low: Count of low severity alerts/recommendations. + :type low: int + """ + + _attribute_map = { + 'high': {'key': 'high', 'type': 'int'}, + 'medium': {'key': 'medium', 'type': 'int'}, + 'low': {'key': 'low', 'type': 'int'}, + } + + def __init__(self, *, high: int=None, medium: int=None, low: int=None, **kwargs) -> None: + super(IoTSeverityMetrics, self).__init__(**kwargs) + self.high = high + self.medium = medium + self.low = low + + +class JitNetworkAccessPolicy(Model): + """JitNetworkAccessPolicy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Kind of the resource + :type kind: str + :ivar location: Location where the resource is stored + :vartype location: str + :param virtual_machines: Required. Configurations for + Microsoft.Compute/virtualMachines resource type. + :type virtual_machines: + list[~azure.mgmt.security.models.JitNetworkAccessPolicyVirtualMachine] + :param requests: + :type requests: list[~azure.mgmt.security.models.JitNetworkAccessRequest] + :ivar provisioning_state: Gets the provisioning state of the Just-in-Time + policy. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'virtual_machines': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[JitNetworkAccessPolicyVirtualMachine]'}, + 'requests': {'key': 'properties.requests', 'type': '[JitNetworkAccessRequest]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, virtual_machines, kind: str=None, requests=None, **kwargs) -> None: + super(JitNetworkAccessPolicy, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.kind = kind + self.location = None + self.virtual_machines = virtual_machines + self.requests = requests + self.provisioning_state = None + + +class JitNetworkAccessPolicyInitiatePort(Model): + """JitNetworkAccessPolicyInitiatePort. + + All required parameters must be populated in order to send to Azure. + + :param number: Required. + :type number: int + :param allowed_source_address_prefix: Source of the allowed traffic. If + omitted, the request will be for the source IP address of the initiate + request. + :type allowed_source_address_prefix: str + :param end_time_utc: Required. The time to close the request in UTC + :type end_time_utc: datetime + """ + + _validation = { + 'number': {'required': True}, + 'end_time_utc': {'required': True}, + } + + _attribute_map = { + 'number': {'key': 'number', 'type': 'int'}, + 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, + 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, + } + + def __init__(self, *, number: int, end_time_utc, allowed_source_address_prefix: str=None, **kwargs) -> None: + super(JitNetworkAccessPolicyInitiatePort, self).__init__(**kwargs) + self.number = number + self.allowed_source_address_prefix = allowed_source_address_prefix + self.end_time_utc = end_time_utc + + +class JitNetworkAccessPolicyInitiateRequest(Model): + """JitNetworkAccessPolicyInitiateRequest. + + All required parameters must be populated in order to send to Azure. + + :param virtual_machines: Required. A list of virtual machines & ports to + open access for + :type virtual_machines: + list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiateVirtualMachine] + :param justification: The justification for making the initiate request + :type justification: str + """ + + _validation = { + 'virtual_machines': {'required': True}, + } + + _attribute_map = { + 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessPolicyInitiateVirtualMachine]'}, + 'justification': {'key': 'justification', 'type': 'str'}, + } + + def __init__(self, *, virtual_machines, justification: str=None, **kwargs) -> None: + super(JitNetworkAccessPolicyInitiateRequest, self).__init__(**kwargs) + self.virtual_machines = virtual_machines + self.justification = justification + + +class JitNetworkAccessPolicyInitiateVirtualMachine(Model): + """JitNetworkAccessPolicyInitiateVirtualMachine. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of the virtual machine that is linked to + this policy + :type id: str + :param ports: Required. The ports to open for the resource with the `id` + :type ports: + list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiatePort] + """ + + _validation = { + 'id': {'required': True}, + 'ports': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPolicyInitiatePort]'}, + } + + def __init__(self, *, id: str, ports, **kwargs) -> None: + super(JitNetworkAccessPolicyInitiateVirtualMachine, self).__init__(**kwargs) + self.id = id + self.ports = ports + + +class JitNetworkAccessPolicyVirtualMachine(Model): + """JitNetworkAccessPolicyVirtualMachine. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of the virtual machine that is linked to + this policy + :type id: str + :param ports: Required. Port configurations for the virtual machine + :type ports: list[~azure.mgmt.security.models.JitNetworkAccessPortRule] + :param public_ip_address: Public IP address of the Azure Firewall that is + linked to this policy, if applicable + :type public_ip_address: str + """ + + _validation = { + 'id': {'required': True}, + 'ports': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPortRule]'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + } + + def __init__(self, *, id: str, ports, public_ip_address: str=None, **kwargs) -> None: + super(JitNetworkAccessPolicyVirtualMachine, self).__init__(**kwargs) + self.id = id + self.ports = ports + self.public_ip_address = public_ip_address + + +class JitNetworkAccessPortRule(Model): + """JitNetworkAccessPortRule. + + All required parameters must be populated in order to send to Azure. + + :param number: Required. + :type number: int + :param protocol: Required. Possible values include: 'TCP', 'UDP', 'All' + :type protocol: str or ~azure.mgmt.security.models.Protocol + :param allowed_source_address_prefix: Mutually exclusive with the + "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, + for example "192.168.0.3" or "192.168.0.0/16". + :type allowed_source_address_prefix: str + :param allowed_source_address_prefixes: Mutually exclusive with the + "allowedSourceAddressPrefix" parameter. + :type allowed_source_address_prefixes: list[str] + :param max_request_access_duration: Required. Maximum duration requests + can be made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 + day + :type max_request_access_duration: str + """ + + _validation = { + 'number': {'required': True}, + 'protocol': {'required': True}, + 'max_request_access_duration': {'required': True}, + } + + _attribute_map = { + 'number': {'key': 'number', 'type': 'int'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, + 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, + 'max_request_access_duration': {'key': 'maxRequestAccessDuration', 'type': 'str'}, + } + + def __init__(self, *, number: int, protocol, max_request_access_duration: str, allowed_source_address_prefix: str=None, allowed_source_address_prefixes=None, **kwargs) -> None: + super(JitNetworkAccessPortRule, self).__init__(**kwargs) + self.number = number + self.protocol = protocol + self.allowed_source_address_prefix = allowed_source_address_prefix + self.allowed_source_address_prefixes = allowed_source_address_prefixes + self.max_request_access_duration = max_request_access_duration + + +class JitNetworkAccessRequest(Model): + """JitNetworkAccessRequest. + + All required parameters must be populated in order to send to Azure. + + :param virtual_machines: Required. + :type virtual_machines: + list[~azure.mgmt.security.models.JitNetworkAccessRequestVirtualMachine] + :param start_time_utc: Required. The start time of the request in UTC + :type start_time_utc: datetime + :param requestor: Required. The identity of the person who made the + request + :type requestor: str + :param justification: The justification for making the initiate request + :type justification: str + """ + + _validation = { + 'virtual_machines': {'required': True}, + 'start_time_utc': {'required': True}, + 'requestor': {'required': True}, + } + + _attribute_map = { + 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessRequestVirtualMachine]'}, + 'start_time_utc': {'key': 'startTimeUtc', 'type': 'iso-8601'}, + 'requestor': {'key': 'requestor', 'type': 'str'}, + 'justification': {'key': 'justification', 'type': 'str'}, + } + + def __init__(self, *, virtual_machines, start_time_utc, requestor: str, justification: str=None, **kwargs) -> None: + super(JitNetworkAccessRequest, self).__init__(**kwargs) + self.virtual_machines = virtual_machines + self.start_time_utc = start_time_utc + self.requestor = requestor + self.justification = justification + + +class JitNetworkAccessRequestPort(Model): + """JitNetworkAccessRequestPort. + + All required parameters must be populated in order to send to Azure. + + :param number: Required. + :type number: int + :param allowed_source_address_prefix: Mutually exclusive with the + "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, + for example "192.168.0.3" or "192.168.0.0/16". + :type allowed_source_address_prefix: str + :param allowed_source_address_prefixes: Mutually exclusive with the + "allowedSourceAddressPrefix" parameter. + :type allowed_source_address_prefixes: list[str] + :param end_time_utc: Required. The date & time at which the request ends + in UTC + :type end_time_utc: datetime + :param status: Required. The status of the port. Possible values include: + 'Revoked', 'Initiated' + :type status: str or ~azure.mgmt.security.models.Status + :param status_reason: Required. A description of why the `status` has its + value. Possible values include: 'Expired', 'UserRequested', + 'NewerRequestInitiated' + :type status_reason: str or ~azure.mgmt.security.models.StatusReason + :param mapped_port: The port which is mapped to this port's `number` in + the Azure Firewall, if applicable + :type mapped_port: int + """ + + _validation = { + 'number': {'required': True}, + 'end_time_utc': {'required': True}, + 'status': {'required': True}, + 'status_reason': {'required': True}, + } + + _attribute_map = { + 'number': {'key': 'number', 'type': 'int'}, + 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, + 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, + 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_reason': {'key': 'statusReason', 'type': 'str'}, + 'mapped_port': {'key': 'mappedPort', 'type': 'int'}, + } + + def __init__(self, *, number: int, end_time_utc, status, status_reason, allowed_source_address_prefix: str=None, allowed_source_address_prefixes=None, mapped_port: int=None, **kwargs) -> None: + super(JitNetworkAccessRequestPort, self).__init__(**kwargs) + self.number = number + self.allowed_source_address_prefix = allowed_source_address_prefix + self.allowed_source_address_prefixes = allowed_source_address_prefixes + self.end_time_utc = end_time_utc + self.status = status + self.status_reason = status_reason + self.mapped_port = mapped_port + + +class JitNetworkAccessRequestVirtualMachine(Model): + """JitNetworkAccessRequestVirtualMachine. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of the virtual machine that is linked to + this policy + :type id: str + :param ports: Required. The ports that were opened for the virtual machine + :type ports: list[~azure.mgmt.security.models.JitNetworkAccessRequestPort] + """ + + _validation = { + 'id': {'required': True}, + 'ports': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[JitNetworkAccessRequestPort]'}, + } + + def __init__(self, *, id: str, ports, **kwargs) -> None: + super(JitNetworkAccessRequestVirtualMachine, self).__init__(**kwargs) + self.id = id + self.ports = ports + + +class Kind(Model): + """Describes an Azure resource with kind. + + :param kind: Kind of the resource + :type kind: str + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(Kind, self).__init__(**kwargs) + self.kind = kind + + +class Location(Model): + """Describes an Azure resource with location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: Location where the resource is stored + :vartype location: str + """ + + _validation = { + 'location': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Location, self).__init__(**kwargs) + self.location = None + + +class Operation(Model): + """Possible operation in the REST API of Microsoft.Security. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the operation + :vartype name: str + :ivar origin: Where the operation is originated + :vartype origin: str + :param display: + :type display: ~azure.mgmt.security.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.origin = None + self.display = display + + +class OperationDisplay(Model): + """Security operation display. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The resource provider for the operation. + :vartype provider: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar operation: The display name of the security operation. + :vartype operation: str + :ivar description: The description of the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class PathRecommendation(Model): + """Represents a path that is recommended to be allowed and its properties. + + :param path: The full path to whitelist + :type path: str + :param action: Possible values include: 'Recommended', 'Add', 'Remove' + :type action: str or ~azure.mgmt.security.models.enum + :param type: Possible values include: 'File', 'FileHash', + 'PublisherSignature', 'ProductSignature', 'BinarySignature', + 'VersionAndAboveSignature' + :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 + :type common: bool + :param user_sids: + :type user_sids: list[str] + :param usernames: + :type usernames: list[~azure.mgmt.security.models.UserRecommendation] + :param file_type: Possible values include: 'Exe', 'Dll', 'Msi', 'Script', + 'Executable', 'Unknown' + :type file_type: str or ~azure.mgmt.security.models.enum + :param configuration_status: Possible values include: 'Configured', + 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + :type configuration_status: str or ~azure.mgmt.security.models.enum + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'publisher_info': {'key': 'publisherInfo', 'type': 'PublisherInfo'}, + 'common': {'key': 'common', 'type': 'bool'}, + 'user_sids': {'key': 'userSids', 'type': '[str]'}, + 'usernames': {'key': 'usernames', 'type': '[UserRecommendation]'}, + 'file_type': {'key': 'fileType', 'type': 'str'}, + 'configuration_status': {'key': 'configurationStatus', 'type': 'str'}, + } + + def __init__(self, *, path: str=None, action=None, type=None, publisher_info=None, common: bool=None, user_sids=None, usernames=None, file_type=None, configuration_status=None, **kwargs) -> None: + super(PathRecommendation, self).__init__(**kwargs) + self.path = path + self.action = action + self.type = type + self.publisher_info = publisher_info + self.common = common + self.user_sids = user_sids + self.usernames = usernames + self.file_type = file_type + self.configuration_status = configuration_status + + +class Pricing(Resource): + """Azure Security Center is provided in two pricing tiers: free and standard, + with the standard tier available with a trial period. The standard tier + offers advanced security capabilities, while the free tier offers basic + security features. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param pricing_tier: Required. The pricing tier value. Azure Security + Center is provided in two pricing tiers: free and standard, with the + standard tier available with a trial period. The standard tier offers + advanced security capabilities, while the free tier offers basic security + features. Possible values include: 'Free', 'Standard' + :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier + :ivar free_trial_remaining_time: The duration left for the subscriptions + free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). + :vartype free_trial_remaining_time: timedelta + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'pricing_tier': {'required': True}, + 'free_trial_remaining_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pricing_tier': {'key': 'properties.pricingTier', 'type': 'str'}, + 'free_trial_remaining_time': {'key': 'properties.freeTrialRemainingTime', 'type': 'duration'}, + } + + def __init__(self, *, pricing_tier, **kwargs) -> None: + super(Pricing, self).__init__(**kwargs) + self.pricing_tier = pricing_tier + self.free_trial_remaining_time = None + + +class PricingList(Model): + """List of pricing configurations response. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of pricing configurations + :type value: list[~azure.mgmt.security.models.Pricing] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Pricing]'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(PricingList, self).__init__(**kwargs) + self.value = value + + +class ProtectionMode(Model): + """The protection mode of the collection/file types. Exe/Msi/Script are used + for Windows, Executable is used for Linux. + + :param exe: Possible values include: 'Audit', 'Enforce', 'None' + :type exe: str or ~azure.mgmt.security.models.enum + :param msi: Possible values include: 'Audit', 'Enforce', 'None' + :type msi: str or ~azure.mgmt.security.models.enum + :param script: Possible values include: 'Audit', 'Enforce', 'None' + :type script: str or ~azure.mgmt.security.models.enum + :param executable: Possible values include: 'Audit', 'Enforce', 'None' + :type executable: str or ~azure.mgmt.security.models.enum + """ + + _attribute_map = { + 'exe': {'key': 'exe', 'type': 'str'}, + 'msi': {'key': 'msi', 'type': 'str'}, + 'script': {'key': 'script', 'type': 'str'}, + 'executable': {'key': 'executable', 'type': 'str'}, + } + + def __init__(self, *, exe=None, msi=None, script=None, executable=None, **kwargs) -> None: + super(ProtectionMode, self).__init__(**kwargs) + self.exe = exe + self.msi = msi + self.script = script + self.executable = executable + + +class PublisherInfo(Model): + """Represents the publisher information of a process/rule. + + :param publisher_name: The Subject field of the x.509 certificate used to + sign the code, using the following fields - O = Organization, L = + Locality, S = State or Province, and C = Country + :type publisher_name: str + :param product_name: The product name taken from the file's version + resource + :type product_name: str + :param binary_name: The "OriginalName" field taken from the file's version + resource + :type binary_name: str + :param version: The binary file version taken from the file's version + resource + :type version: str + """ + + _attribute_map = { + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'product_name': {'key': 'productName', 'type': 'str'}, + 'binary_name': {'key': 'binaryName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, publisher_name: str=None, product_name: str=None, binary_name: str=None, version: str=None, **kwargs) -> None: + super(PublisherInfo, self).__init__(**kwargs) + self.publisher_name = publisher_name + self.product_name = product_name + self.binary_name = binary_name + self.version = version + + +class RecommendationConfigurationProperties(Model): + """The type of IoT Security recommendation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param recommendation_type: Required. The type of IoT Security + recommendation. Possible values include: 'IoT_ACRAuthentication', + 'IoT_AgentSendsUnutilizedMessages', 'IoT_Baseline', + 'IoT_EdgeHubMemOptimize', 'IoT_EdgeLoggingOptions', + 'IoT_InconsistentModuleSettings', 'IoT_InstallAgent', + 'IoT_IPFilter_DenyAll', 'IoT_IPFilter_PermissiveRule', 'IoT_OpenPorts', + 'IoT_PermissiveFirewallPolicy', 'IoT_PermissiveInputFirewallRules', + 'IoT_PermissiveOutputFirewallRules', 'IoT_PrivilegedDockerOptions', + 'IoT_SharedCredentials', 'IoT_VulnerableTLSCipherSuite' + :type recommendation_type: str or + ~azure.mgmt.security.models.RecommendationType + :ivar name: + :vartype name: str + :param status: Required. Recommendation status. When the recommendation + status is disabled recommendations are not generated. Possible values + include: 'Disabled', 'Enabled'. Default value: "Enabled" . + :type status: str or + ~azure.mgmt.security.models.RecommendationConfigStatus + """ + + _validation = { + 'recommendation_type': {'required': True}, + 'name': {'readonly': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'recommendation_type': {'key': 'recommendationType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, recommendation_type, status="Enabled", **kwargs) -> None: + super(RecommendationConfigurationProperties, self).__init__(**kwargs) + self.recommendation_type = recommendation_type + self.name = None + self.status = status + + +class RegulatoryComplianceAssessment(Resource): + """Regulatory compliance assessment details and state. + + 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 description: The description of the regulatory compliance assessment + :vartype description: str + :ivar assessment_type: The expected type of assessment contained in the + AssessmentDetailsLink + :vartype assessment_type: str + :ivar assessment_details_link: Link to more detailed assessment results + data. The response type will be according to the assessmentType field + :vartype assessment_details_link: str + :param state: Aggregative state based on the assessment's scanned + resources states. Possible values include: 'Passed', 'Failed', 'Skipped', + 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_resources: The given assessment's related resources count + with passed state. + :vartype passed_resources: int + :ivar failed_resources: The given assessment's related resources count + with failed state. + :vartype failed_resources: int + :ivar skipped_resources: The given assessment's related resources count + with skipped state. + :vartype skipped_resources: int + :ivar unsupported_resources: The given assessment's related resources + count with unsupported state. + :vartype unsupported_resources: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'assessment_type': {'readonly': True}, + 'assessment_details_link': {'readonly': True}, + 'passed_resources': {'readonly': True}, + 'failed_resources': {'readonly': True}, + 'skipped_resources': {'readonly': True}, + 'unsupported_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'assessment_type': {'key': 'properties.assessmentType', 'type': 'str'}, + 'assessment_details_link': {'key': 'properties.assessmentDetailsLink', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_resources': {'key': 'properties.passedResources', 'type': 'int'}, + 'failed_resources': {'key': 'properties.failedResources', 'type': 'int'}, + 'skipped_resources': {'key': 'properties.skippedResources', 'type': 'int'}, + 'unsupported_resources': {'key': 'properties.unsupportedResources', 'type': 'int'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(RegulatoryComplianceAssessment, self).__init__(**kwargs) + self.description = None + self.assessment_type = None + self.assessment_details_link = None + self.state = state + self.passed_resources = None + self.failed_resources = None + self.skipped_resources = None + self.unsupported_resources = None + + +class RegulatoryComplianceControl(Resource): + """Regulatory compliance control details and state. + + 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 description: The description of the regulatory compliance control + :vartype description: str + :param state: Aggregative state based on the control's supported + assessments states. Possible values include: 'Passed', 'Failed', + 'Skipped', 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_assessments: The number of supported regulatory compliance + assessments of the given control with a passed state + :vartype passed_assessments: int + :ivar failed_assessments: The number of supported regulatory compliance + assessments of the given control with a failed state + :vartype failed_assessments: int + :ivar skipped_assessments: The number of supported regulatory compliance + assessments of the given control with a skipped state + :vartype skipped_assessments: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'passed_assessments': {'readonly': True}, + 'failed_assessments': {'readonly': True}, + 'skipped_assessments': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_assessments': {'key': 'properties.passedAssessments', 'type': 'int'}, + 'failed_assessments': {'key': 'properties.failedAssessments', 'type': 'int'}, + 'skipped_assessments': {'key': 'properties.skippedAssessments', 'type': 'int'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(RegulatoryComplianceControl, self).__init__(**kwargs) + self.description = None + self.state = state + self.passed_assessments = None + self.failed_assessments = None + self.skipped_assessments = None + + +class RegulatoryComplianceStandard(Resource): + """Regulatory compliance standard details and state. + + 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 state: Aggregative state based on the standard's supported controls + states. Possible values include: 'Passed', 'Failed', 'Skipped', + 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_controls: The number of supported regulatory compliance + controls of the given standard with a passed state + :vartype passed_controls: int + :ivar failed_controls: The number of supported regulatory compliance + controls of the given standard with a failed state + :vartype failed_controls: int + :ivar skipped_controls: The number of supported regulatory compliance + controls of the given standard with a skipped state + :vartype skipped_controls: int + :ivar unsupported_controls: The number of regulatory compliance controls + of the given standard which are unsupported by automated assessments + :vartype unsupported_controls: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'passed_controls': {'readonly': True}, + 'failed_controls': {'readonly': True}, + 'skipped_controls': {'readonly': True}, + 'unsupported_controls': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_controls': {'key': 'properties.passedControls', 'type': 'int'}, + 'failed_controls': {'key': 'properties.failedControls', 'type': 'int'}, + 'skipped_controls': {'key': 'properties.skippedControls', 'type': 'int'}, + 'unsupported_controls': {'key': 'properties.unsupportedControls', 'type': 'int'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(RegulatoryComplianceStandard, self).__init__(**kwargs) + self.state = state + self.passed_controls = None + self.failed_controls = None + self.skipped_controls = None + self.unsupported_controls = None + + +class SecurityContact(Resource): + """Contact details for security issues. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param email: Required. The email of this security contact + :type email: str + :param phone: The phone number of this security contact + :type phone: str + :param alert_notifications: Required. Whether to send security alerts + notifications to the security contact. Possible values include: 'On', + 'Off' + :type alert_notifications: str or + ~azure.mgmt.security.models.AlertNotifications + :param alerts_to_admins: Required. Whether to send security alerts + notifications to subscription admins. Possible values include: 'On', 'Off' + :type alerts_to_admins: str or ~azure.mgmt.security.models.AlertsToAdmins + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'email': {'required': True}, + 'alert_notifications': {'required': True}, + 'alerts_to_admins': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'email': {'key': 'properties.email', 'type': 'str'}, + 'phone': {'key': 'properties.phone', 'type': 'str'}, + 'alert_notifications': {'key': 'properties.alertNotifications', 'type': 'str'}, + 'alerts_to_admins': {'key': 'properties.alertsToAdmins', 'type': 'str'}, + } + + def __init__(self, *, email: str, alert_notifications, alerts_to_admins, phone: str=None, **kwargs) -> None: + super(SecurityContact, self).__init__(**kwargs) + self.email = email + self.phone = phone + self.alert_notifications = alert_notifications + self.alerts_to_admins = alerts_to_admins + + +class SecuritySubAssessment(Resource): + """Security sub-assessment on a resource. + + 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 security_sub_assessment_id: Vulnerability ID + :vartype security_sub_assessment_id: str + :ivar display_name: User friendly display name of the sub-assessment + :vartype display_name: str + :param status: + :type status: ~azure.mgmt.security.models.SubAssessmentStatus + :ivar remediation: Information on how to remediate this sub-assessment + :vartype remediation: str + :ivar impact: Description of the impact of this sub-assessment + :vartype impact: str + :ivar category: Category of the sub-assessment + :vartype category: str + :ivar description: Human readable description of the assessment status + :vartype description: str + :ivar time_generated: The date and time the sub-assessment was generated + :vartype time_generated: datetime + :param resource_details: + :type resource_details: ~azure.mgmt.security.models.ResourceDetails + :param additional_data: + :type additional_data: ~azure.mgmt.security.models.AdditionalData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'security_sub_assessment_id': {'readonly': True}, + 'display_name': {'readonly': True}, + 'remediation': {'readonly': True}, + 'impact': {'readonly': True}, + 'category': {'readonly': True}, + 'description': {'readonly': True}, + 'time_generated': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'security_sub_assessment_id': {'key': 'properties.id', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'SubAssessmentStatus'}, + 'remediation': {'key': 'properties.remediation', 'type': 'str'}, + 'impact': {'key': 'properties.impact', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'time_generated': {'key': 'properties.timeGenerated', 'type': 'iso-8601'}, + 'resource_details': {'key': 'properties.resourceDetails', 'type': 'ResourceDetails'}, + 'additional_data': {'key': 'properties.additionalData', 'type': 'AdditionalData'}, + } + + def __init__(self, *, status=None, resource_details=None, additional_data=None, **kwargs) -> None: + super(SecuritySubAssessment, self).__init__(**kwargs) + self.security_sub_assessment_id = None + self.display_name = None + self.status = status + self.remediation = None + self.impact = None + self.category = None + self.description = None + self.time_generated = None + self.resource_details = resource_details + self.additional_data = additional_data + + +class SecurityTask(Resource): + """Security task that we recommend to do in order to strengthen security. + + 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 state: State of the task (Active, Resolved etc.) + :vartype state: str + :ivar creation_time_utc: The time this task was discovered in UTC + :vartype creation_time_utc: datetime + :param security_task_parameters: + :type security_task_parameters: + ~azure.mgmt.security.models.SecurityTaskParameters + :ivar last_state_change_time_utc: The time this task's details were last + changed in UTC + :vartype last_state_change_time_utc: datetime + :ivar sub_state: Additional data on the state of the task + :vartype sub_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_time_utc': {'readonly': True}, + 'last_state_change_time_utc': {'readonly': True}, + 'sub_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'creation_time_utc': {'key': 'properties.creationTimeUtc', 'type': 'iso-8601'}, + 'security_task_parameters': {'key': 'properties.securityTaskParameters', 'type': 'SecurityTaskParameters'}, + 'last_state_change_time_utc': {'key': 'properties.lastStateChangeTimeUtc', 'type': 'iso-8601'}, + 'sub_state': {'key': 'properties.subState', 'type': 'str'}, + } + + def __init__(self, *, security_task_parameters=None, **kwargs) -> None: + super(SecurityTask, self).__init__(**kwargs) + self.state = None + self.creation_time_utc = None + self.security_task_parameters = security_task_parameters + self.last_state_change_time_utc = None + self.sub_state = None + + +class SecurityTaskParameters(Model): + """Changing set of properties, depending on the task type that is derived from + the name field. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar name: Name of the task type + :vartype name: str + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(SecurityTaskParameters, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.name = None + + +class SensitivityLabel(Model): + """The sensitivity label. + + :param display_name: The name of the sensitivity label. + :type display_name: str + :param order: The order of the sensitivity label. + :type order: float + :param enabled: Indicates whether the label is enabled or not. + :type enabled: bool + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'float'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, *, display_name: str=None, order: float=None, enabled: bool=None, **kwargs) -> None: + super(SensitivityLabel, self).__init__(**kwargs) + self.display_name = display_name + self.order = order + self.enabled = enabled + + +class ServerVulnerabilityAssessment(Resource): + """Describes the server vulnerability assessment details on a resource. + + 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 provisioning_state: The provisioningState of the vulnerability + assessment capability on the VM. Possible values include: 'Succeeded', + 'Failed', 'Canceled', 'Provisioning', 'Deprovisioning' + :vartype provisioning_state: str or ~azure.mgmt.security.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ServerVulnerabilityAssessment, self).__init__(**kwargs) + self.provisioning_state = None + + +class ServerVulnerabilityAssessmentsList(Model): + """List of server vulnerability assessments. + + :param value: + :type value: + list[~azure.mgmt.security.models.ServerVulnerabilityAssessment] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServerVulnerabilityAssessment]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(ServerVulnerabilityAssessmentsList, self).__init__(**kwargs) + self.value = value + + +class ServerVulnerabilityProperties(AdditionalData): + """Additional context fields for server vulnerability assessment. + + 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 assessed_resource_type: Required. Constant filled by server. + :type assessed_resource_type: str + :ivar type: Vulnerability Type. e.g: Vulnerability, Potential + Vulnerability, Information Gathered + :vartype type: str + :ivar cvss: Dictionary from cvss version to cvss details object + :vartype cvss: dict[str, ~azure.mgmt.security.models.CVSS] + :ivar patchable: Indicates whether a patch is available or not + :vartype patchable: bool + :ivar cve: List of CVEs + :vartype cve: list[~azure.mgmt.security.models.CVE] + :ivar threat: Threat name + :vartype threat: str + :ivar published_time: Published time + :vartype published_time: datetime + :ivar vendor_references: + :vartype vendor_references: + list[~azure.mgmt.security.models.VendorReference] + """ + + _validation = { + 'assessed_resource_type': {'required': True}, + 'type': {'readonly': True}, + 'cvss': {'readonly': True}, + 'patchable': {'readonly': True}, + 'cve': {'readonly': True}, + 'threat': {'readonly': True}, + 'published_time': {'readonly': True}, + 'vendor_references': {'readonly': True}, + } + + _attribute_map = { + 'assessed_resource_type': {'key': 'assessedResourceType', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'cvss': {'key': 'cvss', 'type': '{CVSS}'}, + 'patchable': {'key': 'patchable', 'type': 'bool'}, + 'cve': {'key': 'cve', 'type': '[CVE]'}, + 'threat': {'key': 'threat', 'type': 'str'}, + 'published_time': {'key': 'publishedTime', 'type': 'iso-8601'}, + 'vendor_references': {'key': 'vendorReferences', 'type': '[VendorReference]'}, + } + + def __init__(self, **kwargs) -> None: + super(ServerVulnerabilityProperties, self).__init__(**kwargs) + self.type = None + self.cvss = None + self.patchable = None + self.cve = None + self.threat = None + self.published_time = None + self.vendor_references = None + self.assessed_resource_type = 'ServerVulnerabilityAssessment' + + +class SqlServerVulnerabilityProperties(AdditionalData): + """Details of the 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 assessed_resource_type: Required. Constant filled by server. + :type assessed_resource_type: str + :ivar type: The resource type the sub assessment refers to in its resource + details + :vartype type: str + :ivar query: The T-SQL query that runs on your SQL database to perform the + particular check + :vartype query: str + """ + + _validation = { + 'assessed_resource_type': {'required': True}, + 'type': {'readonly': True}, + 'query': {'readonly': True}, + } + + _attribute_map = { + 'assessed_resource_type': {'key': 'assessedResourceType', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SqlServerVulnerabilityProperties, self).__init__(**kwargs) + self.type = None + self.query = None + self.assessed_resource_type = 'SqlServerVulnerability' + + +class SubAssessmentStatus(Model): + """Status of the sub-assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Programmatic code for the status of the assessment. Possible + values include: 'Healthy', 'Unhealthy', 'NotApplicable' + :vartype code: str or ~azure.mgmt.security.models.SubAssessmentStatusCode + :ivar cause: Programmatic code for the cause of the assessment status + :vartype cause: str + :ivar description: Human readable description of the assessment status + :vartype description: str + :ivar severity: The sub-assessment severity level. Possible values + include: 'Low', 'Medium', 'High' + :vartype severity: str or ~azure.mgmt.security.models.Severity + """ + + _validation = { + 'code': {'readonly': True}, + 'cause': {'readonly': True}, + 'description': {'readonly': True}, + 'severity': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'cause': {'key': 'cause', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubAssessmentStatus, self).__init__(**kwargs) + self.code = None + self.cause = None + self.description = None + self.severity = None + + +class Tags(Model): + """A list of key value pairs that describe the resource. + + :param tags: A list of key value pairs that describe the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(Tags, self).__init__(**kwargs) + self.tags = tags + + +class TagsResource(Model): + """A container holding only the Tags for a resource, allowing the user to + update the tags. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(TagsResource, self).__init__(**kwargs) + self.tags = tags + + +class ThresholdCustomAlertRule(CustomAlertRule): + """A custom alert rule that checks if a value (depends on the custom alert + type) is within the given range. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Status of the custom alert. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + :param min_threshold: Required. The minimum threshold. + :type min_threshold: int + :param max_threshold: Required. The maximum threshold. + :type max_threshold: int + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'min_threshold': {'required': True}, + 'max_threshold': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'min_threshold': {'key': 'minThreshold', 'type': 'int'}, + 'max_threshold': {'key': 'maxThreshold', 'type': 'int'}, + } + + def __init__(self, *, is_enabled: bool, rule_type: str, min_threshold: int, max_threshold: int, **kwargs) -> None: + super(ThresholdCustomAlertRule, self).__init__(is_enabled=is_enabled, rule_type=rule_type, **kwargs) + self.min_threshold = min_threshold + self.max_threshold = max_threshold + + +class TimeWindowCustomAlertRule(ThresholdCustomAlertRule): + """A custom alert rule that checks if the number of activities (depends on the + custom alert type) in a time window is within the given range. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Status of the custom alert. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + :param min_threshold: Required. The minimum threshold. + :type min_threshold: int + :param max_threshold: Required. The maximum threshold. + :type max_threshold: int + :param time_window_size: Required. The time window size in iso8601 format. + :type time_window_size: timedelta + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'min_threshold': {'required': True}, + 'max_threshold': {'required': True}, + 'time_window_size': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'min_threshold': {'key': 'minThreshold', 'type': 'int'}, + 'max_threshold': {'key': 'maxThreshold', 'type': 'int'}, + 'time_window_size': {'key': 'timeWindowSize', 'type': 'duration'}, + } + + def __init__(self, *, is_enabled: bool, rule_type: str, min_threshold: int, max_threshold: int, time_window_size, **kwargs) -> None: + super(TimeWindowCustomAlertRule, self).__init__(is_enabled=is_enabled, rule_type=rule_type, min_threshold=min_threshold, max_threshold=max_threshold, **kwargs) + self.time_window_size = time_window_size + + +class TopologyResource(Model): + """TopologyResource. + + 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 + :ivar calculated_date_time: The UTC time on which the topology was + calculated + :vartype calculated_date_time: datetime + :ivar topology_resources: Azure resources which are part of this topology + resource + :vartype topology_resources: + list[~azure.mgmt.security.models.TopologySingleResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'calculated_date_time': {'readonly': True}, + 'topology_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, + 'topology_resources': {'key': 'properties.topologyResources', 'type': '[TopologySingleResource]'}, + } + + def __init__(self, **kwargs) -> None: + super(TopologyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.calculated_date_time = None + self.topology_resources = None + + +class TopologySingleResource(Model): + """TopologySingleResource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_id: Azure resource id + :vartype resource_id: str + :ivar severity: The security severity of the resource + :vartype severity: str + :ivar recommendations_exist: Indicates if the resource has security + recommendations + :vartype recommendations_exist: bool + :ivar network_zones: Indicates the resource connectivity level to the + Internet (InternetFacing, Internal ,etc.) + :vartype network_zones: str + :ivar topology_score: Score of the resource based on its security severity + :vartype topology_score: int + :ivar location: The location of this resource + :vartype location: str + :ivar parents: Azure resources connected to this resource which are in + higher level in the topology view + :vartype parents: + list[~azure.mgmt.security.models.TopologySingleResourceParent] + :ivar children: Azure resources connected to this resource which are in + lower level in the topology view + :vartype children: + list[~azure.mgmt.security.models.TopologySingleResourceChild] + """ + + _validation = { + 'resource_id': {'readonly': True}, + 'severity': {'readonly': True}, + 'recommendations_exist': {'readonly': True}, + 'network_zones': {'readonly': True}, + 'topology_score': {'readonly': True}, + 'location': {'readonly': True}, + 'parents': {'readonly': True}, + 'children': {'readonly': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + 'recommendations_exist': {'key': 'recommendationsExist', 'type': 'bool'}, + 'network_zones': {'key': 'networkZones', 'type': 'str'}, + 'topology_score': {'key': 'topologyScore', 'type': 'int'}, + 'location': {'key': 'location', 'type': 'str'}, + 'parents': {'key': 'parents', 'type': '[TopologySingleResourceParent]'}, + 'children': {'key': 'children', 'type': '[TopologySingleResourceChild]'}, + } + + def __init__(self, **kwargs) -> None: + super(TopologySingleResource, self).__init__(**kwargs) + self.resource_id = None + self.severity = None + self.recommendations_exist = None + self.network_zones = None + self.topology_score = None + self.location = None + self.parents = None + self.children = None + + +class TopologySingleResourceChild(Model): + """TopologySingleResourceChild. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_id: Azure resource id which serves as child resource in + topology view + :vartype resource_id: str + """ + + _validation = { + 'resource_id': {'readonly': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(TopologySingleResourceChild, self).__init__(**kwargs) + self.resource_id = None + + +class TopologySingleResourceParent(Model): + """TopologySingleResourceParent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_id: Azure resource id which serves as parent resource in + topology view + :vartype resource_id: str + """ + + _validation = { + 'resource_id': {'readonly': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(TopologySingleResourceParent, self).__init__(**kwargs) + self.resource_id = None + + +class UpdateIotSecuritySolutionData(TagsResource): + """UpdateIotSecuritySolutionData. + + :param tags: Resource tags + :type tags: dict[str, str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'user_defined_resources': {'key': 'properties.userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'recommendations_configuration': {'key': 'properties.recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, *, tags=None, user_defined_resources=None, recommendations_configuration=None, **kwargs) -> None: + super(UpdateIotSecuritySolutionData, self).__init__(tags=tags, **kwargs) + self.user_defined_resources = user_defined_resources + self.recommendations_configuration = recommendations_configuration + + +class UserDefinedResourcesProperties(Model): + """Properties of the IoT Security solution's user defined resources. + + All required parameters must be populated in order to send to Azure. + + :param query: Required. Azure Resource Graph query which represents the + security solution's user defined resources. Required to start with "where + type != "Microsoft.Devices/IotHubs"" + :type query: str + :param query_subscriptions: Required. List of Azure subscription ids on + which the user defined resources query should be executed. + :type query_subscriptions: list[str] + """ + + _validation = { + 'query': {'required': True}, + 'query_subscriptions': {'required': True}, + } + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'}, + 'query_subscriptions': {'key': 'querySubscriptions', 'type': '[str]'}, + } + + def __init__(self, *, query: str, query_subscriptions, **kwargs) -> None: + super(UserDefinedResourcesProperties, self).__init__(**kwargs) + self.query = query + self.query_subscriptions = query_subscriptions + + +class UserRecommendation(Model): + """Represents a user that is recommended to be allowed for a certain rule. + + :param username: Represents a user that is recommended to be allowed for a + certain rule + :type username: str + :param recommendation_action: Possible values include: 'Recommended', + 'Add', 'Remove' + :type recommendation_action: str or ~azure.mgmt.security.models.enum + """ + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'recommendation_action': {'key': 'recommendationAction', 'type': 'str'}, + } + + def __init__(self, *, username: str=None, recommendation_action=None, **kwargs) -> None: + super(UserRecommendation, self).__init__(**kwargs) + self.username = username + self.recommendation_action = recommendation_action + + +class VendorReference(Model): + """Vendor reference. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar title: Link title + :vartype title: str + :ivar link: Link url + :vartype link: str + """ + + _validation = { + 'title': {'readonly': True}, + 'link': {'readonly': True}, + } + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'link': {'key': 'link', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(VendorReference, self).__init__(**kwargs) + self.title = None + self.link = None + + +class VmRecommendation(Model): + """Represents a machine that is part of a VM/server group. + + :param configuration_status: Possible values include: 'Configured', + 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + :type configuration_status: str or ~azure.mgmt.security.models.enum + :param recommendation_action: Possible values include: 'Recommended', + 'Add', 'Remove' + :type recommendation_action: str or ~azure.mgmt.security.models.enum + :param resource_id: + :type resource_id: str + """ + + _attribute_map = { + 'configuration_status': {'key': 'configurationStatus', 'type': 'str'}, + 'recommendation_action': {'key': 'recommendationAction', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, *, configuration_status=None, recommendation_action=None, resource_id: str=None, **kwargs) -> None: + super(VmRecommendation, self).__init__(**kwargs) + self.configuration_status = configuration_status + self.recommendation_action = recommendation_action + self.resource_id = resource_id + + +class WorkspaceSetting(Resource): + """Configures where to store the OMS agent data for workspaces under a scope. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param workspace_id: Required. The full Azure ID of the workspace to save + the data in + :type workspace_id: str + :param scope: Required. All the VMs in this scope will send their security + data to the mentioned workspace unless overridden by a setting with more + specific scope + :type scope: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'workspace_id': {'required': True}, + 'scope': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + } + + def __init__(self, *, workspace_id: str, scope: str, **kwargs) -> None: + super(WorkspaceSetting, self).__init__(**kwargs) + self.workspace_id = workspace_id + self.scope = scope 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 new file mode 100644 index 000000000000..41a6d0fac11c --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py @@ -0,0 +1,339 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ComplianceResultPaged(Paged): + """ + A paging container for iterating over a list of :class:`ComplianceResult ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ComplianceResult]'} + } + + def __init__(self, *args, **kwargs): + + super(ComplianceResultPaged, self).__init__(*args, **kwargs) +class AlertPaged(Paged): + """ + A paging container for iterating over a list of :class:`Alert ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Alert]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertPaged, self).__init__(*args, **kwargs) +class SettingPaged(Paged): + """ + A paging container for iterating over a list of :class:`Setting ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Setting]'} + } + + def __init__(self, *args, **kwargs): + + super(SettingPaged, self).__init__(*args, **kwargs) +class DeviceSecurityGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`DeviceSecurityGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DeviceSecurityGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(DeviceSecurityGroupPaged, self).__init__(*args, **kwargs) +class IoTSecuritySolutionModelPaged(Paged): + """ + A paging container for iterating over a list of :class:`IoTSecuritySolutionModel ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IoTSecuritySolutionModel]'} + } + + def __init__(self, *args, **kwargs): + + super(IoTSecuritySolutionModelPaged, self).__init__(*args, **kwargs) +class IoTSecurityAggregatedAlertPaged(Paged): + """ + A paging container for iterating over a list of :class:`IoTSecurityAggregatedAlert ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IoTSecurityAggregatedAlert]'} + } + + def __init__(self, *args, **kwargs): + + super(IoTSecurityAggregatedAlertPaged, self).__init__(*args, **kwargs) +class IoTSecurityAggregatedRecommendationPaged(Paged): + """ + A paging container for iterating over a list of :class:`IoTSecurityAggregatedRecommendation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IoTSecurityAggregatedRecommendation]'} + } + + def __init__(self, *args, **kwargs): + + super(IoTSecurityAggregatedRecommendationPaged, self).__init__(*args, **kwargs) +class AllowedConnectionsResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`AllowedConnectionsResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AllowedConnectionsResource]'} + } + + def __init__(self, *args, **kwargs): + + super(AllowedConnectionsResourcePaged, self).__init__(*args, **kwargs) +class DiscoveredSecuritySolutionPaged(Paged): + """ + A paging container for iterating over a list of :class:`DiscoveredSecuritySolution ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DiscoveredSecuritySolution]'} + } + + def __init__(self, *args, **kwargs): + + super(DiscoveredSecuritySolutionPaged, self).__init__(*args, **kwargs) +class ExternalSecuritySolutionPaged(Paged): + """ + A paging container for iterating over a list of :class:`ExternalSecuritySolution ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ExternalSecuritySolution]'} + } + + def __init__(self, *args, **kwargs): + + super(ExternalSecuritySolutionPaged, self).__init__(*args, **kwargs) +class JitNetworkAccessPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`JitNetworkAccessPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JitNetworkAccessPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(JitNetworkAccessPolicyPaged, self).__init__(*args, **kwargs) +class AscLocationPaged(Paged): + """ + A paging container for iterating over a list of :class:`AscLocation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AscLocation]'} + } + + def __init__(self, *args, **kwargs): + + super(AscLocationPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class SecurityTaskPaged(Paged): + """ + A paging container for iterating over a list of :class:`SecurityTask ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SecurityTask]'} + } + + def __init__(self, *args, **kwargs): + + super(SecurityTaskPaged, self).__init__(*args, **kwargs) +class TopologyResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`TopologyResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TopologyResource]'} + } + + def __init__(self, *args, **kwargs): + + super(TopologyResourcePaged, self).__init__(*args, **kwargs) +class AutoProvisioningSettingPaged(Paged): + """ + A paging container for iterating over a list of :class:`AutoProvisioningSetting ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AutoProvisioningSetting]'} + } + + def __init__(self, *args, **kwargs): + + super(AutoProvisioningSettingPaged, self).__init__(*args, **kwargs) +class CompliancePaged(Paged): + """ + A paging container for iterating over a list of :class:`Compliance ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Compliance]'} + } + + def __init__(self, *args, **kwargs): + + super(CompliancePaged, self).__init__(*args, **kwargs) +class InformationProtectionPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`InformationProtectionPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InformationProtectionPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(InformationProtectionPolicyPaged, self).__init__(*args, **kwargs) +class SecurityContactPaged(Paged): + """ + A paging container for iterating over a list of :class:`SecurityContact ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SecurityContact]'} + } + + def __init__(self, *args, **kwargs): + + super(SecurityContactPaged, self).__init__(*args, **kwargs) +class WorkspaceSettingPaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkspaceSetting ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkspaceSetting]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkspaceSettingPaged, self).__init__(*args, **kwargs) +class RegulatoryComplianceStandardPaged(Paged): + """ + A paging container for iterating over a list of :class:`RegulatoryComplianceStandard ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RegulatoryComplianceStandard]'} + } + + def __init__(self, *args, **kwargs): + + super(RegulatoryComplianceStandardPaged, self).__init__(*args, **kwargs) +class RegulatoryComplianceControlPaged(Paged): + """ + A paging container for iterating over a list of :class:`RegulatoryComplianceControl ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RegulatoryComplianceControl]'} + } + + def __init__(self, *args, **kwargs): + + super(RegulatoryComplianceControlPaged, self).__init__(*args, **kwargs) +class RegulatoryComplianceAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`RegulatoryComplianceAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RegulatoryComplianceAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(RegulatoryComplianceAssessmentPaged, self).__init__(*args, **kwargs) +class SecuritySubAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`SecuritySubAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SecuritySubAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(SecuritySubAssessmentPaged, self).__init__(*args, **kwargs) +class AutomationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Automation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Automation]'} + } + + def __init__(self, *args, **kwargs): + + super(AutomationPaged, 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 new file mode 100644 index 000000000000..2c0c22d2b47b --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py @@ -0,0 +1,209 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class ResourceStatus(str, Enum): + + healthy = "Healthy" #: This assessment on the resource is healthy + not_applicable = "NotApplicable" #: This assessment is not applicable to this resource + off_by_policy = "OffByPolicy" #: This assessment is turned off by policy on this subscription + not_healthy = "NotHealthy" #: This assessment on the resource is not healthy + + +class PricingTier(str, Enum): + + free = "Free" #: Get free Azure security center experience with basic security features + standard = "Standard" #: Get the standard Azure security center experience with advanced security features + + +class ReportedSeverity(str, Enum): + + informational = "Informational" + low = "Low" + medium = "Medium" + high = "High" + + +class SettingKind(str, Enum): + + data_export_setting = "DataExportSetting" + alert_suppression_setting = "AlertSuppressionSetting" + + +class ValueType(str, Enum): + + ip_cidr = "IpCidr" #: An IP range in CIDR format (e.g. '192.168.0.1/8'). + string = "String" #: Any string value. + + +class SecuritySolutionStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class ExportData(str, Enum): + + raw_events = "RawEvents" #: Agent raw events + + +class DataSource(str, Enum): + + twin_data = "TwinData" #: Devices twin data + + +class RecommendationType(str, Enum): + + io_t_acrauthentication = "IoT_ACRAuthentication" #: Authentication schema used for pull an edge module from an ACR repository does not use Service Principal Authentication. + io_t_agent_sends_unutilized_messages = "IoT_AgentSendsUnutilizedMessages" #: IoT agent message size capacity is currently underutilized, causing an increase in the number of sent messages. Adjust message intervals for better utilization. + io_t_baseline = "IoT_Baseline" #: Identified security related system configuration issues. + io_t_edge_hub_mem_optimize = "IoT_EdgeHubMemOptimize" #: You can optimize Edge Hub memory usage by turning off protocol heads for any protocols not used by Edge modules in your solution. + io_t_edge_logging_options = "IoT_EdgeLoggingOptions" #: Logging is disabled for this edge module. + io_t_inconsistent_module_settings = "IoT_InconsistentModuleSettings" #: A minority within a device security group has inconsistent Edge Module settings with the rest of their group. + io_t_install_agent = "IoT_InstallAgent" #: Install the Azure Security of Things Agent. + io_t_ipfilter_deny_all = "IoT_IPFilter_DenyAll" #: IP Filter Configuration should have rules defined for allowed traffic and should deny all other traffic by default. + io_t_ipfilter_permissive_rule = "IoT_IPFilter_PermissiveRule" #: An Allow IP Filter rules source IP range is too large. Overly permissive rules might expose your IoT hub to malicious intenders. + io_t_open_ports = "IoT_OpenPorts" #: A listening endpoint was found on the device. + io_t_permissive_firewall_policy = "IoT_PermissiveFirewallPolicy" #: An Allowed firewall policy was found (INPUT/OUTPUT). The policy should Deny all traffic by default and define rules to allow necessary communication to/from the device. + io_t_permissive_input_firewall_rules = "IoT_PermissiveInputFirewallRules" #: A rule in the firewall has been found that contains a permissive pattern for a wide range of IP addresses or Ports. + io_t_permissive_output_firewall_rules = "IoT_PermissiveOutputFirewallRules" #: A rule in the firewall has been found that contains a permissive pattern for a wide range of IP addresses or Ports. + io_t_privileged_docker_options = "IoT_PrivilegedDockerOptions" #: Edge module is configured to run in privileged mode, with extensive Linux capabilities or with host-level network access (send/receive data to host machine). + io_t_shared_credentials = "IoT_SharedCredentials" #: Same authentication credentials to the IoT Hub used by multiple devices. This could indicate an illegitimate device impersonating a legitimate device. It also exposes the risk of device impersonation by an attacker. + io_t_vulnerable_tls_cipher_suite = "IoT_VulnerableTLSCipherSuite" #: Insecure TLS configurations detected. Immediate upgrade recommended. + + +class RecommendationConfigStatus(str, Enum): + + disabled = "Disabled" + enabled = "Enabled" + + +class UnmaskedIpLoggingStatus(str, Enum): + + disabled = "Disabled" #: Unmasked IP logging is disabled + enabled = "Enabled" #: Unmasked IP logging is enabled + + +class SecurityFamily(str, Enum): + + waf = "Waf" + ngfw = "Ngfw" + saas_waf = "SaasWaf" + va = "Va" + + +class AadConnectivityState(str, Enum): + + discovered = "Discovered" + not_licensed = "NotLicensed" + connected = "Connected" + + +class ExternalSecuritySolutionKind(str, Enum): + + cef = "CEF" + ata = "ATA" + aad = "AAD" + + +class Protocol(str, Enum): + + tcp = "TCP" + udp = "UDP" + all = "*" + + +class Status(str, Enum): + + revoked = "Revoked" + initiated = "Initiated" + + +class StatusReason(str, Enum): + + expired = "Expired" + user_requested = "UserRequested" + newer_request_initiated = "NewerRequestInitiated" + + +class AutoProvision(str, Enum): + + on = "On" #: Install missing security agent on VMs automatically + off = "Off" #: Do not install security agent on the VMs automatically + + +class AlertNotifications(str, Enum): + + on = "On" #: Get notifications on new alerts + off = "Off" #: Don't get notifications on new alerts + + +class AlertsToAdmins(str, Enum): + + on = "On" #: Send notification on new alerts to the subscription's admins + off = "Off" #: Don't send notification on new alerts to the subscription's admins + + +class State(str, Enum): + + passed = "Passed" #: All supported regulatory compliance controls in the given standard have a passed state + failed = "Failed" #: At least one supported regulatory compliance control in the given standard has a state of failed + skipped = "Skipped" #: All supported regulatory compliance controls in the given standard have a state of skipped + unsupported = "Unsupported" #: No supported regulatory compliance data for the given standard + + +class SubAssessmentStatusCode(str, Enum): + + healthy = "Healthy" #: The resource is healthy + unhealthy = "Unhealthy" #: The resource has a security issue that needs to be addressed + not_applicable = "NotApplicable" #: Assessment for this resource did not happen + + +class Severity(str, Enum): + + low = "Low" + medium = "Medium" + high = "High" + + +class EventSource(str, Enum): + + assessments = "Assessments" + alerts = "Alerts" + + +class PropertyType(str, Enum): + + string = "String" + integer = "Integer" + number = "Number" + boolean = "Boolean" + + +class Operator(str, Enum): + + equals = "Equals" + greater_than = "GreaterThan" + greater_than_or_equal_to = "GreaterThanOrEqualTo" + lesser_than = "LesserThan" + lesser_than_or_equal_to = "LesserThanOrEqualTo" + not_equals = "NotEquals" + contains = "Contains" + starts_with = "StartsWith" + ends_with = "EndsWith" + + +class ConnectionType(str, Enum): + + internal = "Internal" + external = "External" diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1.py deleted file mode 100644 index 7feb6e549272..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AadConnectivityState1(Model): - """Describes an Azure resource with kind. - - :param connectivity_state: The connectivity state of the external AAD - solution . Possible values include: 'Discovered', 'NotLicensed', - 'Connected' - :type connectivity_state: str or - ~azure.mgmt.security.models.AadConnectivityState - """ - - _attribute_map = { - 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AadConnectivityState1, self).__init__(**kwargs) - self.connectivity_state = kwargs.get('connectivity_state', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1_py3.py deleted file mode 100644 index 7c699ec9d77e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AadConnectivityState1(Model): - """Describes an Azure resource with kind. - - :param connectivity_state: The connectivity state of the external AAD - solution . Possible values include: 'Discovered', 'NotLicensed', - 'Connected' - :type connectivity_state: str or - ~azure.mgmt.security.models.AadConnectivityState - """ - - _attribute_map = { - 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, - } - - def __init__(self, *, connectivity_state=None, **kwargs) -> None: - super(AadConnectivityState1, self).__init__(**kwargs) - self.connectivity_state = connectivity_state diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution.py deleted file mode 100644 index da55d84dfdad..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .external_security_solution import ExternalSecuritySolution - - -class AadExternalSecuritySolution(ExternalSecuritySolution): - """Represents an AAD identity protection solution which sends logs to an OMS - workspace. - - 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 kind: Required. Constant filled by server. - :type kind: str - :param properties: - :type properties: ~azure.mgmt.security.models.AadSolutionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AadSolutionProperties'}, - } - - def __init__(self, **kwargs): - super(AadExternalSecuritySolution, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.kind = 'AAD' diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution_py3.py deleted file mode 100644 index 893a2efac215..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .external_security_solution_py3 import ExternalSecuritySolution - - -class AadExternalSecuritySolution(ExternalSecuritySolution): - """Represents an AAD identity protection solution which sends logs to an OMS - workspace. - - 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 kind: Required. Constant filled by server. - :type kind: str - :param properties: - :type properties: ~azure.mgmt.security.models.AadSolutionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AadSolutionProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AadExternalSecuritySolution, self).__init__(**kwargs) - self.properties = properties - self.kind = 'AAD' diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties.py deleted file mode 100644 index 44c62d15869c..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AadSolutionProperties(Model): - """The external security solution properties for AAD solutions. - - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - :param connectivity_state: The connectivity state of the external AAD - solution . Possible values include: 'Discovered', 'NotLicensed', - 'Connected' - :type connectivity_state: str or - ~azure.mgmt.security.models.AadConnectivityState - """ - - _attribute_map = { - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AadSolutionProperties, self).__init__(**kwargs) - self.device_vendor = kwargs.get('device_vendor', None) - self.device_type = kwargs.get('device_type', None) - self.workspace = kwargs.get('workspace', None) - self.connectivity_state = kwargs.get('connectivity_state', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties_py3.py deleted file mode 100644 index 4acc4804aa08..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AadSolutionProperties(Model): - """The external security solution properties for AAD solutions. - - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - :param connectivity_state: The connectivity state of the external AAD - solution . Possible values include: 'Discovered', 'NotLicensed', - 'Connected' - :type connectivity_state: str or - ~azure.mgmt.security.models.AadConnectivityState - """ - - _attribute_map = { - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, - } - - def __init__(self, *, device_vendor: str=None, device_type: str=None, workspace=None, connectivity_state=None, **kwargs) -> None: - super(AadSolutionProperties, self).__init__(**kwargs) - self.device_vendor = device_vendor - self.device_type = device_type - self.workspace = workspace - self.connectivity_state = connectivity_state diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting.py deleted file mode 100644 index 722352481320..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AdvancedThreatProtectionSetting(Resource): - """The Advanced Threat Protection resource. - - 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 is_enabled: Indicates whether Advanced Threat Protection is - enabled. - :type is_enabled: bool - """ - - _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'}, - 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AdvancedThreatProtectionSetting, self).__init__(**kwargs) - self.is_enabled = kwargs.get('is_enabled', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting_py3.py deleted file mode 100644 index 66ed9c5fe2ec..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AdvancedThreatProtectionSetting(Resource): - """The Advanced Threat Protection resource. - - 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 is_enabled: Indicates whether Advanced Threat Protection is - enabled. - :type is_enabled: bool - """ - - _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'}, - 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, - } - - def __init__(self, *, is_enabled: bool=None, **kwargs) -> None: - super(AdvancedThreatProtectionSetting, self).__init__(**kwargs) - self.is_enabled = is_enabled diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert.py deleted file mode 100644 index a467fe8ffcbb..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Alert(Resource): - """Security alert. - - 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 state: State of the alert (Active, Dismissed etc.) - :vartype state: str - :ivar reported_time_utc: The time the incident was reported to - Microsoft.Security in UTC - :vartype reported_time_utc: datetime - :ivar vendor_name: Name of the vendor that discovered the incident - :vartype vendor_name: str - :ivar alert_name: Name of the alert type - :vartype alert_name: str - :ivar alert_display_name: Display name of the alert type - :vartype alert_display_name: str - :ivar detected_time_utc: The time the incident was detected by the vendor - :vartype detected_time_utc: datetime - :ivar description: Description of the incident and what it means - :vartype description: str - :ivar remediation_steps: Recommended steps to reradiate the incident - :vartype remediation_steps: str - :ivar action_taken: The action that was taken as a response to the alert - (Active, Blocked etc.) - :vartype action_taken: str - :ivar reported_severity: Estimated severity of this alert. Possible values - include: 'Informational', 'Low', 'Medium', 'High' - :vartype reported_severity: str or - ~azure.mgmt.security.models.ReportedSeverity - :ivar compromised_entity: The entity that the incident happened on - :vartype compromised_entity: str - :ivar associated_resource: Azure resource ID of the associated resource - :vartype associated_resource: str - :param extended_properties: - :type extended_properties: dict[str, object] - :ivar system_source: The type of the alerted resource (Azure, Non-Azure) - :vartype system_source: str - :ivar can_be_investigated: Whether this alert can be investigated with - Azure Security Center - :vartype can_be_investigated: bool - :ivar is_incident: Whether this alert is for incident type or not - (otherwise - single alert) - :vartype is_incident: bool - :param entities: objects that are related to this alerts - :type entities: list[~azure.mgmt.security.models.AlertEntity] - :ivar confidence_score: level of confidence we have on the alert - :vartype confidence_score: float - :param confidence_reasons: reasons the alert got the confidenceScore value - :type confidence_reasons: - list[~azure.mgmt.security.models.AlertConfidenceReason] - :ivar subscription_id: Azure subscription ID of the resource that had the - security alert or the subscription ID of the workspace that this resource - reports to - :vartype subscription_id: str - :ivar instance_id: Instance ID of the alert. - :vartype instance_id: str - :ivar workspace_arm_id: Azure resource ID of the workspace that the alert - was reported to. - :vartype workspace_arm_id: str - :ivar correlation_key: Alerts with the same CorrelationKey will be grouped - together in Ibiza. - :vartype correlation_key: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'reported_time_utc': {'readonly': True}, - 'vendor_name': {'readonly': True}, - 'alert_name': {'readonly': True}, - 'alert_display_name': {'readonly': True}, - 'detected_time_utc': {'readonly': True}, - 'description': {'readonly': True}, - 'remediation_steps': {'readonly': True}, - 'action_taken': {'readonly': True}, - 'reported_severity': {'readonly': True}, - 'compromised_entity': {'readonly': True}, - 'associated_resource': {'readonly': True}, - 'system_source': {'readonly': True}, - 'can_be_investigated': {'readonly': True}, - 'is_incident': {'readonly': True}, - 'confidence_score': {'readonly': True, 'maximum': 1, 'minimum': 0}, - 'subscription_id': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'workspace_arm_id': {'readonly': True}, - 'correlation_key': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'reported_time_utc': {'key': 'properties.reportedTimeUtc', 'type': 'iso-8601'}, - 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, - 'alert_name': {'key': 'properties.alertName', 'type': 'str'}, - 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, - 'detected_time_utc': {'key': 'properties.detectedTimeUtc', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, - 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, - 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, - 'compromised_entity': {'key': 'properties.compromisedEntity', 'type': 'str'}, - 'associated_resource': {'key': 'properties.associatedResource', 'type': 'str'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{object}'}, - 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, - 'can_be_investigated': {'key': 'properties.canBeInvestigated', 'type': 'bool'}, - 'is_incident': {'key': 'properties.isIncident', 'type': 'bool'}, - 'entities': {'key': 'properties.entities', 'type': '[AlertEntity]'}, - 'confidence_score': {'key': 'properties.confidenceScore', 'type': 'float'}, - 'confidence_reasons': {'key': 'properties.confidenceReasons', 'type': '[AlertConfidenceReason]'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'workspace_arm_id': {'key': 'properties.workspaceArmId', 'type': 'str'}, - 'correlation_key': {'key': 'properties.correlationKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Alert, self).__init__(**kwargs) - self.state = None - self.reported_time_utc = None - self.vendor_name = None - self.alert_name = None - self.alert_display_name = None - self.detected_time_utc = None - self.description = None - self.remediation_steps = None - self.action_taken = None - self.reported_severity = None - self.compromised_entity = None - self.associated_resource = None - self.extended_properties = kwargs.get('extended_properties', None) - self.system_source = None - self.can_be_investigated = None - self.is_incident = None - self.entities = kwargs.get('entities', None) - self.confidence_score = None - self.confidence_reasons = kwargs.get('confidence_reasons', None) - self.subscription_id = None - self.instance_id = None - self.workspace_arm_id = None - self.correlation_key = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason.py deleted file mode 100644 index ddbfc3dae2ec..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertConfidenceReason(Model): - """Factors that increase our confidence that the alert is a true positive. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: Type of confidence factor - :vartype type: str - :ivar reason: description of the confidence reason - :vartype reason: str - """ - - _validation = { - 'type': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AlertConfidenceReason, self).__init__(**kwargs) - self.type = None - self.reason = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason_py3.py deleted file mode 100644 index ff57f840a16d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertConfidenceReason(Model): - """Factors that increase our confidence that the alert is a true positive. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: Type of confidence factor - :vartype type: str - :ivar reason: description of the confidence reason - :vartype reason: str - """ - - _validation = { - 'type': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(AlertConfidenceReason, self).__init__(**kwargs) - self.type = None - self.reason = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity.py deleted file mode 100644 index 1dd8ca41529a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertEntity(Model): - """Changing set of properties depending on the entity type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar type: Type of entity - :vartype type: str - """ - - _validation = { - 'type': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AlertEntity, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.type = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity_py3.py deleted file mode 100644 index 1f8de5415ff7..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertEntity(Model): - """Changing set of properties depending on the entity type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar type: Type of entity - :vartype type: str - """ - - _validation = { - 'type': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(AlertEntity, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.type = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_paged.py deleted file mode 100644 index 8fd844916438..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AlertPaged(Paged): - """ - A paging container for iterating over a list of :class:`Alert ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Alert]'} - } - - def __init__(self, *args, **kwargs): - - super(AlertPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py deleted file mode 100644 index 95007f9bb77a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Alert(Resource): - """Security alert. - - 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 state: State of the alert (Active, Dismissed etc.) - :vartype state: str - :ivar reported_time_utc: The time the incident was reported to - Microsoft.Security in UTC - :vartype reported_time_utc: datetime - :ivar vendor_name: Name of the vendor that discovered the incident - :vartype vendor_name: str - :ivar alert_name: Name of the alert type - :vartype alert_name: str - :ivar alert_display_name: Display name of the alert type - :vartype alert_display_name: str - :ivar detected_time_utc: The time the incident was detected by the vendor - :vartype detected_time_utc: datetime - :ivar description: Description of the incident and what it means - :vartype description: str - :ivar remediation_steps: Recommended steps to reradiate the incident - :vartype remediation_steps: str - :ivar action_taken: The action that was taken as a response to the alert - (Active, Blocked etc.) - :vartype action_taken: str - :ivar reported_severity: Estimated severity of this alert. Possible values - include: 'Informational', 'Low', 'Medium', 'High' - :vartype reported_severity: str or - ~azure.mgmt.security.models.ReportedSeverity - :ivar compromised_entity: The entity that the incident happened on - :vartype compromised_entity: str - :ivar associated_resource: Azure resource ID of the associated resource - :vartype associated_resource: str - :param extended_properties: - :type extended_properties: dict[str, object] - :ivar system_source: The type of the alerted resource (Azure, Non-Azure) - :vartype system_source: str - :ivar can_be_investigated: Whether this alert can be investigated with - Azure Security Center - :vartype can_be_investigated: bool - :ivar is_incident: Whether this alert is for incident type or not - (otherwise - single alert) - :vartype is_incident: bool - :param entities: objects that are related to this alerts - :type entities: list[~azure.mgmt.security.models.AlertEntity] - :ivar confidence_score: level of confidence we have on the alert - :vartype confidence_score: float - :param confidence_reasons: reasons the alert got the confidenceScore value - :type confidence_reasons: - list[~azure.mgmt.security.models.AlertConfidenceReason] - :ivar subscription_id: Azure subscription ID of the resource that had the - security alert or the subscription ID of the workspace that this resource - reports to - :vartype subscription_id: str - :ivar instance_id: Instance ID of the alert. - :vartype instance_id: str - :ivar workspace_arm_id: Azure resource ID of the workspace that the alert - was reported to. - :vartype workspace_arm_id: str - :ivar correlation_key: Alerts with the same CorrelationKey will be grouped - together in Ibiza. - :vartype correlation_key: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'reported_time_utc': {'readonly': True}, - 'vendor_name': {'readonly': True}, - 'alert_name': {'readonly': True}, - 'alert_display_name': {'readonly': True}, - 'detected_time_utc': {'readonly': True}, - 'description': {'readonly': True}, - 'remediation_steps': {'readonly': True}, - 'action_taken': {'readonly': True}, - 'reported_severity': {'readonly': True}, - 'compromised_entity': {'readonly': True}, - 'associated_resource': {'readonly': True}, - 'system_source': {'readonly': True}, - 'can_be_investigated': {'readonly': True}, - 'is_incident': {'readonly': True}, - 'confidence_score': {'readonly': True, 'maximum': 1, 'minimum': 0}, - 'subscription_id': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'workspace_arm_id': {'readonly': True}, - 'correlation_key': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'reported_time_utc': {'key': 'properties.reportedTimeUtc', 'type': 'iso-8601'}, - 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, - 'alert_name': {'key': 'properties.alertName', 'type': 'str'}, - 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, - 'detected_time_utc': {'key': 'properties.detectedTimeUtc', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, - 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, - 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, - 'compromised_entity': {'key': 'properties.compromisedEntity', 'type': 'str'}, - 'associated_resource': {'key': 'properties.associatedResource', 'type': 'str'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{object}'}, - 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, - 'can_be_investigated': {'key': 'properties.canBeInvestigated', 'type': 'bool'}, - 'is_incident': {'key': 'properties.isIncident', 'type': 'bool'}, - 'entities': {'key': 'properties.entities', 'type': '[AlertEntity]'}, - 'confidence_score': {'key': 'properties.confidenceScore', 'type': 'float'}, - 'confidence_reasons': {'key': 'properties.confidenceReasons', 'type': '[AlertConfidenceReason]'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'workspace_arm_id': {'key': 'properties.workspaceArmId', 'type': 'str'}, - 'correlation_key': {'key': 'properties.correlationKey', 'type': 'str'}, - } - - def __init__(self, *, extended_properties=None, entities=None, confidence_reasons=None, **kwargs) -> None: - super(Alert, self).__init__(**kwargs) - self.state = None - self.reported_time_utc = None - self.vendor_name = None - self.alert_name = None - self.alert_display_name = None - self.detected_time_utc = None - self.description = None - self.remediation_steps = None - self.action_taken = None - self.reported_severity = None - self.compromised_entity = None - self.associated_resource = None - self.extended_properties = extended_properties - self.system_source = None - self.can_be_investigated = None - self.is_incident = None - self.entities = entities - self.confidence_score = None - self.confidence_reasons = confidence_reasons - self.subscription_id = None - self.instance_id = None - self.workspace_arm_id = None - self.correlation_key = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource.py deleted file mode 100644 index a33332d21a3a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AllowedConnectionsResource(Model): - """The resource whose properties describes the allowed traffic between Azure - resources. - - 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 - :ivar calculated_date_time: The UTC time on which the allowed connections - resource was calculated - :vartype calculated_date_time: datetime - :ivar connectable_resources: List of connectable resources - :vartype connectable_resources: - list[~azure.mgmt.security.models.ConnectableResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'calculated_date_time': {'readonly': True}, - 'connectable_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, - 'connectable_resources': {'key': 'properties.connectableResources', 'type': '[ConnectableResource]'}, - } - - def __init__(self, **kwargs): - super(AllowedConnectionsResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.calculated_date_time = None - self.connectable_resources = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_paged.py deleted file mode 100644 index 6a1696891e15..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AllowedConnectionsResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`AllowedConnectionsResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AllowedConnectionsResource]'} - } - - def __init__(self, *args, **kwargs): - - super(AllowedConnectionsResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_py3.py deleted file mode 100644 index c6cc09b53298..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AllowedConnectionsResource(Model): - """The resource whose properties describes the allowed traffic between Azure - resources. - - 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 - :ivar calculated_date_time: The UTC time on which the allowed connections - resource was calculated - :vartype calculated_date_time: datetime - :ivar connectable_resources: List of connectable resources - :vartype connectable_resources: - list[~azure.mgmt.security.models.ConnectableResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'calculated_date_time': {'readonly': True}, - 'connectable_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, - 'connectable_resources': {'key': 'properties.connectableResources', 'type': '[ConnectableResource]'}, - } - - def __init__(self, **kwargs) -> None: - super(AllowedConnectionsResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.calculated_date_time = None - self.connectable_resources = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location.py deleted file mode 100644 index c665bef0469a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AscLocation(Resource): - """The ASC location of the subscription is in the "name" field. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param properties: - :type properties: object - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AscLocation, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_paged.py deleted file mode 100644 index 85394884079a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AscLocationPaged(Paged): - """ - A paging container for iterating over a list of :class:`AscLocation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AscLocation]'} - } - - def __init__(self, *args, **kwargs): - - super(AscLocationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_py3.py deleted file mode 100644 index 8ee3de84094f..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AscLocation(Resource): - """The ASC location of the subscription is in the "name" field. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param properties: - :type properties: object - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AscLocation, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution.py deleted file mode 100644 index 813dae68b0e1..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .external_security_solution import ExternalSecuritySolution - - -class AtaExternalSecuritySolution(ExternalSecuritySolution): - """Represents an ATA security solution which sends logs to an OMS workspace. - - 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 kind: Required. Constant filled by server. - :type kind: str - :param properties: - :type properties: ~azure.mgmt.security.models.AtaSolutionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AtaSolutionProperties'}, - } - - def __init__(self, **kwargs): - super(AtaExternalSecuritySolution, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.kind = 'ATA' diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution_py3.py deleted file mode 100644 index 52b5e8b579a7..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .external_security_solution_py3 import ExternalSecuritySolution - - -class AtaExternalSecuritySolution(ExternalSecuritySolution): - """Represents an ATA security solution which sends logs to an OMS workspace. - - 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 kind: Required. Constant filled by server. - :type kind: str - :param properties: - :type properties: ~azure.mgmt.security.models.AtaSolutionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AtaSolutionProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AtaExternalSecuritySolution, self).__init__(**kwargs) - self.properties = properties - self.kind = 'ATA' diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties.py deleted file mode 100644 index 8067254e71fa..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .external_security_solution_properties import ExternalSecuritySolutionProperties - - -class AtaSolutionProperties(ExternalSecuritySolutionProperties): - """The external security solution properties for ATA solutions. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - :param last_event_received: - :type last_event_received: str - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AtaSolutionProperties, self).__init__(**kwargs) - self.last_event_received = kwargs.get('last_event_received', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties_py3.py deleted file mode 100644 index 7314df45108c..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .external_security_solution_properties_py3 import ExternalSecuritySolutionProperties - - -class AtaSolutionProperties(ExternalSecuritySolutionProperties): - """The external security solution properties for ATA solutions. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - :param last_event_received: - :type last_event_received: str - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, device_vendor: str=None, device_type: str=None, workspace=None, last_event_received: str=None, **kwargs) -> None: - super(AtaSolutionProperties, self).__init__(additional_properties=additional_properties, device_vendor=device_vendor, device_type=device_type, workspace=workspace, **kwargs) - self.last_event_received = last_event_received diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting.py deleted file mode 100644 index 907869accb3d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AutoProvisioningSetting(Resource): - """Auto provisioning setting. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param auto_provision: Required. Describes what kind of security agent - provisioning action to take. Possible values include: 'On', 'Off' - :type auto_provision: str or ~azure.mgmt.security.models.AutoProvision - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'auto_provision': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'auto_provision': {'key': 'properties.autoProvision', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AutoProvisioningSetting, self).__init__(**kwargs) - self.auto_provision = kwargs.get('auto_provision', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_paged.py deleted file mode 100644 index a618c42c075c..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AutoProvisioningSettingPaged(Paged): - """ - A paging container for iterating over a list of :class:`AutoProvisioningSetting ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AutoProvisioningSetting]'} - } - - def __init__(self, *args, **kwargs): - - super(AutoProvisioningSettingPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_py3.py deleted file mode 100644 index 7c86b8da5c01..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AutoProvisioningSetting(Resource): - """Auto provisioning setting. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param auto_provision: Required. Describes what kind of security agent - provisioning action to take. Possible values include: 'On', 'Off' - :type auto_provision: str or ~azure.mgmt.security.models.AutoProvision - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'auto_provision': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'auto_provision': {'key': 'properties.autoProvision', 'type': 'str'}, - } - - def __init__(self, *, auto_provision, **kwargs) -> None: - super(AutoProvisioningSetting, self).__init__(**kwargs) - self.auto_provision = auto_provision diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution.py deleted file mode 100644 index 513fb6de5940..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .external_security_solution import ExternalSecuritySolution - - -class CefExternalSecuritySolution(ExternalSecuritySolution): - """Represents a security solution which sends CEF logs to an OMS workspace. - - 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 kind: Required. Constant filled by server. - :type kind: str - :param properties: - :type properties: ~azure.mgmt.security.models.CefSolutionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'CefSolutionProperties'}, - } - - def __init__(self, **kwargs): - super(CefExternalSecuritySolution, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.kind = 'CEF' diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution_py3.py deleted file mode 100644 index 930b453b72d8..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .external_security_solution_py3 import ExternalSecuritySolution - - -class CefExternalSecuritySolution(ExternalSecuritySolution): - """Represents a security solution which sends CEF logs to an OMS workspace. - - 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 kind: Required. Constant filled by server. - :type kind: str - :param properties: - :type properties: ~azure.mgmt.security.models.CefSolutionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'CefSolutionProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(CefExternalSecuritySolution, self).__init__(**kwargs) - self.properties = properties - self.kind = 'CEF' diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties.py deleted file mode 100644 index b49610a04bb0..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .external_security_solution_properties import ExternalSecuritySolutionProperties - - -class CefSolutionProperties(ExternalSecuritySolutionProperties): - """The external security solution properties for CEF solutions. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - :param hostname: - :type hostname: str - :param agent: - :type agent: str - :param last_event_received: - :type last_event_received: str - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - 'hostname': {'key': 'hostname', 'type': 'str'}, - 'agent': {'key': 'agent', 'type': 'str'}, - 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CefSolutionProperties, self).__init__(**kwargs) - self.hostname = kwargs.get('hostname', None) - self.agent = kwargs.get('agent', None) - self.last_event_received = kwargs.get('last_event_received', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties_py3.py deleted file mode 100644 index 390c6acba5fb..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .external_security_solution_properties_py3 import ExternalSecuritySolutionProperties - - -class CefSolutionProperties(ExternalSecuritySolutionProperties): - """The external security solution properties for CEF solutions. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - :param hostname: - :type hostname: str - :param agent: - :type agent: str - :param last_event_received: - :type last_event_received: str - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - 'hostname': {'key': 'hostname', 'type': 'str'}, - 'agent': {'key': 'agent', 'type': 'str'}, - 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, device_vendor: str=None, device_type: str=None, workspace=None, hostname: str=None, agent: str=None, last_event_received: str=None, **kwargs) -> None: - super(CefSolutionProperties, self).__init__(additional_properties=additional_properties, device_vendor=device_vendor, device_type=device_type, workspace=workspace, **kwargs) - self.hostname = hostname - self.agent = agent - self.last_event_received = last_event_received diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance.py deleted file mode 100644 index f515b35211bd..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Compliance(Resource): - """Compliance of a scope. - - 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 assessment_timestamp_utc_date: The timestamp when the Compliance - calculation was conducted. - :vartype assessment_timestamp_utc_date: datetime - :ivar resource_count: The resource count of the given subscription for - which the Compliance calculation was conducted (needed for Management - Group Compliance calculation). - :vartype resource_count: int - :ivar assessment_result: An array of segment, which is the actually the - compliance assessment. - :vartype assessment_result: - list[~azure.mgmt.security.models.ComplianceSegment] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'assessment_timestamp_utc_date': {'readonly': True}, - 'resource_count': {'readonly': True}, - 'assessment_result': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'assessment_timestamp_utc_date': {'key': 'properties.assessmentTimestampUtcDate', 'type': 'iso-8601'}, - 'resource_count': {'key': 'properties.resourceCount', 'type': 'int'}, - 'assessment_result': {'key': 'properties.assessmentResult', 'type': '[ComplianceSegment]'}, - } - - def __init__(self, **kwargs): - super(Compliance, self).__init__(**kwargs) - self.assessment_timestamp_utc_date = None - self.resource_count = None - self.assessment_result = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_paged.py deleted file mode 100644 index 4e2030375270..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class CompliancePaged(Paged): - """ - A paging container for iterating over a list of :class:`Compliance ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Compliance]'} - } - - def __init__(self, *args, **kwargs): - - super(CompliancePaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_py3.py deleted file mode 100644 index 0e271a1351b4..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Compliance(Resource): - """Compliance of a scope. - - 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 assessment_timestamp_utc_date: The timestamp when the Compliance - calculation was conducted. - :vartype assessment_timestamp_utc_date: datetime - :ivar resource_count: The resource count of the given subscription for - which the Compliance calculation was conducted (needed for Management - Group Compliance calculation). - :vartype resource_count: int - :ivar assessment_result: An array of segment, which is the actually the - compliance assessment. - :vartype assessment_result: - list[~azure.mgmt.security.models.ComplianceSegment] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'assessment_timestamp_utc_date': {'readonly': True}, - 'resource_count': {'readonly': True}, - 'assessment_result': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'assessment_timestamp_utc_date': {'key': 'properties.assessmentTimestampUtcDate', 'type': 'iso-8601'}, - 'resource_count': {'key': 'properties.resourceCount', 'type': 'int'}, - 'assessment_result': {'key': 'properties.assessmentResult', 'type': '[ComplianceSegment]'}, - } - - def __init__(self, **kwargs) -> None: - super(Compliance, self).__init__(**kwargs) - self.assessment_timestamp_utc_date = None - self.resource_count = None - self.assessment_result = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment.py deleted file mode 100644 index ea23dc49c079..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComplianceSegment(Model): - """A segment of a compliance assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar segment_type: The segment type, e.g. compliant, non-compliance, - insufficient coverage, N/A, etc. - :vartype segment_type: str - :ivar percentage: The size (%) of the segment. - :vartype percentage: float - """ - - _validation = { - 'segment_type': {'readonly': True}, - 'percentage': {'readonly': True}, - } - - _attribute_map = { - 'segment_type': {'key': 'segmentType', 'type': 'str'}, - 'percentage': {'key': 'percentage', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ComplianceSegment, self).__init__(**kwargs) - self.segment_type = None - self.percentage = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment_py3.py deleted file mode 100644 index a819e7cde997..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComplianceSegment(Model): - """A segment of a compliance assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar segment_type: The segment type, e.g. compliant, non-compliance, - insufficient coverage, N/A, etc. - :vartype segment_type: str - :ivar percentage: The size (%) of the segment. - :vartype percentage: float - """ - - _validation = { - 'segment_type': {'readonly': True}, - 'percentage': {'readonly': True}, - } - - _attribute_map = { - 'segment_type': {'key': 'segmentType', 'type': 'str'}, - 'percentage': {'key': 'percentage', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(ComplianceSegment, self).__init__(**kwargs) - self.segment_type = None - self.percentage = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource.py deleted file mode 100644 index 617931b620d2..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConnectableResource(Model): - """Describes the allowed inbound and outbound traffic of an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The Azure resource id - :vartype id: str - :ivar inbound_connected_resources: The list of Azure resources that the - resource has inbound allowed connection from - :vartype inbound_connected_resources: - list[~azure.mgmt.security.models.ConnectedResource] - :ivar outbound_connected_resources: The list of Azure resources that the - resource has outbound allowed connection to - :vartype outbound_connected_resources: - list[~azure.mgmt.security.models.ConnectedResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'inbound_connected_resources': {'readonly': True}, - 'outbound_connected_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'inbound_connected_resources': {'key': 'inboundConnectedResources', 'type': '[ConnectedResource]'}, - 'outbound_connected_resources': {'key': 'outboundConnectedResources', 'type': '[ConnectedResource]'}, - } - - def __init__(self, **kwargs): - super(ConnectableResource, self).__init__(**kwargs) - self.id = None - self.inbound_connected_resources = None - self.outbound_connected_resources = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource_py3.py deleted file mode 100644 index 405942f2b228..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConnectableResource(Model): - """Describes the allowed inbound and outbound traffic of an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The Azure resource id - :vartype id: str - :ivar inbound_connected_resources: The list of Azure resources that the - resource has inbound allowed connection from - :vartype inbound_connected_resources: - list[~azure.mgmt.security.models.ConnectedResource] - :ivar outbound_connected_resources: The list of Azure resources that the - resource has outbound allowed connection to - :vartype outbound_connected_resources: - list[~azure.mgmt.security.models.ConnectedResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'inbound_connected_resources': {'readonly': True}, - 'outbound_connected_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'inbound_connected_resources': {'key': 'inboundConnectedResources', 'type': '[ConnectedResource]'}, - 'outbound_connected_resources': {'key': 'outboundConnectedResources', 'type': '[ConnectedResource]'}, - } - - def __init__(self, **kwargs) -> None: - super(ConnectableResource, self).__init__(**kwargs) - self.id = None - self.inbound_connected_resources = None - self.outbound_connected_resources = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource.py deleted file mode 100644 index cb4e417044cd..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConnectedResource(Model): - """Describes properties of a connected resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connected_resource_id: The Azure resource id of the connected - resource - :vartype connected_resource_id: str - :ivar tcp_ports: The allowed tcp ports - :vartype tcp_ports: str - :ivar udp_ports: The allowed udp ports - :vartype udp_ports: str - """ - - _validation = { - 'connected_resource_id': {'readonly': True}, - 'tcp_ports': {'readonly': True}, - 'udp_ports': {'readonly': True}, - } - - _attribute_map = { - 'connected_resource_id': {'key': 'connectedResourceId', 'type': 'str'}, - 'tcp_ports': {'key': 'tcpPorts', 'type': 'str'}, - 'udp_ports': {'key': 'udpPorts', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ConnectedResource, self).__init__(**kwargs) - self.connected_resource_id = None - self.tcp_ports = None - self.udp_ports = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource_py3.py deleted file mode 100644 index 509629455e1c..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConnectedResource(Model): - """Describes properties of a connected resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connected_resource_id: The Azure resource id of the connected - resource - :vartype connected_resource_id: str - :ivar tcp_ports: The allowed tcp ports - :vartype tcp_ports: str - :ivar udp_ports: The allowed udp ports - :vartype udp_ports: str - """ - - _validation = { - 'connected_resource_id': {'readonly': True}, - 'tcp_ports': {'readonly': True}, - 'udp_ports': {'readonly': True}, - } - - _attribute_map = { - 'connected_resource_id': {'key': 'connectedResourceId', 'type': 'str'}, - 'tcp_ports': {'key': 'tcpPorts', 'type': 'str'}, - 'udp_ports': {'key': 'udpPorts', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ConnectedResource, self).__init__(**kwargs) - self.connected_resource_id = None - self.tcp_ports = None - self.udp_ports = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace.py deleted file mode 100644 index 6ac3212eabd9..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConnectedWorkspace(Model): - """Represents an OMS workspace to which the solution is connected. - - :param id: Azure resource ID of the connected OMS workspace - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ConnectedWorkspace, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace_py3.py deleted file mode 100644 index 5bc6960972d2..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConnectedWorkspace(Model): - """Represents an OMS workspace to which the solution is connected. - - :param id: Azure resource ID of the connected OMS workspace - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ConnectedWorkspace, self).__init__(**kwargs) - self.id = id diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting.py deleted file mode 100644 index 8c355e50e6ff..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .setting import Setting - - -class DataExportSetting(Setting): - """Represents a data export setting. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Required. the kind of the settings string - (DataExportSetting). Possible values include: 'DataExportSetting', - 'AlertSuppressionSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - :param enabled: Required. Is the data export setting is enabled - :type enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - 'enabled': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DataExportSetting, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting_py3.py deleted file mode 100644 index 05d8e11208fc..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .setting_py3 import Setting - - -class DataExportSetting(Setting): - """Represents a data export setting. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Required. the kind of the settings string - (DataExportSetting). Possible values include: 'DataExportSetting', - 'AlertSuppressionSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - :param enabled: Required. Is the data export setting is enabled - :type enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - 'enabled': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, *, kind, enabled: bool, **kwargs) -> None: - super(DataExportSetting, self).__init__(kind=kind, **kwargs) - self.enabled = enabled diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution.py deleted file mode 100644 index fabb09226953..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiscoveredSecuritySolution(Model): - """DiscoveredSecuritySolution. - - 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 discovered - solution. Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' - :type security_family: str or ~azure.mgmt.security.models.SecurityFamily - :param offer: Required. The security solutions' image offer - :type offer: str - :param publisher: Required. The security solutions' image publisher - :type publisher: str - :param sku: Required. The security solutions' image sku - :type sku: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'security_family': {'required': True}, - 'offer': {'required': True}, - 'publisher': {'required': True}, - 'sku': {'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'}, - 'offer': {'key': 'properties.offer', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DiscoveredSecuritySolution, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.security_family = kwargs.get('security_family', None) - self.offer = kwargs.get('offer', None) - self.publisher = kwargs.get('publisher', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_paged.py deleted file mode 100644 index 9bfbb03c5409..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DiscoveredSecuritySolutionPaged(Paged): - """ - A paging container for iterating over a list of :class:`DiscoveredSecuritySolution ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DiscoveredSecuritySolution]'} - } - - def __init__(self, *args, **kwargs): - - super(DiscoveredSecuritySolutionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_py3.py deleted file mode 100644 index 33934cab24d5..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiscoveredSecuritySolution(Model): - """DiscoveredSecuritySolution. - - 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 discovered - solution. Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' - :type security_family: str or ~azure.mgmt.security.models.SecurityFamily - :param offer: Required. The security solutions' image offer - :type offer: str - :param publisher: Required. The security solutions' image publisher - :type publisher: str - :param sku: Required. The security solutions' image sku - :type sku: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'security_family': {'required': True}, - 'offer': {'required': True}, - 'publisher': {'required': True}, - 'sku': {'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'}, - 'offer': {'key': 'properties.offer', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'str'}, - } - - def __init__(self, *, security_family, offer: str, publisher: str, sku: str, **kwargs) -> None: - super(DiscoveredSecuritySolution, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.security_family = security_family - self.offer = offer - self.publisher = publisher - self.sku = sku diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution.py deleted file mode 100644 index 0eb60137c0c0..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSecuritySolution(Model): - """Represents a security solution external to Azure Security Center which - sends information to an OMS workspace and whose data is displayed by Azure - Security Center. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CefExternalSecuritySolution, AtaExternalSecuritySolution, - AadExternalSecuritySolution - - 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 kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'CEF': 'CefExternalSecuritySolution', 'ATA': 'AtaExternalSecuritySolution', 'AAD': 'AadExternalSecuritySolution'} - } - - def __init__(self, **kwargs): - super(ExternalSecuritySolution, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.kind = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1.py deleted file mode 100644 index 7f736fcfc1ba..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSecuritySolutionKind1(Model): - """Describes an Azure resource with kind. - - :param kind: The kind of the external solution. Possible values include: - 'CEF', 'ATA', 'AAD' - :type kind: str or - ~azure.mgmt.security.models.ExternalSecuritySolutionKind - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExternalSecuritySolutionKind1, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1_py3.py deleted file mode 100644 index 0d1ef240b557..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSecuritySolutionKind1(Model): - """Describes an Azure resource with kind. - - :param kind: The kind of the external solution. Possible values include: - 'CEF', 'ATA', 'AAD' - :type kind: str or - ~azure.mgmt.security.models.ExternalSecuritySolutionKind - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, kind=None, **kwargs) -> None: - super(ExternalSecuritySolutionKind1, self).__init__(**kwargs) - self.kind = kind diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_paged.py deleted file mode 100644 index a67047ce19c0..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ExternalSecuritySolutionPaged(Paged): - """ - A paging container for iterating over a list of :class:`ExternalSecuritySolution ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ExternalSecuritySolution]'} - } - - def __init__(self, *args, **kwargs): - - super(ExternalSecuritySolutionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties.py deleted file mode 100644 index 9ccbb179d3e4..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSecuritySolutionProperties(Model): - """The solution properties (correspond to the solution kind). - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - } - - def __init__(self, **kwargs): - super(ExternalSecuritySolutionProperties, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.device_vendor = kwargs.get('device_vendor', None) - self.device_type = kwargs.get('device_type', None) - self.workspace = kwargs.get('workspace', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties_py3.py deleted file mode 100644 index de53f50ae553..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSecuritySolutionProperties(Model): - """The solution properties (correspond to the solution kind). - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - } - - def __init__(self, *, additional_properties=None, device_vendor: str=None, device_type: str=None, workspace=None, **kwargs) -> None: - super(ExternalSecuritySolutionProperties, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.device_vendor = device_vendor - self.device_type = device_type - self.workspace = workspace diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_py3.py deleted file mode 100644 index 798e808ddfab..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSecuritySolution(Model): - """Represents a security solution external to Azure Security Center which - sends information to an OMS workspace and whose data is displayed by Azure - Security Center. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CefExternalSecuritySolution, AtaExternalSecuritySolution, - AadExternalSecuritySolution - - 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 kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'CEF': 'CefExternalSecuritySolution', 'ATA': 'AtaExternalSecuritySolution', 'AAD': 'AadExternalSecuritySolution'} - } - - def __init__(self, **kwargs) -> None: - super(ExternalSecuritySolution, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.kind = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword.py deleted file mode 100644 index b67a1d4cfbd1..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword_py3.py deleted file mode 100644 index 52c424cd4452..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy.py deleted file mode 100644 index c430a8605127..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -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 - :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}, - } - - _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'}, - '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.labels = kwargs.get('labels', None) - self.information_types = kwargs.get('information_types', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_paged.py deleted file mode 100644 index 807d040d4f4b..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class InformationProtectionPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`InformationProtectionPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[InformationProtectionPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(InformationProtectionPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_py3.py deleted file mode 100644 index e07676bb0d27..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -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 - :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}, - } - - _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'}, - '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.labels = labels - self.information_types = information_types diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type.py deleted file mode 100644 index df77e7c1ff65..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InformationType(Model): - """The information type. - - :param display_name: The name of the information type. - :type display_name: str - :param order: The order of the information type. - :type order: float - :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'}, - 'order': {'key': 'order', 'type': 'float'}, - '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.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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type_py3.py deleted file mode 100644 index b8b1ab434c82..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InformationType(Model): - """The information type. - - :param display_name: The name of the information type. - :type display_name: str - :param order: The order of the information type. - :type order: float - :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'}, - 'order': {'key': 'order', 'type': 'float'}, - '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, order: float=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.order = order - self.recommended_label_id = recommended_label_id - self.enabled = enabled - self.custom = custom - self.keywords = keywords diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy.py deleted file mode 100644 index 281b6e07c25d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPolicy(Model): - """JitNetworkAccessPolicy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Kind of the resource - :type kind: str - :ivar location: Location where the resource is stored - :vartype location: str - :param virtual_machines: Required. Configurations for - Microsoft.Compute/virtualMachines resource type. - :type virtual_machines: - list[~azure.mgmt.security.models.JitNetworkAccessPolicyVirtualMachine] - :param requests: - :type requests: list[~azure.mgmt.security.models.JitNetworkAccessRequest] - :ivar provisioning_state: Gets the provisioning state of the Just-in-Time - policy. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'virtual_machines': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[JitNetworkAccessPolicyVirtualMachine]'}, - 'requests': {'key': 'properties.requests', 'type': '[JitNetworkAccessRequest]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessPolicy, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kind = kwargs.get('kind', None) - self.location = None - self.virtual_machines = kwargs.get('virtual_machines', None) - self.requests = kwargs.get('requests', None) - self.provisioning_state = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port.py deleted file mode 100644 index b0829c87c01b..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPolicyInitiatePort(Model): - """JitNetworkAccessPolicyInitiatePort. - - All required parameters must be populated in order to send to Azure. - - :param number: Required. - :type number: int - :param allowed_source_address_prefix: Source of the allowed traffic. If - omitted, the request will be for the source IP address of the initiate - request. - :type allowed_source_address_prefix: str - :param end_time_utc: Required. The time to close the request in UTC - :type end_time_utc: datetime - """ - - _validation = { - 'number': {'required': True}, - 'end_time_utc': {'required': True}, - } - - _attribute_map = { - 'number': {'key': 'number', 'type': 'int'}, - 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, - 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessPolicyInitiatePort, self).__init__(**kwargs) - self.number = kwargs.get('number', None) - self.allowed_source_address_prefix = kwargs.get('allowed_source_address_prefix', None) - self.end_time_utc = kwargs.get('end_time_utc', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port_py3.py deleted file mode 100644 index 65ae97d30788..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPolicyInitiatePort(Model): - """JitNetworkAccessPolicyInitiatePort. - - All required parameters must be populated in order to send to Azure. - - :param number: Required. - :type number: int - :param allowed_source_address_prefix: Source of the allowed traffic. If - omitted, the request will be for the source IP address of the initiate - request. - :type allowed_source_address_prefix: str - :param end_time_utc: Required. The time to close the request in UTC - :type end_time_utc: datetime - """ - - _validation = { - 'number': {'required': True}, - 'end_time_utc': {'required': True}, - } - - _attribute_map = { - 'number': {'key': 'number', 'type': 'int'}, - 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, - 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, - } - - def __init__(self, *, number: int, end_time_utc, allowed_source_address_prefix: str=None, **kwargs) -> None: - super(JitNetworkAccessPolicyInitiatePort, self).__init__(**kwargs) - self.number = number - self.allowed_source_address_prefix = allowed_source_address_prefix - self.end_time_utc = end_time_utc diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request.py deleted file mode 100644 index 6d567c7aee30..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPolicyInitiateRequest(Model): - """JitNetworkAccessPolicyInitiateRequest. - - All required parameters must be populated in order to send to Azure. - - :param virtual_machines: Required. A list of virtual machines & ports to - open access for - :type virtual_machines: - list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiateVirtualMachine] - """ - - _validation = { - 'virtual_machines': {'required': True}, - } - - _attribute_map = { - 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessPolicyInitiateVirtualMachine]'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessPolicyInitiateRequest, self).__init__(**kwargs) - self.virtual_machines = kwargs.get('virtual_machines', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request_py3.py deleted file mode 100644 index ba6c6cbf2f93..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPolicyInitiateRequest(Model): - """JitNetworkAccessPolicyInitiateRequest. - - All required parameters must be populated in order to send to Azure. - - :param virtual_machines: Required. A list of virtual machines & ports to - open access for - :type virtual_machines: - list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiateVirtualMachine] - """ - - _validation = { - 'virtual_machines': {'required': True}, - } - - _attribute_map = { - 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessPolicyInitiateVirtualMachine]'}, - } - - def __init__(self, *, virtual_machines, **kwargs) -> None: - super(JitNetworkAccessPolicyInitiateRequest, self).__init__(**kwargs) - self.virtual_machines = virtual_machines diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine.py deleted file mode 100644 index e8581019f64d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPolicyInitiateVirtualMachine(Model): - """JitNetworkAccessPolicyInitiateVirtualMachine. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource ID of the virtual machine that is linked to - this policy - :type id: str - :param ports: Required. The ports to open for the resource with the `id` - :type ports: - list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiatePort] - """ - - _validation = { - 'id': {'required': True}, - 'ports': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPolicyInitiatePort]'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessPolicyInitiateVirtualMachine, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.ports = kwargs.get('ports', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine_py3.py deleted file mode 100644 index bdae532a9308..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPolicyInitiateVirtualMachine(Model): - """JitNetworkAccessPolicyInitiateVirtualMachine. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource ID of the virtual machine that is linked to - this policy - :type id: str - :param ports: Required. The ports to open for the resource with the `id` - :type ports: - list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiatePort] - """ - - _validation = { - 'id': {'required': True}, - 'ports': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPolicyInitiatePort]'}, - } - - def __init__(self, *, id: str, ports, **kwargs) -> None: - super(JitNetworkAccessPolicyInitiateVirtualMachine, self).__init__(**kwargs) - self.id = id - self.ports = ports diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_paged.py deleted file mode 100644 index 87c684afb92e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JitNetworkAccessPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`JitNetworkAccessPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JitNetworkAccessPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(JitNetworkAccessPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_py3.py deleted file mode 100644 index 4e719184b290..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPolicy(Model): - """JitNetworkAccessPolicy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Kind of the resource - :type kind: str - :ivar location: Location where the resource is stored - :vartype location: str - :param virtual_machines: Required. Configurations for - Microsoft.Compute/virtualMachines resource type. - :type virtual_machines: - list[~azure.mgmt.security.models.JitNetworkAccessPolicyVirtualMachine] - :param requests: - :type requests: list[~azure.mgmt.security.models.JitNetworkAccessRequest] - :ivar provisioning_state: Gets the provisioning state of the Just-in-Time - policy. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'virtual_machines': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[JitNetworkAccessPolicyVirtualMachine]'}, - 'requests': {'key': 'properties.requests', 'type': '[JitNetworkAccessRequest]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, virtual_machines, kind: str=None, requests=None, **kwargs) -> None: - super(JitNetworkAccessPolicy, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kind = kind - self.location = None - self.virtual_machines = virtual_machines - self.requests = requests - self.provisioning_state = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine.py deleted file mode 100644 index 49ce31c7f04e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPolicyVirtualMachine(Model): - """JitNetworkAccessPolicyVirtualMachine. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource ID of the virtual machine that is linked to - this policy - :type id: str - :param ports: Required. Port configurations for the virtual machine - :type ports: list[~azure.mgmt.security.models.JitNetworkAccessPortRule] - """ - - _validation = { - 'id': {'required': True}, - 'ports': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPortRule]'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessPolicyVirtualMachine, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.ports = kwargs.get('ports', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine_py3.py deleted file mode 100644 index f315044fbc70..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPolicyVirtualMachine(Model): - """JitNetworkAccessPolicyVirtualMachine. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource ID of the virtual machine that is linked to - this policy - :type id: str - :param ports: Required. Port configurations for the virtual machine - :type ports: list[~azure.mgmt.security.models.JitNetworkAccessPortRule] - """ - - _validation = { - 'id': {'required': True}, - 'ports': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPortRule]'}, - } - - def __init__(self, *, id: str, ports, **kwargs) -> None: - super(JitNetworkAccessPolicyVirtualMachine, self).__init__(**kwargs) - self.id = id - self.ports = ports diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule.py deleted file mode 100644 index 4be40bf43b69..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPortRule(Model): - """JitNetworkAccessPortRule. - - All required parameters must be populated in order to send to Azure. - - :param number: Required. - :type number: int - :param protocol: Required. Possible values include: 'TCP', 'UDP', 'All' - :type protocol: str or ~azure.mgmt.security.models.Protocol - :param allowed_source_address_prefix: Mutually exclusive with the - "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, - for example "192.168.0.3" or "192.168.0.0/16". - :type allowed_source_address_prefix: str - :param allowed_source_address_prefixes: Mutually exclusive with the - "allowedSourceAddressPrefix" parameter. - :type allowed_source_address_prefixes: list[str] - :param max_request_access_duration: Required. Maximum duration requests - can be made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 - day - :type max_request_access_duration: str - """ - - _validation = { - 'number': {'required': True}, - 'protocol': {'required': True}, - 'max_request_access_duration': {'required': True}, - } - - _attribute_map = { - 'number': {'key': 'number', 'type': 'int'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, - 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, - 'max_request_access_duration': {'key': 'maxRequestAccessDuration', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessPortRule, self).__init__(**kwargs) - self.number = kwargs.get('number', None) - self.protocol = kwargs.get('protocol', None) - self.allowed_source_address_prefix = kwargs.get('allowed_source_address_prefix', None) - self.allowed_source_address_prefixes = kwargs.get('allowed_source_address_prefixes', None) - self.max_request_access_duration = kwargs.get('max_request_access_duration', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule_py3.py deleted file mode 100644 index 2d6c223bea49..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPortRule(Model): - """JitNetworkAccessPortRule. - - All required parameters must be populated in order to send to Azure. - - :param number: Required. - :type number: int - :param protocol: Required. Possible values include: 'TCP', 'UDP', 'All' - :type protocol: str or ~azure.mgmt.security.models.Protocol - :param allowed_source_address_prefix: Mutually exclusive with the - "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, - for example "192.168.0.3" or "192.168.0.0/16". - :type allowed_source_address_prefix: str - :param allowed_source_address_prefixes: Mutually exclusive with the - "allowedSourceAddressPrefix" parameter. - :type allowed_source_address_prefixes: list[str] - :param max_request_access_duration: Required. Maximum duration requests - can be made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 - day - :type max_request_access_duration: str - """ - - _validation = { - 'number': {'required': True}, - 'protocol': {'required': True}, - 'max_request_access_duration': {'required': True}, - } - - _attribute_map = { - 'number': {'key': 'number', 'type': 'int'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, - 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, - 'max_request_access_duration': {'key': 'maxRequestAccessDuration', 'type': 'str'}, - } - - def __init__(self, *, number: int, protocol, max_request_access_duration: str, allowed_source_address_prefix: str=None, allowed_source_address_prefixes=None, **kwargs) -> None: - super(JitNetworkAccessPortRule, self).__init__(**kwargs) - self.number = number - self.protocol = protocol - self.allowed_source_address_prefix = allowed_source_address_prefix - self.allowed_source_address_prefixes = allowed_source_address_prefixes - self.max_request_access_duration = max_request_access_duration diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request.py deleted file mode 100644 index 4e3d22353b07..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessRequest(Model): - """JitNetworkAccessRequest. - - All required parameters must be populated in order to send to Azure. - - :param virtual_machines: Required. - :type virtual_machines: - list[~azure.mgmt.security.models.JitNetworkAccessRequestVirtualMachine] - :param start_time_utc: Required. The start time of the request in UTC - :type start_time_utc: datetime - :param requestor: Required. The identity of the person who made the - request - :type requestor: str - """ - - _validation = { - 'virtual_machines': {'required': True}, - 'start_time_utc': {'required': True}, - 'requestor': {'required': True}, - } - - _attribute_map = { - 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessRequestVirtualMachine]'}, - 'start_time_utc': {'key': 'startTimeUtc', 'type': 'iso-8601'}, - 'requestor': {'key': 'requestor', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessRequest, self).__init__(**kwargs) - self.virtual_machines = kwargs.get('virtual_machines', None) - self.start_time_utc = kwargs.get('start_time_utc', None) - self.requestor = kwargs.get('requestor', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port.py deleted file mode 100644 index 63212f65aae1..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessRequestPort(Model): - """JitNetworkAccessRequestPort. - - All required parameters must be populated in order to send to Azure. - - :param number: Required. - :type number: int - :param allowed_source_address_prefix: Mutually exclusive with the - "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, - for example "192.168.0.3" or "192.168.0.0/16". - :type allowed_source_address_prefix: str - :param allowed_source_address_prefixes: Mutually exclusive with the - "allowedSourceAddressPrefix" parameter. - :type allowed_source_address_prefixes: list[str] - :param end_time_utc: Required. The date & time at which the request ends - in UTC - :type end_time_utc: datetime - :param status: Required. The status of the port. Possible values include: - 'Revoked', 'Initiated' - :type status: str or ~azure.mgmt.security.models.Status - :param status_reason: Required. A description of why the `status` has its - value. Possible values include: 'Expired', 'UserRequested', - 'NewerRequestInitiated' - :type status_reason: str or ~azure.mgmt.security.models.StatusReason - """ - - _validation = { - 'number': {'required': True}, - 'end_time_utc': {'required': True}, - 'status': {'required': True}, - 'status_reason': {'required': True}, - } - - _attribute_map = { - 'number': {'key': 'number', 'type': 'int'}, - 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, - 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, - 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_reason': {'key': 'statusReason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessRequestPort, self).__init__(**kwargs) - self.number = kwargs.get('number', None) - self.allowed_source_address_prefix = kwargs.get('allowed_source_address_prefix', None) - self.allowed_source_address_prefixes = kwargs.get('allowed_source_address_prefixes', None) - self.end_time_utc = kwargs.get('end_time_utc', None) - self.status = kwargs.get('status', None) - self.status_reason = kwargs.get('status_reason', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port_py3.py deleted file mode 100644 index 957d7b08bb7a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessRequestPort(Model): - """JitNetworkAccessRequestPort. - - All required parameters must be populated in order to send to Azure. - - :param number: Required. - :type number: int - :param allowed_source_address_prefix: Mutually exclusive with the - "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, - for example "192.168.0.3" or "192.168.0.0/16". - :type allowed_source_address_prefix: str - :param allowed_source_address_prefixes: Mutually exclusive with the - "allowedSourceAddressPrefix" parameter. - :type allowed_source_address_prefixes: list[str] - :param end_time_utc: Required. The date & time at which the request ends - in UTC - :type end_time_utc: datetime - :param status: Required. The status of the port. Possible values include: - 'Revoked', 'Initiated' - :type status: str or ~azure.mgmt.security.models.Status - :param status_reason: Required. A description of why the `status` has its - value. Possible values include: 'Expired', 'UserRequested', - 'NewerRequestInitiated' - :type status_reason: str or ~azure.mgmt.security.models.StatusReason - """ - - _validation = { - 'number': {'required': True}, - 'end_time_utc': {'required': True}, - 'status': {'required': True}, - 'status_reason': {'required': True}, - } - - _attribute_map = { - 'number': {'key': 'number', 'type': 'int'}, - 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, - 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, - 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_reason': {'key': 'statusReason', 'type': 'str'}, - } - - def __init__(self, *, number: int, end_time_utc, status, status_reason, allowed_source_address_prefix: str=None, allowed_source_address_prefixes=None, **kwargs) -> None: - super(JitNetworkAccessRequestPort, self).__init__(**kwargs) - self.number = number - self.allowed_source_address_prefix = allowed_source_address_prefix - self.allowed_source_address_prefixes = allowed_source_address_prefixes - self.end_time_utc = end_time_utc - self.status = status - self.status_reason = status_reason diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_py3.py deleted file mode 100644 index 4945c427dd93..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessRequest(Model): - """JitNetworkAccessRequest. - - All required parameters must be populated in order to send to Azure. - - :param virtual_machines: Required. - :type virtual_machines: - list[~azure.mgmt.security.models.JitNetworkAccessRequestVirtualMachine] - :param start_time_utc: Required. The start time of the request in UTC - :type start_time_utc: datetime - :param requestor: Required. The identity of the person who made the - request - :type requestor: str - """ - - _validation = { - 'virtual_machines': {'required': True}, - 'start_time_utc': {'required': True}, - 'requestor': {'required': True}, - } - - _attribute_map = { - 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessRequestVirtualMachine]'}, - 'start_time_utc': {'key': 'startTimeUtc', 'type': 'iso-8601'}, - 'requestor': {'key': 'requestor', 'type': 'str'}, - } - - def __init__(self, *, virtual_machines, start_time_utc, requestor: str, **kwargs) -> None: - super(JitNetworkAccessRequest, self).__init__(**kwargs) - self.virtual_machines = virtual_machines - self.start_time_utc = start_time_utc - self.requestor = requestor diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine.py deleted file mode 100644 index 7c5ba66b2385..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessRequestVirtualMachine(Model): - """JitNetworkAccessRequestVirtualMachine. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource ID of the virtual machine that is linked to - this policy - :type id: str - :param ports: Required. The ports that were opened for the virtual machine - :type ports: list[~azure.mgmt.security.models.JitNetworkAccessRequestPort] - """ - - _validation = { - 'id': {'required': True}, - 'ports': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[JitNetworkAccessRequestPort]'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessRequestVirtualMachine, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.ports = kwargs.get('ports', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine_py3.py deleted file mode 100644 index 7c9ddaa5a4a2..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessRequestVirtualMachine(Model): - """JitNetworkAccessRequestVirtualMachine. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource ID of the virtual machine that is linked to - this policy - :type id: str - :param ports: Required. The ports that were opened for the virtual machine - :type ports: list[~azure.mgmt.security.models.JitNetworkAccessRequestPort] - """ - - _validation = { - 'id': {'required': True}, - 'ports': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[JitNetworkAccessRequestPort]'}, - } - - def __init__(self, *, id: str, ports, **kwargs) -> None: - super(JitNetworkAccessRequestVirtualMachine, self).__init__(**kwargs) - self.id = id - self.ports = ports diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind.py deleted file mode 100644 index dafce6cdd7cb..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Kind(Model): - """Describes an Azure resource with kind. - - :param kind: Kind of the resource - :type kind: str - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Kind, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind_py3.py deleted file mode 100644 index d77a28e0c975..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Kind(Model): - """Describes an Azure resource with kind. - - :param kind: Kind of the resource - :type kind: str - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(Kind, self).__init__(**kwargs) - self.kind = kind diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/location.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/location.py deleted file mode 100644 index 852cd020018d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/location.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """Describes an Azure resource with location. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location: Location where the resource is stored - :vartype location: str - """ - - _validation = { - 'location': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Location, self).__init__(**kwargs) - self.location = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/location_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/location_py3.py deleted file mode 100644 index 8203f9cdf30d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/location_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """Describes an Azure resource with location. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location: Location where the resource is stored - :vartype location: str - """ - - _validation = { - 'location': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Location, self).__init__(**kwargs) - self.location = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation.py deleted file mode 100644 index 5b91bf6bccf4..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Possible operation in the REST API of Microsoft.Security. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of the operation - :vartype name: str - :ivar origin: Where the operation is originated - :vartype origin: str - :param display: - :type display: ~azure.mgmt.security.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - 'origin': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.origin = None - self.display = kwargs.get('display', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display.py deleted file mode 100644 index 624f831a4bfe..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Security operation display. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: The resource provider for the operation. - :vartype provider: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar operation: The display name of the security operation. - :vartype operation: str - :ivar description: The description of the operation. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display_py3.py deleted file mode 100644 index 4403ea324a9f..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Security operation display. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: The resource provider for the operation. - :vartype provider: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar operation: The display name of the security operation. - :vartype operation: str - :ivar description: The description of the operation. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_paged.py deleted file mode 100644 index c9fc34cc5505..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_py3.py deleted file mode 100644 index 927bf356676d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Possible operation in the REST API of Microsoft.Security. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of the operation - :vartype name: str - :ivar origin: Where the operation is originated - :vartype origin: str - :param display: - :type display: ~azure.mgmt.security.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - 'origin': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.origin = None - self.display = display diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing.py deleted file mode 100644 index 8201c965f0a5..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Pricing(Resource): - """Pricing tier will be applied for the scope based on the resource ID. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param pricing_tier: Required. The pricing tier value. Possible values - include: 'Free', 'Standard' - :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier - :ivar free_trial_remaining_time: The duration left for the subscriptions - free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). - :vartype free_trial_remaining_time: timedelta - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'pricing_tier': {'required': True}, - 'free_trial_remaining_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pricing_tier': {'key': 'properties.pricingTier', 'type': 'str'}, - 'free_trial_remaining_time': {'key': 'properties.freeTrialRemainingTime', 'type': 'duration'}, - } - - def __init__(self, **kwargs): - super(Pricing, self).__init__(**kwargs) - self.pricing_tier = kwargs.get('pricing_tier', None) - self.free_trial_remaining_time = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list.py deleted file mode 100644 index 5c461c74609d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PricingList(Model): - """List of pricing configurations response. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of pricing configurations - :type value: list[~azure.mgmt.security.models.Pricing] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Pricing]'}, - } - - def __init__(self, **kwargs): - super(PricingList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list_py3.py deleted file mode 100644 index 564f6bab68b9..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PricingList(Model): - """List of pricing configurations response. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of pricing configurations - :type value: list[~azure.mgmt.security.models.Pricing] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Pricing]'}, - } - - def __init__(self, *, value, **kwargs) -> None: - super(PricingList, self).__init__(**kwargs) - self.value = value diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py deleted file mode 100644 index cab29e683d39..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Pricing(Resource): - """Pricing tier will be applied for the scope based on the resource ID. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param pricing_tier: Required. The pricing tier value. Possible values - include: 'Free', 'Standard' - :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier - :ivar free_trial_remaining_time: The duration left for the subscriptions - free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). - :vartype free_trial_remaining_time: timedelta - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'pricing_tier': {'required': True}, - 'free_trial_remaining_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pricing_tier': {'key': 'properties.pricingTier', 'type': 'str'}, - 'free_trial_remaining_time': {'key': 'properties.freeTrialRemainingTime', 'type': 'duration'}, - } - - def __init__(self, *, pricing_tier, **kwargs) -> None: - super(Pricing, self).__init__(**kwargs) - self.pricing_tier = pricing_tier - self.free_trial_remaining_time = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource.py deleted file mode 100644 index 9c6150ed498e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """Describes an Azure resource. - - 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 - """ - - _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'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource_py3.py deleted file mode 100644 index d19d439b8bc0..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """Describes an Azure resource. - - 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 - """ - - _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'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None 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 deleted file mode 100644 index d075c87db018..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class PricingTier(str, Enum): - - free = "Free" #: Get free Azure security center experience with basic security features - standard = "Standard" #: Get the standard Azure security center experience with advanced security features - - -class ReportedSeverity(str, Enum): - - informational = "Informational" - low = "Low" - medium = "Medium" - high = "High" - - -class SettingKind(str, Enum): - - data_export_setting = "DataExportSetting" - alert_suppression_setting = "AlertSuppressionSetting" - - -class SecurityFamily(str, Enum): - - waf = "Waf" - ngfw = "Ngfw" - saas_waf = "SaasWaf" - va = "Va" - - -class AadConnectivityState(str, Enum): - - discovered = "Discovered" - not_licensed = "NotLicensed" - connected = "Connected" - - -class ExternalSecuritySolutionKind(str, Enum): - - cef = "CEF" - ata = "ATA" - aad = "AAD" - - -class Protocol(str, Enum): - - tcp = "TCP" - udp = "UDP" - all = "*" - - -class Status(str, Enum): - - revoked = "Revoked" - initiated = "Initiated" - - -class StatusReason(str, Enum): - - expired = "Expired" - user_requested = "UserRequested" - newer_request_initiated = "NewerRequestInitiated" - - -class AutoProvision(str, Enum): - - on = "On" #: Install missing security agent on VMs automatically - off = "Off" #: Do not install security agent on the VMs automatically - - -class AlertNotifications(str, Enum): - - on = "On" #: Get notifications on new alerts - off = "Off" #: Don't get notifications on new alerts - - -class AlertsToAdmins(str, Enum): - - on = "On" #: Send notification on new alerts to the subscription's admins - off = "Off" #: Don't send notification on new alerts to the subscription's admins - - -class ConnectionType(str, Enum): - - internal = "Internal" - external = "External" diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact.py deleted file mode 100644 index 43926670b0ec..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class SecurityContact(Resource): - """Contact details for security issues. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param email: Required. The email of this security contact - :type email: str - :param phone: The phone number of this security contact - :type phone: str - :param alert_notifications: Required. Whether to send security alerts - notifications to the security contact. Possible values include: 'On', - 'Off' - :type alert_notifications: str or - ~azure.mgmt.security.models.AlertNotifications - :param alerts_to_admins: Required. Whether to send security alerts - notifications to subscription admins. Possible values include: 'On', 'Off' - :type alerts_to_admins: str or ~azure.mgmt.security.models.AlertsToAdmins - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'email': {'required': True}, - 'alert_notifications': {'required': True}, - 'alerts_to_admins': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'email': {'key': 'properties.email', 'type': 'str'}, - 'phone': {'key': 'properties.phone', 'type': 'str'}, - 'alert_notifications': {'key': 'properties.alertNotifications', 'type': 'str'}, - 'alerts_to_admins': {'key': 'properties.alertsToAdmins', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecurityContact, self).__init__(**kwargs) - self.email = kwargs.get('email', None) - self.phone = kwargs.get('phone', None) - self.alert_notifications = kwargs.get('alert_notifications', None) - self.alerts_to_admins = kwargs.get('alerts_to_admins', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_paged.py deleted file mode 100644 index a422f9bd58b7..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SecurityContactPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecurityContact ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecurityContact]'} - } - - def __init__(self, *args, **kwargs): - - super(SecurityContactPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_py3.py deleted file mode 100644 index 6a78f995545a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class SecurityContact(Resource): - """Contact details for security issues. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param email: Required. The email of this security contact - :type email: str - :param phone: The phone number of this security contact - :type phone: str - :param alert_notifications: Required. Whether to send security alerts - notifications to the security contact. Possible values include: 'On', - 'Off' - :type alert_notifications: str or - ~azure.mgmt.security.models.AlertNotifications - :param alerts_to_admins: Required. Whether to send security alerts - notifications to subscription admins. Possible values include: 'On', 'Off' - :type alerts_to_admins: str or ~azure.mgmt.security.models.AlertsToAdmins - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'email': {'required': True}, - 'alert_notifications': {'required': True}, - 'alerts_to_admins': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'email': {'key': 'properties.email', 'type': 'str'}, - 'phone': {'key': 'properties.phone', 'type': 'str'}, - 'alert_notifications': {'key': 'properties.alertNotifications', 'type': 'str'}, - 'alerts_to_admins': {'key': 'properties.alertsToAdmins', 'type': 'str'}, - } - - def __init__(self, *, email: str, alert_notifications, alerts_to_admins, phone: str=None, **kwargs) -> None: - super(SecurityContact, self).__init__(**kwargs) - self.email = email - self.phone = phone - self.alert_notifications = alert_notifications - self.alerts_to_admins = alerts_to_admins diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task.py deleted file mode 100644 index 239a28c5e53e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class SecurityTask(Resource): - """Security task that we recommend to do in order to strengthen security. - - 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 state: State of the task (Active, Resolved etc.) - :vartype state: str - :ivar creation_time_utc: The time this task was discovered in UTC - :vartype creation_time_utc: datetime - :param security_task_parameters: - :type security_task_parameters: - ~azure.mgmt.security.models.SecurityTaskParameters - :ivar last_state_change_time_utc: The time this task's details were last - changed in UTC - :vartype last_state_change_time_utc: datetime - :ivar sub_state: Additional data on the state of the task - :vartype sub_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'creation_time_utc': {'readonly': True}, - 'last_state_change_time_utc': {'readonly': True}, - 'sub_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'creation_time_utc': {'key': 'properties.creationTimeUtc', 'type': 'iso-8601'}, - 'security_task_parameters': {'key': 'properties.securityTaskParameters', 'type': 'SecurityTaskParameters'}, - 'last_state_change_time_utc': {'key': 'properties.lastStateChangeTimeUtc', 'type': 'iso-8601'}, - 'sub_state': {'key': 'properties.subState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecurityTask, self).__init__(**kwargs) - self.state = None - self.creation_time_utc = None - self.security_task_parameters = kwargs.get('security_task_parameters', None) - self.last_state_change_time_utc = None - self.sub_state = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_paged.py deleted file mode 100644 index 99856db41035..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SecurityTaskPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecurityTask ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecurityTask]'} - } - - def __init__(self, *args, **kwargs): - - super(SecurityTaskPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters.py deleted file mode 100644 index 43150ace1c41..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SecurityTaskParameters(Model): - """Changing set of properties, depending on the task type that is derived from - the name field. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar name: Name of the task type - :vartype name: str - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecurityTaskParameters, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.name = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters_py3.py deleted file mode 100644 index e7bbe4d7bbea..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SecurityTaskParameters(Model): - """Changing set of properties, depending on the task type that is derived from - the name field. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar name: Name of the task type - :vartype name: str - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(SecurityTaskParameters, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.name = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_py3.py deleted file mode 100644 index d29d10479772..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_py3.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class SecurityTask(Resource): - """Security task that we recommend to do in order to strengthen security. - - 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 state: State of the task (Active, Resolved etc.) - :vartype state: str - :ivar creation_time_utc: The time this task was discovered in UTC - :vartype creation_time_utc: datetime - :param security_task_parameters: - :type security_task_parameters: - ~azure.mgmt.security.models.SecurityTaskParameters - :ivar last_state_change_time_utc: The time this task's details were last - changed in UTC - :vartype last_state_change_time_utc: datetime - :ivar sub_state: Additional data on the state of the task - :vartype sub_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'creation_time_utc': {'readonly': True}, - 'last_state_change_time_utc': {'readonly': True}, - 'sub_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'creation_time_utc': {'key': 'properties.creationTimeUtc', 'type': 'iso-8601'}, - 'security_task_parameters': {'key': 'properties.securityTaskParameters', 'type': 'SecurityTaskParameters'}, - 'last_state_change_time_utc': {'key': 'properties.lastStateChangeTimeUtc', 'type': 'iso-8601'}, - 'sub_state': {'key': 'properties.subState', 'type': 'str'}, - } - - def __init__(self, *, security_task_parameters=None, **kwargs) -> None: - super(SecurityTask, self).__init__(**kwargs) - self.state = None - self.creation_time_utc = None - self.security_task_parameters = security_task_parameters - self.last_state_change_time_utc = None - self.sub_state = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label.py deleted file mode 100644 index 09fd4a0bee30..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SensitivityLabel(Model): - """The sensitivity label. - - :param display_name: The name of the sensitivity label. - :type display_name: str - :param order: The order of the sensitivity label. - :type order: float - :param enabled: Indicates whether the label is enabled or not. - :type enabled: bool - """ - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'float'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(SensitivityLabel, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.order = kwargs.get('order', None) - self.enabled = kwargs.get('enabled', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label_py3.py deleted file mode 100644 index 79b0766f48c8..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SensitivityLabel(Model): - """The sensitivity label. - - :param display_name: The name of the sensitivity label. - :type display_name: str - :param order: The order of the sensitivity label. - :type order: float - :param enabled: Indicates whether the label is enabled or not. - :type enabled: bool - """ - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'float'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, *, display_name: str=None, order: float=None, enabled: bool=None, **kwargs) -> None: - super(SensitivityLabel, self).__init__(**kwargs) - self.display_name = display_name - self.order = order - self.enabled = enabled diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting.py deleted file mode 100644 index 9dd2c8f9944c..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .setting_resource import SettingResource - - -class Setting(SettingResource): - """Represents a security setting in Azure Security Center. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Required. the kind of the settings string - (DataExportSetting). Possible values include: 'DataExportSetting', - 'AlertSuppressionSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Setting, self).__init__(**kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_paged.py deleted file mode 100644 index 5ab8b2585b4a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SettingPaged(Paged): - """ - A paging container for iterating over a list of :class:`Setting ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Setting]'} - } - - def __init__(self, *args, **kwargs): - - super(SettingPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_py3.py deleted file mode 100644 index 0611d4ebdd49..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .setting_resource_py3 import SettingResource - - -class Setting(SettingResource): - """Represents a security setting in Azure Security Center. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Required. the kind of the settings string - (DataExportSetting). Possible values include: 'DataExportSetting', - 'AlertSuppressionSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, kind, **kwargs) -> None: - super(Setting, self).__init__(kind=kind, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource.py deleted file mode 100644 index d20bda7cab66..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class SettingResource(Resource): - """The kind of the security setting. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Required. the kind of the settings string - (DataExportSetting). Possible values include: 'DataExportSetting', - 'AlertSuppressionSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SettingResource, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource_py3.py deleted file mode 100644 index 4feeff7166c5..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class SettingResource(Resource): - """The kind of the security setting. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Required. the kind of the settings string - (DataExportSetting). Possible values include: 'DataExportSetting', - 'AlertSuppressionSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, kind, **kwargs) -> None: - super(SettingResource, self).__init__(**kwargs) - self.kind = kind diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource.py deleted file mode 100644 index 6bf07b3d3164..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TopologyResource(Model): - """TopologyResource. - - 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 - :ivar calculated_date_time: The UTC time on which the topology was - calculated - :vartype calculated_date_time: datetime - :ivar topology_resources: Azure resources which are part of this topology - resource - :vartype topology_resources: - list[~azure.mgmt.security.models.TopologySingleResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'calculated_date_time': {'readonly': True}, - 'topology_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, - 'topology_resources': {'key': 'properties.topologyResources', 'type': '[TopologySingleResource]'}, - } - - def __init__(self, **kwargs): - super(TopologyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.calculated_date_time = None - self.topology_resources = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_paged.py deleted file mode 100644 index 8c104aa5970a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class TopologyResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`TopologyResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TopologyResource]'} - } - - def __init__(self, *args, **kwargs): - - super(TopologyResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_py3.py deleted file mode 100644 index 00cca774a552..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TopologyResource(Model): - """TopologyResource. - - 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 - :ivar calculated_date_time: The UTC time on which the topology was - calculated - :vartype calculated_date_time: datetime - :ivar topology_resources: Azure resources which are part of this topology - resource - :vartype topology_resources: - list[~azure.mgmt.security.models.TopologySingleResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'calculated_date_time': {'readonly': True}, - 'topology_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, - 'topology_resources': {'key': 'properties.topologyResources', 'type': '[TopologySingleResource]'}, - } - - def __init__(self, **kwargs) -> None: - super(TopologyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.calculated_date_time = None - self.topology_resources = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource.py deleted file mode 100644 index f79f4c0f1a73..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TopologySingleResource(Model): - """TopologySingleResource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_id: Azure resource id - :vartype resource_id: str - :ivar severity: The security severity of the resource - :vartype severity: str - :ivar recommendations_exist: Indicates if the resource has security - recommendations - :vartype recommendations_exist: bool - :ivar network_zones: Indicates the resource connectivity level to the - Internet (InternetFacing, Internal ,etc.) - :vartype network_zones: str - :ivar topology_score: Score of the resource based on its security severity - :vartype topology_score: int - :ivar location: The location of this resource - :vartype location: str - :ivar parents: Azure resources connected to this resource which are in - higher level in the topology view - :vartype parents: - list[~azure.mgmt.security.models.TopologySingleResourceParent] - :ivar children: Azure resources connected to this resource which are in - lower level in the topology view - :vartype children: - list[~azure.mgmt.security.models.TopologySingleResourceChild] - """ - - _validation = { - 'resource_id': {'readonly': True}, - 'severity': {'readonly': True}, - 'recommendations_exist': {'readonly': True}, - 'network_zones': {'readonly': True}, - 'topology_score': {'readonly': True}, - 'location': {'readonly': True}, - 'parents': {'readonly': True}, - 'children': {'readonly': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'severity': {'key': 'severity', 'type': 'str'}, - 'recommendations_exist': {'key': 'recommendationsExist', 'type': 'bool'}, - 'network_zones': {'key': 'networkZones', 'type': 'str'}, - 'topology_score': {'key': 'topologyScore', 'type': 'int'}, - 'location': {'key': 'location', 'type': 'str'}, - 'parents': {'key': 'parents', 'type': '[TopologySingleResourceParent]'}, - 'children': {'key': 'children', 'type': '[TopologySingleResourceChild]'}, - } - - def __init__(self, **kwargs): - super(TopologySingleResource, self).__init__(**kwargs) - self.resource_id = None - self.severity = None - self.recommendations_exist = None - self.network_zones = None - self.topology_score = None - self.location = None - self.parents = None - self.children = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child.py deleted file mode 100644 index 257d81aab76d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TopologySingleResourceChild(Model): - """TopologySingleResourceChild. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_id: Azure resource id which serves as child resource in - topology view - :vartype resource_id: str - """ - - _validation = { - 'resource_id': {'readonly': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TopologySingleResourceChild, self).__init__(**kwargs) - self.resource_id = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child_py3.py deleted file mode 100644 index a4e41c33fe64..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TopologySingleResourceChild(Model): - """TopologySingleResourceChild. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_id: Azure resource id which serves as child resource in - topology view - :vartype resource_id: str - """ - - _validation = { - 'resource_id': {'readonly': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(TopologySingleResourceChild, self).__init__(**kwargs) - self.resource_id = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent.py deleted file mode 100644 index c79aba299feb..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TopologySingleResourceParent(Model): - """TopologySingleResourceParent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_id: Azure resource id which serves as parent resource in - topology view - :vartype resource_id: str - """ - - _validation = { - 'resource_id': {'readonly': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TopologySingleResourceParent, self).__init__(**kwargs) - self.resource_id = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent_py3.py deleted file mode 100644 index 6249dcea8849..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TopologySingleResourceParent(Model): - """TopologySingleResourceParent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_id: Azure resource id which serves as parent resource in - topology view - :vartype resource_id: str - """ - - _validation = { - 'resource_id': {'readonly': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(TopologySingleResourceParent, self).__init__(**kwargs) - self.resource_id = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_py3.py deleted file mode 100644 index 529974e5619a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TopologySingleResource(Model): - """TopologySingleResource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_id: Azure resource id - :vartype resource_id: str - :ivar severity: The security severity of the resource - :vartype severity: str - :ivar recommendations_exist: Indicates if the resource has security - recommendations - :vartype recommendations_exist: bool - :ivar network_zones: Indicates the resource connectivity level to the - Internet (InternetFacing, Internal ,etc.) - :vartype network_zones: str - :ivar topology_score: Score of the resource based on its security severity - :vartype topology_score: int - :ivar location: The location of this resource - :vartype location: str - :ivar parents: Azure resources connected to this resource which are in - higher level in the topology view - :vartype parents: - list[~azure.mgmt.security.models.TopologySingleResourceParent] - :ivar children: Azure resources connected to this resource which are in - lower level in the topology view - :vartype children: - list[~azure.mgmt.security.models.TopologySingleResourceChild] - """ - - _validation = { - 'resource_id': {'readonly': True}, - 'severity': {'readonly': True}, - 'recommendations_exist': {'readonly': True}, - 'network_zones': {'readonly': True}, - 'topology_score': {'readonly': True}, - 'location': {'readonly': True}, - 'parents': {'readonly': True}, - 'children': {'readonly': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'severity': {'key': 'severity', 'type': 'str'}, - 'recommendations_exist': {'key': 'recommendationsExist', 'type': 'bool'}, - 'network_zones': {'key': 'networkZones', 'type': 'str'}, - 'topology_score': {'key': 'topologyScore', 'type': 'int'}, - 'location': {'key': 'location', 'type': 'str'}, - 'parents': {'key': 'parents', 'type': '[TopologySingleResourceParent]'}, - 'children': {'key': 'children', 'type': '[TopologySingleResourceChild]'}, - } - - def __init__(self, **kwargs) -> None: - super(TopologySingleResource, self).__init__(**kwargs) - self.resource_id = None - self.severity = None - self.recommendations_exist = None - self.network_zones = None - self.topology_score = None - self.location = None - self.parents = None - self.children = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting.py deleted file mode 100644 index 327a5b9d8897..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class WorkspaceSetting(Resource): - """Configures where to store the OMS agent data for workspaces under a scope. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param workspace_id: Required. The full Azure ID of the workspace to save - the data in - :type workspace_id: str - :param scope: Required. All the VMs in this scope will send their security - data to the mentioned workspace unless overridden by a setting with more - specific scope - :type scope: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'workspace_id': {'required': True}, - 'scope': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkspaceSetting, self).__init__(**kwargs) - self.workspace_id = kwargs.get('workspace_id', None) - self.scope = kwargs.get('scope', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_paged.py deleted file mode 100644 index 95122f57b90e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class WorkspaceSettingPaged(Paged): - """ - A paging container for iterating over a list of :class:`WorkspaceSetting ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WorkspaceSetting]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkspaceSettingPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_py3.py deleted file mode 100644 index aaa1be0b59a9..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class WorkspaceSetting(Resource): - """Configures where to store the OMS agent data for workspaces under a scope. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param workspace_id: Required. The full Azure ID of the workspace to save - the data in - :type workspace_id: str - :param scope: Required. All the VMs in this scope will send their security - data to the mentioned workspace unless overridden by a setting with more - specific scope - :type scope: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'workspace_id': {'required': True}, - 'scope': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - } - - def __init__(self, *, workspace_id: str, scope: str, **kwargs) -> None: - super(WorkspaceSetting, self).__init__(**kwargs) - self.workspace_id = workspace_id - self.scope = scope 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 23522fd792f8..15d69b017b72 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 @@ -9,32 +9,52 @@ # regenerated. # -------------------------------------------------------------------------- -from .pricings_operations import PricingsOperations -from .alerts_operations import AlertsOperations -from .settings_operations import SettingsOperations -from .allowed_connections_operations import AllowedConnectionsOperations -from .discovered_security_solutions_operations import DiscoveredSecuritySolutionsOperations -from .external_security_solutions_operations import ExternalSecuritySolutionsOperations -from .jit_network_access_policies_operations import JitNetworkAccessPoliciesOperations -from .locations_operations import LocationsOperations -from .operations import Operations -from .tasks_operations import TasksOperations -from .topology_operations import TopologyOperations -from .advanced_threat_protection_operations import AdvancedThreatProtectionOperations -from .auto_provisioning_settings_operations import AutoProvisioningSettingsOperations -from .compliances_operations import CompliancesOperations -from .information_protection_policies_operations import InformationProtectionPoliciesOperations -from .security_contacts_operations import SecurityContactsOperations -from .workspace_settings_operations import WorkspaceSettingsOperations +from ._compliance_results_operations import ComplianceResultsOperations +from ._pricings_operations import PricingsOperations +from ._alerts_operations import AlertsOperations +from ._settings_operations import SettingsOperations +from ._device_security_groups_operations import DeviceSecurityGroupsOperations +from ._iot_security_solution_operations import IotSecuritySolutionOperations +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 ._allowed_connections_operations import AllowedConnectionsOperations +from ._discovered_security_solutions_operations import DiscoveredSecuritySolutionsOperations +from ._external_security_solutions_operations import ExternalSecuritySolutionsOperations +from ._jit_network_access_policies_operations import JitNetworkAccessPoliciesOperations +from ._adaptive_application_controls_operations import AdaptiveApplicationControlsOperations +from ._locations_operations import LocationsOperations +from ._operations import Operations +from ._tasks_operations import TasksOperations +from ._topology_operations import TopologyOperations +from ._advanced_threat_protection_operations import AdvancedThreatProtectionOperations +from ._auto_provisioning_settings_operations import AutoProvisioningSettingsOperations +from ._compliances_operations import CompliancesOperations +from ._information_protection_policies_operations import InformationProtectionPoliciesOperations +from ._security_contacts_operations import SecurityContactsOperations +from ._workspace_settings_operations import WorkspaceSettingsOperations +from ._regulatory_compliance_standards_operations import RegulatoryComplianceStandardsOperations +from ._regulatory_compliance_controls_operations import RegulatoryComplianceControlsOperations +from ._regulatory_compliance_assessments_operations import RegulatoryComplianceAssessmentsOperations +from ._server_vulnerability_assessment_operations import ServerVulnerabilityAssessmentOperations +from ._sub_assessments_operations import SubAssessmentsOperations +from ._automations_operations import AutomationsOperations __all__ = [ + 'ComplianceResultsOperations', 'PricingsOperations', 'AlertsOperations', 'SettingsOperations', + 'DeviceSecurityGroupsOperations', + 'IotSecuritySolutionOperations', + 'IotSecuritySolutionAnalyticsOperations', + 'IotSecuritySolutionsAnalyticsAggregatedAlertOperations', + 'IotSecuritySolutionsAnalyticsRecommendationOperations', 'AllowedConnectionsOperations', 'DiscoveredSecuritySolutionsOperations', 'ExternalSecuritySolutionsOperations', 'JitNetworkAccessPoliciesOperations', + 'AdaptiveApplicationControlsOperations', 'LocationsOperations', 'Operations', 'TasksOperations', @@ -45,4 +65,10 @@ 'InformationProtectionPoliciesOperations', 'SecurityContactsOperations', 'WorkspaceSettingsOperations', + 'RegulatoryComplianceStandardsOperations', + 'RegulatoryComplianceControlsOperations', + 'RegulatoryComplianceAssessmentsOperations', + 'ServerVulnerabilityAssessmentOperations', + 'SubAssessmentsOperations', + 'AutomationsOperations', ] 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 new file mode 100644 index 000000000000..bab90ed88dee --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_adaptive_application_controls_operations.py @@ -0,0 +1,228 @@ +# 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 AdaptiveApplicationControlsOperations(object): + """AdaptiveApplicationControlsOperations 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: "2015-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-01-preview" + + self.config = config + + 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. + + :param include_path_recommendations: Include the policy rules + :type include_path_recommendations: bool + :param summary: Return output in a summarized form + :type summary: bool + :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: AppWhitelistingGroups or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.AppWhitelistingGroups 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') + if include_path_recommendations is not None: + query_parameters['includePathRecommendations'] = self._serialize.query("include_path_recommendations", include_path_recommendations, 'bool') + if summary is not None: + query_parameters['summary'] = self._serialize.query("summary", summary, 'bool') + + # 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('AppWhitelistingGroups', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/applicationWhitelistings'} + + 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 + :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 + ~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}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'groupName': self._serialize.url("group_name", group_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('AppWhitelistingGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}'} + + def put( + self, group_name, body, custom_headers=None, raw=False, **operation_config): + """Update an application control VM/server group. + + :param group_name: Name of an application control VM/server group + :type group_name: str + :param body: The updated VM/server group data + :type body: ~azure.mgmt.security.models.AppWhitelistingPutGroupData + :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 + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.put.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'), + 'groupName': self._serialize.url("group_name", group_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(body, 'AppWhitelistingPutGroupData') + + # 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('AppWhitelistingGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + put.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/advanced_threat_protection_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_advanced_threat_protection_operations.py similarity index 98% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/advanced_threat_protection_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_advanced_threat_protection_operations.py index 2bdef2916fbc..57930d189083 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/advanced_threat_protection_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_advanced_threat_protection_operations.py @@ -19,6 +19,8 @@ class AdvancedThreatProtectionOperations(object): """AdvancedThreatProtectionOperations 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. @@ -89,7 +91,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AdvancedThreatProtectionSetting', response) @@ -159,7 +160,6 @@ def create( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AdvancedThreatProtectionSetting', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/alerts_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_alerts_operations.py similarity index 78% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/alerts_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_alerts_operations.py index d0d86845ded3..d53d5a1d64db 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/alerts_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_alerts_operations.py @@ -19,6 +19,8 @@ class AlertsOperations(object): """AlertsOperations 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. @@ -57,8 +59,7 @@ def list( ~azure.mgmt.security.models.AlertPaged[~azure.mgmt.security.models.Alert] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -93,6 +94,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -103,12 +109,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/alerts'} @@ -136,8 +140,7 @@ def list_by_resource_group( ~azure.mgmt.security.models.AlertPaged[~azure.mgmt.security.models.Alert] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -173,6 +176,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -183,12 +191,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/alerts'} @@ -214,8 +220,7 @@ def list_subscription_level_alerts_by_region( ~azure.mgmt.security.models.AlertPaged[~azure.mgmt.security.models.Alert] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_subscription_level_alerts_by_region.metadata['url'] @@ -251,6 +256,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -261,12 +271,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_subscription_level_alerts_by_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts'} @@ -295,8 +303,7 @@ def list_resource_group_level_alerts_by_region( ~azure.mgmt.security.models.AlertPaged[~azure.mgmt.security.models.Alert] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_resource_group_level_alerts_by_region.metadata['url'] @@ -333,6 +340,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -343,12 +355,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_resource_group_level_alerts_by_region.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts'} @@ -402,7 +412,6 @@ def get_subscription_level_alert( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Alert', response) @@ -467,7 +476,6 @@ def get_resource_group_level_alerts( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Alert', response) @@ -478,15 +486,12 @@ def get_resource_group_level_alerts( return deserialized get_resource_group_level_alerts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}'} - def update_subscription_level_alert_state( - self, alert_name, alert_update_action_type, custom_headers=None, raw=False, **operation_config): + def update_subscription_level_alert_state_to_dismiss( + self, alert_name, custom_headers=None, raw=False, **operation_config): """Update the alert's state. :param alert_name: Name of the alert object :type alert_name: str - :param alert_update_action_type: Type of the action to do on the - alert. Possible values include: 'Dismiss', 'Reactivate' - :type alert_update_action_type: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -497,12 +502,117 @@ def update_subscription_level_alert_state( :raises: :class:`CloudError` """ # Construct URL - url = self.update_subscription_level_alert_state.metadata['url'] + url = self.update_subscription_level_alert_state_to_dismiss.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'alertName': self._serialize.url("alert_name", alert_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [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 + update_subscription_level_alert_state_to_dismiss.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss'} + + def update_subscription_level_alert_state_to_reactivate( + self, alert_name, custom_headers=None, raw=False, **operation_config): + """Update the alert's state. + + :param alert_name: Name of the alert object + :type alert_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_subscription_level_alert_state_to_reactivate.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'), + 'alertName': self._serialize.url("alert_name", alert_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [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 + update_subscription_level_alert_state_to_reactivate.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/reactivate'} + + def update_resource_group_level_alert_state_to_dismiss( + self, alert_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Update the alert's state. + + :param alert_name: Name of the alert object + :type alert_name: str + :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 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.update_resource_group_level_alert_state_to_dismiss.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), 'alertName': self._serialize.url("alert_name", alert_name, 'str'), - 'alertUpdateActionType': self._serialize.url("alert_update_action_type", alert_update_action_type, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') } url = self._client.format_url(url, **path_format_arguments) @@ -531,17 +641,14 @@ def update_subscription_level_alert_state( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - update_subscription_level_alert_state.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/{alertUpdateActionType}'} + update_resource_group_level_alert_state_to_dismiss.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss'} - def update_resource_group_level_alert_state( - self, alert_name, alert_update_action_type, resource_group_name, custom_headers=None, raw=False, **operation_config): + def update_resource_group_level_alert_state_to_reactivate( + self, alert_name, resource_group_name, custom_headers=None, raw=False, **operation_config): """Update the alert's state. :param alert_name: Name of the alert object :type alert_name: str - :param alert_update_action_type: Type of the action to do on the - alert. Possible values include: 'Dismiss', 'Reactivate' - :type alert_update_action_type: str :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 @@ -555,12 +662,11 @@ def update_resource_group_level_alert_state( :raises: :class:`CloudError` """ # Construct URL - url = self.update_resource_group_level_alert_state.metadata['url'] + url = self.update_resource_group_level_alert_state_to_reactivate.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'), 'alertName': self._serialize.url("alert_name", alert_name, 'str'), - 'alertUpdateActionType': self._serialize.url("alert_update_action_type", alert_update_action_type, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') } url = self._client.format_url(url, **path_format_arguments) @@ -590,4 +696,4 @@ def update_resource_group_level_alert_state( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - update_resource_group_level_alert_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/{alertUpdateActionType}'} + update_resource_group_level_alert_state_to_reactivate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/reactivate'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/allowed_connections_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_allowed_connections_operations.py similarity index 94% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/allowed_connections_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_allowed_connections_operations.py index 2d97b7366913..8aa4cd8ba546 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/allowed_connections_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_allowed_connections_operations.py @@ -19,6 +19,8 @@ class AllowedConnectionsOperations(object): """AllowedConnectionsOperations 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. @@ -52,8 +54,7 @@ def list( ~azure.mgmt.security.models.AllowedConnectionsResourcePaged[~azure.mgmt.security.models.AllowedConnectionsResource] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -82,6 +83,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -92,12 +98,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/allowedConnections'} @@ -117,8 +121,7 @@ def list_by_home_region( ~azure.mgmt.security.models.AllowedConnectionsResourcePaged[~azure.mgmt.security.models.AllowedConnectionsResource] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_home_region.metadata['url'] @@ -148,6 +151,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -158,12 +166,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections'} @@ -224,7 +230,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AllowedConnectionsResource', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/auto_provisioning_settings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_auto_provisioning_settings_operations.py similarity index 96% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/auto_provisioning_settings_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_auto_provisioning_settings_operations.py index 9d6eccd8d530..3390cc0eb08b 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/auto_provisioning_settings_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_auto_provisioning_settings_operations.py @@ -19,6 +19,8 @@ class AutoProvisioningSettingsOperations(object): """AutoProvisioningSettingsOperations 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. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.security.models.AutoProvisioningSettingPaged[~azure.mgmt.security.models.AutoProvisioningSetting] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -81,6 +82,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -91,12 +97,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AutoProvisioningSettingPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AutoProvisioningSettingPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AutoProvisioningSettingPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/autoProvisioningSettings'} @@ -149,7 +153,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AutoProvisioningSetting', response) @@ -217,7 +220,6 @@ def create( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AutoProvisioningSetting', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_automations_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_automations_operations.py new file mode 100644 index 000000000000..e2b432ba4be7 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_automations_operations.py @@ -0,0 +1,437 @@ +# 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 AutomationsOperations(object): + """AutomationsOperations 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-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the security automations in the specified subscription. Use + the 'nextLink' property in the response to get the next page of + security automations for the specified 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 Automation + :rtype: + ~azure.mgmt.security.models.AutomationPaged[~azure.mgmt.security.models.Automation] + :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.AutomationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/automations'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the security automations in the specified resource group. Use + the 'nextLink' property in the response to get the next page of + security automations for the specified resource group. + + :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 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 Automation + :rtype: + ~azure.mgmt.security.models.AutomationPaged[~azure.mgmt.security.models.Automation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + 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.AutomationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations'} + + def get( + self, resource_group_name, automation_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about the model of a security automation. + + :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 automation_name: The security automation name. + :type automation_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: Automation or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.Automation 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\._\(\)]+$'), + 'automationName': self._serialize.url("automation_name", automation_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('Automation', 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/automations/{automationName}'} + + def create_or_update( + self, resource_group_name, automation_name, automation, custom_headers=None, raw=False, **operation_config): + """Creates or updates a security automation. If a security automation is + already created and a subsequent request is issued for the same + automation id, then it will be updated. + + :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 automation_name: The security automation name. + :type automation_name: str + :param automation: The security automation resource + :type automation: ~azure.mgmt.security.models.Automation + :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: Automation or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.Automation or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'automationName': self._serialize.url("automation_name", automation_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(automation, 'Automation') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Automation', response) + if response.status_code == 201: + deserialized = self._deserialize('Automation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations/{automationName}'} + + def delete( + self, resource_group_name, automation_name, custom_headers=None, raw=False, **operation_config): + """Deletes a security automation. + + :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 automation_name: The security automation name. + :type automation_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'automationName': self._serialize.url("automation_name", automation_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 [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations/{automationName}'} + + def validate( + self, resource_group_name, automation_name, automation, custom_headers=None, raw=False, **operation_config): + """Validates the security automation model before create or update. Any + validation errors are returned to the client. + + :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 automation_name: The security automation name. + :type automation_name: str + :param automation: The security automation resource + :type automation: ~azure.mgmt.security.models.Automation + :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: AutomationValidationStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.AutomationValidationStatus or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.validate.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\._\(\)]+$'), + 'automationName': self._serialize.url("automation_name", automation_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(automation, 'Automation') + + # Construct and send request + request = self._client.post(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('AutomationValidationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations/{automationName}/validate'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliance_results_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliance_results_operations.py new file mode 100644 index 000000000000..9b163bbbb1e0 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliance_results_operations.py @@ -0,0 +1,171 @@ +# 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 ComplianceResultsOperations(object): + """ComplianceResultsOperations 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: "2017-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01" + + self.config = config + + def list( + self, scope, custom_headers=None, raw=False, **operation_config): + """Security compliance results in the subscription. + + :param scope: Scope of the query, can be subscription + (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management + group (/providers/Microsoft.Management/managementGroups/mgName). + :type scope: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ComplianceResult + :rtype: + ~azure.mgmt.security.models.ComplianceResultPaged[~azure.mgmt.security.models.ComplianceResult] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + 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.ComplianceResultPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/{scope}/providers/Microsoft.Security/complianceResults'} + + def get( + self, resource_id, compliance_result_name, custom_headers=None, raw=False, **operation_config): + """Security Compliance Result. + + :param resource_id: The identifier of the resource. + :type resource_id: str + :param compliance_result_name: name of the desired assessment + compliance result + :type compliance_result_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: ComplianceResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.ComplianceResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + 'complianceResultName': self._serialize.url("compliance_result_name", compliance_result_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('ComplianceResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/{resourceId}/providers/Microsoft.Security/complianceResults/{complianceResultName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/compliances_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliances_operations.py similarity index 94% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/compliances_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliances_operations.py index 3edc73a4fc32..90e921623526 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/compliances_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliances_operations.py @@ -19,6 +19,8 @@ class CompliancesOperations(object): """CompliancesOperations 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. @@ -55,8 +57,7 @@ def list( ~azure.mgmt.security.models.CompliancePaged[~azure.mgmt.security.models.Compliance] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -85,6 +86,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -95,12 +101,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.CompliancePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.CompliancePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.CompliancePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/{scope}/providers/Microsoft.Security/compliances'} @@ -157,7 +161,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Compliance', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_device_security_groups_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_device_security_groups_operations.py new file mode 100644 index 000000000000..581733e3c324 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_device_security_groups_operations.py @@ -0,0 +1,298 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class DeviceSecurityGroupsOperations(object): + """DeviceSecurityGroupsOperations 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_id, custom_headers=None, raw=False, **operation_config): + """Use this method get the list of device security groups for the + specified IoT Hub resource. + + :param resource_id: The identifier of the resource. + :type resource_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DeviceSecurityGroup + :rtype: + ~azure.mgmt.security.models.DeviceSecurityGroupPaged[~azure.mgmt.security.models.DeviceSecurityGroup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceId': self._serialize.url("resource_id", resource_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + 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.DeviceSecurityGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups'} + + def get( + self, resource_id, device_security_group_name, custom_headers=None, raw=False, **operation_config): + """Use this method to get the device security group for the specified IoT + Hub resource. + + :param resource_id: The identifier of the resource. + :type resource_id: str + :param device_security_group_name: The name of the device security + group. Note that the name of the device security group is case + insensitive. + :type device_security_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: DeviceSecurityGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.DeviceSecurityGroup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + 'deviceSecurityGroupName': self._serialize.url("device_security_group_name", device_security_group_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('DeviceSecurityGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}'} + + def create_or_update( + self, resource_id, device_security_group_name, device_security_group, custom_headers=None, raw=False, **operation_config): + """Use this method to creates or updates the device security group on a + specified IoT Hub resource. + + :param resource_id: The identifier of the resource. + :type resource_id: str + :param device_security_group_name: The name of the device security + group. Note that the name of the device security group is case + insensitive. + :type device_security_group_name: str + :param device_security_group: Security group object. + :type device_security_group: + ~azure.mgmt.security.models.DeviceSecurityGroup + :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: DeviceSecurityGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.DeviceSecurityGroup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + 'deviceSecurityGroupName': self._serialize.url("device_security_group_name", device_security_group_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(device_security_group, 'DeviceSecurityGroup') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DeviceSecurityGroup', response) + if response.status_code == 201: + deserialized = self._deserialize('DeviceSecurityGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}'} + + def delete( + self, resource_id, device_security_group_name, custom_headers=None, raw=False, **operation_config): + """User this method to deletes the device security group. + + :param resource_id: The identifier of the resource. + :type resource_id: str + :param device_security_group_name: The name of the device security + group. Note that the name of the device security group is case + insensitive. + :type device_security_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: 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 = { + 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + 'deviceSecurityGroupName': self._serialize.url("device_security_group_name", device_security_group_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': '/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/discovered_security_solutions_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_discovered_security_solutions_operations.py similarity index 94% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/discovered_security_solutions_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_discovered_security_solutions_operations.py index 339bbfddd5bf..bd553e4567fd 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/discovered_security_solutions_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_discovered_security_solutions_operations.py @@ -19,6 +19,8 @@ class DiscoveredSecuritySolutionsOperations(object): """DiscoveredSecuritySolutionsOperations 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. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.security.models.DiscoveredSecuritySolutionPaged[~azure.mgmt.security.models.DiscoveredSecuritySolution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -81,6 +82,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -91,12 +97,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DiscoveredSecuritySolutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DiscoveredSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DiscoveredSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/discoveredSecuritySolutions'} @@ -116,8 +120,7 @@ def list_by_home_region( ~azure.mgmt.security.models.DiscoveredSecuritySolutionPaged[~azure.mgmt.security.models.DiscoveredSecuritySolution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_home_region.metadata['url'] @@ -147,6 +150,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -157,12 +165,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DiscoveredSecuritySolutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DiscoveredSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DiscoveredSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/discoveredSecuritySolutions'} @@ -221,7 +227,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DiscoveredSecuritySolution', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/external_security_solutions_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_external_security_solutions_operations.py similarity index 94% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/external_security_solutions_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_external_security_solutions_operations.py index 3286ae570426..69b6019e5e25 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/external_security_solutions_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_external_security_solutions_operations.py @@ -19,6 +19,8 @@ class ExternalSecuritySolutionsOperations(object): """ExternalSecuritySolutionsOperations 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. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.security.models.ExternalSecuritySolutionPaged[~azure.mgmt.security.models.ExternalSecuritySolution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -81,6 +82,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -91,12 +97,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ExternalSecuritySolutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ExternalSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ExternalSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/externalSecuritySolutions'} @@ -116,8 +120,7 @@ def list_by_home_region( ~azure.mgmt.security.models.ExternalSecuritySolutionPaged[~azure.mgmt.security.models.ExternalSecuritySolution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_home_region.metadata['url'] @@ -147,6 +150,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -157,12 +165,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ExternalSecuritySolutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ExternalSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ExternalSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/ExternalSecuritySolutions'} @@ -221,7 +227,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ExternalSecuritySolution', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/information_protection_policies_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_information_protection_policies_operations.py similarity index 96% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/information_protection_policies_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_information_protection_policies_operations.py index d4c5fe7329b4..9ee97c1bbf93 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/information_protection_policies_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_information_protection_policies_operations.py @@ -19,6 +19,8 @@ class InformationProtectionPoliciesOperations(object): """InformationProtectionPoliciesOperations 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. @@ -90,7 +92,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('InformationProtectionPolicy', response) @@ -154,7 +155,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('InformationProtectionPolicy', response) if response.status_code == 201: @@ -185,8 +185,7 @@ def list( ~azure.mgmt.security.models.InformationProtectionPolicyPaged[~azure.mgmt.security.models.InformationProtectionPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -215,6 +214,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -225,12 +229,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.InformationProtectionPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.InformationProtectionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.InformationProtectionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/{scope}/providers/Microsoft.Security/informationProtectionPolicies'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solution_analytics_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solution_analytics_operations.py new file mode 100644 index 000000000000..a7ee65858d04 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solution_analytics_operations.py @@ -0,0 +1,167 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IotSecuritySolutionAnalyticsOperations(object): + """IotSecuritySolutionAnalyticsOperations 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): + """Use this method to get IoT security Analytics metrics in an array. + + :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: IoTSecuritySolutionAnalyticsModelList or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelList 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('IoTSecuritySolutionAnalyticsModelList', 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}/analyticsModels'} + + def get( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """Use this method to get IoT Security Analytics metrics. + + :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: IoTSecuritySolutionAnalyticsModel or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IoTSecuritySolutionAnalyticsModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solution_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solution_operations.py new file mode 100644 index 000000000000..8a820da44265 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solution_operations.py @@ -0,0 +1,447 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IotSecuritySolutionOperations(object): + """IotSecuritySolutionOperations operations. + + 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_by_subscription( + self, filter=None, custom_headers=None, raw=False, **operation_config): + """Use this method to get the list of IoT Security solutions by + subscription. + + :param filter: Filter the IoT Security solution with OData syntax. + Supports filtering by iotHubs. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IoTSecuritySolutionModel + :rtype: + ~azure.mgmt.security.models.IoTSecuritySolutionModelPaged[~azure.mgmt.security.models.IoTSecuritySolutionModel] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + 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.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotSecuritySolutions'} + + def list_by_resource_group( + self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Use this method to get the list IoT Security solutions organized by + resource group. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param filter: Filter the IoT Security solution with OData syntax. + Supports filtering by iotHubs. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IoTSecuritySolutionModel + :rtype: + ~azure.mgmt.security.models.IoTSecuritySolutionModelPaged[~azure.mgmt.security.models.IoTSecuritySolutionModel] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + 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.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions'} + + def get( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """User this method to get details of a specific IoT Security solution + based on solution name. + + :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: IoTSecuritySolutionModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IoTSecuritySolutionModel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IoTSecuritySolutionModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} + + def create_or_update( + self, resource_group_name, solution_name, iot_security_solution_data, custom_headers=None, raw=False, **operation_config): + """Use this method to create or update yours IoT Security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The name of the IoT Security solution. + :type solution_name: str + :param iot_security_solution_data: The security solution data + :type iot_security_solution_data: + ~azure.mgmt.security.models.IoTSecuritySolutionModel + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecuritySolutionModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IoTSecuritySolutionModel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(iot_security_solution_data, 'IoTSecuritySolutionModel') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IoTSecuritySolutionModel', response) + if response.status_code == 201: + deserialized = self._deserialize('IoTSecuritySolutionModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} + + def update( + self, resource_group_name, solution_name, update_iot_security_solution_data, custom_headers=None, raw=False, **operation_config): + """Use this method to update existing IoT Security solution tags or user + defined resources. To update other fields use the CreateOrUpdate + method. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The name of the IoT Security solution. + :type solution_name: str + :param update_iot_security_solution_data: The security solution data + :type update_iot_security_solution_data: + ~azure.mgmt.security.models.UpdateIotSecuritySolutionData + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecuritySolutionModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IoTSecuritySolutionModel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(update_iot_security_solution_data, 'UpdateIotSecuritySolutionData') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IoTSecuritySolutionModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} + + def delete( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """Use this method to delete yours IoT Security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The 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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solutions_analytics_aggregated_alert_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solutions_analytics_aggregated_alert_operations.py new file mode 100644 index 000000000000..327bbbd5f397 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solutions_analytics_aggregated_alert_operations.py @@ -0,0 +1,241 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IotSecuritySolutionsAnalyticsAggregatedAlertOperations(object): + """IotSecuritySolutionsAnalyticsAggregatedAlertOperations operations. + + 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, top=None, custom_headers=None, raw=False, **operation_config): + """Use this method to get the aggregated alert list of yours IoT Security + solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The name of the IoT Security solution. + :type solution_name: str + :param top: Number of results to retrieve. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IoTSecurityAggregatedAlert + :rtype: + ~azure.mgmt.security.models.IoTSecurityAggregatedAlertPaged[~azure.mgmt.security.models.IoTSecurityAggregatedAlert] + :raises: :class:`CloudError` + """ + def 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 top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + 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.IoTSecurityAggregatedAlertPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts'} + + def get( + self, resource_group_name, solution_name, aggregated_alert_name, custom_headers=None, raw=False, **operation_config): + """Use this method to get a single the aggregated alert of yours IoT + Security solution. This aggregation is performed by alert name. + + :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 aggregated_alert_name: Identifier of the aggregated alert. + :type aggregated_alert_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecurityAggregatedAlert or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IoTSecurityAggregatedAlert or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str'), + 'aggregatedAlertName': self._serialize.url("aggregated_alert_name", aggregated_alert_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IoTSecurityAggregatedAlert', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts/{aggregatedAlertName}'} + + def dismiss( + self, resource_group_name, solution_name, aggregated_alert_name, custom_headers=None, raw=False, **operation_config): + """Use this method to dismiss an aggregated IoT Security Solution 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 aggregated_alert_name: Identifier of the aggregated alert. + :type aggregated_alert_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.dismiss.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str'), + 'aggregatedAlertName': self._serialize.url("aggregated_alert_name", aggregated_alert_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + dismiss.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts/{aggregatedAlertName}/dismiss'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solutions_analytics_recommendation_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solutions_analytics_recommendation_operations.py new file mode 100644 index 000000000000..57dbc1031ce4 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solutions_analytics_recommendation_operations.py @@ -0,0 +1,189 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IotSecuritySolutionsAnalyticsRecommendationOperations(object): + """IotSecuritySolutionsAnalyticsRecommendationOperations operations. + + 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 get( + self, resource_group_name, solution_name, aggregated_recommendation_name, custom_headers=None, raw=False, **operation_config): + """Use this method to get the aggregated security analytics recommendation + of yours IoT Security solution. This aggregation is performed by + recommendation name. + + :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 aggregated_recommendation_name: Name of the recommendation + aggregated for this query. + :type aggregated_recommendation_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecurityAggregatedRecommendation or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.security.models.IoTSecurityAggregatedRecommendation or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str'), + 'aggregatedRecommendationName': self._serialize.url("aggregated_recommendation_name", aggregated_recommendation_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IoTSecurityAggregatedRecommendation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedRecommendations/{aggregatedRecommendationName}'} + + def list( + self, resource_group_name, solution_name, top=None, custom_headers=None, raw=False, **operation_config): + """Use this method to get the list of aggregated security analytics + recommendations of yours IoT Security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The name of the IoT Security solution. + :type solution_name: str + :param top: Number of results to retrieve. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + IoTSecurityAggregatedRecommendation + :rtype: + ~azure.mgmt.security.models.IoTSecurityAggregatedRecommendationPaged[~azure.mgmt.security.models.IoTSecurityAggregatedRecommendation] + :raises: :class:`CloudError` + """ + def 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 top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + 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.IoTSecurityAggregatedRecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedRecommendations'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/jit_network_access_policies_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_jit_network_access_policies_operations.py similarity index 95% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/jit_network_access_policies_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_jit_network_access_policies_operations.py index a8b9c88bed35..16a6f67da9d1 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/jit_network_access_policies_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_jit_network_access_policies_operations.py @@ -19,6 +19,8 @@ class JitNetworkAccessPoliciesOperations(object): """JitNetworkAccessPoliciesOperations 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. @@ -53,8 +55,7 @@ def list( ~azure.mgmt.security.models.JitNetworkAccessPolicyPaged[~azure.mgmt.security.models.JitNetworkAccessPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -83,6 +84,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -93,12 +99,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/jitNetworkAccessPolicies'} @@ -118,8 +122,7 @@ def list_by_region( ~azure.mgmt.security.models.JitNetworkAccessPolicyPaged[~azure.mgmt.security.models.JitNetworkAccessPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_region.metadata['url'] @@ -149,6 +152,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -159,12 +167,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies'} @@ -187,8 +193,7 @@ def list_by_resource_group( ~azure.mgmt.security.models.JitNetworkAccessPolicyPaged[~azure.mgmt.security.models.JitNetworkAccessPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -218,6 +223,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -228,12 +238,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/jitNetworkAccessPolicies'} @@ -256,8 +264,7 @@ def list_by_resource_group_and_region( ~azure.mgmt.security.models.JitNetworkAccessPolicyPaged[~azure.mgmt.security.models.JitNetworkAccessPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group_and_region.metadata['url'] @@ -288,6 +295,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -298,12 +310,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group_and_region.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies'} @@ -363,7 +373,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JitNetworkAccessPolicy', response) @@ -435,7 +444,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JitNetworkAccessPolicy', response) @@ -503,7 +511,7 @@ def delete( delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}'} def initiate( - self, resource_group_name, jit_network_access_policy_name, virtual_machines, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, jit_network_access_policy_name, virtual_machines, justification=None, custom_headers=None, raw=False, **operation_config): """Initiate a JIT access from a specific Just-in-Time policy configuration. @@ -517,6 +525,9 @@ def initiate( access for :type virtual_machines: list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiateVirtualMachine] + :param justification: The justification for making the initiate + request + :type justification: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -527,7 +538,7 @@ def initiate( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - body = models.JitNetworkAccessPolicyInitiateRequest(virtual_machines=virtual_machines) + body = models.JitNetworkAccessPolicyInitiateRequest(virtual_machines=virtual_machines, justification=justification) # Construct URL url = self.initiate.metadata['url'] @@ -568,7 +579,6 @@ def initiate( raise exp deserialized = None - if response.status_code == 202: deserialized = self._deserialize('JitNetworkAccessRequest', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/locations_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_locations_operations.py similarity index 94% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/locations_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_locations_operations.py index 5aa7ba17569f..df6c428164d3 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/locations_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_locations_operations.py @@ -19,6 +19,8 @@ class LocationsOperations(object): """LocationsOperations 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. @@ -54,8 +56,7 @@ def list( ~azure.mgmt.security.models.AscLocationPaged[~azure.mgmt.security.models.AscLocation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -84,6 +85,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -94,12 +100,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AscLocationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AscLocationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AscLocationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations'} @@ -150,7 +154,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AscLocation', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_operations.py similarity index 90% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_operations.py index 5a2cacc56e2f..2f400c9b62e9 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_operations.py @@ -19,6 +19,8 @@ class Operations(object): """Operations 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. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.security.models.OperationPaged[~azure.mgmt.security.models.Operation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -87,12 +93,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.Security/operations'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_pricings_operations.py similarity index 92% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_pricings_operations.py index 85177f446714..e7d4637ae20b 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_pricings_operations.py @@ -19,6 +19,8 @@ class PricingsOperations(object): """PricingsOperations 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. @@ -39,7 +41,7 @@ def __init__(self, client, config, serializer, deserializer): def list( self, custom_headers=None, raw=False, **operation_config): - """Security pricing configurations in the subscription. + """Lists Security Center pricing configurations in the subscription. :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -82,7 +84,6 @@ def list( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PricingList', response) @@ -95,7 +96,8 @@ def list( def get( self, pricing_name, custom_headers=None, raw=False, **operation_config): - """Security pricing configuration in the subscription. + """Gets a provided Security Center pricing configuration in the + subscription. :param pricing_name: name of the pricing configuration :type pricing_name: str @@ -141,7 +143,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Pricing', response) @@ -154,12 +155,16 @@ def get( def update( self, pricing_name, pricing_tier, custom_headers=None, raw=False, **operation_config): - """Security pricing configuration in the subscription. + """Updates a provided Security Center pricing configuration in the + subscription. :param pricing_name: name of the pricing configuration :type pricing_name: str - :param pricing_tier: The pricing tier value. Possible values include: - 'Free', 'Standard' + :param pricing_tier: The pricing tier value. Azure Security Center is + provided in two pricing tiers: free and standard, with the standard + tier available with a trial period. The standard tier offers advanced + security capabilities, while the free tier offers basic security + features. Possible values include: 'Free', 'Standard' :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -209,7 +214,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Pricing', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_assessments_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_assessments_operations.py new file mode 100644 index 000000000000..353ea103d365 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_assessments_operations.py @@ -0,0 +1,188 @@ +# 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 RegulatoryComplianceAssessmentsOperations(object): + """RegulatoryComplianceAssessmentsOperations 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-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list( + self, regulatory_compliance_standard_name, regulatory_compliance_control_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Details and state of assessments mapped to selected regulatory + compliance control. + + :param regulatory_compliance_standard_name: Name of the regulatory + compliance standard object + :type regulatory_compliance_standard_name: str + :param regulatory_compliance_control_name: Name of the regulatory + compliance control object + :type regulatory_compliance_control_name: str + :param filter: OData filter. Optional. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RegulatoryComplianceAssessment + :rtype: + ~azure.mgmt.security.models.RegulatoryComplianceAssessmentPaged[~azure.mgmt.security.models.RegulatoryComplianceAssessment] + :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}$'), + 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str'), + 'regulatoryComplianceControlName': self._serialize.url("regulatory_compliance_control_name", regulatory_compliance_control_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 filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + 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.RegulatoryComplianceAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments'} + + def get( + self, regulatory_compliance_standard_name, regulatory_compliance_control_name, regulatory_compliance_assessment_name, custom_headers=None, raw=False, **operation_config): + """Supported regulatory compliance details and state for selected + assessment. + + :param regulatory_compliance_standard_name: Name of the regulatory + compliance standard object + :type regulatory_compliance_standard_name: str + :param regulatory_compliance_control_name: Name of the regulatory + compliance control object + :type regulatory_compliance_control_name: str + :param regulatory_compliance_assessment_name: Name of the regulatory + compliance assessment object + :type regulatory_compliance_assessment_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: RegulatoryComplianceAssessment or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.RegulatoryComplianceAssessment 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}$'), + 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str'), + 'regulatoryComplianceControlName': self._serialize.url("regulatory_compliance_control_name", regulatory_compliance_control_name, 'str'), + 'regulatoryComplianceAssessmentName': self._serialize.url("regulatory_compliance_assessment_name", regulatory_compliance_assessment_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('RegulatoryComplianceAssessment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments/{regulatoryComplianceAssessmentName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_controls_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_controls_operations.py new file mode 100644 index 000000000000..21bb45c57662 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_controls_operations.py @@ -0,0 +1,178 @@ +# 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 RegulatoryComplianceControlsOperations(object): + """RegulatoryComplianceControlsOperations 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-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list( + self, regulatory_compliance_standard_name, filter=None, custom_headers=None, raw=False, **operation_config): + """All supported regulatory compliance controls details and state for + selected standard. + + :param regulatory_compliance_standard_name: Name of the regulatory + compliance standard object + :type regulatory_compliance_standard_name: str + :param filter: OData filter. Optional. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RegulatoryComplianceControl + :rtype: + ~azure.mgmt.security.models.RegulatoryComplianceControlPaged[~azure.mgmt.security.models.RegulatoryComplianceControl] + :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}$'), + 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_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 filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + 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.RegulatoryComplianceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls'} + + def get( + self, regulatory_compliance_standard_name, regulatory_compliance_control_name, custom_headers=None, raw=False, **operation_config): + """Selected regulatory compliance control details and state. + + :param regulatory_compliance_standard_name: Name of the regulatory + compliance standard object + :type regulatory_compliance_standard_name: str + :param regulatory_compliance_control_name: Name of the regulatory + compliance control object + :type regulatory_compliance_control_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: RegulatoryComplianceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.RegulatoryComplianceControl 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}$'), + 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str'), + 'regulatoryComplianceControlName': self._serialize.url("regulatory_compliance_control_name", regulatory_compliance_control_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('RegulatoryComplianceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_standards_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_standards_operations.py new file mode 100644 index 000000000000..63cca3001264 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_standards_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 RegulatoryComplianceStandardsOperations(object): + """RegulatoryComplianceStandardsOperations 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-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list( + self, filter=None, custom_headers=None, raw=False, **operation_config): + """Supported regulatory compliance standards details and state. + + :param filter: OData filter. Optional. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RegulatoryComplianceStandard + :rtype: + ~azure.mgmt.security.models.RegulatoryComplianceStandardPaged[~azure.mgmt.security.models.RegulatoryComplianceStandard] + :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') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + 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.RegulatoryComplianceStandardPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards'} + + def get( + self, regulatory_compliance_standard_name, custom_headers=None, raw=False, **operation_config): + """Supported regulatory compliance details state for selected standard. + + :param regulatory_compliance_standard_name: Name of the regulatory + compliance standard object + :type regulatory_compliance_standard_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: RegulatoryComplianceStandard or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.RegulatoryComplianceStandard 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}$'), + 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_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('RegulatoryComplianceStandard', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/security_contacts_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_security_contacts_operations.py similarity index 97% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/security_contacts_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_security_contacts_operations.py index 9a1c12a66205..5b1343256321 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/security_contacts_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_security_contacts_operations.py @@ -19,6 +19,8 @@ class SecurityContactsOperations(object): """SecurityContactsOperations 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. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.security.models.SecurityContactPaged[~azure.mgmt.security.models.SecurityContact] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -81,6 +82,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -91,12 +97,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SecurityContactPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SecurityContactPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SecurityContactPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts'} @@ -149,7 +153,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SecurityContact', response) @@ -214,7 +217,6 @@ def create( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SecurityContact', response) @@ -329,7 +331,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SecurityContact', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_server_vulnerability_assessment_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_server_vulnerability_assessment_operations.py new file mode 100644 index 000000000000..18722ae2855b --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_server_vulnerability_assessment_operations.py @@ -0,0 +1,315 @@ +# 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 ServerVulnerabilityAssessmentOperations(object): + """ServerVulnerabilityAssessmentOperations 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-01-01-preview". + :ivar server_vulnerability_assessment: ServerVulnerabilityAssessment status. only a 'default' value is supported. Constant value: "default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + self.server_vulnerability_assessment = "default" + + self.config = config + + def list_by_extended_resource( + self, resource_group_name, resource_namespace, resource_type, resource_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of server vulnerability assessment onboarding statuses on a + given resource. + + :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 resource_namespace: The Namespace of the resource. + :type resource_namespace: str + :param resource_type: The type of the resource. + :type resource_type: str + :param resource_name: Name of the resource. + :type resource_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: ServerVulnerabilityAssessmentsList or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.ServerVulnerabilityAssessmentsList + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_by_extended_resource.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\._\(\)]+$'), + 'resourceNamespace': self._serialize.url("resource_namespace", resource_namespace, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_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('ServerVulnerabilityAssessmentsList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_extended_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments'} + + def get( + self, resource_group_name, resource_namespace, resource_type, resource_name, custom_headers=None, raw=False, **operation_config): + """Gets a server vulnerability assessment onboarding statuses on a given + resource. + + :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 resource_namespace: The Namespace of the resource. + :type resource_namespace: str + :param resource_type: The type of the resource. + :type resource_type: str + :param resource_name: Name of the resource. + :type resource_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: ServerVulnerabilityAssessment or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.ServerVulnerabilityAssessment 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\._\(\)]+$'), + 'resourceNamespace': self._serialize.url("resource_namespace", resource_namespace, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'serverVulnerabilityAssessment': self._serialize.url("self.server_vulnerability_assessment", self.server_vulnerability_assessment, '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('ServerVulnerabilityAssessment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}'} + + def create_or_update( + self, resource_group_name, resource_namespace, resource_type, resource_name, custom_headers=None, raw=False, **operation_config): + """Creating a server vulnerability assessment on a resource, which will + onboard a resource for having a vulnerability assessment on it. + + :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 resource_namespace: The Namespace of the resource. + :type resource_namespace: str + :param resource_type: The type of the resource. + :type resource_type: str + :param resource_name: Name of the resource. + :type resource_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: ServerVulnerabilityAssessment or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.ServerVulnerabilityAssessment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceNamespace': self._serialize.url("resource_namespace", resource_namespace, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'serverVulnerabilityAssessment': self._serialize.url("self.server_vulnerability_assessment", self.server_vulnerability_assessment, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 202: + deserialized = self._deserialize('ServerVulnerabilityAssessment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}'} + + def delete( + self, resource_group_name, resource_namespace, resource_type, resource_name, custom_headers=None, raw=False, **operation_config): + """Removing server vulnerability assessment from a resource. + + :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 resource_namespace: The Namespace of the resource. + :type resource_namespace: str + :param resource_type: The type of the resource. + :type resource_type: str + :param resource_name: Name of the resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceNamespace': self._serialize.url("resource_namespace", resource_namespace, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'serverVulnerabilityAssessment': self._serialize.url("self.server_vulnerability_assessment", self.server_vulnerability_assessment, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/settings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_settings_operations.py similarity index 96% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/settings_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_settings_operations.py index b36f8f8b2b4b..5dcbe3cd8d9f 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/settings_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_settings_operations.py @@ -19,6 +19,8 @@ class SettingsOperations(object): """SettingsOperations 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. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.security.models.SettingPaged[~azure.mgmt.security.models.Setting] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -81,6 +82,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -91,12 +97,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SettingPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SettingPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SettingPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/settings'} @@ -150,7 +154,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Setting', response) @@ -220,7 +223,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Setting', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_sub_assessments_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_sub_assessments_operations.py new file mode 100644 index 000000000000..c73ee21df970 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_sub_assessments_operations.py @@ -0,0 +1,253 @@ +# 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 SubAssessmentsOperations(object): + """SubAssessmentsOperations 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-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list_all( + self, scope, custom_headers=None, raw=False, **operation_config): + """Get security sub-assessments on all your scanned resources inside a + subscription scope. + + :param scope: Scope of the query, can be subscription + (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management + group (/providers/Microsoft.Management/managementGroups/mgName). + :type scope: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SecuritySubAssessment + :rtype: + ~azure.mgmt.security.models.SecuritySubAssessmentPaged[~azure.mgmt.security.models.SecuritySubAssessment] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + 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.SecuritySubAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_all.metadata = {'url': '/{scope}/providers/Microsoft.Security/subAssessments'} + + def list( + self, scope, assessment_name, custom_headers=None, raw=False, **operation_config): + """Get security sub-assessments on all your scanned resources inside a + scope. + + :param scope: Scope of the query, can be subscription + (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management + group (/providers/Microsoft.Management/managementGroups/mgName). + :type scope: str + :param assessment_name: The Assessment Key - Unique key for the + assessment type + :type assessment_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SecuritySubAssessment + :rtype: + ~azure.mgmt.security.models.SecuritySubAssessmentPaged[~azure.mgmt.security.models.SecuritySubAssessment] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str'), + 'assessmentName': self._serialize.url("assessment_name", assessment_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') + + 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.SecuritySubAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/subAssessments'} + + def get( + self, scope, assessment_name, sub_assessment_name, custom_headers=None, raw=False, **operation_config): + """Get a security sub-assessment on your scanned resource. + + :param scope: Scope of the query, can be subscription + (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management + group (/providers/Microsoft.Management/managementGroups/mgName). + :type scope: str + :param assessment_name: The Assessment Key - Unique key for the + assessment type + :type assessment_name: str + :param sub_assessment_name: The Sub-Assessment Key - Unique key for + the sub-assessment type + :type sub_assessment_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: SecuritySubAssessment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.SecuritySubAssessment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str'), + 'assessmentName': self._serialize.url("assessment_name", assessment_name, 'str'), + 'subAssessmentName': self._serialize.url("sub_assessment_name", sub_assessment_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('SecuritySubAssessment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/subAssessments/{subAssessmentName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/tasks_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_tasks_operations.py similarity index 96% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/tasks_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_tasks_operations.py index fc002b8368ed..3fed53ee15dc 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/tasks_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_tasks_operations.py @@ -19,6 +19,8 @@ class TasksOperations(object): """TasksOperations 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. @@ -54,8 +56,7 @@ def list( ~azure.mgmt.security.models.SecurityTaskPaged[~azure.mgmt.security.models.SecurityTask] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -86,6 +87,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -96,12 +102,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/tasks'} @@ -123,8 +127,7 @@ def list_by_home_region( ~azure.mgmt.security.models.SecurityTaskPaged[~azure.mgmt.security.models.SecurityTask] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_home_region.metadata['url'] @@ -156,6 +159,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -166,12 +174,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks'} @@ -226,7 +232,6 @@ def get_subscription_level_task( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SecurityTask', response) @@ -314,8 +319,7 @@ def list_by_resource_group( ~azure.mgmt.security.models.SecurityTaskPaged[~azure.mgmt.security.models.SecurityTask] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -348,6 +352,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -358,12 +367,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks'} @@ -422,7 +429,6 @@ def get_resource_group_level_task( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SecurityTask', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/topology_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_topology_operations.py similarity index 94% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/topology_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_topology_operations.py index 75ba584c21f7..1d6e616bb498 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/topology_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_topology_operations.py @@ -19,6 +19,8 @@ class TopologyOperations(object): """TopologyOperations 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. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.security.models.TopologyResourcePaged[~azure.mgmt.security.models.TopologyResource] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -81,6 +82,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -91,12 +97,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.TopologyResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.TopologyResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.TopologyResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/topologies'} @@ -116,8 +120,7 @@ def list_by_home_region( ~azure.mgmt.security.models.TopologyResourcePaged[~azure.mgmt.security.models.TopologyResource] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_home_region.metadata['url'] @@ -147,6 +150,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -157,12 +165,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.TopologyResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.TopologyResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.TopologyResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/topologies'} @@ -221,7 +227,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('TopologyResource', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/workspace_settings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_workspace_settings_operations.py similarity index 97% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/workspace_settings_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_workspace_settings_operations.py index 7c25fa3c51ab..5717490464d3 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/workspace_settings_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_workspace_settings_operations.py @@ -19,6 +19,8 @@ class WorkspaceSettingsOperations(object): """WorkspaceSettingsOperations 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. @@ -53,8 +55,7 @@ def list( ~azure.mgmt.security.models.WorkspaceSettingPaged[~azure.mgmt.security.models.WorkspaceSetting] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -83,6 +84,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -93,12 +99,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.WorkspaceSettingPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.WorkspaceSettingPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.WorkspaceSettingPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings'} @@ -153,7 +157,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('WorkspaceSetting', response) @@ -226,7 +229,6 @@ def create( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('WorkspaceSetting', response) @@ -298,7 +300,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('WorkspaceSetting', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/version.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/version.py index 9bd1dfac7ecb..3e682bbd5fb1 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/version.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.2.0" +VERSION = "0.3.0" diff --git a/sdk/security/azure-mgmt-security/setup.py b/sdk/security/azure-mgmt-security/setup.py index eaf6f78dff3b..c951aad9ef0d 100644 --- a/sdk/security/azure-mgmt-security/setup.py +++ b/sdk/security/azure-mgmt-security/setup.py @@ -64,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7',