From 9820cd6c1cc1ea6702ffe721e6397dd3e750b6c9 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 6 Jun 2019 09:33:38 -0700 Subject: [PATCH 01/13] Generated from 2b4c25b67ef444e5fb6df8a4a4d78bfa747b198a (#5704) chore: jsonfmt security Ran `jsonfmt -w "specification/security/**/*.json"` --- .../azure/mgmt/security/models/__init__.py | 36 +++- .../mgmt/security/models/compliance_result.py | 50 +++++ .../models/compliance_result_paged.py | 27 +++ .../security/models/compliance_result_py3.py | 50 +++++ .../regulatory_compliance_assessment.py | 89 +++++++++ .../regulatory_compliance_assessment_paged.py | 27 +++ .../regulatory_compliance_assessment_py3.py | 89 +++++++++ .../models/regulatory_compliance_control.py | 71 +++++++ .../regulatory_compliance_control_paged.py | 27 +++ .../regulatory_compliance_control_py3.py | 71 +++++++ .../models/regulatory_compliance_standard.py | 72 +++++++ .../regulatory_compliance_standard_paged.py | 27 +++ .../regulatory_compliance_standard_py3.py | 72 +++++++ .../security/models/security_center_enums.py | 16 ++ .../mgmt/security/operations/__init__.py | 8 + .../compliance_results_operations.py | 168 ++++++++++++++++ ...atory_compliance_assessments_operations.py | 185 ++++++++++++++++++ ...gulatory_compliance_controls_operations.py | 175 +++++++++++++++++ ...ulatory_compliance_standards_operations.py | 166 ++++++++++++++++ .../azure/mgmt/security/security_center.py | 20 ++ .../azure/mgmt/security/version.py | 2 +- 21 files changed, 1441 insertions(+), 7 deletions(-) create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result_paged.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_paged.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_paged.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_paged.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/compliance_results_operations.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_assessments_operations.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_controls_operations.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_standards_operations.py 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..eda1c7ded32f 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,10 +10,11 @@ # -------------------------------------------------------------------------- try: - from .pricing_py3 import Pricing - from .pricing_list_py3 import PricingList + from .compliance_result_py3 import ComplianceResult from .asc_location_py3 import AscLocation from .resource_py3 import Resource + from .pricing_py3 import Pricing + from .pricing_list_py3 import PricingList from .alert_entity_py3 import AlertEntity from .alert_confidence_reason_py3 import AlertConfidenceReason from .alert_py3 import Alert @@ -64,11 +65,15 @@ from .information_protection_policy_py3 import InformationProtectionPolicy from .security_contact_py3 import SecurityContact from .workspace_setting_py3 import WorkspaceSetting + from .regulatory_compliance_standard_py3 import RegulatoryComplianceStandard + from .regulatory_compliance_control_py3 import RegulatoryComplianceControl + from .regulatory_compliance_assessment_py3 import RegulatoryComplianceAssessment except (SyntaxError, ImportError): - from .pricing import Pricing - from .pricing_list import PricingList + from .compliance_result import ComplianceResult from .asc_location import AscLocation from .resource import Resource + from .pricing import Pricing + from .pricing_list import PricingList from .alert_entity import AlertEntity from .alert_confidence_reason import AlertConfidenceReason from .alert import Alert @@ -119,6 +124,10 @@ from .information_protection_policy import InformationProtectionPolicy from .security_contact import SecurityContact from .workspace_setting import WorkspaceSetting + from .regulatory_compliance_standard import RegulatoryComplianceStandard + from .regulatory_compliance_control import RegulatoryComplianceControl + from .regulatory_compliance_assessment import RegulatoryComplianceAssessment +from .compliance_result_paged import ComplianceResultPaged from .alert_paged import AlertPaged from .setting_paged import SettingPaged from .allowed_connections_resource_paged import AllowedConnectionsResourcePaged @@ -134,7 +143,11 @@ from .information_protection_policy_paged import InformationProtectionPolicyPaged from .security_contact_paged import SecurityContactPaged from .workspace_setting_paged import WorkspaceSettingPaged +from .regulatory_compliance_standard_paged import RegulatoryComplianceStandardPaged +from .regulatory_compliance_control_paged import RegulatoryComplianceControlPaged +from .regulatory_compliance_assessment_paged import RegulatoryComplianceAssessmentPaged from .security_center_enums import ( + ResourceStatus, PricingTier, ReportedSeverity, SettingKind, @@ -147,14 +160,16 @@ AutoProvision, AlertNotifications, AlertsToAdmins, + State, ConnectionType, ) __all__ = [ - 'Pricing', - 'PricingList', + 'ComplianceResult', 'AscLocation', 'Resource', + 'Pricing', + 'PricingList', 'AlertEntity', 'AlertConfidenceReason', 'Alert', @@ -205,6 +220,10 @@ 'InformationProtectionPolicy', 'SecurityContact', 'WorkspaceSetting', + 'RegulatoryComplianceStandard', + 'RegulatoryComplianceControl', + 'RegulatoryComplianceAssessment', + 'ComplianceResultPaged', 'AlertPaged', 'SettingPaged', 'AllowedConnectionsResourcePaged', @@ -220,6 +239,10 @@ 'InformationProtectionPolicyPaged', 'SecurityContactPaged', 'WorkspaceSettingPaged', + 'RegulatoryComplianceStandardPaged', + 'RegulatoryComplianceControlPaged', + 'RegulatoryComplianceAssessmentPaged', + 'ResourceStatus', 'PricingTier', 'ReportedSeverity', 'SettingKind', @@ -232,5 +255,6 @@ 'AutoProvision', 'AlertNotifications', 'AlertsToAdmins', + 'State', 'ConnectionType', ] diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result.py new file mode 100644 index 000000000000..662075af02c2 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result_paged.py new file mode 100644 index 000000000000..c8f94c6ef486 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result_py3.py new file mode 100644 index 000000000000..210f3fac9f54 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment.py new file mode 100644 index 000000000000..471302606092 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_paged.py new file mode 100644 index 000000000000..f5661a66b539 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_py3.py new file mode 100644 index 000000000000..92bad19c1805 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_py3.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control.py new file mode 100644 index 000000000000..ab7accd57683 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_paged.py new file mode 100644 index 000000000000..22210d83bc43 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_py3.py new file mode 100644 index 000000000000..0eaf9208895c --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_py3.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard.py new file mode 100644 index 000000000000..052a8a90edbc --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_paged.py new file mode 100644 index 000000000000..8f091eee07be --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_py3.py new file mode 100644 index 000000000000..9abfdccc46f2 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_py3.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py index d075c87db018..d2fe2ddff43c 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py @@ -12,6 +12,14 @@ 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 @@ -92,6 +100,14 @@ class AlertsToAdmins(str, Enum): 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 ConnectionType(str, Enum): internal = "Internal" 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..c065ad458a3e 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,6 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- +from .compliance_results_operations import ComplianceResultsOperations from .pricings_operations import PricingsOperations from .alerts_operations import AlertsOperations from .settings_operations import SettingsOperations @@ -26,8 +27,12 @@ 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 __all__ = [ + 'ComplianceResultsOperations', 'PricingsOperations', 'AlertsOperations', 'SettingsOperations', @@ -45,4 +50,7 @@ 'InformationProtectionPoliciesOperations', 'SecurityContactsOperations', 'WorkspaceSettingsOperations', + 'RegulatoryComplianceStandardsOperations', + 'RegulatoryComplianceControlsOperations', + 'RegulatoryComplianceAssessmentsOperations', ] 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..a451aa668bd3 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/compliance_results_operations.py @@ -0,0 +1,168 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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. + + :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 internal_paging(next_link=None, raw=False): + + 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) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ComplianceResultPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ComplianceResultPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + 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/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..5285b27e9f2c --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_assessments_operations.py @@ -0,0 +1,185 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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. + + :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 internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + '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) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.RegulatoryComplianceAssessmentPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RegulatoryComplianceAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + 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..673688d7d335 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_controls_operations.py @@ -0,0 +1,175 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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. + + :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 internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + '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) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.RegulatoryComplianceControlPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RegulatoryComplianceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + 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..2a49705ece36 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_standards_operations.py @@ -0,0 +1,166 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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. + + :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 internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.RegulatoryComplianceStandardPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RegulatoryComplianceStandardPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + 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/security_center.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py index 38888caff012..b138a0a3d3bc 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 @@ -13,6 +13,7 @@ from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION +from .operations.compliance_results_operations import ComplianceResultsOperations from .operations.pricings_operations import PricingsOperations from .operations.alerts_operations import AlertsOperations from .operations.settings_operations import SettingsOperations @@ -30,6 +31,9 @@ from .operations.information_protection_policies_operations import InformationProtectionPoliciesOperations from .operations.security_contacts_operations import SecurityContactsOperations from .operations.workspace_settings_operations import WorkspaceSettingsOperations +from .operations.regulatory_compliance_standards_operations import RegulatoryComplianceStandardsOperations +from .operations.regulatory_compliance_controls_operations import RegulatoryComplianceControlsOperations +from .operations.regulatory_compliance_assessments_operations import RegulatoryComplianceAssessmentsOperations from . import models @@ -77,6 +81,8 @@ 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 @@ -111,6 +117,12 @@ 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 :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -133,6 +145,8 @@ 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( @@ -167,3 +181,9 @@ 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) 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..e0ec669828cb 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.1.0" From 66407bda32038a36da7fd048b59493dd0ba9b33d Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 1 Jul 2019 13:23:08 -0700 Subject: [PATCH 02/13] [AutoPR security/resource-manager] Changes to the JIT API for Firewall Support (#6047) * Generated from 0a90b13aa3eeec05f438be7bbe0eb444a084e789 Update jitNetworkAccessPolicies.json * Generated from 77db60c613fff13703dc99ca4aaa81bfbd4900ef Update jitNetworkAccessPolicies.json * Generated from 77db60c613fff13703dc99ca4aaa81bfbd4900ef Update jitNetworkAccessPolicies.json --- .../azure/mgmt/security/models/__init__.py | 6 + ...t_network_access_policy_virtual_machine.py | 5 + ...twork_access_policy_virtual_machine_py3.py | 7 +- .../models/jit_network_access_request_port.py | 5 + .../jit_network_access_request_port_py3.py | 7 +- .../models/server_vulnerability_assessment.py | 49 +++ .../server_vulnerability_assessment_py3.py | 49 +++ .../server_vulnerability_assessments_list.py | 29 ++ ...rver_vulnerability_assessments_list_py3.py | 29 ++ .../mgmt/security/operations/__init__.py | 2 + ...ver_vulnerability_assessment_operations.py | 316 ++++++++++++++++++ .../azure/mgmt/security/security_center.py | 5 + 12 files changed, 507 insertions(+), 2 deletions(-) create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessment.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessment_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessments_list.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessments_list_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/server_vulnerability_assessment_operations.py 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 eda1c7ded32f..72fb491ff0a1 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 @@ -68,6 +68,8 @@ from .regulatory_compliance_standard_py3 import RegulatoryComplianceStandard from .regulatory_compliance_control_py3 import RegulatoryComplianceControl from .regulatory_compliance_assessment_py3 import RegulatoryComplianceAssessment + from .server_vulnerability_assessment_py3 import ServerVulnerabilityAssessment + from .server_vulnerability_assessments_list_py3 import ServerVulnerabilityAssessmentsList except (SyntaxError, ImportError): from .compliance_result import ComplianceResult from .asc_location import AscLocation @@ -127,6 +129,8 @@ from .regulatory_compliance_standard import RegulatoryComplianceStandard from .regulatory_compliance_control import RegulatoryComplianceControl from .regulatory_compliance_assessment import RegulatoryComplianceAssessment + from .server_vulnerability_assessment import ServerVulnerabilityAssessment + from .server_vulnerability_assessments_list import ServerVulnerabilityAssessmentsList from .compliance_result_paged import ComplianceResultPaged from .alert_paged import AlertPaged from .setting_paged import SettingPaged @@ -223,6 +227,8 @@ 'RegulatoryComplianceStandard', 'RegulatoryComplianceControl', 'RegulatoryComplianceAssessment', + 'ServerVulnerabilityAssessment', + 'ServerVulnerabilityAssessmentsList', 'ComplianceResultPaged', 'AlertPaged', 'SettingPaged', 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 index 49ce31c7f04e..acc1126e8732 100644 --- 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 @@ -22,6 +22,9 @@ class JitNetworkAccessPolicyVirtualMachine(Model): :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 = { @@ -32,9 +35,11 @@ class JitNetworkAccessPolicyVirtualMachine(Model): _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) 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 index f315044fbc70..888a6833e2f0 100644 --- 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 @@ -22,6 +22,9 @@ class JitNetworkAccessPolicyVirtualMachine(Model): :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 = { @@ -32,9 +35,11 @@ class JitNetworkAccessPolicyVirtualMachine(Model): _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, **kwargs) -> None: + 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 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 index 63212f65aae1..29489e7ffa80 100644 --- 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 @@ -36,6 +36,9 @@ class JitNetworkAccessRequestPort(Model): 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 = { @@ -52,6 +55,7 @@ class JitNetworkAccessRequestPort(Model): '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): @@ -62,3 +66,4 @@ def __init__(self, **kwargs): 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) 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 index 957d7b08bb7a..b188238da0cc 100644 --- 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 @@ -36,6 +36,9 @@ class JitNetworkAccessRequestPort(Model): 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 = { @@ -52,9 +55,10 @@ class JitNetworkAccessRequestPort(Model): '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, **kwargs) -> None: + 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 @@ -62,3 +66,4 @@ def __init__(self, *, number: int, end_time_utc, status, status_reason, allowed_ self.end_time_utc = end_time_utc self.status = status self.status_reason = status_reason + self.mapped_port = mapped_port diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessment.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessment.py new file mode 100644 index 000000000000..be08a761a2c3 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessment.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessment_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessment_py3.py new file mode 100644 index 000000000000..a401ebf662c1 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessment_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessments_list.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessments_list.py new file mode 100644 index 000000000000..9de12cd4ed9c --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessments_list.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessments_list_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessments_list_py3.py new file mode 100644 index 000000000000..b3979d3f0e53 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessments_list_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class 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 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 c065ad458a3e..ff76660402c5 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 @@ -30,6 +30,7 @@ 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 __all__ = [ 'ComplianceResultsOperations', @@ -53,4 +54,5 @@ 'RegulatoryComplianceStandardsOperations', 'RegulatoryComplianceControlsOperations', 'RegulatoryComplianceAssessmentsOperations', + 'ServerVulnerabilityAssessmentOperations', ] 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..7faff054f178 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/server_vulnerability_assessment_operations.py @@ -0,0 +1,316 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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. + + :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/security_center.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py index b138a0a3d3bc..8b4c683fa799 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 @@ -34,6 +34,7 @@ from .operations.regulatory_compliance_standards_operations import RegulatoryComplianceStandardsOperations from .operations.regulatory_compliance_controls_operations import RegulatoryComplianceControlsOperations from .operations.regulatory_compliance_assessments_operations import RegulatoryComplianceAssessmentsOperations +from .operations.server_vulnerability_assessment_operations import ServerVulnerabilityAssessmentOperations from . import models @@ -123,6 +124,8 @@ class SecurityCenter(SDKClient): :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 :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -187,3 +190,5 @@ def __init__( 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) From 0cf29b12f67552de3af572280bb53396f0d5dc41 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 1 Jul 2019 20:25:53 +0000 Subject: [PATCH 03/13] Packaging update of azure-mgmt-security --- sdk/security/azure-mgmt-security/README.rst | 2 +- sdk/security/azure-mgmt-security/setup.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) 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/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', From 21f8ed0dc85016e24f35cf01adc61efdbcf931b1 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 15 Jul 2019 01:34:55 -0700 Subject: [PATCH 04/13] [AutoPR security/resource-manager] Improving Security Center pricing API documentation (#6289) * Generated from 149ce8a94fd12df4868cb641d0d47bf83472b659 Improving Security Center pricing API documentation * Generated from 149ce8a94fd12df4868cb641d0d47bf83472b659 Improving Security Center pricing API documentation --- .../azure/mgmt/security/models/__init__.py | 67 ++++ .../models/io_tsecurity_aggregated_alert.py | 115 +++++++ .../io_tsecurity_aggregated_alert_paged.py | 27 ++ .../io_tsecurity_aggregated_alert_py3.py | 115 +++++++ .../io_tsecurity_aggregated_recommendation.py | 104 ++++++ ...ecurity_aggregated_recommendation_paged.py | 27 ++ ...tsecurity_aggregated_recommendation_py3.py | 104 ++++++ .../models/io_tsecurity_alerted_device.py | 41 +++ .../models/io_tsecurity_alerted_device_py3.py | 41 +++ .../io_tsecurity_alerted_devices_list.py | 42 +++ .../io_tsecurity_alerted_devices_list_py3.py | 42 +++ .../models/io_tsecurity_device_alert.py | 48 +++ .../models/io_tsecurity_device_alert_py3.py | 48 +++ .../models/io_tsecurity_device_alerts_list.py | 42 +++ .../io_tsecurity_device_alerts_list_py3.py | 42 +++ .../io_tsecurity_device_recommendation.py | 48 +++ .../io_tsecurity_device_recommendation_py3.py | 48 +++ ...o_tsecurity_device_recommendations_list.py | 43 +++ ...ecurity_device_recommendations_list_py3.py | 43 +++ .../io_tsecurity_solution_analytics_model.py | 75 +++++ ...tsecurity_solution_analytics_model_list.py | 43 +++ ...urity_solution_analytics_model_list_py3.py | 43 +++ ...s_model_properties_devices_metrics_item.py | 32 ++ ...del_properties_devices_metrics_item_py3.py | 32 ++ ..._tsecurity_solution_analytics_model_py3.py | 75 +++++ .../models/io_tsecurity_solution_model.py | 101 ++++++ .../io_tsecurity_solution_model_paged.py | 27 ++ .../models/io_tsecurity_solution_model_py3.py | 101 ++++++ .../security/models/io_tseverity_metrics.py | 36 +++ .../models/io_tseverity_metrics_py3.py | 36 +++ .../azure/mgmt/security/models/pricing.py | 7 +- .../azure/mgmt/security/models/pricing_py3.py | 7 +- ...recommendation_configuration_properties.py | 57 ++++ ...mmendation_configuration_properties_py3.py | 57 ++++ .../security/models/security_center_enums.py | 38 +++ .../mgmt/security/models/tags_resource.py | 29 ++ .../mgmt/security/models/tags_resource_py3.py | 29 ++ .../update_iot_security_solution_data.py | 37 +++ .../update_iot_security_solution_data_py3.py | 37 +++ .../user_defined_resources_properties.py | 42 +++ .../user_defined_resources_properties_py3.py | 42 +++ .../mgmt/security/operations/__init__.py | 16 + ...s_analytics_aggregated_alert_operations.py | 161 ++++++++++ ..._analytics_aggregated_alerts_operations.py | 113 +++++++ ...security_solutions_analytics_operations.py | 167 ++++++++++ ...ons_analytics_recommendation_operations.py | 107 +++++++ ...ns_analytics_recommendations_operations.py | 114 +++++++ .../io_tsecurity_solutions_operations.py | 107 +++++++ ...ity_solutions_resource_group_operations.py | 111 +++++++ .../iot_security_solution_operations.py | 298 ++++++++++++++++++ .../operations/pricings_operations.py | 22 +- .../azure/mgmt/security/security_center.py | 40 +++ 52 files changed, 3317 insertions(+), 9 deletions(-) create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_paged.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_paged.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_paged.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alert_operations.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alerts_operations.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_operations.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendation_operations.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendations_operations.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_operations.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_resource_group_operations.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/iot_security_solution_operations.py diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/__init__.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/__init__.py index 72fb491ff0a1..556353b79cbc 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/__init__.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/__init__.py @@ -65,6 +65,23 @@ from .information_protection_policy_py3 import InformationProtectionPolicy from .security_contact_py3 import SecurityContact from .workspace_setting_py3 import WorkspaceSetting + from .tags_resource_py3 import TagsResource + from .user_defined_resources_properties_py3 import UserDefinedResourcesProperties + from .recommendation_configuration_properties_py3 import RecommendationConfigurationProperties + from .io_tsecurity_solution_model_py3 import IoTSecuritySolutionModel + from .update_iot_security_solution_data_py3 import UpdateIotSecuritySolutionData + from .io_tseverity_metrics_py3 import IoTSeverityMetrics + from .io_tsecurity_solution_analytics_model_properties_devices_metrics_item_py3 import IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem + from .io_tsecurity_alerted_device_py3 import IoTSecurityAlertedDevice + from .io_tsecurity_alerted_devices_list_py3 import IoTSecurityAlertedDevicesList + from .io_tsecurity_device_alert_py3 import IoTSecurityDeviceAlert + from .io_tsecurity_device_alerts_list_py3 import IoTSecurityDeviceAlertsList + from .io_tsecurity_device_recommendation_py3 import IoTSecurityDeviceRecommendation + from .io_tsecurity_device_recommendations_list_py3 import IoTSecurityDeviceRecommendationsList + from .io_tsecurity_solution_analytics_model_py3 import IoTSecuritySolutionAnalyticsModel + from .io_tsecurity_solution_analytics_model_list_py3 import IoTSecuritySolutionAnalyticsModelList + from .io_tsecurity_aggregated_alert_py3 import IoTSecurityAggregatedAlert + from .io_tsecurity_aggregated_recommendation_py3 import IoTSecurityAggregatedRecommendation from .regulatory_compliance_standard_py3 import RegulatoryComplianceStandard from .regulatory_compliance_control_py3 import RegulatoryComplianceControl from .regulatory_compliance_assessment_py3 import RegulatoryComplianceAssessment @@ -126,6 +143,23 @@ from .information_protection_policy import InformationProtectionPolicy from .security_contact import SecurityContact from .workspace_setting import WorkspaceSetting + from .tags_resource import TagsResource + from .user_defined_resources_properties import UserDefinedResourcesProperties + from .recommendation_configuration_properties import RecommendationConfigurationProperties + from .io_tsecurity_solution_model import IoTSecuritySolutionModel + from .update_iot_security_solution_data import UpdateIotSecuritySolutionData + from .io_tseverity_metrics import IoTSeverityMetrics + from .io_tsecurity_solution_analytics_model_properties_devices_metrics_item import IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem + from .io_tsecurity_alerted_device import IoTSecurityAlertedDevice + from .io_tsecurity_alerted_devices_list import IoTSecurityAlertedDevicesList + from .io_tsecurity_device_alert import IoTSecurityDeviceAlert + from .io_tsecurity_device_alerts_list import IoTSecurityDeviceAlertsList + from .io_tsecurity_device_recommendation import IoTSecurityDeviceRecommendation + from .io_tsecurity_device_recommendations_list import IoTSecurityDeviceRecommendationsList + from .io_tsecurity_solution_analytics_model import IoTSecuritySolutionAnalyticsModel + from .io_tsecurity_solution_analytics_model_list import IoTSecuritySolutionAnalyticsModelList + from .io_tsecurity_aggregated_alert import IoTSecurityAggregatedAlert + from .io_tsecurity_aggregated_recommendation import IoTSecurityAggregatedRecommendation from .regulatory_compliance_standard import RegulatoryComplianceStandard from .regulatory_compliance_control import RegulatoryComplianceControl from .regulatory_compliance_assessment import RegulatoryComplianceAssessment @@ -147,6 +181,9 @@ from .information_protection_policy_paged import InformationProtectionPolicyPaged from .security_contact_paged import SecurityContactPaged from .workspace_setting_paged import WorkspaceSettingPaged +from .io_tsecurity_solution_model_paged import IoTSecuritySolutionModelPaged +from .io_tsecurity_aggregated_alert_paged import IoTSecurityAggregatedAlertPaged +from .io_tsecurity_aggregated_recommendation_paged import IoTSecurityAggregatedRecommendationPaged from .regulatory_compliance_standard_paged import RegulatoryComplianceStandardPaged from .regulatory_compliance_control_paged import RegulatoryComplianceControlPaged from .regulatory_compliance_assessment_paged import RegulatoryComplianceAssessmentPaged @@ -164,6 +201,11 @@ AutoProvision, AlertNotifications, AlertsToAdmins, + SecuritySolutionStatus, + ExportData, + DataSource, + RecommendationType, + RecommendationConfigStatus, State, ConnectionType, ) @@ -224,6 +266,23 @@ 'InformationProtectionPolicy', 'SecurityContact', 'WorkspaceSetting', + 'TagsResource', + 'UserDefinedResourcesProperties', + 'RecommendationConfigurationProperties', + 'IoTSecuritySolutionModel', + 'UpdateIotSecuritySolutionData', + 'IoTSeverityMetrics', + 'IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem', + 'IoTSecurityAlertedDevice', + 'IoTSecurityAlertedDevicesList', + 'IoTSecurityDeviceAlert', + 'IoTSecurityDeviceAlertsList', + 'IoTSecurityDeviceRecommendation', + 'IoTSecurityDeviceRecommendationsList', + 'IoTSecuritySolutionAnalyticsModel', + 'IoTSecuritySolutionAnalyticsModelList', + 'IoTSecurityAggregatedAlert', + 'IoTSecurityAggregatedRecommendation', 'RegulatoryComplianceStandard', 'RegulatoryComplianceControl', 'RegulatoryComplianceAssessment', @@ -245,6 +304,9 @@ 'InformationProtectionPolicyPaged', 'SecurityContactPaged', 'WorkspaceSettingPaged', + 'IoTSecuritySolutionModelPaged', + 'IoTSecurityAggregatedAlertPaged', + 'IoTSecurityAggregatedRecommendationPaged', 'RegulatoryComplianceStandardPaged', 'RegulatoryComplianceControlPaged', 'RegulatoryComplianceAssessmentPaged', @@ -261,6 +323,11 @@ 'AutoProvision', 'AlertNotifications', 'AlertsToAdmins', + 'SecuritySolutionStatus', + 'ExportData', + 'DataSource', + 'RecommendationType', + 'RecommendationConfigStatus', 'State', 'ConnectionType', ] diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert.py new file mode 100644 index 000000000000..e022695de0ef --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert.py @@ -0,0 +1,115 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecurityAggregatedAlert(Model): + """Security Solution Aggregated Alert information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar alert_type: Name of the alert type + :vartype alert_type: str + :ivar alert_display_name: Display name of the alert type + :vartype alert_display_name: str + :ivar aggregated_date_utc: The date the incidents were detected by the + vendor + :vartype aggregated_date_utc: date + :ivar vendor_name: Name of the vendor that discovered the incident + :vartype vendor_name: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar count: Occurrence number of the alert within the aggregated date + :vartype count: int + :ivar effected_resource_type: Azure resource ID of the resource that got + the alerts + :vartype effected_resource_type: str + :ivar system_source: The type of the alerted resource (Azure, Non-Azure) + :vartype system_source: str + :ivar action_taken: The action that was taken as a response to the alert + (Active, Blocked etc.) + :vartype action_taken: str + :ivar log_analytics_query: query in log analytics to get the list of + affected devices/alerts + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'alert_type': {'readonly': True}, + 'alert_display_name': {'readonly': True}, + 'aggregated_date_utc': {'readonly': True}, + 'vendor_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'description': {'readonly': True}, + 'count': {'readonly': True}, + 'effected_resource_type': {'readonly': True}, + 'system_source': {'readonly': True}, + 'action_taken': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, + 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, + 'aggregated_date_utc': {'key': 'properties.aggregatedDateUtc', 'type': 'date'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'count': {'key': 'properties.count', 'type': 'int'}, + 'effected_resource_type': {'key': 'properties.effectedResourceType', 'type': 'str'}, + 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, + 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAggregatedAlert, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + self.alert_type = None + self.alert_display_name = None + self.aggregated_date_utc = None + self.vendor_name = None + self.reported_severity = None + self.remediation_steps = None + self.description = None + self.count = None + self.effected_resource_type = None + self.system_source = None + self.action_taken = None + self.log_analytics_query = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_paged.py new file mode 100644 index 000000000000..42bbd9750136 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class IoTSecurityAggregatedAlertPaged(Paged): + """ + A paging container for iterating over a list of :class:`IoTSecurityAggregatedAlert ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IoTSecurityAggregatedAlert]'} + } + + def __init__(self, *args, **kwargs): + + super(IoTSecurityAggregatedAlertPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_py3.py new file mode 100644 index 000000000000..5988186d6f53 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_py3.py @@ -0,0 +1,115 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecurityAggregatedAlert(Model): + """Security Solution Aggregated Alert information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar alert_type: Name of the alert type + :vartype alert_type: str + :ivar alert_display_name: Display name of the alert type + :vartype alert_display_name: str + :ivar aggregated_date_utc: The date the incidents were detected by the + vendor + :vartype aggregated_date_utc: date + :ivar vendor_name: Name of the vendor that discovered the incident + :vartype vendor_name: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar count: Occurrence number of the alert within the aggregated date + :vartype count: int + :ivar effected_resource_type: Azure resource ID of the resource that got + the alerts + :vartype effected_resource_type: str + :ivar system_source: The type of the alerted resource (Azure, Non-Azure) + :vartype system_source: str + :ivar action_taken: The action that was taken as a response to the alert + (Active, Blocked etc.) + :vartype action_taken: str + :ivar log_analytics_query: query in log analytics to get the list of + affected devices/alerts + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'alert_type': {'readonly': True}, + 'alert_display_name': {'readonly': True}, + 'aggregated_date_utc': {'readonly': True}, + 'vendor_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'description': {'readonly': True}, + 'count': {'readonly': True}, + 'effected_resource_type': {'readonly': True}, + 'system_source': {'readonly': True}, + 'action_taken': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, + 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, + 'aggregated_date_utc': {'key': 'properties.aggregatedDateUtc', 'type': 'date'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'count': {'key': 'properties.count', 'type': 'int'}, + 'effected_resource_type': {'key': 'properties.effectedResourceType', 'type': 'str'}, + 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, + 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(IoTSecurityAggregatedAlert, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + self.alert_type = None + self.alert_display_name = None + self.aggregated_date_utc = None + self.vendor_name = None + self.reported_severity = None + self.remediation_steps = None + self.description = None + self.count = None + self.effected_resource_type = None + self.system_source = None + self.action_taken = None + self.log_analytics_query = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation.py new file mode 100644 index 000000000000..cab13bb5f5e2 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecurityAggregatedRecommendation(Model): + """Security Solution Recommendation Information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param recommendation_name: Name of the recommendation + :type recommendation_name: str + :ivar recommendation_display_name: Display name of the recommendation + type. + :vartype recommendation_display_name: str + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar recommendation_type_id: The recommendation-type GUID. + :vartype recommendation_type_id: str + :ivar detected_by: Name of the vendor that discovered the issue + :vartype detected_by: str + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar reported_severity: Estimated severity of this recommendation. + Possible values include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar healthy_devices: the number of the healthy devices within the + solution + :vartype healthy_devices: int + :ivar unhealthy_device_count: the number of the unhealthy devices within + the solution + :vartype unhealthy_device_count: int + :ivar log_analytics_query: query in log analytics to get the list of + affected devices/alerts + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'recommendation_display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'recommendation_type_id': {'readonly': True}, + 'detected_by': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'healthy_devices': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'recommendation_name': {'key': 'properties.recommendationName', 'type': 'str'}, + 'recommendation_display_name': {'key': 'properties.recommendationDisplayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'recommendation_type_id': {'key': 'properties.recommendationTypeId', 'type': 'str'}, + 'detected_by': {'key': 'properties.detectedBy', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'healthy_devices': {'key': 'properties.healthyDevices', 'type': 'int'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAggregatedRecommendation, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + self.recommendation_name = kwargs.get('recommendation_name', None) + self.recommendation_display_name = None + self.description = None + self.recommendation_type_id = None + self.detected_by = None + self.remediation_steps = None + self.reported_severity = None + self.healthy_devices = None + self.unhealthy_device_count = None + self.log_analytics_query = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_paged.py new file mode 100644 index 000000000000..623be0865882 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class IoTSecurityAggregatedRecommendationPaged(Paged): + """ + A paging container for iterating over a list of :class:`IoTSecurityAggregatedRecommendation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IoTSecurityAggregatedRecommendation]'} + } + + def __init__(self, *args, **kwargs): + + super(IoTSecurityAggregatedRecommendationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_py3.py new file mode 100644 index 000000000000..f75d04c930d1 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_py3.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecurityAggregatedRecommendation(Model): + """Security Solution Recommendation Information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param recommendation_name: Name of the recommendation + :type recommendation_name: str + :ivar recommendation_display_name: Display name of the recommendation + type. + :vartype recommendation_display_name: str + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar recommendation_type_id: The recommendation-type GUID. + :vartype recommendation_type_id: str + :ivar detected_by: Name of the vendor that discovered the issue + :vartype detected_by: str + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar reported_severity: Estimated severity of this recommendation. + Possible values include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar healthy_devices: the number of the healthy devices within the + solution + :vartype healthy_devices: int + :ivar unhealthy_device_count: the number of the unhealthy devices within + the solution + :vartype unhealthy_device_count: int + :ivar log_analytics_query: query in log analytics to get the list of + affected devices/alerts + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'recommendation_display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'recommendation_type_id': {'readonly': True}, + 'detected_by': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'healthy_devices': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'recommendation_name': {'key': 'properties.recommendationName', 'type': 'str'}, + 'recommendation_display_name': {'key': 'properties.recommendationDisplayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'recommendation_type_id': {'key': 'properties.recommendationTypeId', 'type': 'str'}, + 'detected_by': {'key': 'properties.detectedBy', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'healthy_devices': {'key': 'properties.healthyDevices', 'type': 'int'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, *, tags=None, recommendation_name: str=None, **kwargs) -> None: + super(IoTSecurityAggregatedRecommendation, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + self.recommendation_name = recommendation_name + self.recommendation_display_name = None + self.description = None + self.recommendation_type_id = None + self.detected_by = None + self.remediation_steps = None + self.reported_severity = None + self.healthy_devices = None + self.unhealthy_device_count = None + self.log_analytics_query = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device.py new file mode 100644 index 000000000000..bd55f6b5a9f2 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecurityAlertedDevice(Model): + """Statistic information about the number of alerts per device during the last + period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar device_id: Name of the alert type + :vartype device_id: str + :ivar alerts_count: the number of alerts raised for this device + :vartype alerts_count: int + """ + + _validation = { + 'device_id': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAlertedDevice, self).__init__(**kwargs) + self.device_id = None + self.alerts_count = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device_py3.py new file mode 100644 index 000000000000..8f5d393791d6 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecurityAlertedDevice(Model): + """Statistic information about the number of alerts per device during the last + period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar device_id: Name of the alert type + :vartype device_id: str + :ivar alerts_count: the number of alerts raised for this device + :vartype alerts_count: int + """ + + _validation = { + 'device_id': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(IoTSecurityAlertedDevice, self).__init__(**kwargs) + self.device_id = None + self.alerts_count = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list.py new file mode 100644 index 000000000000..122dece5d348 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecurityAlertedDevicesList(Model): + """List of devices with the count of raised alerts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of aggregated alerts data + :type value: list[~azure.mgmt.security.models.IoTSecurityAlertedDevice] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityAlertedDevice]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAlertedDevicesList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list_py3.py new file mode 100644 index 000000000000..494b767a8c34 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecurityAlertedDevicesList(Model): + """List of devices with the count of raised alerts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of aggregated alerts data + :type value: list[~azure.mgmt.security.models.IoTSecurityAlertedDevice] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityAlertedDevice]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecurityAlertedDevicesList, self).__init__(**kwargs) + self.value = value + self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert.py new file mode 100644 index 000000000000..bcabf9448c9e --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecurityDeviceAlert(Model): + """Statistic information about the number of alerts per alert type during the + last period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_display_name: Display name of the alert + :vartype alert_display_name: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar alerts_count: the number of alerts raised for this alert type + :vartype alerts_count: int + """ + + _validation = { + 'alert_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'alert_display_name': {'key': 'alertDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceAlert, self).__init__(**kwargs) + self.alert_display_name = None + self.reported_severity = None + self.alerts_count = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert_py3.py new file mode 100644 index 000000000000..25f390cb73b2 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecurityDeviceAlert(Model): + """Statistic information about the number of alerts per alert type during the + last period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_display_name: Display name of the alert + :vartype alert_display_name: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar alerts_count: the number of alerts raised for this alert type + :vartype alerts_count: int + """ + + _validation = { + 'alert_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'alert_display_name': {'key': 'alertDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(IoTSecurityDeviceAlert, self).__init__(**kwargs) + self.alert_display_name = None + self.reported_severity = None + self.alerts_count = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list.py new file mode 100644 index 000000000000..4d6fa443d62b --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecurityDeviceAlertsList(Model): + """List of alerts with the count of raised alerts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of top alerts data + :type value: list[~azure.mgmt.security.models.IoTSecurityDeviceAlert] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityDeviceAlert]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceAlertsList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list_py3.py new file mode 100644 index 000000000000..de41c1dd97eb --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecurityDeviceAlertsList(Model): + """List of alerts with the count of raised alerts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of top alerts data + :type value: list[~azure.mgmt.security.models.IoTSecurityDeviceAlert] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityDeviceAlert]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecurityDeviceAlertsList, self).__init__(**kwargs) + self.value = value + self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation.py new file mode 100644 index 000000000000..2d36f29827a1 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecurityDeviceRecommendation(Model): + """Statistic information about the number of recommendations per + recommendation type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar recommendation_display_name: Display name of the recommendation + :vartype recommendation_display_name: str + :ivar reported_severity: Estimated severity of this recommendation. + Possible values include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar devices_count: the number of device with this recommendation + :vartype devices_count: int + """ + + _validation = { + 'recommendation_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'devices_count': {'readonly': True}, + } + + _attribute_map = { + 'recommendation_display_name': {'key': 'recommendationDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'devices_count': {'key': 'devicesCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceRecommendation, self).__init__(**kwargs) + self.recommendation_display_name = None + self.reported_severity = None + self.devices_count = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation_py3.py new file mode 100644 index 000000000000..52126486993f --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecurityDeviceRecommendation(Model): + """Statistic information about the number of recommendations per + recommendation type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar recommendation_display_name: Display name of the recommendation + :vartype recommendation_display_name: str + :ivar reported_severity: Estimated severity of this recommendation. + Possible values include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar devices_count: the number of device with this recommendation + :vartype devices_count: int + """ + + _validation = { + 'recommendation_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'devices_count': {'readonly': True}, + } + + _attribute_map = { + 'recommendation_display_name': {'key': 'recommendationDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'devices_count': {'key': 'devicesCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(IoTSecurityDeviceRecommendation, self).__init__(**kwargs) + self.recommendation_display_name = None + self.reported_severity = None + self.devices_count = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list.py new file mode 100644 index 000000000000..13145a43f39d --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecurityDeviceRecommendationsList(Model): + """List of recommendations with the count of devices. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of aggregated recommendation data + :type value: + list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityDeviceRecommendation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceRecommendationsList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list_py3.py new file mode 100644 index 000000000000..fe62af9c67d4 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecurityDeviceRecommendationsList(Model): + """List of recommendations with the count of devices. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of aggregated recommendation data + :type value: + list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityDeviceRecommendation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecurityDeviceRecommendationsList, self).__init__(**kwargs) + self.value = value + self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model.py new file mode 100644 index 000000000000..fca261bd72e3 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class IoTSecuritySolutionAnalyticsModel(Resource): + """Security Analytics of a security solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar metrics: Security Analytics of a security solution + :vartype metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + :ivar unhealthy_device_count: number of unhealthy devices + :vartype unhealthy_device_count: int + :ivar devices_metrics: The list of devices metrics by the aggregated date. + :vartype devices_metrics: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem] + :param top_alerted_devices: The list of top 3 devices with the most + attacked. + :type top_alerted_devices: + ~azure.mgmt.security.models.IoTSecurityAlertedDevicesList + :param most_prevalent_device_alerts: The list of most prevalent 3 alerts. + :type most_prevalent_device_alerts: + ~azure.mgmt.security.models.IoTSecurityDeviceAlertsList + :param most_prevalent_device_recommendations: The list of most prevalent 3 + recommendations. + :type most_prevalent_device_recommendations: + ~azure.mgmt.security.models.IoTSecurityDeviceRecommendationsList + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metrics': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'devices_metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'metrics': {'key': 'properties.metrics', 'type': 'IoTSeverityMetrics'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'devices_metrics': {'key': 'properties.devicesMetrics', 'type': '[IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem]'}, + 'top_alerted_devices': {'key': 'properties.topAlertedDevices', 'type': 'IoTSecurityAlertedDevicesList'}, + 'most_prevalent_device_alerts': {'key': 'properties.mostPrevalentDeviceAlerts', 'type': 'IoTSecurityDeviceAlertsList'}, + 'most_prevalent_device_recommendations': {'key': 'properties.mostPrevalentDeviceRecommendations', 'type': 'IoTSecurityDeviceRecommendationsList'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionAnalyticsModel, self).__init__(**kwargs) + self.metrics = None + self.unhealthy_device_count = None + self.devices_metrics = None + self.top_alerted_devices = kwargs.get('top_alerted_devices', None) + self.most_prevalent_device_alerts = kwargs.get('most_prevalent_device_alerts', None) + self.most_prevalent_device_recommendations = kwargs.get('most_prevalent_device_recommendations', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list.py new file mode 100644 index 000000000000..734fd1eac11b --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecuritySolutionAnalyticsModelList(Model): + """List of Security Analytics of a security solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of Security Analytics of a security solution + :type value: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecuritySolutionAnalyticsModel]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionAnalyticsModelList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list_py3.py new file mode 100644 index 000000000000..557c6ec56303 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecuritySolutionAnalyticsModelList(Model): + """List of Security Analytics of a security solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of Security Analytics of a security solution + :type value: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecuritySolutionAnalyticsModel]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecuritySolutionAnalyticsModelList, self).__init__(**kwargs) + self.value = value + self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item.py new file mode 100644 index 000000000000..bf0cd8470ad6 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem(Model): + """IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem. + + :param date_property: the date of the metrics + :type date_property: datetime + :param devices_metrics: devices alerts count by severity. + :type devices_metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'devices_metrics': {'key': 'devicesMetrics', 'type': 'IoTSeverityMetrics'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, self).__init__(**kwargs) + self.date_property = kwargs.get('date_property', None) + self.devices_metrics = kwargs.get('devices_metrics', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item_py3.py new file mode 100644 index 000000000000..9d374866cc3d --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem(Model): + """IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem. + + :param date_property: the date of the metrics + :type date_property: datetime + :param devices_metrics: devices alerts count by severity. + :type devices_metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'devices_metrics': {'key': 'devicesMetrics', 'type': 'IoTSeverityMetrics'}, + } + + def __init__(self, *, date_property=None, devices_metrics=None, **kwargs) -> None: + super(IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, self).__init__(**kwargs) + self.date_property = date_property + self.devices_metrics = devices_metrics diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_py3.py new file mode 100644 index 000000000000..5ff736dfc071 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_py3.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class IoTSecuritySolutionAnalyticsModel(Resource): + """Security Analytics of a security solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar metrics: Security Analytics of a security solution + :vartype metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + :ivar unhealthy_device_count: number of unhealthy devices + :vartype unhealthy_device_count: int + :ivar devices_metrics: The list of devices metrics by the aggregated date. + :vartype devices_metrics: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem] + :param top_alerted_devices: The list of top 3 devices with the most + attacked. + :type top_alerted_devices: + ~azure.mgmt.security.models.IoTSecurityAlertedDevicesList + :param most_prevalent_device_alerts: The list of most prevalent 3 alerts. + :type most_prevalent_device_alerts: + ~azure.mgmt.security.models.IoTSecurityDeviceAlertsList + :param most_prevalent_device_recommendations: The list of most prevalent 3 + recommendations. + :type most_prevalent_device_recommendations: + ~azure.mgmt.security.models.IoTSecurityDeviceRecommendationsList + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metrics': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'devices_metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'metrics': {'key': 'properties.metrics', 'type': 'IoTSeverityMetrics'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'devices_metrics': {'key': 'properties.devicesMetrics', 'type': '[IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem]'}, + 'top_alerted_devices': {'key': 'properties.topAlertedDevices', 'type': 'IoTSecurityAlertedDevicesList'}, + 'most_prevalent_device_alerts': {'key': 'properties.mostPrevalentDeviceAlerts', 'type': 'IoTSecurityDeviceAlertsList'}, + 'most_prevalent_device_recommendations': {'key': 'properties.mostPrevalentDeviceRecommendations', 'type': 'IoTSecurityDeviceRecommendationsList'}, + } + + def __init__(self, *, top_alerted_devices=None, most_prevalent_device_alerts=None, most_prevalent_device_recommendations=None, **kwargs) -> None: + super(IoTSecuritySolutionAnalyticsModel, self).__init__(**kwargs) + self.metrics = None + self.unhealthy_device_count = None + self.devices_metrics = None + self.top_alerted_devices = top_alerted_devices + self.most_prevalent_device_alerts = most_prevalent_device_alerts + self.most_prevalent_device_recommendations = most_prevalent_device_recommendations diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model.py new file mode 100644 index 000000000000..b789210c2c52 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model.py @@ -0,0 +1,101 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecuritySolutionModel(Model): + """Security Solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param location: The resource location. + :type location: str + :param workspace: Required. Workspace resource ID + :type workspace: str + :param display_name: Required. Resource display name. + :type display_name: str + :param status: Security solution status. Possible values include: + 'Enabled', 'Disabled'. Default value: "Enabled" . + :type status: str or ~azure.mgmt.security.models.SecuritySolutionStatus + :param export: List of additional export to workspace data options + :type export: list[str or ~azure.mgmt.security.models.ExportData] + :param disabled_data_sources: Disabled data sources. Disabling these data + sources compromises the system. + :type disabled_data_sources: list[str or + ~azure.mgmt.security.models.DataSource] + :param iot_hubs: Required. IoT Hub resource IDs + :type iot_hubs: list[str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :ivar auto_discovered_resources: List of resources that were automatically + discovered as relevant to the security solution. + :vartype auto_discovered_resources: list[str] + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'workspace': {'required': True}, + 'display_name': {'required': True}, + 'iot_hubs': {'required': True}, + 'auto_discovered_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'workspace': {'key': 'properties.workspace', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'export': {'key': 'properties.export', 'type': '[str]'}, + 'disabled_data_sources': {'key': 'properties.disabledDataSources', 'type': '[str]'}, + 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[str]'}, + 'user_defined_resources': {'key': 'properties.userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'auto_discovered_resources': {'key': 'properties.autoDiscoveredResources', 'type': '[str]'}, + 'recommendations_configuration': {'key': 'properties.recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + self.workspace = kwargs.get('workspace', None) + self.display_name = kwargs.get('display_name', None) + self.status = kwargs.get('status', "Enabled") + self.export = kwargs.get('export', None) + self.disabled_data_sources = kwargs.get('disabled_data_sources', None) + self.iot_hubs = kwargs.get('iot_hubs', None) + self.user_defined_resources = kwargs.get('user_defined_resources', None) + self.auto_discovered_resources = None + self.recommendations_configuration = kwargs.get('recommendations_configuration', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_paged.py new file mode 100644 index 000000000000..cb2524737f12 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class IoTSecuritySolutionModelPaged(Paged): + """ + A paging container for iterating over a list of :class:`IoTSecuritySolutionModel ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IoTSecuritySolutionModel]'} + } + + def __init__(self, *args, **kwargs): + + super(IoTSecuritySolutionModelPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_py3.py new file mode 100644 index 000000000000..c088b9be9a4b --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_py3.py @@ -0,0 +1,101 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSecuritySolutionModel(Model): + """Security Solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param location: The resource location. + :type location: str + :param workspace: Required. Workspace resource ID + :type workspace: str + :param display_name: Required. Resource display name. + :type display_name: str + :param status: Security solution status. Possible values include: + 'Enabled', 'Disabled'. Default value: "Enabled" . + :type status: str or ~azure.mgmt.security.models.SecuritySolutionStatus + :param export: List of additional export to workspace data options + :type export: list[str or ~azure.mgmt.security.models.ExportData] + :param disabled_data_sources: Disabled data sources. Disabling these data + sources compromises the system. + :type disabled_data_sources: list[str or + ~azure.mgmt.security.models.DataSource] + :param iot_hubs: Required. IoT Hub resource IDs + :type iot_hubs: list[str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :ivar auto_discovered_resources: List of resources that were automatically + discovered as relevant to the security solution. + :vartype auto_discovered_resources: list[str] + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'workspace': {'required': True}, + 'display_name': {'required': True}, + 'iot_hubs': {'required': True}, + 'auto_discovered_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'workspace': {'key': 'properties.workspace', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'export': {'key': 'properties.export', 'type': '[str]'}, + 'disabled_data_sources': {'key': 'properties.disabledDataSources', 'type': '[str]'}, + 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[str]'}, + 'user_defined_resources': {'key': 'properties.userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'auto_discovered_resources': {'key': 'properties.autoDiscoveredResources', 'type': '[str]'}, + 'recommendations_configuration': {'key': 'properties.recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, *, workspace: str, display_name: str, iot_hubs, tags=None, location: str=None, status="Enabled", export=None, disabled_data_sources=None, user_defined_resources=None, recommendations_configuration=None, **kwargs) -> None: + super(IoTSecuritySolutionModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + self.location = location + self.workspace = workspace + self.display_name = display_name + self.status = status + self.export = export + self.disabled_data_sources = disabled_data_sources + self.iot_hubs = iot_hubs + self.user_defined_resources = user_defined_resources + self.auto_discovered_resources = None + self.recommendations_configuration = recommendations_configuration diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics.py new file mode 100644 index 000000000000..4e68eb5aab24 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSeverityMetrics(Model): + """Severity metrics. + + :param high: count of high severity items + :type high: int + :param medium: count of medium severity items + :type medium: int + :param low: count of low severity items + :type low: int + """ + + _attribute_map = { + 'high': {'key': 'high', 'type': 'int'}, + 'medium': {'key': 'medium', 'type': 'int'}, + 'low': {'key': 'low', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSeverityMetrics, self).__init__(**kwargs) + self.high = kwargs.get('high', None) + self.medium = kwargs.get('medium', None) + self.low = kwargs.get('low', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics_py3.py new file mode 100644 index 000000000000..69fe974ba60a --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IoTSeverityMetrics(Model): + """Severity metrics. + + :param high: count of high severity items + :type high: int + :param medium: count of medium severity items + :type medium: int + :param low: count of low severity items + :type low: int + """ + + _attribute_map = { + 'high': {'key': 'high', 'type': 'int'}, + 'medium': {'key': 'medium', 'type': 'int'}, + 'low': {'key': 'low', 'type': 'int'}, + } + + def __init__(self, *, high: int=None, medium: int=None, low: int=None, **kwargs) -> None: + super(IoTSeverityMetrics, self).__init__(**kwargs) + self.high = high + self.medium = medium + self.low = low diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing.py index 8201c965f0a5..bfa545b47bc2 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing.py @@ -26,8 +26,11 @@ class Pricing(Resource): :vartype name: str :ivar type: Resource type :vartype type: str - :param pricing_tier: Required. The pricing tier value. Possible values - include: 'Free', 'Standard' + :param pricing_tier: Required. The pricing tier value. Azure Security + Center is provided in two pricing tiers: free and standard, with the + standard tier available with a trial period. The standard tier offers + advanced security capabilities, while the free tier offers basic security + features. Possible values include: 'Free', 'Standard' :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier :ivar free_trial_remaining_time: The duration left for the subscriptions free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py index cab29e683d39..edb48104ed19 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py @@ -26,8 +26,11 @@ class Pricing(Resource): :vartype name: str :ivar type: Resource type :vartype type: str - :param pricing_tier: Required. The pricing tier value. Possible values - include: 'Free', 'Standard' + :param pricing_tier: Required. The pricing tier value. Azure Security + Center is provided in two pricing tiers: free and standard, with the + standard tier available with a trial period. The standard tier offers + advanced security capabilities, while the free tier offers basic security + features. Possible values include: 'Free', 'Standard' :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier :ivar free_trial_remaining_time: The duration left for the subscriptions free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties.py new file mode 100644 index 000000000000..81a38e40d2ca --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RecommendationConfigurationProperties(Model): + """Recommendation configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param recommendation_type: Required. The recommendation type. Possible + values include: 'OpenPortsOnDevice', 'PermissiveFirewallPolicy', + 'PermissiveFirewallRuleInput', 'PermissiveFirewallRuleOut', + 'OperationSystemNotValid', 'UnutilizedMessagesFromAgent', + 'SecurityTwinConfigurationNotOptimal', + 'SecurityTwinConfigurationConflict', 'IdenticalAuthenticationCredentials', + 'DenyDefaultIpPolicy', 'TooLargeIPRange', 'EnableDiagnosticsLog' + :type recommendation_type: str or + ~azure.mgmt.security.models.RecommendationType + :ivar description: + :vartype description: str + :param status: Required. Recommendation status. The recommendation is not + generated when the status is turned off. Possible values include: + 'TurnedOff', 'TurnedOn'. Default value: "TurnedOn" . + :type status: str or + ~azure.mgmt.security.models.RecommendationConfigStatus + """ + + _validation = { + 'recommendation_type': {'required': True}, + 'description': {'readonly': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'recommendation_type': {'key': 'recommendationType', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecommendationConfigurationProperties, self).__init__(**kwargs) + self.recommendation_type = kwargs.get('recommendation_type', None) + self.description = None + self.status = kwargs.get('status', "TurnedOn") diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties_py3.py new file mode 100644 index 000000000000..a7f9f4d48d88 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RecommendationConfigurationProperties(Model): + """Recommendation configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param recommendation_type: Required. The recommendation type. Possible + values include: 'OpenPortsOnDevice', 'PermissiveFirewallPolicy', + 'PermissiveFirewallRuleInput', 'PermissiveFirewallRuleOut', + 'OperationSystemNotValid', 'UnutilizedMessagesFromAgent', + 'SecurityTwinConfigurationNotOptimal', + 'SecurityTwinConfigurationConflict', 'IdenticalAuthenticationCredentials', + 'DenyDefaultIpPolicy', 'TooLargeIPRange', 'EnableDiagnosticsLog' + :type recommendation_type: str or + ~azure.mgmt.security.models.RecommendationType + :ivar description: + :vartype description: str + :param status: Required. Recommendation status. The recommendation is not + generated when the status is turned off. Possible values include: + 'TurnedOff', 'TurnedOn'. Default value: "TurnedOn" . + :type status: str or + ~azure.mgmt.security.models.RecommendationConfigStatus + """ + + _validation = { + 'recommendation_type': {'required': True}, + 'description': {'readonly': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'recommendation_type': {'key': 'recommendationType', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, recommendation_type, status="TurnedOn", **kwargs) -> None: + super(RecommendationConfigurationProperties, self).__init__(**kwargs) + self.recommendation_type = recommendation_type + self.description = None + self.status = status diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py index d2fe2ddff43c..e93bba6581b8 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py @@ -100,6 +100,44 @@ class AlertsToAdmins(str, Enum): off = "Off" #: Don't send notification on new alerts to the subscription's admins +class SecuritySolutionStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class ExportData(str, Enum): + + raw_events = "RawEvents" #: Agent raw events + + +class DataSource(str, Enum): + + twin_data = "TwinData" #: Devices twin data + + +class RecommendationType(str, Enum): + + open_ports_on_device = "OpenPortsOnDevice" #: A listening endpoint was found on the device. + permissive_firewall_policy = "PermissiveFirewallPolicy" #: Allowed firewall policy found (INPUT/OUTPUT). Firewall policy should deny all traffic by default, and define rules to allow necessary communication to/from the device. + permissive_firewall_rule_input = "PermissiveFirewallRuleInput" #: A rule in the firewall in the input chain has been found that contains a permissive pattern for a wide range of IP addresses or ports. + permissive_firewall_rule_out = "PermissiveFirewallRuleOut" #: A rule in the firewall in the output chain has been found that contains a permissive pattern for a wide range of IP addresses or ports. + operation_system_not_valid = "OperationSystemNotValid" #: Device doesn't comply with CIS Linux benchmarks. + unutilized_messages_from_agent = "UnutilizedMessagesFromAgent" #: 10% or more of security messages were smaller than 4kb during the last 24 hours. + security_twin_configuration_not_optimal = "SecurityTwinConfigurationNotOptimal" #: Security twin configuration is not optimal. + security_twin_configuration_conflict = "SecurityTwinConfigurationConflict" #: Conflicts were identified in the security twin configuration. + identical_authentication_credentials = "IdenticalAuthenticationCredentials" #: IoT Hub authentication credentials are used by multiple devices. This may indicate an illegitimate device impersonating a legitimate device. Duplicate credential use increases the risk of device impersonation by a malicious actor. + deny_default_ip_policy = "DenyDefaultIpPolicy" #: IP filter configuration should have rules defined for allowed traffic, and should by default, deny all other traffic by default. + too_large_ip_range = "TooLargeIPRange" #: An allow IP filter rule source IP range is too large. Overly permissive rules can expose your IoT hub to malicious actors. + enable_diagnostics_log = "EnableDiagnosticsLog" #: Enable logs and retain them for up to a year. Retaining logs enables you to recreate activity trails for investigation purposes when a security incident occurs or your network is compromised. + + +class RecommendationConfigStatus(str, Enum): + + turned_off = "TurnedOff" + turned_on = "TurnedOn" + + class State(str, Enum): passed = "Passed" #: All supported regulatory compliance controls in the given standard have a passed state diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource.py new file mode 100644 index 000000000000..3e9bca840331 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TagsResource(Model): + """A container holding only the Tags for a resource, allowing the user to + update the tags. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TagsResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource_py3.py new file mode 100644 index 000000000000..459b5db6f0b3 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TagsResource(Model): + """A container holding only the Tags for a resource, allowing the user to + update the tags. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(TagsResource, self).__init__(**kwargs) + self.tags = tags diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data.py new file mode 100644 index 000000000000..9992ee466b3d --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tags_resource import TagsResource + + +class UpdateIotSecuritySolutionData(TagsResource): + """UpdateIotSecuritySolutionData. + + :param tags: Resource tags + :type tags: dict[str, str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'user_defined_resources': {'key': 'userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'recommendations_configuration': {'key': 'recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, **kwargs): + super(UpdateIotSecuritySolutionData, self).__init__(**kwargs) + self.user_defined_resources = kwargs.get('user_defined_resources', None) + self.recommendations_configuration = kwargs.get('recommendations_configuration', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data_py3.py new file mode 100644 index 000000000000..dbad3c94549e --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tags_resource_py3 import TagsResource + + +class UpdateIotSecuritySolutionData(TagsResource): + """UpdateIotSecuritySolutionData. + + :param tags: Resource tags + :type tags: dict[str, str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'user_defined_resources': {'key': 'userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'recommendations_configuration': {'key': 'recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, *, tags=None, user_defined_resources=None, recommendations_configuration=None, **kwargs) -> None: + super(UpdateIotSecuritySolutionData, self).__init__(tags=tags, **kwargs) + self.user_defined_resources = user_defined_resources + self.recommendations_configuration = recommendations_configuration diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties.py new file mode 100644 index 000000000000..c3ca5e92c06c --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UserDefinedResourcesProperties(Model): + """Properties of the solution's user defined resources. + + All required parameters must be populated in order to send to Azure. + + :param query: Required. Azure Resource Graph query which represents the + security solution's user defined resources. Required to start with "where + type != "Microsoft.Devices/IotHubs"" + :type query: str + :param query_subscriptions: Required. List of Azure subscription ids on + which the user defined resources query should be executed. + :type query_subscriptions: list[str] + """ + + _validation = { + 'query': {'required': True}, + 'query_subscriptions': {'required': True}, + } + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'}, + 'query_subscriptions': {'key': 'querySubscriptions', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(UserDefinedResourcesProperties, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.query_subscriptions = kwargs.get('query_subscriptions', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties_py3.py new file mode 100644 index 000000000000..6300959530f6 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UserDefinedResourcesProperties(Model): + """Properties of the solution's user defined resources. + + All required parameters must be populated in order to send to Azure. + + :param query: Required. Azure Resource Graph query which represents the + security solution's user defined resources. Required to start with "where + type != "Microsoft.Devices/IotHubs"" + :type query: str + :param query_subscriptions: Required. List of Azure subscription ids on + which the user defined resources query should be executed. + :type query_subscriptions: list[str] + """ + + _validation = { + 'query': {'required': True}, + 'query_subscriptions': {'required': True}, + } + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'}, + 'query_subscriptions': {'key': 'querySubscriptions', 'type': '[str]'}, + } + + def __init__(self, *, query: str, query_subscriptions, **kwargs) -> None: + super(UserDefinedResourcesProperties, self).__init__(**kwargs) + self.query = query + self.query_subscriptions = query_subscriptions diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/__init__.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/__init__.py index ff76660402c5..405e1f50d534 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/__init__.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/__init__.py @@ -27,6 +27,14 @@ from .information_protection_policies_operations import InformationProtectionPoliciesOperations from .security_contacts_operations import SecurityContactsOperations from .workspace_settings_operations import WorkspaceSettingsOperations +from .io_tsecurity_solutions_operations import IoTSecuritySolutionsOperations +from .io_tsecurity_solutions_resource_group_operations import IoTSecuritySolutionsResourceGroupOperations +from .iot_security_solution_operations import IotSecuritySolutionOperations +from .io_tsecurity_solutions_analytics_operations import IoTSecuritySolutionsAnalyticsOperations +from .io_tsecurity_solutions_analytics_aggregated_alerts_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations +from .io_tsecurity_solutions_analytics_aggregated_alert_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertOperations +from .io_tsecurity_solutions_analytics_recommendation_operations import IoTSecuritySolutionsAnalyticsRecommendationOperations +from .io_tsecurity_solutions_analytics_recommendations_operations import IoTSecuritySolutionsAnalyticsRecommendationsOperations from .regulatory_compliance_standards_operations import RegulatoryComplianceStandardsOperations from .regulatory_compliance_controls_operations import RegulatoryComplianceControlsOperations from .regulatory_compliance_assessments_operations import RegulatoryComplianceAssessmentsOperations @@ -51,6 +59,14 @@ 'InformationProtectionPoliciesOperations', 'SecurityContactsOperations', 'WorkspaceSettingsOperations', + 'IoTSecuritySolutionsOperations', + 'IoTSecuritySolutionsResourceGroupOperations', + 'IotSecuritySolutionOperations', + 'IoTSecuritySolutionsAnalyticsOperations', + 'IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations', + 'IoTSecuritySolutionsAnalyticsAggregatedAlertOperations', + 'IoTSecuritySolutionsAnalyticsRecommendationOperations', + 'IoTSecuritySolutionsAnalyticsRecommendationsOperations', 'RegulatoryComplianceStandardsOperations', 'RegulatoryComplianceControlsOperations', 'RegulatoryComplianceAssessmentsOperations', diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alert_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alert_operations.py new file mode 100644 index 000000000000..3b887d1b232e --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alert_operations.py @@ -0,0 +1,161 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsAnalyticsAggregatedAlertOperations(object): + """IoTSecuritySolutionsAnalyticsAggregatedAlertOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def get( + self, resource_group_name, solution_name, aggregated_alert_name, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param aggregated_alert_name: Identifier of the aggregated alert + :type aggregated_alert_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecurityAggregatedAlert or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IoTSecurityAggregatedAlert or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str'), + 'aggregatedAlertName': self._serialize.url("aggregated_alert_name", aggregated_alert_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('IoTSecurityAggregatedAlert', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts/{aggregatedAlertName}'} + + def dismiss( + self, resource_group_name, solution_name, aggregated_alert_name, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param aggregated_alert_name: Identifier of the aggregated alert + :type aggregated_alert_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.dismiss.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str'), + 'aggregatedAlertName': self._serialize.url("aggregated_alert_name", aggregated_alert_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + dismiss.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts/{aggregatedAlertName}/dismiss'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alerts_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alerts_operations.py new file mode 100644 index 000000000000..b7c3c363bf0c --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alerts_operations.py @@ -0,0 +1,113 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations(object): + """IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def list( + self, resource_group_name, solution_name, top=None, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param top: The number of results to retrieve. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IoTSecurityAggregatedAlert + :rtype: + ~azure.mgmt.security.models.IoTSecurityAggregatedAlertPaged[~azure.mgmt.security.models.IoTSecurityAggregatedAlert] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.IoTSecurityAggregatedAlertPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.IoTSecurityAggregatedAlertPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_operations.py new file mode 100644 index 000000000000..38480e79a367 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_operations.py @@ -0,0 +1,167 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsAnalyticsOperations(object): + """IoTSecuritySolutionsAnalyticsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def get_all( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecuritySolutionAnalyticsModelList or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelList or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('IoTSecuritySolutionAnalyticsModelList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels'} + + def get_default( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecuritySolutionAnalyticsModel or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_default.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('IoTSecuritySolutionAnalyticsModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_default.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendation_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendation_operations.py new file mode 100644 index 000000000000..85bea2a5b2d0 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendation_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsAnalyticsRecommendationOperations(object): + """IoTSecuritySolutionsAnalyticsRecommendationOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def get( + self, resource_group_name, solution_name, aggregated_recommendation_name, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param aggregated_recommendation_name: Identifier of the aggregated + recommendation + :type aggregated_recommendation_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecurityAggregatedRecommendation or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.security.models.IoTSecurityAggregatedRecommendation or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str'), + 'aggregatedRecommendationName': self._serialize.url("aggregated_recommendation_name", aggregated_recommendation_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('IoTSecurityAggregatedRecommendation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedRecommendations/{aggregatedRecommendationName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendations_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendations_operations.py new file mode 100644 index 000000000000..dff823861641 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendations_operations.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsAnalyticsRecommendationsOperations(object): + """IoTSecuritySolutionsAnalyticsRecommendationsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def list( + self, resource_group_name, solution_name, top=None, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param top: The number of results to retrieve. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + IoTSecurityAggregatedRecommendation + :rtype: + ~azure.mgmt.security.models.IoTSecurityAggregatedRecommendationPaged[~azure.mgmt.security.models.IoTSecurityAggregatedRecommendation] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.IoTSecurityAggregatedRecommendationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.IoTSecurityAggregatedRecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedRecommendations'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_operations.py new file mode 100644 index 000000000000..480914333184 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsOperations(object): + """IoTSecuritySolutionsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def list( + self, filter=None, custom_headers=None, raw=False, **operation_config): + """List of security solutions. + + :param filter: filter the Security Solution with OData syntax. + supporting filter by iotHubs + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IoTSecuritySolutionModel + :rtype: + ~azure.mgmt.security.models.IoTSecuritySolutionModelPaged[~azure.mgmt.security.models.IoTSecuritySolutionModel] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotSecuritySolutions'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_resource_group_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_resource_group_operations.py new file mode 100644 index 000000000000..196d0d3ab1e6 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_resource_group_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsResourceGroupOperations(object): + """IoTSecuritySolutionsResourceGroupOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def list( + self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): + """List of security solutions. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param filter: filter the Security Solution with OData syntax. + supporting filter by iotHubs + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IoTSecuritySolutionModel + :rtype: + ~azure.mgmt.security.models.IoTSecuritySolutionModelPaged[~azure.mgmt.security.models.IoTSecuritySolutionModel] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/iot_security_solution_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/iot_security_solution_operations.py new file mode 100644 index 000000000000..7be7884ad212 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/iot_security_solution_operations.py @@ -0,0 +1,298 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IotSecuritySolutionOperations(object): + """IotSecuritySolutionOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def get( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """Details of a specific iot security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecuritySolutionModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IoTSecuritySolutionModel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('IoTSecuritySolutionModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} + + def create( + self, resource_group_name, solution_name, iot_security_solution_data, custom_headers=None, raw=False, **operation_config): + """Create new solution manager. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param iot_security_solution_data: The security solution data + :type iot_security_solution_data: + ~azure.mgmt.security.models.IoTSecuritySolutionModel + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecuritySolutionModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IoTSecuritySolutionModel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(iot_security_solution_data, 'IoTSecuritySolutionModel') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('IoTSecuritySolutionModel', response) + if response.status_code == 201: + deserialized = self._deserialize('IoTSecuritySolutionModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} + + def update( + self, resource_group_name, solution_name, update_iot_security_solution_data, custom_headers=None, raw=False, **operation_config): + """update existing Security Solution tags or user defined resources. To + update other fields use the CreateOrUpdate method. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param update_iot_security_solution_data: The security solution data + :type update_iot_security_solution_data: + ~azure.mgmt.security.models.UpdateIotSecuritySolutionData + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecuritySolutionModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IoTSecuritySolutionModel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(update_iot_security_solution_data, 'UpdateIotSecuritySolutionData') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('IoTSecuritySolutionModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} + + def delete( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """Create new solution manager. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py index 85177f446714..9d80066a2cdf 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py @@ -39,7 +39,10 @@ def __init__(self, client, config, serializer, deserializer): def list( self, custom_headers=None, raw=False, **operation_config): - """Security pricing configurations in the subscription. + """A given security pricing configuration in the subscription. Azure + Security Center is available in two pricing tiers: Free and Standard, + on multiple resource types, including Virtual machines, SQL Servers, + App service plans and Storage accounts. :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -95,7 +98,10 @@ def list( def get( self, pricing_name, custom_headers=None, raw=False, **operation_config): - """Security pricing configuration in the subscription. + """A given security pricing configuration in the subscription. Azure + Security Center is available in two pricing tiers: Free and Standard, + on multiple resource types, including Virtual machines, SQL Servers, + App service plans and Storage accounts. :param pricing_name: name of the pricing configuration :type pricing_name: str @@ -154,12 +160,18 @@ def get( def update( self, pricing_name, pricing_tier, custom_headers=None, raw=False, **operation_config): - """Security pricing configuration in the subscription. + """A given security pricing configuration in the subscription. Azure + Security Center is available in two pricing tiers: Free and Standard, + on multiple resource types, including Virtual machines, SQL Servers, + App service plans and Storage accounts. :param pricing_name: name of the pricing configuration :type pricing_name: str - :param pricing_tier: The pricing tier value. Possible values include: - 'Free', 'Standard' + :param pricing_tier: The pricing tier value. Azure Security Center is + provided in two pricing tiers: free and standard, with the standard + tier available with a trial period. The standard tier offers advanced + security capabilities, while the free tier offers basic security + features. Possible values include: 'Free', 'Standard' :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py index 8b4c683fa799..27c5f08754c8 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py @@ -31,6 +31,14 @@ from .operations.information_protection_policies_operations import InformationProtectionPoliciesOperations from .operations.security_contacts_operations import SecurityContactsOperations from .operations.workspace_settings_operations import WorkspaceSettingsOperations +from .operations.io_tsecurity_solutions_operations import IoTSecuritySolutionsOperations +from .operations.io_tsecurity_solutions_resource_group_operations import IoTSecuritySolutionsResourceGroupOperations +from .operations.iot_security_solution_operations import IotSecuritySolutionOperations +from .operations.io_tsecurity_solutions_analytics_operations import IoTSecuritySolutionsAnalyticsOperations +from .operations.io_tsecurity_solutions_analytics_aggregated_alerts_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations +from .operations.io_tsecurity_solutions_analytics_aggregated_alert_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertOperations +from .operations.io_tsecurity_solutions_analytics_recommendation_operations import IoTSecuritySolutionsAnalyticsRecommendationOperations +from .operations.io_tsecurity_solutions_analytics_recommendations_operations import IoTSecuritySolutionsAnalyticsRecommendationsOperations from .operations.regulatory_compliance_standards_operations import RegulatoryComplianceStandardsOperations from .operations.regulatory_compliance_controls_operations import RegulatoryComplianceControlsOperations from .operations.regulatory_compliance_assessments_operations import RegulatoryComplianceAssessmentsOperations @@ -118,6 +126,22 @@ class SecurityCenter(SDKClient): :vartype security_contacts: azure.mgmt.security.operations.SecurityContactsOperations :ivar workspace_settings: WorkspaceSettings operations :vartype workspace_settings: azure.mgmt.security.operations.WorkspaceSettingsOperations + :ivar io_tsecurity_solutions: IoTSecuritySolutions operations + :vartype io_tsecurity_solutions: azure.mgmt.security.operations.IoTSecuritySolutionsOperations + :ivar io_tsecurity_solutions_resource_group: IoTSecuritySolutionsResourceGroup operations + :vartype io_tsecurity_solutions_resource_group: azure.mgmt.security.operations.IoTSecuritySolutionsResourceGroupOperations + :ivar iot_security_solution: IotSecuritySolution operations + :vartype iot_security_solution: azure.mgmt.security.operations.IotSecuritySolutionOperations + :ivar io_tsecurity_solutions_analytics: IoTSecuritySolutionsAnalytics operations + :vartype io_tsecurity_solutions_analytics: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsOperations + :ivar io_tsecurity_solutions_analytics_aggregated_alerts: IoTSecuritySolutionsAnalyticsAggregatedAlerts operations + :vartype io_tsecurity_solutions_analytics_aggregated_alerts: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations + :ivar io_tsecurity_solutions_analytics_aggregated_alert: IoTSecuritySolutionsAnalyticsAggregatedAlert operations + :vartype io_tsecurity_solutions_analytics_aggregated_alert: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsAggregatedAlertOperations + :ivar io_tsecurity_solutions_analytics_recommendation: IoTSecuritySolutionsAnalyticsRecommendation operations + :vartype io_tsecurity_solutions_analytics_recommendation: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsRecommendationOperations + :ivar io_tsecurity_solutions_analytics_recommendations: IoTSecuritySolutionsAnalyticsRecommendations operations + :vartype io_tsecurity_solutions_analytics_recommendations: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsRecommendationsOperations :ivar regulatory_compliance_standards: RegulatoryComplianceStandards operations :vartype regulatory_compliance_standards: azure.mgmt.security.operations.RegulatoryComplianceStandardsOperations :ivar regulatory_compliance_controls: RegulatoryComplianceControls operations @@ -184,6 +208,22 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.workspace_settings = WorkspaceSettingsOperations( self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions = IoTSecuritySolutionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_resource_group = IoTSecuritySolutionsResourceGroupOperations( + self._client, self.config, self._serialize, self._deserialize) + self.iot_security_solution = IotSecuritySolutionOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics = IoTSecuritySolutionsAnalyticsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics_aggregated_alerts = IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics_aggregated_alert = IoTSecuritySolutionsAnalyticsAggregatedAlertOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics_recommendation = IoTSecuritySolutionsAnalyticsRecommendationOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics_recommendations = IoTSecuritySolutionsAnalyticsRecommendationsOperations( + self._client, self.config, self._serialize, self._deserialize) self.regulatory_compliance_standards = RegulatoryComplianceStandardsOperations( self._client, self.config, self._serialize, self._deserialize) self.regulatory_compliance_controls = RegulatoryComplianceControlsOperations( From 7a251d6924ec007312f127b6b1cadbafd56e7b4a Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 15 Jul 2019 22:08:35 -0700 Subject: [PATCH 05/13] [AutoPR security/resource-manager] Add Microsoft.Security applicationWhitelistings API (#6262) * Generated from 0bc0b6465c2c93267a29e4eb0c39e2b12a8b623e add operation ID's * Generated from 56fe4277e879002f98abc961fc5fb3abf80cf32a remove location from example, add Executable to fileType * Generated from 6307743902cd21e4a200cca1cddc2383121ae216 add Whitelistings to custom-words --- .../azure/mgmt/security/models/__init__.py | 24 ++ .../security/models/app_whitelisting_group.py | 84 +++++++ .../models/app_whitelisting_group_py3.py | 84 +++++++ .../models/app_whitelisting_groups.py | 29 +++ .../models/app_whitelisting_groups_py3.py | 29 +++ .../models/app_whitelisting_issue_summary.py | 36 +++ .../app_whitelisting_issue_summary_py3.py | 36 +++ .../models/app_whitelisting_put_group_data.py | 38 +++ .../app_whitelisting_put_group_data_py3.py | 38 +++ .../security/models/path_recommendation.py | 64 +++++ .../models/path_recommendation_py3.py | 64 +++++ .../mgmt/security/models/publisher_info.py | 45 ++++ .../security/models/publisher_info_py3.py | 45 ++++ .../security/models/user_recommendation.py | 34 +++ .../models/user_recommendation_py3.py | 34 +++ .../mgmt/security/models/vm_recommendation.py | 38 +++ .../security/models/vm_recommendation_py3.py | 38 +++ .../mgmt/security/operations/__init__.py | 2 + ...daptive_application_controls_operations.py | 229 ++++++++++++++++++ .../azure/mgmt/security/security_center.py | 5 + 20 files changed, 996 insertions(+) create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_group.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_group_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_groups.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_groups_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_issue_summary.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_issue_summary_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_put_group_data.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_put_group_data_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/path_recommendation.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/path_recommendation_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/publisher_info.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/publisher_info_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_recommendation.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_recommendation_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/vm_recommendation.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/vm_recommendation_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/adaptive_application_controls_operations.py 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 556353b79cbc..f1df443132ff 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 @@ -47,6 +47,14 @@ 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 .app_whitelisting_issue_summary_py3 import AppWhitelistingIssueSummary + from .vm_recommendation_py3 import VmRecommendation + from .publisher_info_py3 import PublisherInfo + from .user_recommendation_py3 import UserRecommendation + from .path_recommendation_py3 import PathRecommendation + from .app_whitelisting_group_py3 import AppWhitelistingGroup + from .app_whitelisting_groups_py3 import AppWhitelistingGroups + from .app_whitelisting_put_group_data_py3 import AppWhitelistingPutGroupData from .operation_display_py3 import OperationDisplay from .operation_py3 import Operation from .security_task_parameters_py3 import SecurityTaskParameters @@ -125,6 +133,14 @@ from .jit_network_access_policy_initiate_virtual_machine import JitNetworkAccessPolicyInitiateVirtualMachine from .jit_network_access_policy_initiate_request import JitNetworkAccessPolicyInitiateRequest from .kind import Kind + from .app_whitelisting_issue_summary import AppWhitelistingIssueSummary + from .vm_recommendation import VmRecommendation + from .publisher_info import PublisherInfo + from .user_recommendation import UserRecommendation + from .path_recommendation import PathRecommendation + from .app_whitelisting_group import AppWhitelistingGroup + from .app_whitelisting_groups import AppWhitelistingGroups + from .app_whitelisting_put_group_data import AppWhitelistingPutGroupData from .operation_display import OperationDisplay from .operation import Operation from .security_task_parameters import SecurityTaskParameters @@ -248,6 +264,14 @@ 'JitNetworkAccessPolicyInitiateVirtualMachine', 'JitNetworkAccessPolicyInitiateRequest', 'Kind', + 'AppWhitelistingIssueSummary', + 'VmRecommendation', + 'PublisherInfo', + 'UserRecommendation', + 'PathRecommendation', + 'AppWhitelistingGroup', + 'AppWhitelistingGroups', + 'AppWhitelistingPutGroupData', 'OperationDisplay', 'Operation', 'SecurityTaskParameters', diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_group.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_group.py new file mode 100644 index 000000000000..cf255612c901 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_group.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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' + :type enforcement_mode: 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 + :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'}, + '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.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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_group_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_group_py3.py new file mode 100644 index 000000000000..fd2bd774269e --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_group_py3.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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' + :type enforcement_mode: 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 + :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'}, + '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, 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.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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_groups.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_groups.py new file mode 100644 index 000000000000..4ce207c91020 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_groups.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_groups_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_groups_py3.py new file mode 100644 index 000000000000..0217485e4167 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_groups_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_issue_summary.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_issue_summary.py new file mode 100644 index 000000000000..f7719c626ca4 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_issue_summary.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_issue_summary_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_issue_summary_py3.py new file mode 100644 index 000000000000..e30ac478ae6f --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_issue_summary_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_put_group_data.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_put_group_data.py new file mode 100644 index 000000000000..6523df18b81a --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_put_group_data.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 AppWhitelistingPutGroupData(Model): + """The altered data of the recommended VM/server group policy. + + :param enforcement_mode: Possible values include: 'Audit', 'Enforce' + :type enforcement_mode: 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] + """ + + _attribute_map = { + 'enforcement_mode': {'key': 'enforcementMode', 'type': 'str'}, + '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.vm_recommendations = kwargs.get('vm_recommendations', None) + self.path_recommendations = kwargs.get('path_recommendations', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_put_group_data_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_put_group_data_py3.py new file mode 100644 index 000000000000..3c79e5071858 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_put_group_data_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 AppWhitelistingPutGroupData(Model): + """The altered data of the recommended VM/server group policy. + + :param enforcement_mode: Possible values include: 'Audit', 'Enforce' + :type enforcement_mode: 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] + """ + + _attribute_map = { + 'enforcement_mode': {'key': 'enforcementMode', 'type': 'str'}, + 'vm_recommendations': {'key': 'vmRecommendations', 'type': '[VmRecommendation]'}, + 'path_recommendations': {'key': 'pathRecommendations', 'type': '[PathRecommendation]'}, + } + + def __init__(self, *, enforcement_mode=None, vm_recommendations=None, path_recommendations=None, **kwargs) -> None: + super(AppWhitelistingPutGroupData, self).__init__(**kwargs) + self.enforcement_mode = enforcement_mode + self.vm_recommendations = vm_recommendations + self.path_recommendations = path_recommendations diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/path_recommendation.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/path_recommendation.py new file mode 100644 index 000000000000..982362a57d1c --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/path_recommendation.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/path_recommendation_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/path_recommendation_py3.py new file mode 100644 index 000000000000..1563e8dce516 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/path_recommendation_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/publisher_info.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/publisher_info.py new file mode 100644 index 000000000000..653bffbbb364 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/publisher_info.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/publisher_info_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/publisher_info_py3.py new file mode 100644 index 000000000000..8c6eecc16ed0 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/publisher_info_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_recommendation.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_recommendation.py new file mode 100644 index 000000000000..1f22c9903f23 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_recommendation.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_recommendation_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_recommendation_py3.py new file mode 100644 index 000000000000..cd014bb35e42 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_recommendation_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/vm_recommendation.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/vm_recommendation.py new file mode 100644 index 000000000000..40fdda652372 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/vm_recommendation.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/vm_recommendation_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/vm_recommendation_py3.py new file mode 100644 index 000000000000..64aa15c40383 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/vm_recommendation_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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 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 405e1f50d534..37ff3d1bf412 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 @@ -17,6 +17,7 @@ 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 @@ -49,6 +50,7 @@ 'DiscoveredSecuritySolutionsOperations', 'ExternalSecuritySolutionsOperations', 'JitNetworkAccessPoliciesOperations', + 'AdaptiveApplicationControlsOperations', 'LocationsOperations', 'Operations', 'TasksOperations', 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..1f77939b79a5 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/adaptive_application_controls_operations.py @@ -0,0 +1,229 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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. + + :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/security_center.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py index 27c5f08754c8..86f623d0de22 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 @@ -21,6 +21,7 @@ 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.adaptive_application_controls_operations import AdaptiveApplicationControlsOperations from .operations.locations_operations import LocationsOperations from .operations.operations import Operations from .operations.tasks_operations import TasksOperations @@ -106,6 +107,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 @@ -188,6 +191,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( From 00abf9cc92167cf468fef71115341e1c4419de6d Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Sun, 28 Jul 2019 18:37:58 -0700 Subject: [PATCH 06/13] Generated from 01357ba2f4e4ca899217b4e65892b7bdf375d5bf (#6515) chore: jsonfmt security --- ...recommendation_configuration_properties.py | 30 +++++++++-------- ...mmendation_configuration_properties_py3.py | 30 +++++++++-------- .../security/models/security_center_enums.py | 32 +++++++++++-------- 3 files changed, 50 insertions(+), 42 deletions(-) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties.py index 81a38e40d2ca..69e1ea7cc00e 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties.py @@ -21,37 +21,39 @@ class RecommendationConfigurationProperties(Model): All required parameters must be populated in order to send to Azure. :param recommendation_type: Required. The recommendation type. Possible - values include: 'OpenPortsOnDevice', 'PermissiveFirewallPolicy', - 'PermissiveFirewallRuleInput', 'PermissiveFirewallRuleOut', - 'OperationSystemNotValid', 'UnutilizedMessagesFromAgent', - 'SecurityTwinConfigurationNotOptimal', - 'SecurityTwinConfigurationConflict', 'IdenticalAuthenticationCredentials', - 'DenyDefaultIpPolicy', 'TooLargeIPRange', 'EnableDiagnosticsLog' + 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 description: - :vartype description: str + :ivar name: + :vartype name: str :param status: Required. Recommendation status. The recommendation is not - generated when the status is turned off. Possible values include: - 'TurnedOff', 'TurnedOn'. Default value: "TurnedOn" . + generated when the status is disabled. Possible values include: + 'Disabled', 'Enabled'. Default value: "Enabled" . :type status: str or ~azure.mgmt.security.models.RecommendationConfigStatus """ _validation = { 'recommendation_type': {'required': True}, - 'description': {'readonly': True}, + 'name': {'readonly': True}, 'status': {'required': True}, } _attribute_map = { 'recommendation_type': {'key': 'recommendationType', 'type': 'str'}, - 'description': {'key': 'description', '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.description = None - self.status = kwargs.get('status', "TurnedOn") + self.name = None + self.status = kwargs.get('status', "Enabled") diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties_py3.py index a7f9f4d48d88..9805b520d590 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties_py3.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties_py3.py @@ -21,37 +21,39 @@ class RecommendationConfigurationProperties(Model): All required parameters must be populated in order to send to Azure. :param recommendation_type: Required. The recommendation type. Possible - values include: 'OpenPortsOnDevice', 'PermissiveFirewallPolicy', - 'PermissiveFirewallRuleInput', 'PermissiveFirewallRuleOut', - 'OperationSystemNotValid', 'UnutilizedMessagesFromAgent', - 'SecurityTwinConfigurationNotOptimal', - 'SecurityTwinConfigurationConflict', 'IdenticalAuthenticationCredentials', - 'DenyDefaultIpPolicy', 'TooLargeIPRange', 'EnableDiagnosticsLog' + 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 description: - :vartype description: str + :ivar name: + :vartype name: str :param status: Required. Recommendation status. The recommendation is not - generated when the status is turned off. Possible values include: - 'TurnedOff', 'TurnedOn'. Default value: "TurnedOn" . + generated when the status is disabled. Possible values include: + 'Disabled', 'Enabled'. Default value: "Enabled" . :type status: str or ~azure.mgmt.security.models.RecommendationConfigStatus """ _validation = { 'recommendation_type': {'required': True}, - 'description': {'readonly': True}, + 'name': {'readonly': True}, 'status': {'required': True}, } _attribute_map = { 'recommendation_type': {'key': 'recommendationType', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, 'status': {'key': 'status', 'type': 'str'}, } - def __init__(self, *, recommendation_type, status="TurnedOn", **kwargs) -> None: + def __init__(self, *, recommendation_type, status="Enabled", **kwargs) -> None: super(RecommendationConfigurationProperties, self).__init__(**kwargs) self.recommendation_type = recommendation_type - self.description = None + self.name = None self.status = status diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py index e93bba6581b8..553b23186654 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py @@ -118,24 +118,28 @@ class DataSource(str, Enum): class RecommendationType(str, Enum): - open_ports_on_device = "OpenPortsOnDevice" #: A listening endpoint was found on the device. - permissive_firewall_policy = "PermissiveFirewallPolicy" #: Allowed firewall policy found (INPUT/OUTPUT). Firewall policy should deny all traffic by default, and define rules to allow necessary communication to/from the device. - permissive_firewall_rule_input = "PermissiveFirewallRuleInput" #: A rule in the firewall in the input chain has been found that contains a permissive pattern for a wide range of IP addresses or ports. - permissive_firewall_rule_out = "PermissiveFirewallRuleOut" #: A rule in the firewall in the output chain has been found that contains a permissive pattern for a wide range of IP addresses or ports. - operation_system_not_valid = "OperationSystemNotValid" #: Device doesn't comply with CIS Linux benchmarks. - unutilized_messages_from_agent = "UnutilizedMessagesFromAgent" #: 10% or more of security messages were smaller than 4kb during the last 24 hours. - security_twin_configuration_not_optimal = "SecurityTwinConfigurationNotOptimal" #: Security twin configuration is not optimal. - security_twin_configuration_conflict = "SecurityTwinConfigurationConflict" #: Conflicts were identified in the security twin configuration. - identical_authentication_credentials = "IdenticalAuthenticationCredentials" #: IoT Hub authentication credentials are used by multiple devices. This may indicate an illegitimate device impersonating a legitimate device. Duplicate credential use increases the risk of device impersonation by a malicious actor. - deny_default_ip_policy = "DenyDefaultIpPolicy" #: IP filter configuration should have rules defined for allowed traffic, and should by default, deny all other traffic by default. - too_large_ip_range = "TooLargeIPRange" #: An allow IP filter rule source IP range is too large. Overly permissive rules can expose your IoT hub to malicious actors. - enable_diagnostics_log = "EnableDiagnosticsLog" #: Enable logs and retain them for up to a year. Retaining logs enables you to recreate activity trails for investigation purposes when a security incident occurs or your network is compromised. + 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): - turned_off = "TurnedOff" - turned_on = "TurnedOn" + disabled = "Disabled" + enabled = "Enabled" class State(str, Enum): From bf0adbad2968f5716c5d3ae836b2f16dce455a4f Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 31 Jul 2019 15:43:09 -0700 Subject: [PATCH 07/13] [AutoPR security/resource-manager] Set IoTSecuritySolutions & IoTSecuritySolutionAnalytics API as stable (#6526) * Generated from 4d6fbc52713c0423aa04f74ae330867fac488b86 Set IoTSecuritySolutions & IoTSecuritySolutionAnalytics API as stable * Generated from e763a96421ef60d69bbae038d008c08002f16359 remove paging support from IoTSecurityDeviceRecommendationsList * Generated from dea80a5e1da4b383480342bba4eca97ba55c053b remove paging from IoTSecurityAlertedDevicesList --- .../azure/mgmt/security/models/__init__.py | 134 +++++++++--------- .../io_tsecurity_alerted_devices_list.py | 8 -- .../io_tsecurity_alerted_devices_list_py3.py | 8 -- ...o_tsecurity_device_recommendations_list.py | 8 -- ...ecurity_device_recommendations_list_py3.py | 8 -- .../security/models/security_center_enums.py | 84 +++++------ .../mgmt/security/operations/__init__.py | 32 ++--- ...s_analytics_aggregated_alert_operations.py | 4 +- ..._analytics_aggregated_alerts_operations.py | 4 +- ...security_solutions_analytics_operations.py | 4 +- ...ons_analytics_recommendation_operations.py | 4 +- ...ns_analytics_recommendations_operations.py | 4 +- .../io_tsecurity_solutions_operations.py | 4 +- ...ity_solutions_resource_group_operations.py | 4 +- .../iot_security_solution_operations.py | 4 +- .../azure/mgmt/security/security_center.py | 80 +++++------ 16 files changed, 181 insertions(+), 213 deletions(-) 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 f1df443132ff..e6f6360d92fc 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 @@ -21,6 +21,23 @@ from .setting_py3 import Setting from .data_export_setting_py3 import DataExportSetting from .setting_resource_py3 import SettingResource + from .tags_resource_py3 import TagsResource + from .user_defined_resources_properties_py3 import UserDefinedResourcesProperties + from .recommendation_configuration_properties_py3 import RecommendationConfigurationProperties + from .io_tsecurity_solution_model_py3 import IoTSecuritySolutionModel + from .update_iot_security_solution_data_py3 import UpdateIotSecuritySolutionData + from .io_tseverity_metrics_py3 import IoTSeverityMetrics + from .io_tsecurity_solution_analytics_model_properties_devices_metrics_item_py3 import IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem + from .io_tsecurity_alerted_device_py3 import IoTSecurityAlertedDevice + from .io_tsecurity_alerted_devices_list_py3 import IoTSecurityAlertedDevicesList + from .io_tsecurity_device_alert_py3 import IoTSecurityDeviceAlert + from .io_tsecurity_device_alerts_list_py3 import IoTSecurityDeviceAlertsList + from .io_tsecurity_device_recommendation_py3 import IoTSecurityDeviceRecommendation + from .io_tsecurity_device_recommendations_list_py3 import IoTSecurityDeviceRecommendationsList + from .io_tsecurity_solution_analytics_model_py3 import IoTSecuritySolutionAnalyticsModel + from .io_tsecurity_solution_analytics_model_list_py3 import IoTSecuritySolutionAnalyticsModelList + from .io_tsecurity_aggregated_alert_py3 import IoTSecurityAggregatedAlert + from .io_tsecurity_aggregated_recommendation_py3 import IoTSecurityAggregatedRecommendation from .connected_resource_py3 import ConnectedResource from .connectable_resource_py3 import ConnectableResource from .allowed_connections_resource_py3 import AllowedConnectionsResource @@ -73,23 +90,6 @@ from .information_protection_policy_py3 import InformationProtectionPolicy from .security_contact_py3 import SecurityContact from .workspace_setting_py3 import WorkspaceSetting - from .tags_resource_py3 import TagsResource - from .user_defined_resources_properties_py3 import UserDefinedResourcesProperties - from .recommendation_configuration_properties_py3 import RecommendationConfigurationProperties - from .io_tsecurity_solution_model_py3 import IoTSecuritySolutionModel - from .update_iot_security_solution_data_py3 import UpdateIotSecuritySolutionData - from .io_tseverity_metrics_py3 import IoTSeverityMetrics - from .io_tsecurity_solution_analytics_model_properties_devices_metrics_item_py3 import IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem - from .io_tsecurity_alerted_device_py3 import IoTSecurityAlertedDevice - from .io_tsecurity_alerted_devices_list_py3 import IoTSecurityAlertedDevicesList - from .io_tsecurity_device_alert_py3 import IoTSecurityDeviceAlert - from .io_tsecurity_device_alerts_list_py3 import IoTSecurityDeviceAlertsList - from .io_tsecurity_device_recommendation_py3 import IoTSecurityDeviceRecommendation - from .io_tsecurity_device_recommendations_list_py3 import IoTSecurityDeviceRecommendationsList - from .io_tsecurity_solution_analytics_model_py3 import IoTSecuritySolutionAnalyticsModel - from .io_tsecurity_solution_analytics_model_list_py3 import IoTSecuritySolutionAnalyticsModelList - from .io_tsecurity_aggregated_alert_py3 import IoTSecurityAggregatedAlert - from .io_tsecurity_aggregated_recommendation_py3 import IoTSecurityAggregatedRecommendation from .regulatory_compliance_standard_py3 import RegulatoryComplianceStandard from .regulatory_compliance_control_py3 import RegulatoryComplianceControl from .regulatory_compliance_assessment_py3 import RegulatoryComplianceAssessment @@ -107,6 +107,23 @@ from .setting import Setting from .data_export_setting import DataExportSetting from .setting_resource import SettingResource + from .tags_resource import TagsResource + from .user_defined_resources_properties import UserDefinedResourcesProperties + from .recommendation_configuration_properties import RecommendationConfigurationProperties + from .io_tsecurity_solution_model import IoTSecuritySolutionModel + from .update_iot_security_solution_data import UpdateIotSecuritySolutionData + from .io_tseverity_metrics import IoTSeverityMetrics + from .io_tsecurity_solution_analytics_model_properties_devices_metrics_item import IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem + from .io_tsecurity_alerted_device import IoTSecurityAlertedDevice + from .io_tsecurity_alerted_devices_list import IoTSecurityAlertedDevicesList + from .io_tsecurity_device_alert import IoTSecurityDeviceAlert + from .io_tsecurity_device_alerts_list import IoTSecurityDeviceAlertsList + from .io_tsecurity_device_recommendation import IoTSecurityDeviceRecommendation + from .io_tsecurity_device_recommendations_list import IoTSecurityDeviceRecommendationsList + from .io_tsecurity_solution_analytics_model import IoTSecuritySolutionAnalyticsModel + from .io_tsecurity_solution_analytics_model_list import IoTSecuritySolutionAnalyticsModelList + from .io_tsecurity_aggregated_alert import IoTSecurityAggregatedAlert + from .io_tsecurity_aggregated_recommendation import IoTSecurityAggregatedRecommendation from .connected_resource import ConnectedResource from .connectable_resource import ConnectableResource from .allowed_connections_resource import AllowedConnectionsResource @@ -159,23 +176,6 @@ from .information_protection_policy import InformationProtectionPolicy from .security_contact import SecurityContact from .workspace_setting import WorkspaceSetting - from .tags_resource import TagsResource - from .user_defined_resources_properties import UserDefinedResourcesProperties - from .recommendation_configuration_properties import RecommendationConfigurationProperties - from .io_tsecurity_solution_model import IoTSecuritySolutionModel - from .update_iot_security_solution_data import UpdateIotSecuritySolutionData - from .io_tseverity_metrics import IoTSeverityMetrics - from .io_tsecurity_solution_analytics_model_properties_devices_metrics_item import IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem - from .io_tsecurity_alerted_device import IoTSecurityAlertedDevice - from .io_tsecurity_alerted_devices_list import IoTSecurityAlertedDevicesList - from .io_tsecurity_device_alert import IoTSecurityDeviceAlert - from .io_tsecurity_device_alerts_list import IoTSecurityDeviceAlertsList - from .io_tsecurity_device_recommendation import IoTSecurityDeviceRecommendation - from .io_tsecurity_device_recommendations_list import IoTSecurityDeviceRecommendationsList - from .io_tsecurity_solution_analytics_model import IoTSecuritySolutionAnalyticsModel - from .io_tsecurity_solution_analytics_model_list import IoTSecuritySolutionAnalyticsModelList - from .io_tsecurity_aggregated_alert import IoTSecurityAggregatedAlert - from .io_tsecurity_aggregated_recommendation import IoTSecurityAggregatedRecommendation from .regulatory_compliance_standard import RegulatoryComplianceStandard from .regulatory_compliance_control import RegulatoryComplianceControl from .regulatory_compliance_assessment import RegulatoryComplianceAssessment @@ -184,6 +184,9 @@ from .compliance_result_paged import ComplianceResultPaged from .alert_paged import AlertPaged from .setting_paged import SettingPaged +from .io_tsecurity_solution_model_paged import IoTSecuritySolutionModelPaged +from .io_tsecurity_aggregated_alert_paged import IoTSecurityAggregatedAlertPaged +from .io_tsecurity_aggregated_recommendation_paged import IoTSecurityAggregatedRecommendationPaged from .allowed_connections_resource_paged import AllowedConnectionsResourcePaged from .discovered_security_solution_paged import DiscoveredSecuritySolutionPaged from .external_security_solution_paged import ExternalSecuritySolutionPaged @@ -197,9 +200,6 @@ from .information_protection_policy_paged import InformationProtectionPolicyPaged from .security_contact_paged import SecurityContactPaged from .workspace_setting_paged import WorkspaceSettingPaged -from .io_tsecurity_solution_model_paged import IoTSecuritySolutionModelPaged -from .io_tsecurity_aggregated_alert_paged import IoTSecurityAggregatedAlertPaged -from .io_tsecurity_aggregated_recommendation_paged import IoTSecurityAggregatedRecommendationPaged from .regulatory_compliance_standard_paged import RegulatoryComplianceStandardPaged from .regulatory_compliance_control_paged import RegulatoryComplianceControlPaged from .regulatory_compliance_assessment_paged import RegulatoryComplianceAssessmentPaged @@ -208,6 +208,11 @@ PricingTier, ReportedSeverity, SettingKind, + SecuritySolutionStatus, + ExportData, + DataSource, + RecommendationType, + RecommendationConfigStatus, SecurityFamily, AadConnectivityState, ExternalSecuritySolutionKind, @@ -217,11 +222,6 @@ AutoProvision, AlertNotifications, AlertsToAdmins, - SecuritySolutionStatus, - ExportData, - DataSource, - RecommendationType, - RecommendationConfigStatus, State, ConnectionType, ) @@ -238,6 +238,23 @@ 'Setting', 'DataExportSetting', 'SettingResource', + 'TagsResource', + 'UserDefinedResourcesProperties', + 'RecommendationConfigurationProperties', + 'IoTSecuritySolutionModel', + 'UpdateIotSecuritySolutionData', + 'IoTSeverityMetrics', + 'IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem', + 'IoTSecurityAlertedDevice', + 'IoTSecurityAlertedDevicesList', + 'IoTSecurityDeviceAlert', + 'IoTSecurityDeviceAlertsList', + 'IoTSecurityDeviceRecommendation', + 'IoTSecurityDeviceRecommendationsList', + 'IoTSecuritySolutionAnalyticsModel', + 'IoTSecuritySolutionAnalyticsModelList', + 'IoTSecurityAggregatedAlert', + 'IoTSecurityAggregatedRecommendation', 'ConnectedResource', 'ConnectableResource', 'AllowedConnectionsResource', @@ -290,23 +307,6 @@ 'InformationProtectionPolicy', 'SecurityContact', 'WorkspaceSetting', - 'TagsResource', - 'UserDefinedResourcesProperties', - 'RecommendationConfigurationProperties', - 'IoTSecuritySolutionModel', - 'UpdateIotSecuritySolutionData', - 'IoTSeverityMetrics', - 'IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem', - 'IoTSecurityAlertedDevice', - 'IoTSecurityAlertedDevicesList', - 'IoTSecurityDeviceAlert', - 'IoTSecurityDeviceAlertsList', - 'IoTSecurityDeviceRecommendation', - 'IoTSecurityDeviceRecommendationsList', - 'IoTSecuritySolutionAnalyticsModel', - 'IoTSecuritySolutionAnalyticsModelList', - 'IoTSecurityAggregatedAlert', - 'IoTSecurityAggregatedRecommendation', 'RegulatoryComplianceStandard', 'RegulatoryComplianceControl', 'RegulatoryComplianceAssessment', @@ -315,6 +315,9 @@ 'ComplianceResultPaged', 'AlertPaged', 'SettingPaged', + 'IoTSecuritySolutionModelPaged', + 'IoTSecurityAggregatedAlertPaged', + 'IoTSecurityAggregatedRecommendationPaged', 'AllowedConnectionsResourcePaged', 'DiscoveredSecuritySolutionPaged', 'ExternalSecuritySolutionPaged', @@ -328,9 +331,6 @@ 'InformationProtectionPolicyPaged', 'SecurityContactPaged', 'WorkspaceSettingPaged', - 'IoTSecuritySolutionModelPaged', - 'IoTSecurityAggregatedAlertPaged', - 'IoTSecurityAggregatedRecommendationPaged', 'RegulatoryComplianceStandardPaged', 'RegulatoryComplianceControlPaged', 'RegulatoryComplianceAssessmentPaged', @@ -338,6 +338,11 @@ 'PricingTier', 'ReportedSeverity', 'SettingKind', + 'SecuritySolutionStatus', + 'ExportData', + 'DataSource', + 'RecommendationType', + 'RecommendationConfigStatus', 'SecurityFamily', 'AadConnectivityState', 'ExternalSecuritySolutionKind', @@ -347,11 +352,6 @@ 'AutoProvision', 'AlertNotifications', 'AlertsToAdmins', - 'SecuritySolutionStatus', - 'ExportData', - 'DataSource', - 'RecommendationType', - 'RecommendationConfigStatus', 'State', 'ConnectionType', ] diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list.py index 122dece5d348..6ed104953521 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list.py @@ -15,28 +15,20 @@ class IoTSecurityAlertedDevicesList(Model): """List of devices with the count of raised alerts. - Variables are only populated by the server, and will be ignored when - sending a request. - All required parameters must be populated in order to send to Azure. :param value: Required. List of aggregated alerts data :type value: list[~azure.mgmt.security.models.IoTSecurityAlertedDevice] - :ivar next_link: The URI to fetch the next page. - :vartype next_link: str """ _validation = { 'value': {'required': True}, - 'next_link': {'readonly': True}, } _attribute_map = { 'value': {'key': 'value', 'type': '[IoTSecurityAlertedDevice]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__(self, **kwargs): super(IoTSecurityAlertedDevicesList, self).__init__(**kwargs) self.value = kwargs.get('value', None) - self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list_py3.py index 494b767a8c34..7475fc9765ba 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list_py3.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list_py3.py @@ -15,28 +15,20 @@ class IoTSecurityAlertedDevicesList(Model): """List of devices with the count of raised alerts. - Variables are only populated by the server, and will be ignored when - sending a request. - All required parameters must be populated in order to send to Azure. :param value: Required. List of aggregated alerts data :type value: list[~azure.mgmt.security.models.IoTSecurityAlertedDevice] - :ivar next_link: The URI to fetch the next page. - :vartype next_link: str """ _validation = { 'value': {'required': True}, - 'next_link': {'readonly': True}, } _attribute_map = { 'value': {'key': 'value', 'type': '[IoTSecurityAlertedDevice]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__(self, *, value, **kwargs) -> None: super(IoTSecurityAlertedDevicesList, self).__init__(**kwargs) self.value = value - self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list.py index 13145a43f39d..4606b1f5e3bd 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list.py @@ -15,29 +15,21 @@ class IoTSecurityDeviceRecommendationsList(Model): """List of recommendations with the count of devices. - Variables are only populated by the server, and will be ignored when - sending a request. - All required parameters must be populated in order to send to Azure. :param value: Required. List of aggregated recommendation data :type value: list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation] - :ivar next_link: The URI to fetch the next page. - :vartype next_link: str """ _validation = { 'value': {'required': True}, - 'next_link': {'readonly': True}, } _attribute_map = { 'value': {'key': 'value', 'type': '[IoTSecurityDeviceRecommendation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__(self, **kwargs): super(IoTSecurityDeviceRecommendationsList, self).__init__(**kwargs) self.value = kwargs.get('value', None) - self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list_py3.py index fe62af9c67d4..2df25e1c8df5 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list_py3.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list_py3.py @@ -15,29 +15,21 @@ class IoTSecurityDeviceRecommendationsList(Model): """List of recommendations with the count of devices. - Variables are only populated by the server, and will be ignored when - sending a request. - All required parameters must be populated in order to send to Azure. :param value: Required. List of aggregated recommendation data :type value: list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation] - :ivar next_link: The URI to fetch the next page. - :vartype next_link: str """ _validation = { 'value': {'required': True}, - 'next_link': {'readonly': True}, } _attribute_map = { 'value': {'key': 'value', 'type': '[IoTSecurityDeviceRecommendation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__(self, *, value, **kwargs) -> None: super(IoTSecurityDeviceRecommendationsList, self).__init__(**kwargs) self.value = value - self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py index 553b23186654..09cf991ceb06 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py @@ -40,6 +40,48 @@ class SettingKind(str, Enum): alert_suppression_setting = "AlertSuppressionSetting" +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 SecurityFamily(str, Enum): waf = "Waf" @@ -100,48 +142,6 @@ class AlertsToAdmins(str, Enum): off = "Off" #: Don't send notification on new alerts to the subscription's admins -class SecuritySolutionStatus(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class ExportData(str, Enum): - - raw_events = "RawEvents" #: Agent raw events - - -class DataSource(str, Enum): - - twin_data = "TwinData" #: Devices twin data - - -class RecommendationType(str, Enum): - - 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 State(str, Enum): passed = "Passed" #: All supported regulatory compliance controls in the given standard have a passed state diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/__init__.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/__init__.py index 37ff3d1bf412..5e5186d371c4 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 @@ -13,6 +13,14 @@ from .pricings_operations import PricingsOperations from .alerts_operations import AlertsOperations from .settings_operations import SettingsOperations +from .io_tsecurity_solutions_operations import IoTSecuritySolutionsOperations +from .io_tsecurity_solutions_resource_group_operations import IoTSecuritySolutionsResourceGroupOperations +from .iot_security_solution_operations import IotSecuritySolutionOperations +from .io_tsecurity_solutions_analytics_operations import IoTSecuritySolutionsAnalyticsOperations +from .io_tsecurity_solutions_analytics_aggregated_alerts_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations +from .io_tsecurity_solutions_analytics_aggregated_alert_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertOperations +from .io_tsecurity_solutions_analytics_recommendation_operations import IoTSecuritySolutionsAnalyticsRecommendationOperations +from .io_tsecurity_solutions_analytics_recommendations_operations import IoTSecuritySolutionsAnalyticsRecommendationsOperations from .allowed_connections_operations import AllowedConnectionsOperations from .discovered_security_solutions_operations import DiscoveredSecuritySolutionsOperations from .external_security_solutions_operations import ExternalSecuritySolutionsOperations @@ -28,14 +36,6 @@ from .information_protection_policies_operations import InformationProtectionPoliciesOperations from .security_contacts_operations import SecurityContactsOperations from .workspace_settings_operations import WorkspaceSettingsOperations -from .io_tsecurity_solutions_operations import IoTSecuritySolutionsOperations -from .io_tsecurity_solutions_resource_group_operations import IoTSecuritySolutionsResourceGroupOperations -from .iot_security_solution_operations import IotSecuritySolutionOperations -from .io_tsecurity_solutions_analytics_operations import IoTSecuritySolutionsAnalyticsOperations -from .io_tsecurity_solutions_analytics_aggregated_alerts_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations -from .io_tsecurity_solutions_analytics_aggregated_alert_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertOperations -from .io_tsecurity_solutions_analytics_recommendation_operations import IoTSecuritySolutionsAnalyticsRecommendationOperations -from .io_tsecurity_solutions_analytics_recommendations_operations import IoTSecuritySolutionsAnalyticsRecommendationsOperations from .regulatory_compliance_standards_operations import RegulatoryComplianceStandardsOperations from .regulatory_compliance_controls_operations import RegulatoryComplianceControlsOperations from .regulatory_compliance_assessments_operations import RegulatoryComplianceAssessmentsOperations @@ -46,6 +46,14 @@ 'PricingsOperations', 'AlertsOperations', 'SettingsOperations', + 'IoTSecuritySolutionsOperations', + 'IoTSecuritySolutionsResourceGroupOperations', + 'IotSecuritySolutionOperations', + 'IoTSecuritySolutionsAnalyticsOperations', + 'IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations', + 'IoTSecuritySolutionsAnalyticsAggregatedAlertOperations', + 'IoTSecuritySolutionsAnalyticsRecommendationOperations', + 'IoTSecuritySolutionsAnalyticsRecommendationsOperations', 'AllowedConnectionsOperations', 'DiscoveredSecuritySolutionsOperations', 'ExternalSecuritySolutionsOperations', @@ -61,14 +69,6 @@ 'InformationProtectionPoliciesOperations', 'SecurityContactsOperations', 'WorkspaceSettingsOperations', - 'IoTSecuritySolutionsOperations', - 'IoTSecuritySolutionsResourceGroupOperations', - 'IotSecuritySolutionOperations', - 'IoTSecuritySolutionsAnalyticsOperations', - 'IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations', - 'IoTSecuritySolutionsAnalyticsAggregatedAlertOperations', - 'IoTSecuritySolutionsAnalyticsRecommendationOperations', - 'IoTSecuritySolutionsAnalyticsRecommendationsOperations', 'RegulatoryComplianceStandardsOperations', 'RegulatoryComplianceControlsOperations', 'RegulatoryComplianceAssessmentsOperations', diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alert_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alert_operations.py index 3b887d1b232e..2bb488c4c23f 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alert_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alert_operations.py @@ -23,7 +23,7 @@ class IoTSecuritySolutionsAnalyticsAggregatedAlertOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + :ivar api_version: API version for the operation. Constant value: "2019-08-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-08-01-preview" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alerts_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alerts_operations.py index b7c3c363bf0c..2060a8a24297 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alerts_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alerts_operations.py @@ -23,7 +23,7 @@ class IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + :ivar api_version: API version for the operation. Constant value: "2019-08-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-08-01-preview" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_operations.py index 38480e79a367..f750a9d4a5c5 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_operations.py @@ -23,7 +23,7 @@ class IoTSecuritySolutionsAnalyticsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + :ivar api_version: API version for the operation. Constant value: "2019-08-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-08-01-preview" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendation_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendation_operations.py index 85bea2a5b2d0..0f10c1aab35d 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendation_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendation_operations.py @@ -23,7 +23,7 @@ class IoTSecuritySolutionsAnalyticsRecommendationOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + :ivar api_version: API version for the operation. Constant value: "2019-08-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-08-01-preview" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendations_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendations_operations.py index dff823861641..1b1b5ea272f1 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendations_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendations_operations.py @@ -23,7 +23,7 @@ class IoTSecuritySolutionsAnalyticsRecommendationsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + :ivar api_version: API version for the operation. Constant value: "2019-08-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-08-01-preview" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_operations.py index 480914333184..e03e43a17266 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_operations.py @@ -23,7 +23,7 @@ class IoTSecuritySolutionsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + :ivar api_version: API version for the operation. Constant value: "2019-08-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-08-01-preview" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_resource_group_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_resource_group_operations.py index 196d0d3ab1e6..a7ef12f17a9a 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_resource_group_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_resource_group_operations.py @@ -23,7 +23,7 @@ class IoTSecuritySolutionsResourceGroupOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + :ivar api_version: API version for the operation. Constant value: "2019-08-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-08-01-preview" + self.api_version = "2019-08-01" self.config = config 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 index 7be7884ad212..21734654e1bd 100644 --- 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 @@ -23,7 +23,7 @@ class IotSecuritySolutionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + :ivar api_version: API version for the operation. Constant value: "2019-08-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-08-01-preview" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py index 86f623d0de22..5637d709e732 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 @@ -17,6 +17,14 @@ from .operations.pricings_operations import PricingsOperations from .operations.alerts_operations import AlertsOperations from .operations.settings_operations import SettingsOperations +from .operations.io_tsecurity_solutions_operations import IoTSecuritySolutionsOperations +from .operations.io_tsecurity_solutions_resource_group_operations import IoTSecuritySolutionsResourceGroupOperations +from .operations.iot_security_solution_operations import IotSecuritySolutionOperations +from .operations.io_tsecurity_solutions_analytics_operations import IoTSecuritySolutionsAnalyticsOperations +from .operations.io_tsecurity_solutions_analytics_aggregated_alerts_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations +from .operations.io_tsecurity_solutions_analytics_aggregated_alert_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertOperations +from .operations.io_tsecurity_solutions_analytics_recommendation_operations import IoTSecuritySolutionsAnalyticsRecommendationOperations +from .operations.io_tsecurity_solutions_analytics_recommendations_operations import IoTSecuritySolutionsAnalyticsRecommendationsOperations from .operations.allowed_connections_operations import AllowedConnectionsOperations from .operations.discovered_security_solutions_operations import DiscoveredSecuritySolutionsOperations from .operations.external_security_solutions_operations import ExternalSecuritySolutionsOperations @@ -32,14 +40,6 @@ from .operations.information_protection_policies_operations import InformationProtectionPoliciesOperations from .operations.security_contacts_operations import SecurityContactsOperations from .operations.workspace_settings_operations import WorkspaceSettingsOperations -from .operations.io_tsecurity_solutions_operations import IoTSecuritySolutionsOperations -from .operations.io_tsecurity_solutions_resource_group_operations import IoTSecuritySolutionsResourceGroupOperations -from .operations.iot_security_solution_operations import IotSecuritySolutionOperations -from .operations.io_tsecurity_solutions_analytics_operations import IoTSecuritySolutionsAnalyticsOperations -from .operations.io_tsecurity_solutions_analytics_aggregated_alerts_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations -from .operations.io_tsecurity_solutions_analytics_aggregated_alert_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertOperations -from .operations.io_tsecurity_solutions_analytics_recommendation_operations import IoTSecuritySolutionsAnalyticsRecommendationOperations -from .operations.io_tsecurity_solutions_analytics_recommendations_operations import IoTSecuritySolutionsAnalyticsRecommendationsOperations from .operations.regulatory_compliance_standards_operations import RegulatoryComplianceStandardsOperations from .operations.regulatory_compliance_controls_operations import RegulatoryComplianceControlsOperations from .operations.regulatory_compliance_assessments_operations import RegulatoryComplianceAssessmentsOperations @@ -99,6 +99,22 @@ class SecurityCenter(SDKClient): :vartype alerts: azure.mgmt.security.operations.AlertsOperations :ivar settings: Settings operations :vartype settings: azure.mgmt.security.operations.SettingsOperations + :ivar io_tsecurity_solutions: IoTSecuritySolutions operations + :vartype io_tsecurity_solutions: azure.mgmt.security.operations.IoTSecuritySolutionsOperations + :ivar io_tsecurity_solutions_resource_group: IoTSecuritySolutionsResourceGroup operations + :vartype io_tsecurity_solutions_resource_group: azure.mgmt.security.operations.IoTSecuritySolutionsResourceGroupOperations + :ivar iot_security_solution: IotSecuritySolution operations + :vartype iot_security_solution: azure.mgmt.security.operations.IotSecuritySolutionOperations + :ivar io_tsecurity_solutions_analytics: IoTSecuritySolutionsAnalytics operations + :vartype io_tsecurity_solutions_analytics: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsOperations + :ivar io_tsecurity_solutions_analytics_aggregated_alerts: IoTSecuritySolutionsAnalyticsAggregatedAlerts operations + :vartype io_tsecurity_solutions_analytics_aggregated_alerts: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations + :ivar io_tsecurity_solutions_analytics_aggregated_alert: IoTSecuritySolutionsAnalyticsAggregatedAlert operations + :vartype io_tsecurity_solutions_analytics_aggregated_alert: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsAggregatedAlertOperations + :ivar io_tsecurity_solutions_analytics_recommendation: IoTSecuritySolutionsAnalyticsRecommendation operations + :vartype io_tsecurity_solutions_analytics_recommendation: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsRecommendationOperations + :ivar io_tsecurity_solutions_analytics_recommendations: IoTSecuritySolutionsAnalyticsRecommendations operations + :vartype io_tsecurity_solutions_analytics_recommendations: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsRecommendationsOperations :ivar allowed_connections: AllowedConnections operations :vartype allowed_connections: azure.mgmt.security.operations.AllowedConnectionsOperations :ivar discovered_security_solutions: DiscoveredSecuritySolutions operations @@ -129,22 +145,6 @@ class SecurityCenter(SDKClient): :vartype security_contacts: azure.mgmt.security.operations.SecurityContactsOperations :ivar workspace_settings: WorkspaceSettings operations :vartype workspace_settings: azure.mgmt.security.operations.WorkspaceSettingsOperations - :ivar io_tsecurity_solutions: IoTSecuritySolutions operations - :vartype io_tsecurity_solutions: azure.mgmt.security.operations.IoTSecuritySolutionsOperations - :ivar io_tsecurity_solutions_resource_group: IoTSecuritySolutionsResourceGroup operations - :vartype io_tsecurity_solutions_resource_group: azure.mgmt.security.operations.IoTSecuritySolutionsResourceGroupOperations - :ivar iot_security_solution: IotSecuritySolution operations - :vartype iot_security_solution: azure.mgmt.security.operations.IotSecuritySolutionOperations - :ivar io_tsecurity_solutions_analytics: IoTSecuritySolutionsAnalytics operations - :vartype io_tsecurity_solutions_analytics: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsOperations - :ivar io_tsecurity_solutions_analytics_aggregated_alerts: IoTSecuritySolutionsAnalyticsAggregatedAlerts operations - :vartype io_tsecurity_solutions_analytics_aggregated_alerts: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations - :ivar io_tsecurity_solutions_analytics_aggregated_alert: IoTSecuritySolutionsAnalyticsAggregatedAlert operations - :vartype io_tsecurity_solutions_analytics_aggregated_alert: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsAggregatedAlertOperations - :ivar io_tsecurity_solutions_analytics_recommendation: IoTSecuritySolutionsAnalyticsRecommendation operations - :vartype io_tsecurity_solutions_analytics_recommendation: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsRecommendationOperations - :ivar io_tsecurity_solutions_analytics_recommendations: IoTSecuritySolutionsAnalyticsRecommendations operations - :vartype io_tsecurity_solutions_analytics_recommendations: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsRecommendationsOperations :ivar regulatory_compliance_standards: RegulatoryComplianceStandards operations :vartype regulatory_compliance_standards: azure.mgmt.security.operations.RegulatoryComplianceStandardsOperations :ivar regulatory_compliance_controls: RegulatoryComplianceControls operations @@ -183,6 +183,22 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.settings = SettingsOperations( self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions = IoTSecuritySolutionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_resource_group = IoTSecuritySolutionsResourceGroupOperations( + self._client, self.config, self._serialize, self._deserialize) + self.iot_security_solution = IotSecuritySolutionOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics = IoTSecuritySolutionsAnalyticsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics_aggregated_alerts = IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics_aggregated_alert = IoTSecuritySolutionsAnalyticsAggregatedAlertOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics_recommendation = IoTSecuritySolutionsAnalyticsRecommendationOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics_recommendations = IoTSecuritySolutionsAnalyticsRecommendationsOperations( + self._client, self.config, self._serialize, self._deserialize) self.allowed_connections = AllowedConnectionsOperations( self._client, self.config, self._serialize, self._deserialize) self.discovered_security_solutions = DiscoveredSecuritySolutionsOperations( @@ -213,22 +229,6 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.workspace_settings = WorkspaceSettingsOperations( self._client, self.config, self._serialize, self._deserialize) - self.io_tsecurity_solutions = IoTSecuritySolutionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.io_tsecurity_solutions_resource_group = IoTSecuritySolutionsResourceGroupOperations( - self._client, self.config, self._serialize, self._deserialize) - self.iot_security_solution = IotSecuritySolutionOperations( - self._client, self.config, self._serialize, self._deserialize) - self.io_tsecurity_solutions_analytics = IoTSecuritySolutionsAnalyticsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.io_tsecurity_solutions_analytics_aggregated_alerts = IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.io_tsecurity_solutions_analytics_aggregated_alert = IoTSecuritySolutionsAnalyticsAggregatedAlertOperations( - self._client, self.config, self._serialize, self._deserialize) - self.io_tsecurity_solutions_analytics_recommendation = IoTSecuritySolutionsAnalyticsRecommendationOperations( - self._client, self.config, self._serialize, self._deserialize) - self.io_tsecurity_solutions_analytics_recommendations = IoTSecuritySolutionsAnalyticsRecommendationsOperations( - self._client, self.config, self._serialize, self._deserialize) self.regulatory_compliance_standards = RegulatoryComplianceStandardsOperations( self._client, self.config, self._serialize, self._deserialize) self.regulatory_compliance_controls = RegulatoryComplianceControlsOperations( From d8506f8e54407f94baec38e01bf3e115b8a247ee Mon Sep 17 00:00:00 2001 From: Zim Kalinowski Date: Thu, 1 Aug 2019 15:38:16 +0000 Subject: [PATCH 08/13] regenerated --- .../azure/mgmt/security/__init__.py | 7 +- .../azure/mgmt/security/_configuration.py | 54 + ...security_center.py => _security_center.py} | 104 +- .../azure/mgmt/security/models/__init__.py | 518 +-- .../azure/mgmt/security/models/_models.py | 3439 +++++++++++++++++ .../azure/mgmt/security/models/_models_py3.py | 3439 +++++++++++++++++ .../mgmt/security/models/_paged_models.py | 300 ++ ...ter_enums.py => _security_center_enums.py} | 0 .../models/aad_connectivity_state1.py | 31 - .../models/aad_connectivity_state1_py3.py | 31 - .../models/aad_external_security_solution.py | 58 - .../aad_external_security_solution_py3.py | 58 - .../models/aad_solution_properties.py | 43 - .../models/aad_solution_properties_py3.py | 43 - .../advanced_threat_protection_setting.py | 47 - .../advanced_threat_protection_setting_py3.py | 47 - .../azure/mgmt/security/models/alert.py | 165 - .../models/alert_confidence_reason.py | 40 - .../models/alert_confidence_reason_py3.py | 40 - .../mgmt/security/models/alert_entity.py | 40 - .../mgmt/security/models/alert_entity_py3.py | 40 - .../azure/mgmt/security/models/alert_paged.py | 27 - .../azure/mgmt/security/models/alert_py3.py | 165 - .../models/allowed_connections_resource.py | 63 - .../allowed_connections_resource_paged.py | 27 - .../allowed_connections_resource_py3.py | 63 - .../security/models/app_whitelisting_group.py | 84 - .../models/app_whitelisting_group_py3.py | 84 - .../models/app_whitelisting_groups.py | 29 - .../models/app_whitelisting_groups_py3.py | 29 - .../models/app_whitelisting_issue_summary.py | 36 - .../app_whitelisting_issue_summary_py3.py | 36 - .../models/app_whitelisting_put_group_data.py | 38 - .../app_whitelisting_put_group_data_py3.py | 38 - .../mgmt/security/models/asc_location.py | 46 - .../security/models/asc_location_paged.py | 27 - .../mgmt/security/models/asc_location_py3.py | 46 - .../models/ata_external_security_solution.py | 57 - .../ata_external_security_solution_py3.py | 57 - .../models/ata_solution_properties.py | 41 - .../models/ata_solution_properties_py3.py | 41 - .../models/auto_provisioning_setting.py | 50 - .../models/auto_provisioning_setting_paged.py | 27 - .../models/auto_provisioning_setting_py3.py | 50 - .../models/cef_external_security_solution.py | 57 - .../cef_external_security_solution_py3.py | 57 - .../models/cef_solution_properties.py | 49 - .../models/cef_solution_properties_py3.py | 49 - .../azure/mgmt/security/models/compliance.py | 62 - .../mgmt/security/models/compliance_paged.py | 27 - .../mgmt/security/models/compliance_py3.py | 62 - .../mgmt/security/models/compliance_result.py | 50 - .../models/compliance_result_paged.py | 27 - .../security/models/compliance_result_py3.py | 50 - .../security/models/compliance_segment.py | 41 - .../security/models/compliance_segment_py3.py | 41 - .../security/models/connectable_resource.py | 49 - .../models/connectable_resource_py3.py | 49 - .../security/models/connected_resource.py | 46 - .../security/models/connected_resource_py3.py | 46 - .../security/models/connected_workspace.py | 28 - .../models/connected_workspace_py3.py | 28 - .../security/models/data_export_setting.py | 55 - .../models/data_export_setting_py3.py | 55 - .../models/discovered_security_solution.py | 73 - .../discovered_security_solution_paged.py | 27 - .../discovered_security_solution_py3.py | 73 - .../models/external_security_solution.py | 67 - .../external_security_solution_kind1.py | 30 - .../external_security_solution_kind1_py3.py | 30 - .../external_security_solution_paged.py | 27 - .../external_security_solution_properties.py | 41 - ...ternal_security_solution_properties_py3.py | 41 - .../models/external_security_solution_py3.py | 67 - .../models/information_protection_keyword.py | 41 - .../information_protection_keyword_py3.py | 41 - .../models/information_protection_policy.py | 57 - .../information_protection_policy_paged.py | 27 - .../information_protection_policy_py3.py | 57 - .../mgmt/security/models/information_type.py | 50 - .../security/models/information_type_py3.py | 50 - .../models/io_tsecurity_aggregated_alert.py | 115 - .../io_tsecurity_aggregated_alert_paged.py | 27 - .../io_tsecurity_aggregated_alert_py3.py | 115 - .../io_tsecurity_aggregated_recommendation.py | 104 - ...ecurity_aggregated_recommendation_paged.py | 27 - ...tsecurity_aggregated_recommendation_py3.py | 104 - .../models/io_tsecurity_alerted_device.py | 41 - .../models/io_tsecurity_alerted_device_py3.py | 41 - .../io_tsecurity_alerted_devices_list.py | 34 - .../io_tsecurity_alerted_devices_list_py3.py | 34 - .../models/io_tsecurity_device_alert.py | 48 - .../models/io_tsecurity_device_alert_py3.py | 48 - .../models/io_tsecurity_device_alerts_list.py | 42 - .../io_tsecurity_device_alerts_list_py3.py | 42 - .../io_tsecurity_device_recommendation.py | 48 - .../io_tsecurity_device_recommendation_py3.py | 48 - ...o_tsecurity_device_recommendations_list.py | 35 - ...ecurity_device_recommendations_list_py3.py | 35 - .../io_tsecurity_solution_analytics_model.py | 75 - ...tsecurity_solution_analytics_model_list.py | 43 - ...urity_solution_analytics_model_list_py3.py | 43 - ...s_model_properties_devices_metrics_item.py | 32 - ...del_properties_devices_metrics_item_py3.py | 32 - ..._tsecurity_solution_analytics_model_py3.py | 75 - .../models/io_tsecurity_solution_model.py | 101 - .../io_tsecurity_solution_model_paged.py | 27 - .../models/io_tsecurity_solution_model_py3.py | 101 - .../security/models/io_tseverity_metrics.py | 36 - .../models/io_tseverity_metrics_py3.py | 36 - .../models/jit_network_access_policy.py | 73 - ...jit_network_access_policy_initiate_port.py | 45 - ...network_access_policy_initiate_port_py3.py | 45 - ..._network_access_policy_initiate_request.py | 36 - ...work_access_policy_initiate_request_py3.py | 36 - ..._access_policy_initiate_virtual_machine.py | 41 - ...ess_policy_initiate_virtual_machine_py3.py | 41 - .../models/jit_network_access_policy_paged.py | 27 - .../models/jit_network_access_policy_py3.py | 73 - ...t_network_access_policy_virtual_machine.py | 45 - ...twork_access_policy_virtual_machine_py3.py | 45 - .../models/jit_network_access_port_rule.py | 57 - .../jit_network_access_port_rule_py3.py | 57 - .../models/jit_network_access_request.py | 46 - .../models/jit_network_access_request_port.py | 69 - .../jit_network_access_request_port_py3.py | 69 - .../models/jit_network_access_request_py3.py | 46 - ..._network_access_request_virtual_machine.py | 40 - ...work_access_request_virtual_machine_py3.py | 40 - .../azure/mgmt/security/models/kind.py | 28 - .../azure/mgmt/security/models/kind_py3.py | 28 - .../azure/mgmt/security/models/location.py | 35 - .../mgmt/security/models/location_py3.py | 35 - .../azure/mgmt/security/models/operation.py | 44 - .../mgmt/security/models/operation_display.py | 50 - .../security/models/operation_display_py3.py | 50 - .../mgmt/security/models/operation_paged.py | 27 - .../mgmt/security/models/operation_py3.py | 44 - .../security/models/path_recommendation.py | 64 - .../models/path_recommendation_py3.py | 64 - .../azure/mgmt/security/models/pricing.py | 59 - .../mgmt/security/models/pricing_list.py | 34 - .../mgmt/security/models/pricing_list_py3.py | 34 - .../azure/mgmt/security/models/pricing_py3.py | 59 - .../mgmt/security/models/publisher_info.py | 45 - .../security/models/publisher_info_py3.py | 45 - ...recommendation_configuration_properties.py | 59 - ...mmendation_configuration_properties_py3.py | 59 - .../regulatory_compliance_assessment.py | 89 - .../regulatory_compliance_assessment_paged.py | 27 - .../regulatory_compliance_assessment_py3.py | 89 - .../models/regulatory_compliance_control.py | 71 - .../regulatory_compliance_control_paged.py | 27 - .../regulatory_compliance_control_py3.py | 71 - .../models/regulatory_compliance_standard.py | 72 - .../regulatory_compliance_standard_paged.py | 27 - .../regulatory_compliance_standard_py3.py | 72 - .../azure/mgmt/security/models/resource.py | 45 - .../mgmt/security/models/resource_py3.py | 45 - .../mgmt/security/models/security_contact.py | 67 - .../security/models/security_contact_paged.py | 27 - .../security/models/security_contact_py3.py | 67 - .../mgmt/security/models/security_task.py | 68 - .../security/models/security_task_paged.py | 27 - .../models/security_task_parameters.py | 41 - .../models/security_task_parameters_py3.py | 41 - .../mgmt/security/models/security_task_py3.py | 68 - .../mgmt/security/models/sensitivity_label.py | 36 - .../security/models/sensitivity_label_py3.py | 36 - .../models/server_vulnerability_assessment.py | 49 - .../server_vulnerability_assessment_py3.py | 49 - .../server_vulnerability_assessments_list.py | 29 - ...rver_vulnerability_assessments_list_py3.py | 29 - .../azure/mgmt/security/models/setting.py | 50 - .../mgmt/security/models/setting_paged.py | 27 - .../azure/mgmt/security/models/setting_py3.py | 50 - .../mgmt/security/models/setting_resource.py | 51 - .../security/models/setting_resource_py3.py | 51 - .../mgmt/security/models/tags_resource.py | 29 - .../mgmt/security/models/tags_resource_py3.py | 29 - .../mgmt/security/models/topology_resource.py | 63 - .../models/topology_resource_paged.py | 27 - .../security/models/topology_resource_py3.py | 63 - .../models/topology_single_resource.py | 76 - .../models/topology_single_resource_child.py | 36 - .../topology_single_resource_child_py3.py | 36 - .../models/topology_single_resource_parent.py | 36 - .../topology_single_resource_parent_py3.py | 36 - .../models/topology_single_resource_py3.py | 76 - .../update_iot_security_solution_data.py | 37 - .../update_iot_security_solution_data_py3.py | 37 - .../user_defined_resources_properties.py | 42 - .../user_defined_resources_properties_py3.py | 42 - .../security/models/user_recommendation.py | 34 - .../models/user_recommendation_py3.py | 34 - .../mgmt/security/models/vm_recommendation.py | 38 - .../security/models/vm_recommendation_py3.py | 38 - .../mgmt/security/models/workspace_setting.py | 57 - .../models/workspace_setting_paged.py | 27 - .../security/models/workspace_setting_py3.py | 57 - .../mgmt/security/operations/__init__.py | 62 +- ...aptive_application_controls_operations.py} | 5 +- ..._advanced_threat_protection_operations.py} | 4 +- ...ts_operations.py => _alerts_operations.py} | 60 +- ....py => _allowed_connections_operations.py} | 31 +- ..._auto_provisioning_settings_operations.py} | 18 +- ...s.py => _compliance_results_operations.py} | 17 +- ...erations.py => _compliances_operations.py} | 17 +- ...scovered_security_solutions_operations.py} | 31 +- ...external_security_solutions_operations.py} | 31 +- ...rmation_protection_policies_operations.py} | 18 +- ..._analytics_aggregated_alert_operations.py} | 3 +- ...analytics_aggregated_alerts_operations.py} | 16 +- ...ecurity_solutions_analytics_operations.py} | 4 +- ...ns_analytics_recommendation_operations.py} | 3 +- ...s_analytics_recommendations_operations.py} | 16 +- ... => _io_tsecurity_solutions_operations.py} | 16 +- ...ty_solutions_resource_group_operations.py} | 16 +- ...y => _iot_security_solution_operations.py} | 5 +- ...jit_network_access_policies_operations.py} | 61 +- ...operations.py => _locations_operations.py} | 17 +- .../{operations.py => _operations.py} | 16 +- ..._operations.py => _pricings_operations.py} | 5 +- ...tory_compliance_assessments_operations.py} | 17 +- ...ulatory_compliance_controls_operations.py} | 17 +- ...latory_compliance_standards_operations.py} | 17 +- ...ns.py => _security_contacts_operations.py} | 19 +- ...er_vulnerability_assessment_operations.py} | 5 +- ..._operations.py => _settings_operations.py} | 18 +- ...sks_operations.py => _tasks_operations.py} | 46 +- ..._operations.py => _topology_operations.py} | 31 +- ...s.py => _workspace_settings_operations.py} | 19 +- 232 files changed, 7901 insertions(+), 10023 deletions(-) create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/_configuration.py rename sdk/security/azure-mgmt-security/azure/mgmt/security/{security_center.py => _security_center.py} (73%) create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py rename sdk/security/azure-mgmt-security/azure/mgmt/security/models/{security_center_enums.py => _security_center_enums.py} (100%) delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_group.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_group_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_groups.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_groups_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_issue_summary.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_issue_summary_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_put_group_data.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_put_group_data_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/location.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/location_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/path_recommendation.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/path_recommendation_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/publisher_info.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/publisher_info_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessment.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessment_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessments_list.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessments_list_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_recommendation.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_recommendation_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/vm_recommendation.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/vm_recommendation_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_py3.py rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{adaptive_application_controls_operations.py => _adaptive_application_controls_operations.py} (98%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{advanced_threat_protection_operations.py => _advanced_threat_protection_operations.py} (98%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{alerts_operations.py => _alerts_operations.py} (96%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{allowed_connections_operations.py => _allowed_connections_operations.py} (94%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{auto_provisioning_settings_operations.py => _auto_provisioning_settings_operations.py} (96%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{compliance_results_operations.py => _compliance_results_operations.py} (94%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{compliances_operations.py => _compliances_operations.py} (94%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{discovered_security_solutions_operations.py => _discovered_security_solutions_operations.py} (94%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{external_security_solutions_operations.py => _external_security_solutions_operations.py} (94%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{information_protection_policies_operations.py => _information_protection_policies_operations.py} (96%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{io_tsecurity_solutions_analytics_aggregated_alert_operations.py => _io_tsecurity_solutions_analytics_aggregated_alert_operations.py} (98%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{io_tsecurity_solutions_analytics_aggregated_alerts_operations.py => _io_tsecurity_solutions_analytics_aggregated_alerts_operations.py} (92%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{io_tsecurity_solutions_analytics_operations.py => _io_tsecurity_solutions_analytics_operations.py} (98%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{io_tsecurity_solutions_analytics_recommendation_operations.py => _io_tsecurity_solutions_analytics_recommendation_operations.py} (97%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{io_tsecurity_solutions_analytics_recommendations_operations.py => _io_tsecurity_solutions_analytics_recommendations_operations.py} (92%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{io_tsecurity_solutions_operations.py => _io_tsecurity_solutions_operations.py} (91%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{io_tsecurity_solutions_resource_group_operations.py => _io_tsecurity_solutions_resource_group_operations.py} (92%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{iot_security_solution_operations.py => _iot_security_solution_operations.py} (99%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{jit_network_access_policies_operations.py => _jit_network_access_policies_operations.py} (96%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{locations_operations.py => _locations_operations.py} (94%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{operations.py => _operations.py} (90%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{pricings_operations.py => _pricings_operations.py} (98%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{regulatory_compliance_assessments_operations.py => _regulatory_compliance_assessments_operations.py} (95%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{regulatory_compliance_controls_operations.py => _regulatory_compliance_controls_operations.py} (95%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{regulatory_compliance_standards_operations.py => _regulatory_compliance_standards_operations.py} (94%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{security_contacts_operations.py => _security_contacts_operations.py} (97%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{server_vulnerability_assessment_operations.py => _server_vulnerability_assessment_operations.py} (99%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{settings_operations.py => _settings_operations.py} (96%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{tasks_operations.py => _tasks_operations.py} (96%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{topology_operations.py => _topology_operations.py} (94%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{workspace_settings_operations.py => _workspace_settings_operations.py} (97%) 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 73% 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 5637d709e732..342c5d61f0e1 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,78 +11,40 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.compliance_results_operations import ComplianceResultsOperations -from .operations.pricings_operations import PricingsOperations -from .operations.alerts_operations import AlertsOperations -from .operations.settings_operations import SettingsOperations -from .operations.io_tsecurity_solutions_operations import IoTSecuritySolutionsOperations -from .operations.io_tsecurity_solutions_resource_group_operations import IoTSecuritySolutionsResourceGroupOperations -from .operations.iot_security_solution_operations import IotSecuritySolutionOperations -from .operations.io_tsecurity_solutions_analytics_operations import IoTSecuritySolutionsAnalyticsOperations -from .operations.io_tsecurity_solutions_analytics_aggregated_alerts_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations -from .operations.io_tsecurity_solutions_analytics_aggregated_alert_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertOperations -from .operations.io_tsecurity_solutions_analytics_recommendation_operations import IoTSecuritySolutionsAnalyticsRecommendationOperations -from .operations.io_tsecurity_solutions_analytics_recommendations_operations import IoTSecuritySolutionsAnalyticsRecommendationsOperations -from .operations.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.adaptive_application_controls_operations import AdaptiveApplicationControlsOperations -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 .operations.regulatory_compliance_standards_operations import RegulatoryComplianceStandardsOperations -from .operations.regulatory_compliance_controls_operations import RegulatoryComplianceControlsOperations -from .operations.regulatory_compliance_assessments_operations import RegulatoryComplianceAssessmentsOperations -from .operations.server_vulnerability_assessment_operations import ServerVulnerabilityAssessmentOperations -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 IoTSecuritySolutionsOperations +from .operations import IoTSecuritySolutionsResourceGroupOperations +from .operations import IotSecuritySolutionOperations +from .operations import IoTSecuritySolutionsAnalyticsOperations +from .operations import IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations +from .operations import IoTSecuritySolutionsAnalyticsAggregatedAlertOperations +from .operations import IoTSecuritySolutionsAnalyticsRecommendationOperations +from .operations import IoTSecuritySolutionsAnalyticsRecommendationsOperations +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 . import models class SecurityCenter(SDKClient): 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 e6f6360d92fc..b09be32d96b1 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,200 +10,200 @@ # -------------------------------------------------------------------------- try: - from .compliance_result_py3 import ComplianceResult - from .asc_location_py3 import AscLocation - from .resource_py3 import Resource - from .pricing_py3 import Pricing - from .pricing_list_py3 import PricingList - 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 .tags_resource_py3 import TagsResource - from .user_defined_resources_properties_py3 import UserDefinedResourcesProperties - from .recommendation_configuration_properties_py3 import RecommendationConfigurationProperties - from .io_tsecurity_solution_model_py3 import IoTSecuritySolutionModel - from .update_iot_security_solution_data_py3 import UpdateIotSecuritySolutionData - from .io_tseverity_metrics_py3 import IoTSeverityMetrics - from .io_tsecurity_solution_analytics_model_properties_devices_metrics_item_py3 import IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem - from .io_tsecurity_alerted_device_py3 import IoTSecurityAlertedDevice - from .io_tsecurity_alerted_devices_list_py3 import IoTSecurityAlertedDevicesList - from .io_tsecurity_device_alert_py3 import IoTSecurityDeviceAlert - from .io_tsecurity_device_alerts_list_py3 import IoTSecurityDeviceAlertsList - from .io_tsecurity_device_recommendation_py3 import IoTSecurityDeviceRecommendation - from .io_tsecurity_device_recommendations_list_py3 import IoTSecurityDeviceRecommendationsList - from .io_tsecurity_solution_analytics_model_py3 import IoTSecuritySolutionAnalyticsModel - from .io_tsecurity_solution_analytics_model_list_py3 import IoTSecuritySolutionAnalyticsModelList - from .io_tsecurity_aggregated_alert_py3 import IoTSecurityAggregatedAlert - from .io_tsecurity_aggregated_recommendation_py3 import IoTSecurityAggregatedRecommendation - from .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 .app_whitelisting_issue_summary_py3 import AppWhitelistingIssueSummary - from .vm_recommendation_py3 import VmRecommendation - from .publisher_info_py3 import PublisherInfo - from .user_recommendation_py3 import UserRecommendation - from .path_recommendation_py3 import PathRecommendation - from .app_whitelisting_group_py3 import AppWhitelistingGroup - from .app_whitelisting_groups_py3 import AppWhitelistingGroups - from .app_whitelisting_put_group_data_py3 import AppWhitelistingPutGroupData - 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 .regulatory_compliance_standard_py3 import RegulatoryComplianceStandard - from .regulatory_compliance_control_py3 import RegulatoryComplianceControl - from .regulatory_compliance_assessment_py3 import RegulatoryComplianceAssessment - from .server_vulnerability_assessment_py3 import ServerVulnerabilityAssessment - from .server_vulnerability_assessments_list_py3 import ServerVulnerabilityAssessmentsList + from ._models_py3 import AadConnectivityState1 + from ._models_py3 import AadExternalSecuritySolution + from ._models_py3 import AadSolutionProperties + 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 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 AutoProvisioningSetting + 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 DataExportSetting + from ._models_py3 import DiscoveredSecuritySolution + 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 IoTSecurityAggregatedRecommendation + from ._models_py3 import IoTSecurityAlertedDevice + from ._models_py3 import IoTSecurityAlertedDevicesList + from ._models_py3 import IoTSecurityDeviceAlert + from ._models_py3 import IoTSecurityDeviceAlertsList + from ._models_py3 import IoTSecurityDeviceRecommendation + from ._models_py3 import IoTSecurityDeviceRecommendationsList + 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 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 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 SecurityContact + 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 Setting + from ._models_py3 import SettingResource + from ._models_py3 import TagsResource + from ._models_py3 import TopologyResource + from ._models_py3 import TopologySingleResource + from ._models_py3 import TopologySingleResourceChild + from ._models_py3 import TopologySingleResourceParent + from ._models_py3 import UpdateIotSecuritySolutionData + from ._models_py3 import UserDefinedResourcesProperties + from ._models_py3 import UserRecommendation + from ._models_py3 import VmRecommendation + from ._models_py3 import WorkspaceSetting except (SyntaxError, ImportError): - from .compliance_result import ComplianceResult - from .asc_location import AscLocation - from .resource import Resource - from .pricing import Pricing - from .pricing_list import PricingList - 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 .tags_resource import TagsResource - from .user_defined_resources_properties import UserDefinedResourcesProperties - from .recommendation_configuration_properties import RecommendationConfigurationProperties - from .io_tsecurity_solution_model import IoTSecuritySolutionModel - from .update_iot_security_solution_data import UpdateIotSecuritySolutionData - from .io_tseverity_metrics import IoTSeverityMetrics - from .io_tsecurity_solution_analytics_model_properties_devices_metrics_item import IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem - from .io_tsecurity_alerted_device import IoTSecurityAlertedDevice - from .io_tsecurity_alerted_devices_list import IoTSecurityAlertedDevicesList - from .io_tsecurity_device_alert import IoTSecurityDeviceAlert - from .io_tsecurity_device_alerts_list import IoTSecurityDeviceAlertsList - from .io_tsecurity_device_recommendation import IoTSecurityDeviceRecommendation - from .io_tsecurity_device_recommendations_list import IoTSecurityDeviceRecommendationsList - from .io_tsecurity_solution_analytics_model import IoTSecuritySolutionAnalyticsModel - from .io_tsecurity_solution_analytics_model_list import IoTSecuritySolutionAnalyticsModelList - from .io_tsecurity_aggregated_alert import IoTSecurityAggregatedAlert - from .io_tsecurity_aggregated_recommendation import IoTSecurityAggregatedRecommendation - from .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 .app_whitelisting_issue_summary import AppWhitelistingIssueSummary - from .vm_recommendation import VmRecommendation - from .publisher_info import PublisherInfo - from .user_recommendation import UserRecommendation - from .path_recommendation import PathRecommendation - from .app_whitelisting_group import AppWhitelistingGroup - from .app_whitelisting_groups import AppWhitelistingGroups - from .app_whitelisting_put_group_data import AppWhitelistingPutGroupData - 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 .regulatory_compliance_standard import RegulatoryComplianceStandard - from .regulatory_compliance_control import RegulatoryComplianceControl - from .regulatory_compliance_assessment import RegulatoryComplianceAssessment - from .server_vulnerability_assessment import ServerVulnerabilityAssessment - from .server_vulnerability_assessments_list import ServerVulnerabilityAssessmentsList -from .compliance_result_paged import ComplianceResultPaged -from .alert_paged import AlertPaged -from .setting_paged import SettingPaged -from .io_tsecurity_solution_model_paged import IoTSecuritySolutionModelPaged -from .io_tsecurity_aggregated_alert_paged import IoTSecurityAggregatedAlertPaged -from .io_tsecurity_aggregated_recommendation_paged import IoTSecurityAggregatedRecommendationPaged -from .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 .regulatory_compliance_standard_paged import RegulatoryComplianceStandardPaged -from .regulatory_compliance_control_paged import RegulatoryComplianceControlPaged -from .regulatory_compliance_assessment_paged import RegulatoryComplianceAssessmentPaged -from .security_center_enums import ( + from ._models import AadConnectivityState1 + from ._models import AadExternalSecuritySolution + from ._models import AadSolutionProperties + from ._models import AdvancedThreatProtectionSetting + from ._models import Alert + from ._models import AlertConfidenceReason + from ._models import AlertEntity + from ._models import AllowedConnectionsResource + 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 AutoProvisioningSetting + 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 DataExportSetting + from ._models import DiscoveredSecuritySolution + 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 IoTSecurityAggregatedRecommendation + from ._models import IoTSecurityAlertedDevice + from ._models import IoTSecurityAlertedDevicesList + from ._models import IoTSecurityDeviceAlert + from ._models import IoTSecurityDeviceAlertsList + from ._models import IoTSecurityDeviceRecommendation + from ._models import IoTSecurityDeviceRecommendationsList + 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 Location + from ._models import Operation + from ._models import OperationDisplay + from ._models import PathRecommendation + from ._models import Pricing + from ._models import PricingList + 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 SecurityContact + from ._models import SecurityTask + from ._models import SecurityTaskParameters + from ._models import SensitivityLabel + from ._models import ServerVulnerabilityAssessment + from ._models import ServerVulnerabilityAssessmentsList + from ._models import Setting + from ._models import SettingResource + from ._models import TagsResource + from ._models import TopologyResource + from ._models import TopologySingleResource + from ._models import TopologySingleResourceChild + from ._models import TopologySingleResourceParent + from ._models import UpdateIotSecuritySolutionData + from ._models import UserDefinedResourcesProperties + from ._models import UserRecommendation + 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 AutoProvisioningSettingPaged +from ._paged_models import CompliancePaged +from ._paged_models import ComplianceResultPaged +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 SecurityTaskPaged +from ._paged_models import SettingPaged +from ._paged_models import TopologyResourcePaged +from ._paged_models import WorkspaceSettingPaged +from ._security_center_enums import ( ResourceStatus, PricingTier, ReportedSeverity, @@ -227,24 +227,40 @@ ) __all__ = [ - 'ComplianceResult', - 'AscLocation', - 'Resource', - 'Pricing', - 'PricingList', - 'AlertEntity', - 'AlertConfidenceReason', + 'AadConnectivityState1', + 'AadExternalSecuritySolution', + 'AadSolutionProperties', + 'AdvancedThreatProtectionSetting', 'Alert', - 'Setting', + 'AlertConfidenceReason', + 'AlertEntity', + 'AllowedConnectionsResource', + 'AppWhitelistingGroup', + 'AppWhitelistingGroups', + 'AppWhitelistingIssueSummary', + 'AppWhitelistingPutGroupData', + 'AscLocation', + 'AtaExternalSecuritySolution', + 'AtaSolutionProperties', + 'AutoProvisioningSetting', + 'CefExternalSecuritySolution', + 'CefSolutionProperties', + 'Compliance', + 'ComplianceResult', + 'ComplianceSegment', + 'ConnectableResource', + 'ConnectedResource', + 'ConnectedWorkspace', 'DataExportSetting', - 'SettingResource', - 'TagsResource', - 'UserDefinedResourcesProperties', - 'RecommendationConfigurationProperties', - 'IoTSecuritySolutionModel', - 'UpdateIotSecuritySolutionData', - 'IoTSeverityMetrics', - 'IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem', + 'DiscoveredSecuritySolution', + 'ExternalSecuritySolution', + 'ExternalSecuritySolutionKind1', + 'ExternalSecuritySolutionProperties', + 'InformationProtectionKeyword', + 'InformationProtectionPolicy', + 'InformationType', + 'IoTSecurityAggregatedAlert', + 'IoTSecurityAggregatedRecommendation', 'IoTSecurityAlertedDevice', 'IoTSecurityAlertedDevicesList', 'IoTSecurityDeviceAlert', @@ -253,65 +269,49 @@ 'IoTSecurityDeviceRecommendationsList', 'IoTSecuritySolutionAnalyticsModel', 'IoTSecuritySolutionAnalyticsModelList', - 'IoTSecurityAggregatedAlert', - 'IoTSecurityAggregatedRecommendation', - 'ConnectedResource', - 'ConnectableResource', - 'AllowedConnectionsResource', - 'Location', - 'DiscoveredSecuritySolution', - 'ExternalSecuritySolution', - 'CefSolutionProperties', - 'CefExternalSecuritySolution', - 'AtaSolutionProperties', - 'AtaExternalSecuritySolution', - 'ConnectedWorkspace', - 'AadSolutionProperties', - 'AadExternalSecuritySolution', - 'ExternalSecuritySolutionKind1', - 'ExternalSecuritySolutionProperties', - 'AadConnectivityState1', - 'JitNetworkAccessPortRule', - 'JitNetworkAccessPolicyVirtualMachine', - 'JitNetworkAccessRequestPort', - 'JitNetworkAccessRequestVirtualMachine', - 'JitNetworkAccessRequest', + 'IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem', + 'IoTSecuritySolutionModel', + 'IoTSeverityMetrics', 'JitNetworkAccessPolicy', 'JitNetworkAccessPolicyInitiatePort', - 'JitNetworkAccessPolicyInitiateVirtualMachine', 'JitNetworkAccessPolicyInitiateRequest', + 'JitNetworkAccessPolicyInitiateVirtualMachine', + 'JitNetworkAccessPolicyVirtualMachine', + 'JitNetworkAccessPortRule', + 'JitNetworkAccessRequest', + 'JitNetworkAccessRequestPort', + 'JitNetworkAccessRequestVirtualMachine', 'Kind', - 'AppWhitelistingIssueSummary', - 'VmRecommendation', - 'PublisherInfo', - 'UserRecommendation', - 'PathRecommendation', - 'AppWhitelistingGroup', - 'AppWhitelistingGroups', - 'AppWhitelistingPutGroupData', - 'OperationDisplay', + 'Location', 'Operation', - 'SecurityTaskParameters', + 'OperationDisplay', + 'PathRecommendation', + 'Pricing', + 'PricingList', + 'PublisherInfo', + 'RecommendationConfigurationProperties', + 'RegulatoryComplianceAssessment', + 'RegulatoryComplianceControl', + 'RegulatoryComplianceStandard', + 'Resource', + 'SecurityContact', 'SecurityTask', - 'TopologySingleResourceParent', - 'TopologySingleResourceChild', - 'TopologySingleResource', - 'TopologyResource', - 'AdvancedThreatProtectionSetting', - 'AutoProvisioningSetting', - 'ComplianceSegment', - 'Compliance', + 'SecurityTaskParameters', 'SensitivityLabel', - 'InformationProtectionKeyword', - 'InformationType', - 'InformationProtectionPolicy', - 'SecurityContact', - 'WorkspaceSetting', - 'RegulatoryComplianceStandard', - 'RegulatoryComplianceControl', - 'RegulatoryComplianceAssessment', 'ServerVulnerabilityAssessment', 'ServerVulnerabilityAssessmentsList', + 'Setting', + 'SettingResource', + 'TagsResource', + 'TopologyResource', + 'TopologySingleResource', + 'TopologySingleResourceChild', + 'TopologySingleResourceParent', + 'UpdateIotSecuritySolutionData', + 'UserDefinedResourcesProperties', + 'UserRecommendation', + 'VmRecommendation', + 'WorkspaceSetting', 'ComplianceResultPaged', 'AlertPaged', 'SettingPaged', 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..814deff5ee6b --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py @@ -0,0 +1,3439 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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 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' + :type enforcement_mode: 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 + :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'}, + '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.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: Possible values include: 'Audit', 'Enforce' + :type enforcement_mode: 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] + """ + + _attribute_map = { + 'enforcement_mode': {'key': 'enforcementMode', 'type': 'str'}, + '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.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 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 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 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 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 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: The date the incidents were detected by the + vendor + :vartype aggregated_date_utc: date + :ivar vendor_name: Name of the vendor that discovered the incident + :vartype vendor_name: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar count: Occurrence number of the alert within the aggregated date + :vartype count: int + :ivar effected_resource_type: Azure resource ID of the resource that got + the alerts + :vartype effected_resource_type: str + :ivar system_source: The type of the alerted resource (Azure, Non-Azure) + :vartype system_source: str + :ivar action_taken: The action that was taken as a response to the alert + (Active, Blocked etc.) + :vartype action_taken: str + :ivar log_analytics_query: query in log analytics to get the list of + affected devices/alerts + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'alert_type': {'readonly': True}, + 'alert_display_name': {'readonly': True}, + 'aggregated_date_utc': {'readonly': True}, + 'vendor_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'description': {'readonly': True}, + 'count': {'readonly': True}, + 'effected_resource_type': {'readonly': True}, + 'system_source': {'readonly': True}, + 'action_taken': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, + 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, + 'aggregated_date_utc': {'key': 'properties.aggregatedDateUtc', 'type': 'date'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'count': {'key': 'properties.count', 'type': 'int'}, + 'effected_resource_type': {'key': 'properties.effectedResourceType', 'type': 'str'}, + 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, + 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAggregatedAlert, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + self.alert_type = None + self.alert_display_name = None + self.aggregated_date_utc = None + self.vendor_name = None + self.reported_severity = None + self.remediation_steps = None + self.description = None + self.count = None + self.effected_resource_type = None + self.system_source = None + self.action_taken = None + self.log_analytics_query = None + + +class IoTSecurityAggregatedRecommendation(Model): + """Security Solution Recommendation Information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param recommendation_name: Name of the recommendation + :type recommendation_name: str + :ivar recommendation_display_name: Display name of the recommendation + type. + :vartype recommendation_display_name: str + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar recommendation_type_id: The recommendation-type GUID. + :vartype recommendation_type_id: str + :ivar detected_by: Name of the vendor that discovered the issue + :vartype detected_by: str + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar reported_severity: Estimated severity of this recommendation. + Possible values include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar healthy_devices: the number of the healthy devices within the + solution + :vartype healthy_devices: int + :ivar unhealthy_device_count: the number of the unhealthy devices within + the solution + :vartype unhealthy_device_count: int + :ivar log_analytics_query: query in log analytics to get the list of + affected devices/alerts + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'recommendation_display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'recommendation_type_id': {'readonly': True}, + 'detected_by': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'healthy_devices': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'recommendation_name': {'key': 'properties.recommendationName', 'type': 'str'}, + 'recommendation_display_name': {'key': 'properties.recommendationDisplayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'recommendation_type_id': {'key': 'properties.recommendationTypeId', 'type': 'str'}, + 'detected_by': {'key': 'properties.detectedBy', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'healthy_devices': {'key': 'properties.healthyDevices', 'type': 'int'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAggregatedRecommendation, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + self.recommendation_name = kwargs.get('recommendation_name', None) + self.recommendation_display_name = None + self.description = None + self.recommendation_type_id = None + self.detected_by = None + self.remediation_steps = None + self.reported_severity = None + self.healthy_devices = None + self.unhealthy_device_count = None + self.log_analytics_query = None + + +class IoTSecurityAlertedDevice(Model): + """Statistic information about the number of alerts per device during the last + period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar device_id: Name of the alert type + :vartype device_id: str + :ivar alerts_count: the number of alerts raised for this device + :vartype alerts_count: int + """ + + _validation = { + 'device_id': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAlertedDevice, self).__init__(**kwargs) + self.device_id = None + self.alerts_count = None + + +class IoTSecurityAlertedDevicesList(Model): + """List of devices with the count of raised alerts. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of aggregated alerts data + :type value: list[~azure.mgmt.security.models.IoTSecurityAlertedDevice] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityAlertedDevice]'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAlertedDevicesList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class IoTSecurityDeviceAlert(Model): + """Statistic information about the number of alerts per alert type during the + last period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_display_name: Display name of the alert + :vartype alert_display_name: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar alerts_count: the number of alerts raised for this alert type + :vartype alerts_count: int + """ + + _validation = { + 'alert_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'alert_display_name': {'key': 'alertDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceAlert, self).__init__(**kwargs) + self.alert_display_name = None + self.reported_severity = None + self.alerts_count = None + + +class IoTSecurityDeviceAlertsList(Model): + """List of alerts with the count of raised alerts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of top alerts data + :type value: list[~azure.mgmt.security.models.IoTSecurityDeviceAlert] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityDeviceAlert]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceAlertsList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class IoTSecurityDeviceRecommendation(Model): + """Statistic information about the number of recommendations per + recommendation type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar recommendation_display_name: Display name of the recommendation + :vartype recommendation_display_name: str + :ivar reported_severity: Estimated severity of this recommendation. + Possible values include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar devices_count: the number of device with this recommendation + :vartype devices_count: int + """ + + _validation = { + 'recommendation_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'devices_count': {'readonly': True}, + } + + _attribute_map = { + 'recommendation_display_name': {'key': 'recommendationDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'devices_count': {'key': 'devicesCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceRecommendation, self).__init__(**kwargs) + self.recommendation_display_name = None + self.reported_severity = None + self.devices_count = None + + +class IoTSecurityDeviceRecommendationsList(Model): + """List of recommendations with the count of devices. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of aggregated recommendation data + :type value: + list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityDeviceRecommendation]'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceRecommendationsList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class IoTSecuritySolutionAnalyticsModel(Resource): + """Security Analytics of a security solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar metrics: Security Analytics of a security solution + :vartype metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + :ivar unhealthy_device_count: number of unhealthy devices + :vartype unhealthy_device_count: int + :ivar devices_metrics: The list of devices metrics by the aggregated date. + :vartype devices_metrics: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem] + :param top_alerted_devices: The list of top 3 devices with the most + attacked. + :type top_alerted_devices: + ~azure.mgmt.security.models.IoTSecurityAlertedDevicesList + :param most_prevalent_device_alerts: The list of most prevalent 3 alerts. + :type most_prevalent_device_alerts: + ~azure.mgmt.security.models.IoTSecurityDeviceAlertsList + :param most_prevalent_device_recommendations: The list of most prevalent 3 + recommendations. + :type most_prevalent_device_recommendations: + ~azure.mgmt.security.models.IoTSecurityDeviceRecommendationsList + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metrics': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'devices_metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'metrics': {'key': 'properties.metrics', 'type': 'IoTSeverityMetrics'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'devices_metrics': {'key': 'properties.devicesMetrics', 'type': '[IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem]'}, + 'top_alerted_devices': {'key': 'properties.topAlertedDevices', 'type': 'IoTSecurityAlertedDevicesList'}, + 'most_prevalent_device_alerts': {'key': 'properties.mostPrevalentDeviceAlerts', 'type': 'IoTSecurityDeviceAlertsList'}, + 'most_prevalent_device_recommendations': {'key': 'properties.mostPrevalentDeviceRecommendations', 'type': 'IoTSecurityDeviceRecommendationsList'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionAnalyticsModel, self).__init__(**kwargs) + self.metrics = None + self.unhealthy_device_count = None + self.devices_metrics = None + self.top_alerted_devices = kwargs.get('top_alerted_devices', None) + self.most_prevalent_device_alerts = kwargs.get('most_prevalent_device_alerts', None) + self.most_prevalent_device_recommendations = kwargs.get('most_prevalent_device_recommendations', None) + + +class IoTSecuritySolutionAnalyticsModelList(Model): + """List of Security Analytics of a security solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of Security Analytics of a security solution + :type value: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecuritySolutionAnalyticsModel]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionAnalyticsModelList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem(Model): + """IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem. + + :param date_property: the date of the metrics + :type date_property: datetime + :param devices_metrics: devices alerts count by severity. + :type devices_metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'devices_metrics': {'key': 'devicesMetrics', 'type': 'IoTSeverityMetrics'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, self).__init__(**kwargs) + self.date_property = kwargs.get('date_property', None) + self.devices_metrics = kwargs.get('devices_metrics', None) + + +class IoTSecuritySolutionModel(Model): + """Security Solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param location: The resource location. + :type location: str + :param workspace: Required. Workspace resource ID + :type workspace: str + :param display_name: Required. Resource display name. + :type display_name: str + :param status: Security solution status. Possible values include: + 'Enabled', 'Disabled'. Default value: "Enabled" . + :type status: str or ~azure.mgmt.security.models.SecuritySolutionStatus + :param export: List of additional export to workspace data options + :type export: list[str or ~azure.mgmt.security.models.ExportData] + :param disabled_data_sources: Disabled data sources. Disabling these data + sources compromises the system. + :type disabled_data_sources: list[str or + ~azure.mgmt.security.models.DataSource] + :param iot_hubs: Required. IoT Hub resource IDs + :type iot_hubs: list[str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :ivar auto_discovered_resources: List of resources that were automatically + discovered as relevant to the security solution. + :vartype auto_discovered_resources: list[str] + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'workspace': {'required': True}, + 'display_name': {'required': True}, + 'iot_hubs': {'required': True}, + 'auto_discovered_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'workspace': {'key': 'properties.workspace', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'export': {'key': 'properties.export', 'type': '[str]'}, + 'disabled_data_sources': {'key': 'properties.disabledDataSources', 'type': '[str]'}, + 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[str]'}, + 'user_defined_resources': {'key': 'properties.userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'auto_discovered_resources': {'key': 'properties.autoDiscoveredResources', 'type': '[str]'}, + 'recommendations_configuration': {'key': 'properties.recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + self.workspace = kwargs.get('workspace', None) + self.display_name = kwargs.get('display_name', None) + self.status = kwargs.get('status', "Enabled") + self.export = kwargs.get('export', None) + self.disabled_data_sources = kwargs.get('disabled_data_sources', None) + self.iot_hubs = kwargs.get('iot_hubs', None) + self.user_defined_resources = kwargs.get('user_defined_resources', None) + self.auto_discovered_resources = None + self.recommendations_configuration = kwargs.get('recommendations_configuration', None) + + +class IoTSeverityMetrics(Model): + """Severity metrics. + + :param high: count of high severity items + :type high: int + :param medium: count of medium severity items + :type medium: int + :param low: count of low severity items + :type low: int + """ + + _attribute_map = { + 'high': {'key': 'high', 'type': 'int'}, + 'medium': {'key': 'medium', 'type': 'int'}, + 'low': {'key': 'low', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSeverityMetrics, self).__init__(**kwargs) + self.high = kwargs.get('high', None) + self.medium = kwargs.get('medium', None) + self.low = kwargs.get('low', None) + + +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] + """ + + _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) + + +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 + """ + + _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) + + +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): + """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. 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 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): + """Recommendation configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param recommendation_type: Required. The recommendation type. Possible + values include: '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. The recommendation is not + generated when the status is disabled. 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 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 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 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': 'userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'recommendations_configuration': {'key': 'recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, **kwargs): + super(UpdateIotSecuritySolutionData, self).__init__(**kwargs) + self.user_defined_resources = kwargs.get('user_defined_resources', None) + self.recommendations_configuration = kwargs.get('recommendations_configuration', None) + + +class UserDefinedResourcesProperties(Model): + """Properties of the solution's user defined resources. + + All required parameters must be populated in order to send to Azure. + + :param query: Required. Azure Resource Graph query which represents the + security solution's user defined resources. Required to start with "where + type != "Microsoft.Devices/IotHubs"" + :type query: str + :param query_subscriptions: Required. List of Azure subscription ids on + which the user defined resources query should be executed. + :type query_subscriptions: list[str] + """ + + _validation = { + 'query': {'required': True}, + 'query_subscriptions': {'required': True}, + } + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'}, + 'query_subscriptions': {'key': 'querySubscriptions', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(UserDefinedResourcesProperties, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.query_subscriptions = kwargs.get('query_subscriptions', None) + + +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 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..55592fee92b4 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py @@ -0,0 +1,3439 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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 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' + :type enforcement_mode: 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 + :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'}, + '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, 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.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: Possible values include: 'Audit', 'Enforce' + :type enforcement_mode: 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] + """ + + _attribute_map = { + 'enforcement_mode': {'key': 'enforcementMode', 'type': 'str'}, + 'vm_recommendations': {'key': 'vmRecommendations', 'type': '[VmRecommendation]'}, + 'path_recommendations': {'key': 'pathRecommendations', 'type': '[PathRecommendation]'}, + } + + def __init__(self, *, enforcement_mode=None, vm_recommendations=None, path_recommendations=None, **kwargs) -> None: + super(AppWhitelistingPutGroupData, self).__init__(**kwargs) + self.enforcement_mode = enforcement_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 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 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 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 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 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: The date the incidents were detected by the + vendor + :vartype aggregated_date_utc: date + :ivar vendor_name: Name of the vendor that discovered the incident + :vartype vendor_name: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar count: Occurrence number of the alert within the aggregated date + :vartype count: int + :ivar effected_resource_type: Azure resource ID of the resource that got + the alerts + :vartype effected_resource_type: str + :ivar system_source: The type of the alerted resource (Azure, Non-Azure) + :vartype system_source: str + :ivar action_taken: The action that was taken as a response to the alert + (Active, Blocked etc.) + :vartype action_taken: str + :ivar log_analytics_query: query in log analytics to get the list of + affected devices/alerts + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'alert_type': {'readonly': True}, + 'alert_display_name': {'readonly': True}, + 'aggregated_date_utc': {'readonly': True}, + 'vendor_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'description': {'readonly': True}, + 'count': {'readonly': True}, + 'effected_resource_type': {'readonly': True}, + 'system_source': {'readonly': True}, + 'action_taken': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, + 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, + 'aggregated_date_utc': {'key': 'properties.aggregatedDateUtc', 'type': 'date'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'count': {'key': 'properties.count', 'type': 'int'}, + 'effected_resource_type': {'key': 'properties.effectedResourceType', 'type': 'str'}, + 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, + 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(IoTSecurityAggregatedAlert, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + self.alert_type = None + self.alert_display_name = None + self.aggregated_date_utc = None + self.vendor_name = None + self.reported_severity = None + self.remediation_steps = None + self.description = None + self.count = None + self.effected_resource_type = None + self.system_source = None + self.action_taken = None + self.log_analytics_query = None + + +class IoTSecurityAggregatedRecommendation(Model): + """Security Solution Recommendation Information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param recommendation_name: Name of the recommendation + :type recommendation_name: str + :ivar recommendation_display_name: Display name of the recommendation + type. + :vartype recommendation_display_name: str + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar recommendation_type_id: The recommendation-type GUID. + :vartype recommendation_type_id: str + :ivar detected_by: Name of the vendor that discovered the issue + :vartype detected_by: str + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar reported_severity: Estimated severity of this recommendation. + Possible values include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar healthy_devices: the number of the healthy devices within the + solution + :vartype healthy_devices: int + :ivar unhealthy_device_count: the number of the unhealthy devices within + the solution + :vartype unhealthy_device_count: int + :ivar log_analytics_query: query in log analytics to get the list of + affected devices/alerts + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'recommendation_display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'recommendation_type_id': {'readonly': True}, + 'detected_by': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'healthy_devices': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'recommendation_name': {'key': 'properties.recommendationName', 'type': 'str'}, + 'recommendation_display_name': {'key': 'properties.recommendationDisplayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'recommendation_type_id': {'key': 'properties.recommendationTypeId', 'type': 'str'}, + 'detected_by': {'key': 'properties.detectedBy', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'healthy_devices': {'key': 'properties.healthyDevices', 'type': 'int'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, *, tags=None, recommendation_name: str=None, **kwargs) -> None: + super(IoTSecurityAggregatedRecommendation, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + self.recommendation_name = recommendation_name + self.recommendation_display_name = None + self.description = None + self.recommendation_type_id = None + self.detected_by = None + self.remediation_steps = None + self.reported_severity = None + self.healthy_devices = None + self.unhealthy_device_count = None + self.log_analytics_query = None + + +class IoTSecurityAlertedDevice(Model): + """Statistic information about the number of alerts per device during the last + period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar device_id: Name of the alert type + :vartype device_id: str + :ivar alerts_count: the number of alerts raised for this device + :vartype alerts_count: int + """ + + _validation = { + 'device_id': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(IoTSecurityAlertedDevice, self).__init__(**kwargs) + self.device_id = None + self.alerts_count = None + + +class IoTSecurityAlertedDevicesList(Model): + """List of devices with the count of raised alerts. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of aggregated alerts data + :type value: list[~azure.mgmt.security.models.IoTSecurityAlertedDevice] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityAlertedDevice]'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecurityAlertedDevicesList, self).__init__(**kwargs) + self.value = value + + +class IoTSecurityDeviceAlert(Model): + """Statistic information about the number of alerts per alert type during the + last period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_display_name: Display name of the alert + :vartype alert_display_name: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar alerts_count: the number of alerts raised for this alert type + :vartype alerts_count: int + """ + + _validation = { + 'alert_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'alert_display_name': {'key': 'alertDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(IoTSecurityDeviceAlert, self).__init__(**kwargs) + self.alert_display_name = None + self.reported_severity = None + self.alerts_count = None + + +class IoTSecurityDeviceAlertsList(Model): + """List of alerts with the count of raised alerts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of top alerts data + :type value: list[~azure.mgmt.security.models.IoTSecurityDeviceAlert] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityDeviceAlert]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecurityDeviceAlertsList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class IoTSecurityDeviceRecommendation(Model): + """Statistic information about the number of recommendations per + recommendation type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar recommendation_display_name: Display name of the recommendation + :vartype recommendation_display_name: str + :ivar reported_severity: Estimated severity of this recommendation. + Possible values include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar devices_count: the number of device with this recommendation + :vartype devices_count: int + """ + + _validation = { + 'recommendation_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'devices_count': {'readonly': True}, + } + + _attribute_map = { + 'recommendation_display_name': {'key': 'recommendationDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'devices_count': {'key': 'devicesCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(IoTSecurityDeviceRecommendation, self).__init__(**kwargs) + self.recommendation_display_name = None + self.reported_severity = None + self.devices_count = None + + +class IoTSecurityDeviceRecommendationsList(Model): + """List of recommendations with the count of devices. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of aggregated recommendation data + :type value: + list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityDeviceRecommendation]'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecurityDeviceRecommendationsList, self).__init__(**kwargs) + self.value = value + + +class IoTSecuritySolutionAnalyticsModel(Resource): + """Security Analytics of a security solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar metrics: Security Analytics of a security solution + :vartype metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + :ivar unhealthy_device_count: number of unhealthy devices + :vartype unhealthy_device_count: int + :ivar devices_metrics: The list of devices metrics by the aggregated date. + :vartype devices_metrics: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem] + :param top_alerted_devices: The list of top 3 devices with the most + attacked. + :type top_alerted_devices: + ~azure.mgmt.security.models.IoTSecurityAlertedDevicesList + :param most_prevalent_device_alerts: The list of most prevalent 3 alerts. + :type most_prevalent_device_alerts: + ~azure.mgmt.security.models.IoTSecurityDeviceAlertsList + :param most_prevalent_device_recommendations: The list of most prevalent 3 + recommendations. + :type most_prevalent_device_recommendations: + ~azure.mgmt.security.models.IoTSecurityDeviceRecommendationsList + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metrics': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'devices_metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'metrics': {'key': 'properties.metrics', 'type': 'IoTSeverityMetrics'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'devices_metrics': {'key': 'properties.devicesMetrics', 'type': '[IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem]'}, + 'top_alerted_devices': {'key': 'properties.topAlertedDevices', 'type': 'IoTSecurityAlertedDevicesList'}, + 'most_prevalent_device_alerts': {'key': 'properties.mostPrevalentDeviceAlerts', 'type': 'IoTSecurityDeviceAlertsList'}, + 'most_prevalent_device_recommendations': {'key': 'properties.mostPrevalentDeviceRecommendations', 'type': 'IoTSecurityDeviceRecommendationsList'}, + } + + def __init__(self, *, top_alerted_devices=None, most_prevalent_device_alerts=None, most_prevalent_device_recommendations=None, **kwargs) -> None: + super(IoTSecuritySolutionAnalyticsModel, self).__init__(**kwargs) + self.metrics = None + self.unhealthy_device_count = None + self.devices_metrics = None + self.top_alerted_devices = top_alerted_devices + self.most_prevalent_device_alerts = most_prevalent_device_alerts + self.most_prevalent_device_recommendations = most_prevalent_device_recommendations + + +class IoTSecuritySolutionAnalyticsModelList(Model): + """List of Security Analytics of a security solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of Security Analytics of a security solution + :type value: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecuritySolutionAnalyticsModel]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecuritySolutionAnalyticsModelList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem(Model): + """IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem. + + :param date_property: the date of the metrics + :type date_property: datetime + :param devices_metrics: devices alerts count by severity. + :type devices_metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'devices_metrics': {'key': 'devicesMetrics', 'type': 'IoTSeverityMetrics'}, + } + + def __init__(self, *, date_property=None, devices_metrics=None, **kwargs) -> None: + super(IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, self).__init__(**kwargs) + self.date_property = date_property + self.devices_metrics = devices_metrics + + +class IoTSecuritySolutionModel(Model): + """Security Solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param location: The resource location. + :type location: str + :param workspace: Required. Workspace resource ID + :type workspace: str + :param display_name: Required. Resource display name. + :type display_name: str + :param status: Security solution status. Possible values include: + 'Enabled', 'Disabled'. Default value: "Enabled" . + :type status: str or ~azure.mgmt.security.models.SecuritySolutionStatus + :param export: List of additional export to workspace data options + :type export: list[str or ~azure.mgmt.security.models.ExportData] + :param disabled_data_sources: Disabled data sources. Disabling these data + sources compromises the system. + :type disabled_data_sources: list[str or + ~azure.mgmt.security.models.DataSource] + :param iot_hubs: Required. IoT Hub resource IDs + :type iot_hubs: list[str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :ivar auto_discovered_resources: List of resources that were automatically + discovered as relevant to the security solution. + :vartype auto_discovered_resources: list[str] + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'workspace': {'required': True}, + 'display_name': {'required': True}, + 'iot_hubs': {'required': True}, + 'auto_discovered_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'workspace': {'key': 'properties.workspace', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'export': {'key': 'properties.export', 'type': '[str]'}, + 'disabled_data_sources': {'key': 'properties.disabledDataSources', 'type': '[str]'}, + 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[str]'}, + 'user_defined_resources': {'key': 'properties.userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'auto_discovered_resources': {'key': 'properties.autoDiscoveredResources', 'type': '[str]'}, + 'recommendations_configuration': {'key': 'properties.recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, *, workspace: str, display_name: str, iot_hubs, tags=None, location: str=None, status="Enabled", export=None, disabled_data_sources=None, user_defined_resources=None, recommendations_configuration=None, **kwargs) -> None: + super(IoTSecuritySolutionModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + self.location = location + self.workspace = workspace + self.display_name = display_name + self.status = status + self.export = export + self.disabled_data_sources = disabled_data_sources + self.iot_hubs = iot_hubs + self.user_defined_resources = user_defined_resources + self.auto_discovered_resources = None + self.recommendations_configuration = recommendations_configuration + + +class IoTSeverityMetrics(Model): + """Severity metrics. + + :param high: count of high severity items + :type high: int + :param medium: count of medium severity items + :type medium: int + :param low: count of low severity items + :type low: int + """ + + _attribute_map = { + 'high': {'key': 'high', 'type': 'int'}, + 'medium': {'key': 'medium', 'type': 'int'}, + 'low': {'key': 'low', 'type': 'int'}, + } + + def __init__(self, *, high: int=None, medium: int=None, low: int=None, **kwargs) -> None: + super(IoTSeverityMetrics, self).__init__(**kwargs) + self.high = high + self.medium = medium + self.low = low + + +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] + """ + + _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 + + +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 + """ + + _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 + + +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): + """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. 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 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): + """Recommendation configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param recommendation_type: Required. The recommendation type. Possible + values include: '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. The recommendation is not + generated when the status is disabled. 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 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 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 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': 'userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'recommendations_configuration': {'key': 'recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, *, tags=None, user_defined_resources=None, recommendations_configuration=None, **kwargs) -> None: + super(UpdateIotSecuritySolutionData, self).__init__(tags=tags, **kwargs) + self.user_defined_resources = user_defined_resources + self.recommendations_configuration = recommendations_configuration + + +class UserDefinedResourcesProperties(Model): + """Properties of the solution's user defined resources. + + All required parameters must be populated in order to send to Azure. + + :param query: Required. Azure Resource Graph query which represents the + security solution's user defined resources. Required to start with "where + type != "Microsoft.Devices/IotHubs"" + :type query: str + :param query_subscriptions: Required. List of Azure subscription ids on + which the user defined resources query should be executed. + :type query_subscriptions: list[str] + """ + + _validation = { + 'query': {'required': True}, + 'query_subscriptions': {'required': True}, + } + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'}, + 'query_subscriptions': {'key': 'querySubscriptions', 'type': '[str]'}, + } + + def __init__(self, *, query: str, query_subscriptions, **kwargs) -> None: + super(UserDefinedResourcesProperties, self).__init__(**kwargs) + self.query = query + self.query_subscriptions = query_subscriptions + + +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 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..362a777bdc8c --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py @@ -0,0 +1,300 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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) 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 similarity index 100% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py 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/app_whitelisting_group.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_group.py deleted file mode 100644 index cf255612c901..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_group.py +++ /dev/null @@ -1,84 +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 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' - :type enforcement_mode: 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 - :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'}, - '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.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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_group_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_group_py3.py deleted file mode 100644 index fd2bd774269e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_group_py3.py +++ /dev/null @@ -1,84 +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 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' - :type enforcement_mode: 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 - :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'}, - '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, 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.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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_groups.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_groups.py deleted file mode 100644 index 4ce207c91020..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_groups.py +++ /dev/null @@ -1,29 +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 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_groups_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_groups_py3.py deleted file mode 100644 index 0217485e4167..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_groups_py3.py +++ /dev/null @@ -1,29 +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 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_issue_summary.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_issue_summary.py deleted file mode 100644 index f7719c626ca4..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_issue_summary.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 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_issue_summary_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_issue_summary_py3.py deleted file mode 100644 index e30ac478ae6f..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_issue_summary_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 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_put_group_data.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_put_group_data.py deleted file mode 100644 index 6523df18b81a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_put_group_data.py +++ /dev/null @@ -1,38 +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 AppWhitelistingPutGroupData(Model): - """The altered data of the recommended VM/server group policy. - - :param enforcement_mode: Possible values include: 'Audit', 'Enforce' - :type enforcement_mode: 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] - """ - - _attribute_map = { - 'enforcement_mode': {'key': 'enforcementMode', 'type': 'str'}, - '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.vm_recommendations = kwargs.get('vm_recommendations', None) - self.path_recommendations = kwargs.get('path_recommendations', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_put_group_data_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_put_group_data_py3.py deleted file mode 100644 index 3c79e5071858..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/app_whitelisting_put_group_data_py3.py +++ /dev/null @@ -1,38 +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 AppWhitelistingPutGroupData(Model): - """The altered data of the recommended VM/server group policy. - - :param enforcement_mode: Possible values include: 'Audit', 'Enforce' - :type enforcement_mode: 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] - """ - - _attribute_map = { - 'enforcement_mode': {'key': 'enforcementMode', 'type': 'str'}, - 'vm_recommendations': {'key': 'vmRecommendations', 'type': '[VmRecommendation]'}, - 'path_recommendations': {'key': 'pathRecommendations', 'type': '[PathRecommendation]'}, - } - - def __init__(self, *, enforcement_mode=None, vm_recommendations=None, path_recommendations=None, **kwargs) -> None: - super(AppWhitelistingPutGroupData, self).__init__(**kwargs) - self.enforcement_mode = enforcement_mode - self.vm_recommendations = vm_recommendations - self.path_recommendations = path_recommendations 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_result.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result.py deleted file mode 100644 index 662075af02c2..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result.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 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result_paged.py deleted file mode 100644 index c8f94c6ef486..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result_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 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result_py3.py deleted file mode 100644 index 210f3fac9f54..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_result_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 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 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/io_tsecurity_aggregated_alert.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert.py deleted file mode 100644 index e022695de0ef..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert.py +++ /dev/null @@ -1,115 +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 IoTSecurityAggregatedAlert(Model): - """Security Solution Aggregated Alert information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar alert_type: Name of the alert type - :vartype alert_type: str - :ivar alert_display_name: Display name of the alert type - :vartype alert_display_name: str - :ivar aggregated_date_utc: The date the incidents were detected by the - vendor - :vartype aggregated_date_utc: date - :ivar vendor_name: Name of the vendor that discovered the incident - :vartype vendor_name: str - :ivar reported_severity: Estimated severity of this alert. Possible values - include: 'Informational', 'Low', 'Medium', 'High' - :vartype reported_severity: str or - ~azure.mgmt.security.models.ReportedSeverity - :ivar remediation_steps: Recommended steps for remediation - :vartype remediation_steps: str - :ivar description: Description of the incident and what it means - :vartype description: str - :ivar count: Occurrence number of the alert within the aggregated date - :vartype count: int - :ivar effected_resource_type: Azure resource ID of the resource that got - the alerts - :vartype effected_resource_type: str - :ivar system_source: The type of the alerted resource (Azure, Non-Azure) - :vartype system_source: str - :ivar action_taken: The action that was taken as a response to the alert - (Active, Blocked etc.) - :vartype action_taken: str - :ivar log_analytics_query: query in log analytics to get the list of - affected devices/alerts - :vartype log_analytics_query: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'alert_type': {'readonly': True}, - 'alert_display_name': {'readonly': True}, - 'aggregated_date_utc': {'readonly': True}, - 'vendor_name': {'readonly': True}, - 'reported_severity': {'readonly': True}, - 'remediation_steps': {'readonly': True}, - 'description': {'readonly': True}, - 'count': {'readonly': True}, - 'effected_resource_type': {'readonly': True}, - 'system_source': {'readonly': True}, - 'action_taken': {'readonly': True}, - 'log_analytics_query': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, - 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, - 'aggregated_date_utc': {'key': 'properties.aggregatedDateUtc', 'type': 'date'}, - 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, - 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, - 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'effected_resource_type': {'key': 'properties.effectedResourceType', 'type': 'str'}, - 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, - 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, - 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IoTSecurityAggregatedAlert, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = kwargs.get('tags', None) - self.alert_type = None - self.alert_display_name = None - self.aggregated_date_utc = None - self.vendor_name = None - self.reported_severity = None - self.remediation_steps = None - self.description = None - self.count = None - self.effected_resource_type = None - self.system_source = None - self.action_taken = None - self.log_analytics_query = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_paged.py deleted file mode 100644 index 42bbd9750136..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_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 IoTSecurityAggregatedAlertPaged(Paged): - """ - A paging container for iterating over a list of :class:`IoTSecurityAggregatedAlert ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IoTSecurityAggregatedAlert]'} - } - - def __init__(self, *args, **kwargs): - - super(IoTSecurityAggregatedAlertPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_py3.py deleted file mode 100644 index 5988186d6f53..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_alert_py3.py +++ /dev/null @@ -1,115 +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 IoTSecurityAggregatedAlert(Model): - """Security Solution Aggregated Alert information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar alert_type: Name of the alert type - :vartype alert_type: str - :ivar alert_display_name: Display name of the alert type - :vartype alert_display_name: str - :ivar aggregated_date_utc: The date the incidents were detected by the - vendor - :vartype aggregated_date_utc: date - :ivar vendor_name: Name of the vendor that discovered the incident - :vartype vendor_name: str - :ivar reported_severity: Estimated severity of this alert. Possible values - include: 'Informational', 'Low', 'Medium', 'High' - :vartype reported_severity: str or - ~azure.mgmt.security.models.ReportedSeverity - :ivar remediation_steps: Recommended steps for remediation - :vartype remediation_steps: str - :ivar description: Description of the incident and what it means - :vartype description: str - :ivar count: Occurrence number of the alert within the aggregated date - :vartype count: int - :ivar effected_resource_type: Azure resource ID of the resource that got - the alerts - :vartype effected_resource_type: str - :ivar system_source: The type of the alerted resource (Azure, Non-Azure) - :vartype system_source: str - :ivar action_taken: The action that was taken as a response to the alert - (Active, Blocked etc.) - :vartype action_taken: str - :ivar log_analytics_query: query in log analytics to get the list of - affected devices/alerts - :vartype log_analytics_query: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'alert_type': {'readonly': True}, - 'alert_display_name': {'readonly': True}, - 'aggregated_date_utc': {'readonly': True}, - 'vendor_name': {'readonly': True}, - 'reported_severity': {'readonly': True}, - 'remediation_steps': {'readonly': True}, - 'description': {'readonly': True}, - 'count': {'readonly': True}, - 'effected_resource_type': {'readonly': True}, - 'system_source': {'readonly': True}, - 'action_taken': {'readonly': True}, - 'log_analytics_query': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, - 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, - 'aggregated_date_utc': {'key': 'properties.aggregatedDateUtc', 'type': 'date'}, - 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, - 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, - 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'effected_resource_type': {'key': 'properties.effectedResourceType', 'type': 'str'}, - 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, - 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, - 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(IoTSecurityAggregatedAlert, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = tags - self.alert_type = None - self.alert_display_name = None - self.aggregated_date_utc = None - self.vendor_name = None - self.reported_severity = None - self.remediation_steps = None - self.description = None - self.count = None - self.effected_resource_type = None - self.system_source = None - self.action_taken = None - self.log_analytics_query = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation.py deleted file mode 100644 index cab13bb5f5e2..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation.py +++ /dev/null @@ -1,104 +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 IoTSecurityAggregatedRecommendation(Model): - """Security Solution Recommendation Information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - :param recommendation_name: Name of the recommendation - :type recommendation_name: str - :ivar recommendation_display_name: Display name of the recommendation - type. - :vartype recommendation_display_name: str - :ivar description: Description of the incident and what it means - :vartype description: str - :ivar recommendation_type_id: The recommendation-type GUID. - :vartype recommendation_type_id: str - :ivar detected_by: Name of the vendor that discovered the issue - :vartype detected_by: str - :ivar remediation_steps: Recommended steps for remediation - :vartype remediation_steps: str - :ivar reported_severity: Estimated severity of this recommendation. - Possible values include: 'Informational', 'Low', 'Medium', 'High' - :vartype reported_severity: str or - ~azure.mgmt.security.models.ReportedSeverity - :ivar healthy_devices: the number of the healthy devices within the - solution - :vartype healthy_devices: int - :ivar unhealthy_device_count: the number of the unhealthy devices within - the solution - :vartype unhealthy_device_count: int - :ivar log_analytics_query: query in log analytics to get the list of - affected devices/alerts - :vartype log_analytics_query: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'recommendation_display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'recommendation_type_id': {'readonly': True}, - 'detected_by': {'readonly': True}, - 'remediation_steps': {'readonly': True}, - 'reported_severity': {'readonly': True}, - 'healthy_devices': {'readonly': True}, - 'unhealthy_device_count': {'readonly': True}, - 'log_analytics_query': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'recommendation_name': {'key': 'properties.recommendationName', 'type': 'str'}, - 'recommendation_display_name': {'key': 'properties.recommendationDisplayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'recommendation_type_id': {'key': 'properties.recommendationTypeId', 'type': 'str'}, - 'detected_by': {'key': 'properties.detectedBy', 'type': 'str'}, - 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, - 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, - 'healthy_devices': {'key': 'properties.healthyDevices', 'type': 'int'}, - 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, - 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IoTSecurityAggregatedRecommendation, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = kwargs.get('tags', None) - self.recommendation_name = kwargs.get('recommendation_name', None) - self.recommendation_display_name = None - self.description = None - self.recommendation_type_id = None - self.detected_by = None - self.remediation_steps = None - self.reported_severity = None - self.healthy_devices = None - self.unhealthy_device_count = None - self.log_analytics_query = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_paged.py deleted file mode 100644 index 623be0865882..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_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 IoTSecurityAggregatedRecommendationPaged(Paged): - """ - A paging container for iterating over a list of :class:`IoTSecurityAggregatedRecommendation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IoTSecurityAggregatedRecommendation]'} - } - - def __init__(self, *args, **kwargs): - - super(IoTSecurityAggregatedRecommendationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_py3.py deleted file mode 100644 index f75d04c930d1..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_aggregated_recommendation_py3.py +++ /dev/null @@ -1,104 +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 IoTSecurityAggregatedRecommendation(Model): - """Security Solution Recommendation Information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - :param recommendation_name: Name of the recommendation - :type recommendation_name: str - :ivar recommendation_display_name: Display name of the recommendation - type. - :vartype recommendation_display_name: str - :ivar description: Description of the incident and what it means - :vartype description: str - :ivar recommendation_type_id: The recommendation-type GUID. - :vartype recommendation_type_id: str - :ivar detected_by: Name of the vendor that discovered the issue - :vartype detected_by: str - :ivar remediation_steps: Recommended steps for remediation - :vartype remediation_steps: str - :ivar reported_severity: Estimated severity of this recommendation. - Possible values include: 'Informational', 'Low', 'Medium', 'High' - :vartype reported_severity: str or - ~azure.mgmt.security.models.ReportedSeverity - :ivar healthy_devices: the number of the healthy devices within the - solution - :vartype healthy_devices: int - :ivar unhealthy_device_count: the number of the unhealthy devices within - the solution - :vartype unhealthy_device_count: int - :ivar log_analytics_query: query in log analytics to get the list of - affected devices/alerts - :vartype log_analytics_query: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'recommendation_display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'recommendation_type_id': {'readonly': True}, - 'detected_by': {'readonly': True}, - 'remediation_steps': {'readonly': True}, - 'reported_severity': {'readonly': True}, - 'healthy_devices': {'readonly': True}, - 'unhealthy_device_count': {'readonly': True}, - 'log_analytics_query': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'recommendation_name': {'key': 'properties.recommendationName', 'type': 'str'}, - 'recommendation_display_name': {'key': 'properties.recommendationDisplayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'recommendation_type_id': {'key': 'properties.recommendationTypeId', 'type': 'str'}, - 'detected_by': {'key': 'properties.detectedBy', 'type': 'str'}, - 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, - 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, - 'healthy_devices': {'key': 'properties.healthyDevices', 'type': 'int'}, - 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, - 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, - } - - def __init__(self, *, tags=None, recommendation_name: str=None, **kwargs) -> None: - super(IoTSecurityAggregatedRecommendation, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = tags - self.recommendation_name = recommendation_name - self.recommendation_display_name = None - self.description = None - self.recommendation_type_id = None - self.detected_by = None - self.remediation_steps = None - self.reported_severity = None - self.healthy_devices = None - self.unhealthy_device_count = None - self.log_analytics_query = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device.py deleted file mode 100644 index bd55f6b5a9f2..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device.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 IoTSecurityAlertedDevice(Model): - """Statistic information about the number of alerts per device during the last - period. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar device_id: Name of the alert type - :vartype device_id: str - :ivar alerts_count: the number of alerts raised for this device - :vartype alerts_count: int - """ - - _validation = { - 'device_id': {'readonly': True}, - 'alerts_count': {'readonly': True}, - } - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(IoTSecurityAlertedDevice, self).__init__(**kwargs) - self.device_id = None - self.alerts_count = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device_py3.py deleted file mode 100644 index 8f5d393791d6..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_device_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 IoTSecurityAlertedDevice(Model): - """Statistic information about the number of alerts per device during the last - period. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar device_id: Name of the alert type - :vartype device_id: str - :ivar alerts_count: the number of alerts raised for this device - :vartype alerts_count: int - """ - - _validation = { - 'device_id': {'readonly': True}, - 'alerts_count': {'readonly': True}, - } - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(IoTSecurityAlertedDevice, self).__init__(**kwargs) - self.device_id = None - self.alerts_count = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list.py deleted file mode 100644 index 6ed104953521..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_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 IoTSecurityAlertedDevicesList(Model): - """List of devices with the count of raised alerts. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of aggregated alerts data - :type value: list[~azure.mgmt.security.models.IoTSecurityAlertedDevice] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IoTSecurityAlertedDevice]'}, - } - - def __init__(self, **kwargs): - super(IoTSecurityAlertedDevicesList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_list_py3.py deleted file mode 100644 index 7475fc9765ba..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_alerted_devices_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 IoTSecurityAlertedDevicesList(Model): - """List of devices with the count of raised alerts. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of aggregated alerts data - :type value: list[~azure.mgmt.security.models.IoTSecurityAlertedDevice] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IoTSecurityAlertedDevice]'}, - } - - def __init__(self, *, value, **kwargs) -> None: - super(IoTSecurityAlertedDevicesList, self).__init__(**kwargs) - self.value = value diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert.py deleted file mode 100644 index bcabf9448c9e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert.py +++ /dev/null @@ -1,48 +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 IoTSecurityDeviceAlert(Model): - """Statistic information about the number of alerts per alert type during the - last period. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar alert_display_name: Display name of the alert - :vartype alert_display_name: str - :ivar reported_severity: Estimated severity of this alert. Possible values - include: 'Informational', 'Low', 'Medium', 'High' - :vartype reported_severity: str or - ~azure.mgmt.security.models.ReportedSeverity - :ivar alerts_count: the number of alerts raised for this alert type - :vartype alerts_count: int - """ - - _validation = { - 'alert_display_name': {'readonly': True}, - 'reported_severity': {'readonly': True}, - 'alerts_count': {'readonly': True}, - } - - _attribute_map = { - 'alert_display_name': {'key': 'alertDisplayName', 'type': 'str'}, - 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, - 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(IoTSecurityDeviceAlert, self).__init__(**kwargs) - self.alert_display_name = None - self.reported_severity = None - self.alerts_count = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert_py3.py deleted file mode 100644 index 25f390cb73b2..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alert_py3.py +++ /dev/null @@ -1,48 +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 IoTSecurityDeviceAlert(Model): - """Statistic information about the number of alerts per alert type during the - last period. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar alert_display_name: Display name of the alert - :vartype alert_display_name: str - :ivar reported_severity: Estimated severity of this alert. Possible values - include: 'Informational', 'Low', 'Medium', 'High' - :vartype reported_severity: str or - ~azure.mgmt.security.models.ReportedSeverity - :ivar alerts_count: the number of alerts raised for this alert type - :vartype alerts_count: int - """ - - _validation = { - 'alert_display_name': {'readonly': True}, - 'reported_severity': {'readonly': True}, - 'alerts_count': {'readonly': True}, - } - - _attribute_map = { - 'alert_display_name': {'key': 'alertDisplayName', 'type': 'str'}, - 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, - 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(IoTSecurityDeviceAlert, self).__init__(**kwargs) - self.alert_display_name = None - self.reported_severity = None - self.alerts_count = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list.py deleted file mode 100644 index 4d6fa443d62b..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list.py +++ /dev/null @@ -1,42 +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 IoTSecurityDeviceAlertsList(Model): - """List of alerts with the count of raised alerts. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of top alerts data - :type value: list[~azure.mgmt.security.models.IoTSecurityDeviceAlert] - :ivar next_link: The URI to fetch the next page. - :vartype next_link: str - """ - - _validation = { - 'value': {'required': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IoTSecurityDeviceAlert]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IoTSecurityDeviceAlertsList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list_py3.py deleted file mode 100644 index de41c1dd97eb..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_alerts_list_py3.py +++ /dev/null @@ -1,42 +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 IoTSecurityDeviceAlertsList(Model): - """List of alerts with the count of raised alerts. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of top alerts data - :type value: list[~azure.mgmt.security.models.IoTSecurityDeviceAlert] - :ivar next_link: The URI to fetch the next page. - :vartype next_link: str - """ - - _validation = { - 'value': {'required': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IoTSecurityDeviceAlert]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value, **kwargs) -> None: - super(IoTSecurityDeviceAlertsList, self).__init__(**kwargs) - self.value = value - self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation.py deleted file mode 100644 index 2d36f29827a1..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation.py +++ /dev/null @@ -1,48 +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 IoTSecurityDeviceRecommendation(Model): - """Statistic information about the number of recommendations per - recommendation type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar recommendation_display_name: Display name of the recommendation - :vartype recommendation_display_name: str - :ivar reported_severity: Estimated severity of this recommendation. - Possible values include: 'Informational', 'Low', 'Medium', 'High' - :vartype reported_severity: str or - ~azure.mgmt.security.models.ReportedSeverity - :ivar devices_count: the number of device with this recommendation - :vartype devices_count: int - """ - - _validation = { - 'recommendation_display_name': {'readonly': True}, - 'reported_severity': {'readonly': True}, - 'devices_count': {'readonly': True}, - } - - _attribute_map = { - 'recommendation_display_name': {'key': 'recommendationDisplayName', 'type': 'str'}, - 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, - 'devices_count': {'key': 'devicesCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(IoTSecurityDeviceRecommendation, self).__init__(**kwargs) - self.recommendation_display_name = None - self.reported_severity = None - self.devices_count = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation_py3.py deleted file mode 100644 index 52126486993f..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendation_py3.py +++ /dev/null @@ -1,48 +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 IoTSecurityDeviceRecommendation(Model): - """Statistic information about the number of recommendations per - recommendation type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar recommendation_display_name: Display name of the recommendation - :vartype recommendation_display_name: str - :ivar reported_severity: Estimated severity of this recommendation. - Possible values include: 'Informational', 'Low', 'Medium', 'High' - :vartype reported_severity: str or - ~azure.mgmt.security.models.ReportedSeverity - :ivar devices_count: the number of device with this recommendation - :vartype devices_count: int - """ - - _validation = { - 'recommendation_display_name': {'readonly': True}, - 'reported_severity': {'readonly': True}, - 'devices_count': {'readonly': True}, - } - - _attribute_map = { - 'recommendation_display_name': {'key': 'recommendationDisplayName', 'type': 'str'}, - 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, - 'devices_count': {'key': 'devicesCount', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(IoTSecurityDeviceRecommendation, self).__init__(**kwargs) - self.recommendation_display_name = None - self.reported_severity = None - self.devices_count = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list.py deleted file mode 100644 index 4606b1f5e3bd..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list.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 IoTSecurityDeviceRecommendationsList(Model): - """List of recommendations with the count of devices. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of aggregated recommendation data - :type value: - list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IoTSecurityDeviceRecommendation]'}, - } - - def __init__(self, **kwargs): - super(IoTSecurityDeviceRecommendationsList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list_py3.py deleted file mode 100644 index 2df25e1c8df5..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_device_recommendations_list_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 IoTSecurityDeviceRecommendationsList(Model): - """List of recommendations with the count of devices. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of aggregated recommendation data - :type value: - list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IoTSecurityDeviceRecommendation]'}, - } - - def __init__(self, *, value, **kwargs) -> None: - super(IoTSecurityDeviceRecommendationsList, self).__init__(**kwargs) - self.value = value diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model.py deleted file mode 100644 index fca261bd72e3..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model.py +++ /dev/null @@ -1,75 +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 IoTSecuritySolutionAnalyticsModel(Resource): - """Security Analytics of a security solution. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar metrics: Security Analytics of a security solution - :vartype metrics: ~azure.mgmt.security.models.IoTSeverityMetrics - :ivar unhealthy_device_count: number of unhealthy devices - :vartype unhealthy_device_count: int - :ivar devices_metrics: The list of devices metrics by the aggregated date. - :vartype devices_metrics: - list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem] - :param top_alerted_devices: The list of top 3 devices with the most - attacked. - :type top_alerted_devices: - ~azure.mgmt.security.models.IoTSecurityAlertedDevicesList - :param most_prevalent_device_alerts: The list of most prevalent 3 alerts. - :type most_prevalent_device_alerts: - ~azure.mgmt.security.models.IoTSecurityDeviceAlertsList - :param most_prevalent_device_recommendations: The list of most prevalent 3 - recommendations. - :type most_prevalent_device_recommendations: - ~azure.mgmt.security.models.IoTSecurityDeviceRecommendationsList - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'metrics': {'readonly': True}, - 'unhealthy_device_count': {'readonly': True}, - 'devices_metrics': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'metrics': {'key': 'properties.metrics', 'type': 'IoTSeverityMetrics'}, - 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, - 'devices_metrics': {'key': 'properties.devicesMetrics', 'type': '[IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem]'}, - 'top_alerted_devices': {'key': 'properties.topAlertedDevices', 'type': 'IoTSecurityAlertedDevicesList'}, - 'most_prevalent_device_alerts': {'key': 'properties.mostPrevalentDeviceAlerts', 'type': 'IoTSecurityDeviceAlertsList'}, - 'most_prevalent_device_recommendations': {'key': 'properties.mostPrevalentDeviceRecommendations', 'type': 'IoTSecurityDeviceRecommendationsList'}, - } - - def __init__(self, **kwargs): - super(IoTSecuritySolutionAnalyticsModel, self).__init__(**kwargs) - self.metrics = None - self.unhealthy_device_count = None - self.devices_metrics = None - self.top_alerted_devices = kwargs.get('top_alerted_devices', None) - self.most_prevalent_device_alerts = kwargs.get('most_prevalent_device_alerts', None) - self.most_prevalent_device_recommendations = kwargs.get('most_prevalent_device_recommendations', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list.py deleted file mode 100644 index 734fd1eac11b..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list.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 IoTSecuritySolutionAnalyticsModelList(Model): - """List of Security Analytics of a security solution. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of Security Analytics of a security solution - :type value: - list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel] - :ivar next_link: The URI to fetch the next page. - :vartype next_link: str - """ - - _validation = { - 'value': {'required': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IoTSecuritySolutionAnalyticsModel]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IoTSecuritySolutionAnalyticsModelList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list_py3.py deleted file mode 100644 index 557c6ec56303..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_list_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 IoTSecuritySolutionAnalyticsModelList(Model): - """List of Security Analytics of a security solution. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of Security Analytics of a security solution - :type value: - list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel] - :ivar next_link: The URI to fetch the next page. - :vartype next_link: str - """ - - _validation = { - 'value': {'required': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IoTSecuritySolutionAnalyticsModel]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value, **kwargs) -> None: - super(IoTSecuritySolutionAnalyticsModelList, self).__init__(**kwargs) - self.value = value - self.next_link = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item.py deleted file mode 100644 index bf0cd8470ad6..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item.py +++ /dev/null @@ -1,32 +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 IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem(Model): - """IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem. - - :param date_property: the date of the metrics - :type date_property: datetime - :param devices_metrics: devices alerts count by severity. - :type devices_metrics: ~azure.mgmt.security.models.IoTSeverityMetrics - """ - - _attribute_map = { - 'date_property': {'key': 'date', 'type': 'iso-8601'}, - 'devices_metrics': {'key': 'devicesMetrics', 'type': 'IoTSeverityMetrics'}, - } - - def __init__(self, **kwargs): - super(IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, self).__init__(**kwargs) - self.date_property = kwargs.get('date_property', None) - self.devices_metrics = kwargs.get('devices_metrics', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item_py3.py deleted file mode 100644 index 9d374866cc3d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item_py3.py +++ /dev/null @@ -1,32 +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 IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem(Model): - """IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem. - - :param date_property: the date of the metrics - :type date_property: datetime - :param devices_metrics: devices alerts count by severity. - :type devices_metrics: ~azure.mgmt.security.models.IoTSeverityMetrics - """ - - _attribute_map = { - 'date_property': {'key': 'date', 'type': 'iso-8601'}, - 'devices_metrics': {'key': 'devicesMetrics', 'type': 'IoTSeverityMetrics'}, - } - - def __init__(self, *, date_property=None, devices_metrics=None, **kwargs) -> None: - super(IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, self).__init__(**kwargs) - self.date_property = date_property - self.devices_metrics = devices_metrics diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_py3.py deleted file mode 100644 index 5ff736dfc071..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_analytics_model_py3.py +++ /dev/null @@ -1,75 +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 IoTSecuritySolutionAnalyticsModel(Resource): - """Security Analytics of a security solution. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar metrics: Security Analytics of a security solution - :vartype metrics: ~azure.mgmt.security.models.IoTSeverityMetrics - :ivar unhealthy_device_count: number of unhealthy devices - :vartype unhealthy_device_count: int - :ivar devices_metrics: The list of devices metrics by the aggregated date. - :vartype devices_metrics: - list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem] - :param top_alerted_devices: The list of top 3 devices with the most - attacked. - :type top_alerted_devices: - ~azure.mgmt.security.models.IoTSecurityAlertedDevicesList - :param most_prevalent_device_alerts: The list of most prevalent 3 alerts. - :type most_prevalent_device_alerts: - ~azure.mgmt.security.models.IoTSecurityDeviceAlertsList - :param most_prevalent_device_recommendations: The list of most prevalent 3 - recommendations. - :type most_prevalent_device_recommendations: - ~azure.mgmt.security.models.IoTSecurityDeviceRecommendationsList - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'metrics': {'readonly': True}, - 'unhealthy_device_count': {'readonly': True}, - 'devices_metrics': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'metrics': {'key': 'properties.metrics', 'type': 'IoTSeverityMetrics'}, - 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, - 'devices_metrics': {'key': 'properties.devicesMetrics', 'type': '[IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem]'}, - 'top_alerted_devices': {'key': 'properties.topAlertedDevices', 'type': 'IoTSecurityAlertedDevicesList'}, - 'most_prevalent_device_alerts': {'key': 'properties.mostPrevalentDeviceAlerts', 'type': 'IoTSecurityDeviceAlertsList'}, - 'most_prevalent_device_recommendations': {'key': 'properties.mostPrevalentDeviceRecommendations', 'type': 'IoTSecurityDeviceRecommendationsList'}, - } - - def __init__(self, *, top_alerted_devices=None, most_prevalent_device_alerts=None, most_prevalent_device_recommendations=None, **kwargs) -> None: - super(IoTSecuritySolutionAnalyticsModel, self).__init__(**kwargs) - self.metrics = None - self.unhealthy_device_count = None - self.devices_metrics = None - self.top_alerted_devices = top_alerted_devices - self.most_prevalent_device_alerts = most_prevalent_device_alerts - self.most_prevalent_device_recommendations = most_prevalent_device_recommendations diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model.py deleted file mode 100644 index b789210c2c52..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model.py +++ /dev/null @@ -1,101 +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 IoTSecuritySolutionModel(Model): - """Security Solution. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - :param location: The resource location. - :type location: str - :param workspace: Required. Workspace resource ID - :type workspace: str - :param display_name: Required. Resource display name. - :type display_name: str - :param status: Security solution status. Possible values include: - 'Enabled', 'Disabled'. Default value: "Enabled" . - :type status: str or ~azure.mgmt.security.models.SecuritySolutionStatus - :param export: List of additional export to workspace data options - :type export: list[str or ~azure.mgmt.security.models.ExportData] - :param disabled_data_sources: Disabled data sources. Disabling these data - sources compromises the system. - :type disabled_data_sources: list[str or - ~azure.mgmt.security.models.DataSource] - :param iot_hubs: Required. IoT Hub resource IDs - :type iot_hubs: list[str] - :param user_defined_resources: - :type user_defined_resources: - ~azure.mgmt.security.models.UserDefinedResourcesProperties - :ivar auto_discovered_resources: List of resources that were automatically - discovered as relevant to the security solution. - :vartype auto_discovered_resources: list[str] - :param recommendations_configuration: - :type recommendations_configuration: - list[~azure.mgmt.security.models.RecommendationConfigurationProperties] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'workspace': {'required': True}, - 'display_name': {'required': True}, - 'iot_hubs': {'required': True}, - 'auto_discovered_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'workspace': {'key': 'properties.workspace', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'export': {'key': 'properties.export', 'type': '[str]'}, - 'disabled_data_sources': {'key': 'properties.disabledDataSources', 'type': '[str]'}, - 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[str]'}, - 'user_defined_resources': {'key': 'properties.userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, - 'auto_discovered_resources': {'key': 'properties.autoDiscoveredResources', 'type': '[str]'}, - 'recommendations_configuration': {'key': 'properties.recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, - } - - def __init__(self, **kwargs): - super(IoTSecuritySolutionModel, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = kwargs.get('tags', None) - self.location = kwargs.get('location', None) - self.workspace = kwargs.get('workspace', None) - self.display_name = kwargs.get('display_name', None) - self.status = kwargs.get('status', "Enabled") - self.export = kwargs.get('export', None) - self.disabled_data_sources = kwargs.get('disabled_data_sources', None) - self.iot_hubs = kwargs.get('iot_hubs', None) - self.user_defined_resources = kwargs.get('user_defined_resources', None) - self.auto_discovered_resources = None - self.recommendations_configuration = kwargs.get('recommendations_configuration', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_paged.py deleted file mode 100644 index cb2524737f12..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_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 IoTSecuritySolutionModelPaged(Paged): - """ - A paging container for iterating over a list of :class:`IoTSecuritySolutionModel ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IoTSecuritySolutionModel]'} - } - - def __init__(self, *args, **kwargs): - - super(IoTSecuritySolutionModelPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_py3.py deleted file mode 100644 index c088b9be9a4b..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tsecurity_solution_model_py3.py +++ /dev/null @@ -1,101 +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 IoTSecuritySolutionModel(Model): - """Security Solution. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - :param location: The resource location. - :type location: str - :param workspace: Required. Workspace resource ID - :type workspace: str - :param display_name: Required. Resource display name. - :type display_name: str - :param status: Security solution status. Possible values include: - 'Enabled', 'Disabled'. Default value: "Enabled" . - :type status: str or ~azure.mgmt.security.models.SecuritySolutionStatus - :param export: List of additional export to workspace data options - :type export: list[str or ~azure.mgmt.security.models.ExportData] - :param disabled_data_sources: Disabled data sources. Disabling these data - sources compromises the system. - :type disabled_data_sources: list[str or - ~azure.mgmt.security.models.DataSource] - :param iot_hubs: Required. IoT Hub resource IDs - :type iot_hubs: list[str] - :param user_defined_resources: - :type user_defined_resources: - ~azure.mgmt.security.models.UserDefinedResourcesProperties - :ivar auto_discovered_resources: List of resources that were automatically - discovered as relevant to the security solution. - :vartype auto_discovered_resources: list[str] - :param recommendations_configuration: - :type recommendations_configuration: - list[~azure.mgmt.security.models.RecommendationConfigurationProperties] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'workspace': {'required': True}, - 'display_name': {'required': True}, - 'iot_hubs': {'required': True}, - 'auto_discovered_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'workspace': {'key': 'properties.workspace', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'export': {'key': 'properties.export', 'type': '[str]'}, - 'disabled_data_sources': {'key': 'properties.disabledDataSources', 'type': '[str]'}, - 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[str]'}, - 'user_defined_resources': {'key': 'properties.userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, - 'auto_discovered_resources': {'key': 'properties.autoDiscoveredResources', 'type': '[str]'}, - 'recommendations_configuration': {'key': 'properties.recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, - } - - def __init__(self, *, workspace: str, display_name: str, iot_hubs, tags=None, location: str=None, status="Enabled", export=None, disabled_data_sources=None, user_defined_resources=None, recommendations_configuration=None, **kwargs) -> None: - super(IoTSecuritySolutionModel, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = tags - self.location = location - self.workspace = workspace - self.display_name = display_name - self.status = status - self.export = export - self.disabled_data_sources = disabled_data_sources - self.iot_hubs = iot_hubs - self.user_defined_resources = user_defined_resources - self.auto_discovered_resources = None - self.recommendations_configuration = recommendations_configuration diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics.py deleted file mode 100644 index 4e68eb5aab24..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics.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 IoTSeverityMetrics(Model): - """Severity metrics. - - :param high: count of high severity items - :type high: int - :param medium: count of medium severity items - :type medium: int - :param low: count of low severity items - :type low: int - """ - - _attribute_map = { - 'high': {'key': 'high', 'type': 'int'}, - 'medium': {'key': 'medium', 'type': 'int'}, - 'low': {'key': 'low', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(IoTSeverityMetrics, self).__init__(**kwargs) - self.high = kwargs.get('high', None) - self.medium = kwargs.get('medium', None) - self.low = kwargs.get('low', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics_py3.py deleted file mode 100644 index 69fe974ba60a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/io_tseverity_metrics_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 IoTSeverityMetrics(Model): - """Severity metrics. - - :param high: count of high severity items - :type high: int - :param medium: count of medium severity items - :type medium: int - :param low: count of low severity items - :type low: int - """ - - _attribute_map = { - 'high': {'key': 'high', 'type': 'int'}, - 'medium': {'key': 'medium', 'type': 'int'}, - 'low': {'key': 'low', 'type': 'int'}, - } - - def __init__(self, *, high: int=None, medium: int=None, low: int=None, **kwargs) -> None: - super(IoTSeverityMetrics, self).__init__(**kwargs) - self.high = high - self.medium = medium - self.low = low diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/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 acc1126e8732..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine.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 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) 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 888a6833e2f0..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine_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 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 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 29489e7ffa80..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port.py +++ /dev/null @@ -1,69 +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 - :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) 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 b188238da0cc..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port_py3.py +++ /dev/null @@ -1,69 +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 - :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 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/path_recommendation.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/path_recommendation.py deleted file mode 100644 index 982362a57d1c..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/path_recommendation.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 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/path_recommendation_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/path_recommendation_py3.py deleted file mode 100644 index 1563e8dce516..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/path_recommendation_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 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 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 bfa545b47bc2..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing.py +++ /dev/null @@ -1,59 +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. 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 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 edb48104ed19..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py +++ /dev/null @@ -1,59 +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. 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/publisher_info.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/publisher_info.py deleted file mode 100644 index 653bffbbb364..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/publisher_info.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 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/publisher_info_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/publisher_info_py3.py deleted file mode 100644 index 8c6eecc16ed0..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/publisher_info_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 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties.py deleted file mode 100644 index 69e1ea7cc00e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties.py +++ /dev/null @@ -1,59 +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 RecommendationConfigurationProperties(Model): - """Recommendation configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param recommendation_type: Required. The recommendation type. Possible - values include: '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. The recommendation is not - generated when the status is disabled. 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") diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties_py3.py deleted file mode 100644 index 9805b520d590..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/recommendation_configuration_properties_py3.py +++ /dev/null @@ -1,59 +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 RecommendationConfigurationProperties(Model): - """Recommendation configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param recommendation_type: Required. The recommendation type. Possible - values include: '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. The recommendation is not - generated when the status is disabled. 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment.py deleted file mode 100644 index 471302606092..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment.py +++ /dev/null @@ -1,89 +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 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_paged.py deleted file mode 100644 index f5661a66b539..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_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 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_py3.py deleted file mode 100644 index 92bad19c1805..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_py3.py +++ /dev/null @@ -1,89 +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 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control.py deleted file mode 100644 index ab7accd57683..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control.py +++ /dev/null @@ -1,71 +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 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_paged.py deleted file mode 100644 index 22210d83bc43..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_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 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_py3.py deleted file mode 100644 index 0eaf9208895c..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_py3.py +++ /dev/null @@ -1,71 +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 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard.py deleted file mode 100644 index 052a8a90edbc..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard.py +++ /dev/null @@ -1,72 +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 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_paged.py deleted file mode 100644 index 8f091eee07be..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_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 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_py3.py deleted file mode 100644 index 9abfdccc46f2..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_py3.py +++ /dev/null @@ -1,72 +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 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 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_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/server_vulnerability_assessment.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessment.py deleted file mode 100644 index be08a761a2c3..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessment.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 .resource import Resource - - -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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessment_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessment_py3.py deleted file mode 100644 index a401ebf662c1..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessment_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 .resource_py3 import Resource - - -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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessments_list.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessments_list.py deleted file mode 100644 index 9de12cd4ed9c..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessments_list.py +++ /dev/null @@ -1,29 +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 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessments_list_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessments_list_py3.py deleted file mode 100644 index b3979d3f0e53..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/server_vulnerability_assessments_list_py3.py +++ /dev/null @@ -1,29 +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 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 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/tags_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource.py deleted file mode 100644 index 3e9bca840331..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource.py +++ /dev/null @@ -1,29 +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 TagsResource(Model): - """A container holding only the Tags for a resource, allowing the user to - update the tags. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource_py3.py deleted file mode 100644 index 459b5db6f0b3..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/tags_resource_py3.py +++ /dev/null @@ -1,29 +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 TagsResource(Model): - """A container holding only the Tags for a resource, allowing the user to - update the tags. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsResource, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/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/update_iot_security_solution_data.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data.py deleted file mode 100644 index 9992ee466b3d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data.py +++ /dev/null @@ -1,37 +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 .tags_resource import TagsResource - - -class UpdateIotSecuritySolutionData(TagsResource): - """UpdateIotSecuritySolutionData. - - :param tags: Resource tags - :type tags: dict[str, str] - :param user_defined_resources: - :type user_defined_resources: - ~azure.mgmt.security.models.UserDefinedResourcesProperties - :param recommendations_configuration: - :type recommendations_configuration: - list[~azure.mgmt.security.models.RecommendationConfigurationProperties] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'user_defined_resources': {'key': 'userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, - 'recommendations_configuration': {'key': 'recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, - } - - def __init__(self, **kwargs): - super(UpdateIotSecuritySolutionData, self).__init__(**kwargs) - self.user_defined_resources = kwargs.get('user_defined_resources', None) - self.recommendations_configuration = kwargs.get('recommendations_configuration', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data_py3.py deleted file mode 100644 index dbad3c94549e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/update_iot_security_solution_data_py3.py +++ /dev/null @@ -1,37 +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 .tags_resource_py3 import TagsResource - - -class UpdateIotSecuritySolutionData(TagsResource): - """UpdateIotSecuritySolutionData. - - :param tags: Resource tags - :type tags: dict[str, str] - :param user_defined_resources: - :type user_defined_resources: - ~azure.mgmt.security.models.UserDefinedResourcesProperties - :param recommendations_configuration: - :type recommendations_configuration: - list[~azure.mgmt.security.models.RecommendationConfigurationProperties] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'user_defined_resources': {'key': 'userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, - 'recommendations_configuration': {'key': 'recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, - } - - def __init__(self, *, tags=None, user_defined_resources=None, recommendations_configuration=None, **kwargs) -> None: - super(UpdateIotSecuritySolutionData, self).__init__(tags=tags, **kwargs) - self.user_defined_resources = user_defined_resources - self.recommendations_configuration = recommendations_configuration diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties.py deleted file mode 100644 index c3ca5e92c06c..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties.py +++ /dev/null @@ -1,42 +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 UserDefinedResourcesProperties(Model): - """Properties of the solution's user defined resources. - - All required parameters must be populated in order to send to Azure. - - :param query: Required. Azure Resource Graph query which represents the - security solution's user defined resources. Required to start with "where - type != "Microsoft.Devices/IotHubs"" - :type query: str - :param query_subscriptions: Required. List of Azure subscription ids on - which the user defined resources query should be executed. - :type query_subscriptions: list[str] - """ - - _validation = { - 'query': {'required': True}, - 'query_subscriptions': {'required': True}, - } - - _attribute_map = { - 'query': {'key': 'query', 'type': 'str'}, - 'query_subscriptions': {'key': 'querySubscriptions', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(UserDefinedResourcesProperties, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.query_subscriptions = kwargs.get('query_subscriptions', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties_py3.py deleted file mode 100644 index 6300959530f6..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_defined_resources_properties_py3.py +++ /dev/null @@ -1,42 +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 UserDefinedResourcesProperties(Model): - """Properties of the solution's user defined resources. - - All required parameters must be populated in order to send to Azure. - - :param query: Required. Azure Resource Graph query which represents the - security solution's user defined resources. Required to start with "where - type != "Microsoft.Devices/IotHubs"" - :type query: str - :param query_subscriptions: Required. List of Azure subscription ids on - which the user defined resources query should be executed. - :type query_subscriptions: list[str] - """ - - _validation = { - 'query': {'required': True}, - 'query_subscriptions': {'required': True}, - } - - _attribute_map = { - 'query': {'key': 'query', 'type': 'str'}, - 'query_subscriptions': {'key': 'querySubscriptions', 'type': '[str]'}, - } - - def __init__(self, *, query: str, query_subscriptions, **kwargs) -> None: - super(UserDefinedResourcesProperties, self).__init__(**kwargs) - self.query = query - self.query_subscriptions = query_subscriptions diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_recommendation.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_recommendation.py deleted file mode 100644 index 1f22c9903f23..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_recommendation.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 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_recommendation_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_recommendation_py3.py deleted file mode 100644 index cd014bb35e42..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/user_recommendation_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 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/vm_recommendation.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/vm_recommendation.py deleted file mode 100644 index 40fdda652372..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/vm_recommendation.py +++ /dev/null @@ -1,38 +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 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/vm_recommendation_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/vm_recommendation_py3.py deleted file mode 100644 index 64aa15c40383..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/vm_recommendation_py3.py +++ /dev/null @@ -1,38 +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 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 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 5e5186d371c4..2044043fcb95 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,37 +9,37 @@ # regenerated. # -------------------------------------------------------------------------- -from .compliance_results_operations import ComplianceResultsOperations -from .pricings_operations import PricingsOperations -from .alerts_operations import AlertsOperations -from .settings_operations import SettingsOperations -from .io_tsecurity_solutions_operations import IoTSecuritySolutionsOperations -from .io_tsecurity_solutions_resource_group_operations import IoTSecuritySolutionsResourceGroupOperations -from .iot_security_solution_operations import IotSecuritySolutionOperations -from .io_tsecurity_solutions_analytics_operations import IoTSecuritySolutionsAnalyticsOperations -from .io_tsecurity_solutions_analytics_aggregated_alerts_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations -from .io_tsecurity_solutions_analytics_aggregated_alert_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertOperations -from .io_tsecurity_solutions_analytics_recommendation_operations import IoTSecuritySolutionsAnalyticsRecommendationOperations -from .io_tsecurity_solutions_analytics_recommendations_operations import IoTSecuritySolutionsAnalyticsRecommendationsOperations -from .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 ._compliance_results_operations import ComplianceResultsOperations +from ._pricings_operations import PricingsOperations +from ._alerts_operations import AlertsOperations +from ._settings_operations import SettingsOperations +from ._io_tsecurity_solutions_operations import IoTSecuritySolutionsOperations +from ._io_tsecurity_solutions_resource_group_operations import IoTSecuritySolutionsResourceGroupOperations +from ._iot_security_solution_operations import IotSecuritySolutionOperations +from ._io_tsecurity_solutions_analytics_operations import IoTSecuritySolutionsAnalyticsOperations +from ._io_tsecurity_solutions_analytics_aggregated_alerts_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations +from ._io_tsecurity_solutions_analytics_aggregated_alert_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertOperations +from ._io_tsecurity_solutions_analytics_recommendation_operations import IoTSecuritySolutionsAnalyticsRecommendationOperations +from ._io_tsecurity_solutions_analytics_recommendations_operations import IoTSecuritySolutionsAnalyticsRecommendationsOperations +from ._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 __all__ = [ 'ComplianceResultsOperations', 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 similarity index 98% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/adaptive_application_controls_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_adaptive_application_controls_operations.py index 1f77939b79a5..bab90ed88dee 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/adaptive_application_controls_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_adaptive_application_controls_operations.py @@ -19,6 +19,8 @@ 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. @@ -91,7 +93,6 @@ def list( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AppWhitelistingGroups', response) @@ -151,7 +152,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AppWhitelistingGroup', response) @@ -217,7 +217,6 @@ def put( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AppWhitelistingGroup', response) 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 96% 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..984144031f99 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) 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/compliance_results_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliance_results_operations.py similarity index 94% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/compliance_results_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliance_results_operations.py index a451aa668bd3..9b163bbbb1e0 100644 --- 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 @@ -19,6 +19,8 @@ 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. @@ -55,8 +57,7 @@ def list( ~azure.mgmt.security.models.ComplianceResultPaged[~azure.mgmt.security.models.ComplianceResult] :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.ComplianceResultPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ComplianceResultPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ComplianceResultPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/{scope}/providers/Microsoft.Security/complianceResults'} @@ -156,7 +160,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ComplianceResult', response) 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/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/io_tsecurity_solutions_analytics_aggregated_alert_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alert_operations.py similarity index 98% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alert_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alert_operations.py index 2bb488c4c23f..b4a3340cf7e6 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alert_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alert_operations.py @@ -19,6 +19,8 @@ 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. @@ -92,7 +94,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('IoTSecurityAggregatedAlert', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alerts_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alerts_operations.py similarity index 92% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alerts_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alerts_operations.py index 2060a8a24297..8e47ea54d879 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_aggregated_alerts_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alerts_operations.py @@ -19,6 +19,8 @@ class IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations(object): """IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations 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. @@ -58,8 +60,7 @@ def list( ~azure.mgmt.security.models.IoTSecurityAggregatedAlertPaged[~azure.mgmt.security.models.IoTSecurityAggregatedAlert] :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'] @@ -92,6 +93,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]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.IoTSecurityAggregatedAlertPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.IoTSecurityAggregatedAlertPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + 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'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_operations.py similarity index 98% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_operations.py index f750a9d4a5c5..70e6b43692b5 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_operations.py @@ -19,6 +19,8 @@ class IoTSecuritySolutionsAnalyticsOperations(object): """IoTSecuritySolutionsAnalyticsOperations 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. @@ -91,7 +93,6 @@ def get_all( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('IoTSecuritySolutionAnalyticsModelList', response) @@ -155,7 +156,6 @@ def get_default( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('IoTSecuritySolutionAnalyticsModel', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendation_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendation_operations.py similarity index 97% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendation_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendation_operations.py index 0f10c1aab35d..3e251e9f060e 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendation_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendation_operations.py @@ -19,6 +19,8 @@ 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('IoTSecurityAggregatedRecommendation', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendations_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendations_operations.py similarity index 92% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendations_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendations_operations.py index 1b1b5ea272f1..3276e998ec1a 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_analytics_recommendations_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendations_operations.py @@ -19,6 +19,8 @@ class IoTSecuritySolutionsAnalyticsRecommendationsOperations(object): """IoTSecuritySolutionsAnalyticsRecommendationsOperations 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. @@ -59,8 +61,7 @@ def list( ~azure.mgmt.security.models.IoTSecurityAggregatedRecommendationPaged[~azure.mgmt.security.models.IoTSecurityAggregatedRecommendation] :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.IoTSecurityAggregatedRecommendationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.IoTSecurityAggregatedRecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + 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/io_tsecurity_solutions_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_operations.py similarity index 91% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_operations.py index e03e43a17266..b3f222701615 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_operations.py @@ -19,6 +19,8 @@ class IoTSecuritySolutionsOperations(object): """IoTSecuritySolutionsOperations 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.IoTSecuritySolutionModelPaged[~azure.mgmt.security.models.IoTSecuritySolutionModel] :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.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotSecuritySolutions'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_resource_group_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_resource_group_operations.py similarity index 92% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_resource_group_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_resource_group_operations.py index a7ef12f17a9a..1536a6eb452c 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/io_tsecurity_solutions_resource_group_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_resource_group_operations.py @@ -19,6 +19,8 @@ class IoTSecuritySolutionsResourceGroupOperations(object): """IoTSecuritySolutionsResourceGroupOperations 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.IoTSecuritySolutionModelPaged[~azure.mgmt.security.models.IoTSecuritySolutionModel] :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'] @@ -90,6 +91,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]: @@ -100,12 +106,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/iot_security_solution_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solution_operations.py similarity index 99% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/iot_security_solution_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solution_operations.py index 21734654e1bd..3a3c15481184 100644 --- 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 @@ -19,6 +19,8 @@ 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. @@ -89,7 +91,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('IoTSecuritySolutionModel', response) @@ -159,7 +160,6 @@ def create( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('IoTSecuritySolutionModel', response) if response.status_code == 201: @@ -232,7 +232,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('IoTSecuritySolutionModel', response) 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 96% 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..48df52e84dba 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) @@ -568,7 +576,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 98% 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 9d80066a2cdf..02e06e34875c 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. @@ -85,7 +87,6 @@ def list( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PricingList', response) @@ -147,7 +148,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Pricing', response) @@ -221,7 +221,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 similarity index 95% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_assessments_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_assessments_operations.py index 5285b27e9f2c..353ea103d365 100644 --- 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 @@ -19,6 +19,8 @@ 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. @@ -60,8 +62,7 @@ def list( ~azure.mgmt.security.models.RegulatoryComplianceAssessmentPaged[~azure.mgmt.security.models.RegulatoryComplianceAssessment] :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'] @@ -94,6 +95,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]: @@ -104,12 +110,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RegulatoryComplianceAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RegulatoryComplianceAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + 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'} @@ -173,7 +177,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RegulatoryComplianceAssessment', response) 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 similarity index 95% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_controls_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_controls_operations.py index 673688d7d335..21bb45c57662 100644 --- 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 @@ -19,6 +19,8 @@ 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. @@ -57,8 +59,7 @@ def list( ~azure.mgmt.security.models.RegulatoryComplianceControlPaged[~azure.mgmt.security.models.RegulatoryComplianceControl] :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'] @@ -90,6 +91,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]: @@ -100,12 +106,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RegulatoryComplianceControlPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RegulatoryComplianceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RegulatoryComplianceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls'} @@ -163,7 +167,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RegulatoryComplianceControl', response) 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 similarity index 94% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_standards_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_standards_operations.py index 2a49705ece36..63cca3001264 100644 --- 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 @@ -19,6 +19,8 @@ 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. @@ -53,8 +55,7 @@ def list( ~azure.mgmt.security.models.RegulatoryComplianceStandardPaged[~azure.mgmt.security.models.RegulatoryComplianceStandard] :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.RegulatoryComplianceStandardPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RegulatoryComplianceStandardPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RegulatoryComplianceStandardPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards'} @@ -154,7 +158,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RegulatoryComplianceStandard', response) 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 similarity index 99% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/server_vulnerability_assessment_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_server_vulnerability_assessment_operations.py index 7faff054f178..18722ae2855b 100644 --- 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 @@ -19,6 +19,8 @@ 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. @@ -99,7 +101,6 @@ def list_by_extended_resource( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerVulnerabilityAssessmentsList', response) @@ -171,7 +172,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerVulnerabilityAssessment', response) @@ -243,7 +243,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 202: deserialized = self._deserialize('ServerVulnerabilityAssessment', response) 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/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) From ff74b19cc7f8c538369fcb0727702df7580bc8ed Mon Sep 17 00:00:00 2001 From: Zim Kalinowski Date: Thu, 1 Aug 2019 15:45:47 +0000 Subject: [PATCH 09/13] history and version --- sdk/security/azure-mgmt-security/HISTORY.rst | 22 +++++++++++++++++++ .../azure/mgmt/security/version.py | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/sdk/security/azure-mgmt-security/HISTORY.rst b/sdk/security/azure-mgmt-security/HISTORY.rst index 557b6e935083..708d97d3328c 100644 --- a/sdk/security/azure-mgmt-security/HISTORY.rst +++ b/sdk/security/azure-mgmt-security/HISTORY.rst @@ -3,6 +3,28 @@ 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 + 0.2.0 (2019-04-16) ++++++++++++++++++ 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 e0ec669828cb..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.1.0" +VERSION = "0.3.0" From 6b71daf9821a8393b4300d890ff587d272fb914d Mon Sep 17 00:00:00 2001 From: Zim Kalinowski Date: Thu, 1 Aug 2019 16:00:43 +0000 Subject: [PATCH 10/13] general breaking changes info --- sdk/security/azure-mgmt-security/HISTORY.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sdk/security/azure-mgmt-security/HISTORY.rst b/sdk/security/azure-mgmt-security/HISTORY.rst index 708d97d3328c..e8b3d3babd74 100644 --- a/sdk/security/azure-mgmt-security/HISTORY.rst +++ b/sdk/security/azure-mgmt-security/HISTORY.rst @@ -25,6 +25,18 @@ Release History - 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) ++++++++++++++++++ From 3979dac12ea6be54b85c71a0990c99513c501c2d Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Sun, 8 Sep 2019 23:31:46 -0700 Subject: [PATCH 11/13] [AutoPR security/resource-manager] Improve API documentation and add DeviceSecurityGroups to stable API (#6947) * Generated from 061864a3db19de7b976bf47c9d9e4e32b09f9589 move devicesecuritygrups to stabe * Generated from d3e6486cb19eea117de6ad7def57c690427fbe4c Change in analytic from IoT to Iot * Generated from 11637f0778922ea3d14f428d315b7acf7bc8f38f Merge branch 'dev-security-Microsoft.Security-2019-01-01' of https://github.com/hagba/azure-rest-api-specs into dev-security-Microsoft.Security-2019-01-01 * Generated from 785f2dfd589068686e96a4e7af3f2608df86be61 fix syntax * Generated from 37b566efb9f981da83cae89d7379b0af5fc0867a Update specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/iotSecuritySolutions.json Co-Authored-By: Nick Schonning * Generated from b9c1ca732f737de72d79a3d8b7fc8bdcf7c4d422 Update specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/iotSecuritySolutionAnalytics.json Co-Authored-By: Nick Schonning * Generated from 14365513354de42f57a22b16995b7f53c63a2c18 solution/solutions inconsistency * Generated from e83a3e8a780afa1c12f30a2a508b8ca98d42edb2 In PATCH, specify 'properties' field * Generated from d44d4b0e3d8b56de50a2a532669a7914a527225f Updated PUT operation name to CreateOrUpdate * Generated from 9743bc400e5d5fa9bd833ba2d20b23f6e4c11781 Merge branch 'dev-security-Microsoft.Security-2019-01-01' of https://github.com/hagba/azure-rest-api-specs into dev-security-Microsoft.Security-2019-01-01 * Generated from 06632c5962475a20220b942f72abb34cbe7e3b18 fix example validation error --- .../azure/mgmt/security/_security_center.py | 47 +- .../azure/mgmt/security/models/__init__.py | 34 +- .../azure/mgmt/security/models/_models.py | 570 +++++++++++++----- .../azure/mgmt/security/models/_models_py3.py | 570 +++++++++++++----- .../mgmt/security/models/_paged_models.py | 13 + .../security/models/_security_center_enums.py | 6 + .../mgmt/security/operations/__init__.py | 22 +- .../_device_security_groups_operations.py | 298 +++++++++ ..._analytics_aggregated_alerts_operations.py | 117 ---- ...ons_analytics_recommendation_operations.py | 108 ---- .../_io_tsecurity_solutions_operations.py | 111 ---- ...ity_solutions_resource_group_operations.py | 115 ---- ...security_solution_analytics_operations.py} | 24 +- .../_iot_security_solution_operations.py | 174 +++++- ..._analytics_aggregated_alert_operations.py} | 95 ++- ...ns_analytics_recommendation_operations.py} | 81 ++- .../operations/_pricings_operations.py | 17 +- 17 files changed, 1534 insertions(+), 868 deletions(-) create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_device_security_groups_operations.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alerts_operations.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendation_operations.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_operations.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_resource_group_operations.py rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{_io_tsecurity_solutions_analytics_operations.py => _iot_security_solution_analytics_operations.py} (89%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{_io_tsecurity_solutions_analytics_aggregated_alert_operations.py => _iot_security_solutions_analytics_aggregated_alert_operations.py} (63%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{_io_tsecurity_solutions_analytics_recommendations_operations.py => _iot_security_solutions_analytics_recommendation_operations.py} (54%) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/_security_center.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/_security_center.py index 342c5d61f0e1..03f4764ee113 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 @@ -17,14 +17,11 @@ from .operations import PricingsOperations from .operations import AlertsOperations from .operations import SettingsOperations -from .operations import IoTSecuritySolutionsOperations -from .operations import IoTSecuritySolutionsResourceGroupOperations +from .operations import DeviceSecurityGroupsOperations from .operations import IotSecuritySolutionOperations -from .operations import IoTSecuritySolutionsAnalyticsOperations -from .operations import IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations -from .operations import IoTSecuritySolutionsAnalyticsAggregatedAlertOperations -from .operations import IoTSecuritySolutionsAnalyticsRecommendationOperations -from .operations import IoTSecuritySolutionsAnalyticsRecommendationsOperations +from .operations import IotSecuritySolutionAnalyticsOperations +from .operations import IotSecuritySolutionsAnalyticsAggregatedAlertOperations +from .operations import IotSecuritySolutionsAnalyticsRecommendationOperations from .operations import AllowedConnectionsOperations from .operations import DiscoveredSecuritySolutionsOperations from .operations import ExternalSecuritySolutionsOperations @@ -61,22 +58,16 @@ class SecurityCenter(SDKClient): :vartype alerts: azure.mgmt.security.operations.AlertsOperations :ivar settings: Settings operations :vartype settings: azure.mgmt.security.operations.SettingsOperations - :ivar io_tsecurity_solutions: IoTSecuritySolutions operations - :vartype io_tsecurity_solutions: azure.mgmt.security.operations.IoTSecuritySolutionsOperations - :ivar io_tsecurity_solutions_resource_group: IoTSecuritySolutionsResourceGroup operations - :vartype io_tsecurity_solutions_resource_group: azure.mgmt.security.operations.IoTSecuritySolutionsResourceGroupOperations + :ivar 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 io_tsecurity_solutions_analytics: IoTSecuritySolutionsAnalytics operations - :vartype io_tsecurity_solutions_analytics: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsOperations - :ivar io_tsecurity_solutions_analytics_aggregated_alerts: IoTSecuritySolutionsAnalyticsAggregatedAlerts operations - :vartype io_tsecurity_solutions_analytics_aggregated_alerts: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations - :ivar io_tsecurity_solutions_analytics_aggregated_alert: IoTSecuritySolutionsAnalyticsAggregatedAlert operations - :vartype io_tsecurity_solutions_analytics_aggregated_alert: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsAggregatedAlertOperations - :ivar io_tsecurity_solutions_analytics_recommendation: IoTSecuritySolutionsAnalyticsRecommendation operations - :vartype io_tsecurity_solutions_analytics_recommendation: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsRecommendationOperations - :ivar io_tsecurity_solutions_analytics_recommendations: IoTSecuritySolutionsAnalyticsRecommendations operations - :vartype io_tsecurity_solutions_analytics_recommendations: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsRecommendationsOperations + :ivar 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 @@ -145,21 +136,15 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.settings = SettingsOperations( self._client, self.config, self._serialize, self._deserialize) - self.io_tsecurity_solutions = IoTSecuritySolutionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.io_tsecurity_solutions_resource_group = IoTSecuritySolutionsResourceGroupOperations( + self.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.io_tsecurity_solutions_analytics = IoTSecuritySolutionsAnalyticsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.io_tsecurity_solutions_analytics_aggregated_alerts = IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.io_tsecurity_solutions_analytics_aggregated_alert = IoTSecuritySolutionsAnalyticsAggregatedAlertOperations( + self.iot_security_solution_analytics = IotSecuritySolutionAnalyticsOperations( self._client, self.config, self._serialize, self._deserialize) - self.io_tsecurity_solutions_analytics_recommendation = IoTSecuritySolutionsAnalyticsRecommendationOperations( + self.iot_security_solutions_analytics_aggregated_alert = IotSecuritySolutionsAnalyticsAggregatedAlertOperations( self._client, self.config, self._serialize, self._deserialize) - self.io_tsecurity_solutions_analytics_recommendations = IoTSecuritySolutionsAnalyticsRecommendationsOperations( + 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) 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 b09be32d96b1..d0c40691dc6b 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 @@ -18,6 +18,7 @@ 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 @@ -34,7 +35,10 @@ from ._models_py3 import ConnectableResource from ._models_py3 import ConnectedResource from ._models_py3 import ConnectedWorkspace + from ._models_py3 import CustomAlertRule from ._models_py3 import DataExportSetting + from ._models_py3 import DenylistCustomAlertRule + from ._models_py3 import DeviceSecurityGroup from ._models_py3 import DiscoveredSecuritySolution from ._models_py3 import ExternalSecuritySolution from ._models_py3 import ExternalSecuritySolutionKind1 @@ -45,11 +49,8 @@ from ._models_py3 import IoTSecurityAggregatedAlert from ._models_py3 import IoTSecurityAggregatedRecommendation from ._models_py3 import IoTSecurityAlertedDevice - from ._models_py3 import IoTSecurityAlertedDevicesList from ._models_py3 import IoTSecurityDeviceAlert - from ._models_py3 import IoTSecurityDeviceAlertsList from ._models_py3 import IoTSecurityDeviceRecommendation - from ._models_py3 import IoTSecurityDeviceRecommendationsList from ._models_py3 import IoTSecuritySolutionAnalyticsModel from ._models_py3 import IoTSecuritySolutionAnalyticsModelList from ._models_py3 import IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem @@ -65,6 +66,7 @@ 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 @@ -86,6 +88,8 @@ from ._models_py3 import Setting from ._models_py3 import SettingResource 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 @@ -104,6 +108,7 @@ 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 @@ -120,7 +125,10 @@ from ._models import ConnectableResource from ._models import ConnectedResource from ._models import ConnectedWorkspace + from ._models import CustomAlertRule from ._models import DataExportSetting + from ._models import DenylistCustomAlertRule + from ._models import DeviceSecurityGroup from ._models import DiscoveredSecuritySolution from ._models import ExternalSecuritySolution from ._models import ExternalSecuritySolutionKind1 @@ -131,11 +139,8 @@ from ._models import IoTSecurityAggregatedAlert from ._models import IoTSecurityAggregatedRecommendation from ._models import IoTSecurityAlertedDevice - from ._models import IoTSecurityAlertedDevicesList from ._models import IoTSecurityDeviceAlert - from ._models import IoTSecurityDeviceAlertsList from ._models import IoTSecurityDeviceRecommendation - from ._models import IoTSecurityDeviceRecommendationsList from ._models import IoTSecuritySolutionAnalyticsModel from ._models import IoTSecuritySolutionAnalyticsModelList from ._models import IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem @@ -151,6 +156,7 @@ 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 @@ -172,6 +178,8 @@ from ._models import Setting from ._models import SettingResource from ._models import TagsResource + from ._models import ThresholdCustomAlertRule + from ._models import TimeWindowCustomAlertRule from ._models import TopologyResource from ._models import TopologySingleResource from ._models import TopologySingleResourceChild @@ -187,6 +195,7 @@ 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 @@ -208,6 +217,7 @@ PricingTier, ReportedSeverity, SettingKind, + ValueType, SecuritySolutionStatus, ExportData, DataSource, @@ -235,6 +245,7 @@ 'AlertConfidenceReason', 'AlertEntity', 'AllowedConnectionsResource', + 'AllowlistCustomAlertRule', 'AppWhitelistingGroup', 'AppWhitelistingGroups', 'AppWhitelistingIssueSummary', @@ -251,7 +262,10 @@ 'ConnectableResource', 'ConnectedResource', 'ConnectedWorkspace', + 'CustomAlertRule', 'DataExportSetting', + 'DenylistCustomAlertRule', + 'DeviceSecurityGroup', 'DiscoveredSecuritySolution', 'ExternalSecuritySolution', 'ExternalSecuritySolutionKind1', @@ -262,11 +276,8 @@ 'IoTSecurityAggregatedAlert', 'IoTSecurityAggregatedRecommendation', 'IoTSecurityAlertedDevice', - 'IoTSecurityAlertedDevicesList', 'IoTSecurityDeviceAlert', - 'IoTSecurityDeviceAlertsList', 'IoTSecurityDeviceRecommendation', - 'IoTSecurityDeviceRecommendationsList', 'IoTSecuritySolutionAnalyticsModel', 'IoTSecuritySolutionAnalyticsModelList', 'IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem', @@ -282,6 +293,7 @@ 'JitNetworkAccessRequestPort', 'JitNetworkAccessRequestVirtualMachine', 'Kind', + 'ListCustomAlertRule', 'Location', 'Operation', 'OperationDisplay', @@ -303,6 +315,8 @@ 'Setting', 'SettingResource', 'TagsResource', + 'ThresholdCustomAlertRule', + 'TimeWindowCustomAlertRule', 'TopologyResource', 'TopologySingleResource', 'TopologySingleResourceChild', @@ -315,6 +329,7 @@ 'ComplianceResultPaged', 'AlertPaged', 'SettingPaged', + 'DeviceSecurityGroupPaged', 'IoTSecuritySolutionModelPaged', 'IoTSecurityAggregatedAlertPaged', 'IoTSecurityAggregatedRecommendationPaged', @@ -338,6 +353,7 @@ 'PricingTier', 'ReportedSeverity', 'SettingKind', + 'ValueType', 'SecuritySolutionStatus', 'ExportData', 'DataSource', diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py index 814deff5ee6b..89600c9fb8d6 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py @@ -492,6 +492,136 @@ def __init__(self, **kwargs): 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. @@ -1254,6 +1384,104 @@ def __init__(self, **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. @@ -1459,35 +1687,34 @@ class IoTSecurityAggregatedAlert(Model): :vartype type: str :param tags: Resource tags :type tags: dict[str, str] - :ivar alert_type: Name of the alert type + :ivar alert_type: Name of the alert type. :vartype alert_type: str - :ivar alert_display_name: Display name of the alert type + :ivar alert_display_name: Display name of the alert type. :vartype alert_display_name: str - :ivar aggregated_date_utc: The date the incidents were detected by the - vendor + :ivar aggregated_date_utc: Date of detection. :vartype aggregated_date_utc: date - :ivar vendor_name: Name of the vendor that discovered the incident + :ivar vendor_name: Name of the organization that raised the alert. :vartype vendor_name: str - :ivar reported_severity: Estimated severity of this alert. Possible values - include: 'Informational', 'Low', 'Medium', 'High' + :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 + :ivar remediation_steps: Recommended steps for remediation. :vartype remediation_steps: str - :ivar description: Description of the incident and what it means + :ivar description: Description of the suspected vulnerability and meaning. :vartype description: str - :ivar count: Occurrence number of the alert within the aggregated date + :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 got - the alerts + :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) + :ivar system_source: The type of the alerted resource (Azure, Non-Azure). :vartype system_source: str - :ivar action_taken: The action that was taken as a response to the alert - (Active, Blocked etc.) + :ivar action_taken: IoT Security solution alert response. :vartype action_taken: str - :ivar log_analytics_query: query in log analytics to get the list of - affected devices/alerts + :ivar log_analytics_query: Log analytics query for getting the list of + affected devices/alerts. :vartype log_analytics_query: str """ @@ -1549,7 +1776,7 @@ def __init__(self, **kwargs): class IoTSecurityAggregatedRecommendation(Model): - """Security Solution Recommendation Information. + """IoT Security solution recommendation information. Variables are only populated by the server, and will be ignored when sending a request. @@ -1562,31 +1789,31 @@ class IoTSecurityAggregatedRecommendation(Model): :vartype type: str :param tags: Resource tags :type tags: dict[str, str] - :param recommendation_name: Name of the recommendation + :param recommendation_name: Name of the recommendation. :type recommendation_name: str :ivar recommendation_display_name: Display name of the recommendation type. :vartype recommendation_display_name: str - :ivar description: Description of the incident and what it means + :ivar description: Description of the suspected vulnerability and meaning. :vartype description: str - :ivar recommendation_type_id: The recommendation-type GUID. + :ivar recommendation_type_id: Recommendation-type GUID. :vartype recommendation_type_id: str - :ivar detected_by: Name of the vendor that discovered the issue + :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: Estimated severity of this recommendation. - Possible values include: 'Informational', 'Low', 'Medium', 'High' + :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: the number of the healthy devices within the - solution + :ivar healthy_devices: Number of healthy devices within the IoT Security + solution. :vartype healthy_devices: int - :ivar unhealthy_device_count: the number of the unhealthy devices within - the solution + :ivar unhealthy_device_count: Number of unhealthy devices within the IoT + Security solution. :vartype unhealthy_device_count: int - :ivar log_analytics_query: query in log analytics to get the list of - affected devices/alerts + :ivar log_analytics_query: Log analytics query for getting the list of + affected devices/alerts. :vartype log_analytics_query: str """ @@ -1641,15 +1868,15 @@ def __init__(self, **kwargs): class IoTSecurityAlertedDevice(Model): - """Statistic information about the number of alerts per device during the last - period. + """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: Name of the alert type + :ivar device_id: Device identifier. :vartype device_id: str - :ivar alerts_count: the number of alerts raised for this device + :ivar alerts_count: Number of alerts raised for this device. :vartype alerts_count: int """ @@ -1669,42 +1896,20 @@ def __init__(self, **kwargs): self.alerts_count = None -class IoTSecurityAlertedDevicesList(Model): - """List of devices with the count of raised alerts. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of aggregated alerts data - :type value: list[~azure.mgmt.security.models.IoTSecurityAlertedDevice] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IoTSecurityAlertedDevice]'}, - } - - def __init__(self, **kwargs): - super(IoTSecurityAlertedDevicesList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - class IoTSecurityDeviceAlert(Model): - """Statistic information about the number of alerts per alert type during the - last period. + """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: Estimated severity of this alert. Possible values - include: 'Informational', 'Low', 'Medium', 'High' + :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: the number of alerts raised for this alert type + :ivar alerts_count: Number of alerts raised for this alert type. :vartype alerts_count: int """ @@ -1727,50 +1932,20 @@ def __init__(self, **kwargs): self.alerts_count = None -class IoTSecurityDeviceAlertsList(Model): - """List of alerts with the count of raised alerts. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of top alerts data - :type value: list[~azure.mgmt.security.models.IoTSecurityDeviceAlert] - :ivar next_link: The URI to fetch the next page. - :vartype next_link: str - """ - - _validation = { - 'value': {'required': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IoTSecurityDeviceAlert]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IoTSecurityDeviceAlertsList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - class IoTSecurityDeviceRecommendation(Model): - """Statistic information about the number of recommendations per + """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 + :ivar recommendation_display_name: Display name of the recommendation. :vartype recommendation_display_name: str - :ivar reported_severity: Estimated severity of this recommendation. - Possible values include: 'Informational', 'Low', 'Medium', 'High' + :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: the number of device with this recommendation + :ivar devices_count: Number of devices with this recommendation. :vartype devices_count: int """ @@ -1793,31 +1968,8 @@ def __init__(self, **kwargs): self.devices_count = None -class IoTSecurityDeviceRecommendationsList(Model): - """List of recommendations with the count of devices. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of aggregated recommendation data - :type value: - list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IoTSecurityDeviceRecommendation]'}, - } - - def __init__(self, **kwargs): - super(IoTSecurityDeviceRecommendationsList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - class IoTSecuritySolutionAnalyticsModel(Resource): - """Security Analytics of a security solution. + """Security analytics of your IoT Security solution. Variables are only populated by the server, and will be ignored when sending a request. @@ -1828,24 +1980,25 @@ class IoTSecuritySolutionAnalyticsModel(Resource): :vartype name: str :ivar type: Resource type :vartype type: str - :ivar metrics: Security Analytics of a security solution + :ivar metrics: Security analytics of your IoT Security solution. :vartype metrics: ~azure.mgmt.security.models.IoTSeverityMetrics - :ivar unhealthy_device_count: number of unhealthy devices + :ivar unhealthy_device_count: Number of unhealthy devices within your IoT + Security solution. :vartype unhealthy_device_count: int - :ivar devices_metrics: The list of devices metrics by the aggregated date. + :ivar devices_metrics: List of device metrics by the aggregation date. :vartype devices_metrics: list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem] - :param top_alerted_devices: The list of top 3 devices with the most - attacked. + :param top_alerted_devices: List of the 3 devices with the most alerts. :type top_alerted_devices: - ~azure.mgmt.security.models.IoTSecurityAlertedDevicesList - :param most_prevalent_device_alerts: The list of most prevalent 3 alerts. + list[~azure.mgmt.security.models.IoTSecurityAlertedDevice] + :param most_prevalent_device_alerts: List of the 3 most prevalent device + alerts. :type most_prevalent_device_alerts: - ~azure.mgmt.security.models.IoTSecurityDeviceAlertsList - :param most_prevalent_device_recommendations: The list of most prevalent 3 - recommendations. + list[~azure.mgmt.security.models.IoTSecurityDeviceAlert] + :param most_prevalent_device_recommendations: List of the 3 most prevalent + device recommendations. :type most_prevalent_device_recommendations: - ~azure.mgmt.security.models.IoTSecurityDeviceRecommendationsList + list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation] """ _validation = { @@ -1864,9 +2017,9 @@ class IoTSecuritySolutionAnalyticsModel(Resource): 'metrics': {'key': 'properties.metrics', 'type': 'IoTSeverityMetrics'}, 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, 'devices_metrics': {'key': 'properties.devicesMetrics', 'type': '[IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem]'}, - 'top_alerted_devices': {'key': 'properties.topAlertedDevices', 'type': 'IoTSecurityAlertedDevicesList'}, - 'most_prevalent_device_alerts': {'key': 'properties.mostPrevalentDeviceAlerts', 'type': 'IoTSecurityDeviceAlertsList'}, - 'most_prevalent_device_recommendations': {'key': 'properties.mostPrevalentDeviceRecommendations', 'type': 'IoTSecurityDeviceRecommendationsList'}, + '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): @@ -1880,17 +2033,19 @@ def __init__(self, **kwargs): class IoTSecuritySolutionAnalyticsModelList(Model): - """List of Security Analytics of a security solution. + """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 a security solution + :param value: Required. List of Security analytics of your IoT Security + solution :type value: list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel] - :ivar next_link: The URI to fetch the next page. + :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 """ @@ -1913,9 +2068,10 @@ def __init__(self, **kwargs): class IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem(Model): """IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem. - :param date_property: the date of the metrics + :param date_property: Aggregation of IoT Security solution device alert + metrics by date. :type date_property: datetime - :param devices_metrics: devices alerts count by severity. + :param devices_metrics: Device alert count by severity. :type devices_metrics: ~azure.mgmt.security.models.IoTSeverityMetrics """ @@ -1931,7 +2087,7 @@ def __init__(self, **kwargs): class IoTSecuritySolutionModel(Model): - """Security Solution. + """IoT Security solution configuration and resource information. Variables are only populated by the server, and will be ignored when sending a request. @@ -1952,10 +2108,10 @@ class IoTSecuritySolutionModel(Model): :type workspace: str :param display_name: Required. Resource display name. :type display_name: str - :param status: Security solution status. Possible values include: - 'Enabled', 'Disabled'. Default value: "Enabled" . + :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 export to workspace data options + :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. @@ -2020,13 +2176,13 @@ def __init__(self, **kwargs): class IoTSeverityMetrics(Model): - """Severity metrics. + """IoT Security solution analytics severity metrics. - :param high: count of high severity items + :param high: Count of high severity alerts/recommendations. :type high: int - :param medium: count of medium severity items + :param medium: Count of medium severity alerts/recommendations. :type medium: int - :param low: count of low severity items + :param low: Count of low severity alerts/recommendations. :type low: int """ @@ -2549,7 +2705,10 @@ def __init__(self, **kwargs): class Pricing(Resource): - """Pricing tier will be applied for the scope based on the resource ID. + """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. @@ -2651,15 +2810,15 @@ def __init__(self, **kwargs): class RecommendationConfigurationProperties(Model): - """Recommendation configuration. + """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 recommendation type. Possible - values include: 'IoT_ACRAuthentication', + :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', @@ -2671,9 +2830,9 @@ class RecommendationConfigurationProperties(Model): ~azure.mgmt.security.models.RecommendationType :ivar name: :vartype name: str - :param status: Required. Recommendation status. The recommendation is not - generated when the status is disabled. Possible values include: - 'Disabled', 'Enabled'. Default value: "Enabled" . + :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 """ @@ -3128,6 +3287,103 @@ def __init__(self, **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. @@ -3306,8 +3562,8 @@ class UpdateIotSecuritySolutionData(TagsResource): _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'user_defined_resources': {'key': 'userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, - 'recommendations_configuration': {'key': 'recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + 'user_defined_resources': {'key': 'properties.userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'recommendations_configuration': {'key': 'properties.recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, } def __init__(self, **kwargs): @@ -3317,7 +3573,7 @@ def __init__(self, **kwargs): class UserDefinedResourcesProperties(Model): - """Properties of the solution's user defined resources. + """Properties of the IoT Security solution's user defined resources. All required parameters must be populated in order to send to Azure. diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py index 55592fee92b4..0ec2a932124b 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py @@ -492,6 +492,136 @@ def __init__(self, **kwargs) -> 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. @@ -1254,6 +1384,104 @@ def __init__(self, *, kind, enabled: bool, **kwargs) -> None: 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. @@ -1459,35 +1687,34 @@ class IoTSecurityAggregatedAlert(Model): :vartype type: str :param tags: Resource tags :type tags: dict[str, str] - :ivar alert_type: Name of the alert type + :ivar alert_type: Name of the alert type. :vartype alert_type: str - :ivar alert_display_name: Display name of the alert type + :ivar alert_display_name: Display name of the alert type. :vartype alert_display_name: str - :ivar aggregated_date_utc: The date the incidents were detected by the - vendor + :ivar aggregated_date_utc: Date of detection. :vartype aggregated_date_utc: date - :ivar vendor_name: Name of the vendor that discovered the incident + :ivar vendor_name: Name of the organization that raised the alert. :vartype vendor_name: str - :ivar reported_severity: Estimated severity of this alert. Possible values - include: 'Informational', 'Low', 'Medium', 'High' + :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 + :ivar remediation_steps: Recommended steps for remediation. :vartype remediation_steps: str - :ivar description: Description of the incident and what it means + :ivar description: Description of the suspected vulnerability and meaning. :vartype description: str - :ivar count: Occurrence number of the alert within the aggregated date + :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 got - the alerts + :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) + :ivar system_source: The type of the alerted resource (Azure, Non-Azure). :vartype system_source: str - :ivar action_taken: The action that was taken as a response to the alert - (Active, Blocked etc.) + :ivar action_taken: IoT Security solution alert response. :vartype action_taken: str - :ivar log_analytics_query: query in log analytics to get the list of - affected devices/alerts + :ivar log_analytics_query: Log analytics query for getting the list of + affected devices/alerts. :vartype log_analytics_query: str """ @@ -1549,7 +1776,7 @@ def __init__(self, *, tags=None, **kwargs) -> None: class IoTSecurityAggregatedRecommendation(Model): - """Security Solution Recommendation Information. + """IoT Security solution recommendation information. Variables are only populated by the server, and will be ignored when sending a request. @@ -1562,31 +1789,31 @@ class IoTSecurityAggregatedRecommendation(Model): :vartype type: str :param tags: Resource tags :type tags: dict[str, str] - :param recommendation_name: Name of the recommendation + :param recommendation_name: Name of the recommendation. :type recommendation_name: str :ivar recommendation_display_name: Display name of the recommendation type. :vartype recommendation_display_name: str - :ivar description: Description of the incident and what it means + :ivar description: Description of the suspected vulnerability and meaning. :vartype description: str - :ivar recommendation_type_id: The recommendation-type GUID. + :ivar recommendation_type_id: Recommendation-type GUID. :vartype recommendation_type_id: str - :ivar detected_by: Name of the vendor that discovered the issue + :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: Estimated severity of this recommendation. - Possible values include: 'Informational', 'Low', 'Medium', 'High' + :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: the number of the healthy devices within the - solution + :ivar healthy_devices: Number of healthy devices within the IoT Security + solution. :vartype healthy_devices: int - :ivar unhealthy_device_count: the number of the unhealthy devices within - the solution + :ivar unhealthy_device_count: Number of unhealthy devices within the IoT + Security solution. :vartype unhealthy_device_count: int - :ivar log_analytics_query: query in log analytics to get the list of - affected devices/alerts + :ivar log_analytics_query: Log analytics query for getting the list of + affected devices/alerts. :vartype log_analytics_query: str """ @@ -1641,15 +1868,15 @@ def __init__(self, *, tags=None, recommendation_name: str=None, **kwargs) -> Non class IoTSecurityAlertedDevice(Model): - """Statistic information about the number of alerts per device during the last - period. + """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: Name of the alert type + :ivar device_id: Device identifier. :vartype device_id: str - :ivar alerts_count: the number of alerts raised for this device + :ivar alerts_count: Number of alerts raised for this device. :vartype alerts_count: int """ @@ -1669,42 +1896,20 @@ def __init__(self, **kwargs) -> None: self.alerts_count = None -class IoTSecurityAlertedDevicesList(Model): - """List of devices with the count of raised alerts. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of aggregated alerts data - :type value: list[~azure.mgmt.security.models.IoTSecurityAlertedDevice] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IoTSecurityAlertedDevice]'}, - } - - def __init__(self, *, value, **kwargs) -> None: - super(IoTSecurityAlertedDevicesList, self).__init__(**kwargs) - self.value = value - - class IoTSecurityDeviceAlert(Model): - """Statistic information about the number of alerts per alert type during the - last period. + """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: Estimated severity of this alert. Possible values - include: 'Informational', 'Low', 'Medium', 'High' + :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: the number of alerts raised for this alert type + :ivar alerts_count: Number of alerts raised for this alert type. :vartype alerts_count: int """ @@ -1727,50 +1932,20 @@ def __init__(self, **kwargs) -> None: self.alerts_count = None -class IoTSecurityDeviceAlertsList(Model): - """List of alerts with the count of raised alerts. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of top alerts data - :type value: list[~azure.mgmt.security.models.IoTSecurityDeviceAlert] - :ivar next_link: The URI to fetch the next page. - :vartype next_link: str - """ - - _validation = { - 'value': {'required': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IoTSecurityDeviceAlert]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value, **kwargs) -> None: - super(IoTSecurityDeviceAlertsList, self).__init__(**kwargs) - self.value = value - self.next_link = None - - class IoTSecurityDeviceRecommendation(Model): - """Statistic information about the number of recommendations per + """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 + :ivar recommendation_display_name: Display name of the recommendation. :vartype recommendation_display_name: str - :ivar reported_severity: Estimated severity of this recommendation. - Possible values include: 'Informational', 'Low', 'Medium', 'High' + :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: the number of device with this recommendation + :ivar devices_count: Number of devices with this recommendation. :vartype devices_count: int """ @@ -1793,31 +1968,8 @@ def __init__(self, **kwargs) -> None: self.devices_count = None -class IoTSecurityDeviceRecommendationsList(Model): - """List of recommendations with the count of devices. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of aggregated recommendation data - :type value: - list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IoTSecurityDeviceRecommendation]'}, - } - - def __init__(self, *, value, **kwargs) -> None: - super(IoTSecurityDeviceRecommendationsList, self).__init__(**kwargs) - self.value = value - - class IoTSecuritySolutionAnalyticsModel(Resource): - """Security Analytics of a security solution. + """Security analytics of your IoT Security solution. Variables are only populated by the server, and will be ignored when sending a request. @@ -1828,24 +1980,25 @@ class IoTSecuritySolutionAnalyticsModel(Resource): :vartype name: str :ivar type: Resource type :vartype type: str - :ivar metrics: Security Analytics of a security solution + :ivar metrics: Security analytics of your IoT Security solution. :vartype metrics: ~azure.mgmt.security.models.IoTSeverityMetrics - :ivar unhealthy_device_count: number of unhealthy devices + :ivar unhealthy_device_count: Number of unhealthy devices within your IoT + Security solution. :vartype unhealthy_device_count: int - :ivar devices_metrics: The list of devices metrics by the aggregated date. + :ivar devices_metrics: List of device metrics by the aggregation date. :vartype devices_metrics: list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem] - :param top_alerted_devices: The list of top 3 devices with the most - attacked. + :param top_alerted_devices: List of the 3 devices with the most alerts. :type top_alerted_devices: - ~azure.mgmt.security.models.IoTSecurityAlertedDevicesList - :param most_prevalent_device_alerts: The list of most prevalent 3 alerts. + list[~azure.mgmt.security.models.IoTSecurityAlertedDevice] + :param most_prevalent_device_alerts: List of the 3 most prevalent device + alerts. :type most_prevalent_device_alerts: - ~azure.mgmt.security.models.IoTSecurityDeviceAlertsList - :param most_prevalent_device_recommendations: The list of most prevalent 3 - recommendations. + list[~azure.mgmt.security.models.IoTSecurityDeviceAlert] + :param most_prevalent_device_recommendations: List of the 3 most prevalent + device recommendations. :type most_prevalent_device_recommendations: - ~azure.mgmt.security.models.IoTSecurityDeviceRecommendationsList + list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation] """ _validation = { @@ -1864,9 +2017,9 @@ class IoTSecuritySolutionAnalyticsModel(Resource): 'metrics': {'key': 'properties.metrics', 'type': 'IoTSeverityMetrics'}, 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, 'devices_metrics': {'key': 'properties.devicesMetrics', 'type': '[IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem]'}, - 'top_alerted_devices': {'key': 'properties.topAlertedDevices', 'type': 'IoTSecurityAlertedDevicesList'}, - 'most_prevalent_device_alerts': {'key': 'properties.mostPrevalentDeviceAlerts', 'type': 'IoTSecurityDeviceAlertsList'}, - 'most_prevalent_device_recommendations': {'key': 'properties.mostPrevalentDeviceRecommendations', 'type': 'IoTSecurityDeviceRecommendationsList'}, + '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: @@ -1880,17 +2033,19 @@ def __init__(self, *, top_alerted_devices=None, most_prevalent_device_alerts=Non class IoTSecuritySolutionAnalyticsModelList(Model): - """List of Security Analytics of a security solution. + """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 a security solution + :param value: Required. List of Security analytics of your IoT Security + solution :type value: list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel] - :ivar next_link: The URI to fetch the next page. + :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 """ @@ -1913,9 +2068,10 @@ def __init__(self, *, value, **kwargs) -> None: class IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem(Model): """IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem. - :param date_property: the date of the metrics + :param date_property: Aggregation of IoT Security solution device alert + metrics by date. :type date_property: datetime - :param devices_metrics: devices alerts count by severity. + :param devices_metrics: Device alert count by severity. :type devices_metrics: ~azure.mgmt.security.models.IoTSeverityMetrics """ @@ -1931,7 +2087,7 @@ def __init__(self, *, date_property=None, devices_metrics=None, **kwargs) -> Non class IoTSecuritySolutionModel(Model): - """Security Solution. + """IoT Security solution configuration and resource information. Variables are only populated by the server, and will be ignored when sending a request. @@ -1952,10 +2108,10 @@ class IoTSecuritySolutionModel(Model): :type workspace: str :param display_name: Required. Resource display name. :type display_name: str - :param status: Security solution status. Possible values include: - 'Enabled', 'Disabled'. Default value: "Enabled" . + :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 export to workspace data options + :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. @@ -2020,13 +2176,13 @@ def __init__(self, *, workspace: str, display_name: str, iot_hubs, tags=None, lo class IoTSeverityMetrics(Model): - """Severity metrics. + """IoT Security solution analytics severity metrics. - :param high: count of high severity items + :param high: Count of high severity alerts/recommendations. :type high: int - :param medium: count of medium severity items + :param medium: Count of medium severity alerts/recommendations. :type medium: int - :param low: count of low severity items + :param low: Count of low severity alerts/recommendations. :type low: int """ @@ -2549,7 +2705,10 @@ def __init__(self, *, path: str=None, action=None, type=None, publisher_info=Non class Pricing(Resource): - """Pricing tier will be applied for the scope based on the resource ID. + """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. @@ -2651,15 +2810,15 @@ def __init__(self, *, publisher_name: str=None, product_name: str=None, binary_n class RecommendationConfigurationProperties(Model): - """Recommendation configuration. + """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 recommendation type. Possible - values include: 'IoT_ACRAuthentication', + :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', @@ -2671,9 +2830,9 @@ class RecommendationConfigurationProperties(Model): ~azure.mgmt.security.models.RecommendationType :ivar name: :vartype name: str - :param status: Required. Recommendation status. The recommendation is not - generated when the status is disabled. Possible values include: - 'Disabled', 'Enabled'. Default value: "Enabled" . + :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 """ @@ -3128,6 +3287,103 @@ def __init__(self, *, tags=None, **kwargs) -> None: 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. @@ -3306,8 +3562,8 @@ class UpdateIotSecuritySolutionData(TagsResource): _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'user_defined_resources': {'key': 'userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, - 'recommendations_configuration': {'key': 'recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + '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: @@ -3317,7 +3573,7 @@ def __init__(self, *, tags=None, user_defined_resources=None, recommendations_co class UserDefinedResourcesProperties(Model): - """Properties of the solution's user defined resources. + """Properties of the IoT Security solution's user defined resources. All required parameters must be populated in order to send to Azure. diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py index 362a777bdc8c..f0eb60a62a7a 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py @@ -51,6 +51,19 @@ class SettingPaged(Paged): 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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py index 09cf991ceb06..684dbfad43da 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py @@ -40,6 +40,12 @@ class SettingKind(str, Enum): 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" 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 2044043fcb95..f4efc5f7a4c7 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 @@ -13,14 +13,11 @@ from ._pricings_operations import PricingsOperations from ._alerts_operations import AlertsOperations from ._settings_operations import SettingsOperations -from ._io_tsecurity_solutions_operations import IoTSecuritySolutionsOperations -from ._io_tsecurity_solutions_resource_group_operations import IoTSecuritySolutionsResourceGroupOperations +from ._device_security_groups_operations import DeviceSecurityGroupsOperations from ._iot_security_solution_operations import IotSecuritySolutionOperations -from ._io_tsecurity_solutions_analytics_operations import IoTSecuritySolutionsAnalyticsOperations -from ._io_tsecurity_solutions_analytics_aggregated_alerts_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations -from ._io_tsecurity_solutions_analytics_aggregated_alert_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertOperations -from ._io_tsecurity_solutions_analytics_recommendation_operations import IoTSecuritySolutionsAnalyticsRecommendationOperations -from ._io_tsecurity_solutions_analytics_recommendations_operations import IoTSecuritySolutionsAnalyticsRecommendationsOperations +from ._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 @@ -46,14 +43,11 @@ 'PricingsOperations', 'AlertsOperations', 'SettingsOperations', - 'IoTSecuritySolutionsOperations', - 'IoTSecuritySolutionsResourceGroupOperations', + 'DeviceSecurityGroupsOperations', 'IotSecuritySolutionOperations', - 'IoTSecuritySolutionsAnalyticsOperations', - 'IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations', - 'IoTSecuritySolutionsAnalyticsAggregatedAlertOperations', - 'IoTSecuritySolutionsAnalyticsRecommendationOperations', - 'IoTSecuritySolutionsAnalyticsRecommendationsOperations', + 'IotSecuritySolutionAnalyticsOperations', + 'IotSecuritySolutionsAnalyticsAggregatedAlertOperations', + 'IotSecuritySolutionsAnalyticsRecommendationOperations', 'AllowedConnectionsOperations', 'DiscoveredSecuritySolutionsOperations', 'ExternalSecuritySolutionsOperations', 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/_io_tsecurity_solutions_analytics_aggregated_alerts_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alerts_operations.py deleted file mode 100644 index 8e47ea54d879..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alerts_operations.py +++ /dev/null @@ -1,117 +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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations(object): - """IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations 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): - """Security Analytics of a security solution. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param solution_name: The solution manager name - :type solution_name: str - :param top: The number of results to retrieve. - :type top: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IoTSecurityAggregatedAlert - :rtype: - ~azure.mgmt.security.models.IoTSecurityAggregatedAlertPaged[~azure.mgmt.security.models.IoTSecurityAggregatedAlert] - :raises: :class:`CloudError` - """ - def 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'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendation_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendation_operations.py deleted file mode 100644 index 3e251e9f060e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendation_operations.py +++ /dev/null @@ -1,108 +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. -# -------------------------------------------------------------------------- - -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): - """Security Analytics of a security solution. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param solution_name: The solution manager name - :type solution_name: str - :param aggregated_recommendation_name: Identifier of the aggregated - recommendation - :type aggregated_recommendation_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IoTSecurityAggregatedRecommendation or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.security.models.IoTSecurityAggregatedRecommendation or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'solutionName': self._serialize.url("solution_name", solution_name, 'str'), - 'aggregatedRecommendationName': self._serialize.url("aggregated_recommendation_name", aggregated_recommendation_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('IoTSecurityAggregatedRecommendation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedRecommendations/{aggregatedRecommendationName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_operations.py deleted file mode 100644 index b3f222701615..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_operations.py +++ /dev/null @@ -1,111 +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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class IoTSecuritySolutionsOperations(object): - """IoTSecuritySolutionsOperations 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, filter=None, custom_headers=None, raw=False, **operation_config): - """List of security solutions. - - :param filter: filter the Security Solution with OData syntax. - supporting filter by iotHubs - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IoTSecuritySolutionModel - :rtype: - ~azure.mgmt.security.models.IoTSecuritySolutionModelPaged[~azure.mgmt.security.models.IoTSecuritySolutionModel] - :raises: :class:`CloudError` - """ - def 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.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotSecuritySolutions'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_resource_group_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_resource_group_operations.py deleted file mode 100644 index 1536a6eb452c..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_resource_group_operations.py +++ /dev/null @@ -1,115 +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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class IoTSecuritySolutionsResourceGroupOperations(object): - """IoTSecuritySolutionsResourceGroupOperations 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, filter=None, custom_headers=None, raw=False, **operation_config): - """List of security solutions. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param filter: filter the Security Solution with OData syntax. - supporting filter by iotHubs - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IoTSecuritySolutionModel - :rtype: - ~azure.mgmt.security.models.IoTSecuritySolutionModelPaged[~azure.mgmt.security.models.IoTSecuritySolutionModel] - :raises: :class:`CloudError` - """ - def 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\._\(\)]+$') - } - 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solution_analytics_operations.py similarity index 89% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solution_analytics_operations.py index 70e6b43692b5..a7ee65858d04 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solution_analytics_operations.py @@ -16,8 +16,8 @@ from .. import models -class IoTSecuritySolutionsAnalyticsOperations(object): - """IoTSecuritySolutionsAnalyticsOperations operations. +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. @@ -39,14 +39,14 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def get_all( + def list( self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): - """Security Analytics of a security solution. + """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 solution manager name + :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 @@ -61,7 +61,7 @@ def get_all( :raises: :class:`CloudError` """ # Construct URL - url = self.get_all.metadata['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\._\(\)]+$'), @@ -101,16 +101,16 @@ def get_all( return client_raw_response return deserialized - get_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels'} - def get_default( + def get( self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): - """Security Analytics of a security solution. + """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 solution manager name + :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 @@ -124,7 +124,7 @@ def get_default( :raises: :class:`CloudError` """ # Construct URL - url = self.get_default.metadata['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\._\(\)]+$'), @@ -164,4 +164,4 @@ def get_default( return client_raw_response return deserialized - get_default.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default'} + 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 index 3a3c15481184..8a820da44265 100644 --- 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 @@ -39,14 +39,163 @@ def __init__(self, client, config, serializer, deserializer): 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): - """Details of a specific iot security solution. + """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 solution manager name + :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 @@ -101,14 +250,14 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} - def create( + def create_or_update( self, resource_group_name, solution_name, iot_security_solution_data, custom_headers=None, raw=False, **operation_config): - """Create new solution manager. + """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 solution manager name + :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: @@ -124,7 +273,7 @@ def create( :raises: :class:`CloudError` """ # Construct URL - url = self.create.metadata['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\._\(\)]+$'), @@ -170,17 +319,18 @@ def create( return client_raw_response return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} + 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): - """update existing Security Solution tags or user defined resources. To - update other fields use the CreateOrUpdate method. + """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 solution manager name + :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: @@ -244,12 +394,12 @@ def update( def delete( self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): - """Create new solution manager. + """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 solution manager name + :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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alert_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solutions_analytics_aggregated_alert_operations.py similarity index 63% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alert_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solutions_analytics_aggregated_alert_operations.py index b4a3340cf7e6..327bbbd5f397 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alert_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solutions_analytics_aggregated_alert_operations.py @@ -16,8 +16,8 @@ from .. import models -class IoTSecuritySolutionsAnalyticsAggregatedAlertOperations(object): - """IoTSecuritySolutionsAnalyticsAggregatedAlertOperations operations. +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. @@ -39,16 +39,95 @@ def __init__(self, client, config, serializer, deserializer): 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): - """Security Analytics of a security solution. + """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 solution manager name + :param solution_name: The name of the IoT Security solution. :type solution_name: str - :param aggregated_alert_name: Identifier of the aggregated alert + :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 @@ -106,14 +185,14 @@ def get( def dismiss( self, resource_group_name, solution_name, aggregated_alert_name, custom_headers=None, raw=False, **operation_config): - """Security Analytics of a security solution. + """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 solution manager name + :param solution_name: The name of the IoT Security solution. :type solution_name: str - :param aggregated_alert_name: Identifier of the aggregated alert + :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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendations_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solutions_analytics_recommendation_operations.py similarity index 54% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendations_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solutions_analytics_recommendation_operations.py index 3276e998ec1a..57dbc1031ce4 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendations_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solutions_analytics_recommendation_operations.py @@ -16,8 +16,8 @@ from .. import models -class IoTSecuritySolutionsAnalyticsRecommendationsOperations(object): - """IoTSecuritySolutionsAnalyticsRecommendationsOperations operations. +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. @@ -39,16 +39,87 @@ def __init__(self, client, config, serializer, deserializer): 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): - """Security Analytics of a security solution. + """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 solution manager name + :param solution_name: The name of the IoT Security solution. :type solution_name: str - :param top: The number of results to retrieve. + :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 diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_pricings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_pricings_operations.py index 02e06e34875c..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 @@ -41,10 +41,7 @@ def __init__(self, client, config, serializer, deserializer): def list( self, custom_headers=None, raw=False, **operation_config): - """A given security pricing configuration in the subscription. Azure - Security Center is available in two pricing tiers: Free and Standard, - on multiple resource types, including Virtual machines, SQL Servers, - App service plans and Storage accounts. + """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 @@ -99,10 +96,8 @@ def list( def get( self, pricing_name, custom_headers=None, raw=False, **operation_config): - """A given security pricing configuration in the subscription. Azure - Security Center is available in two pricing tiers: Free and Standard, - on multiple resource types, including Virtual machines, SQL Servers, - App service plans and Storage accounts. + """Gets a provided Security Center pricing configuration in the + subscription. :param pricing_name: name of the pricing configuration :type pricing_name: str @@ -160,10 +155,8 @@ def get( def update( self, pricing_name, pricing_tier, custom_headers=None, raw=False, **operation_config): - """A given security pricing configuration in the subscription. Azure - Security Center is available in two pricing tiers: Free and Standard, - on multiple resource types, including Virtual machines, SQL Servers, - App service plans and Storage accounts. + """Updates a provided Security Center pricing configuration in the + subscription. :param pricing_name: name of the pricing configuration :type pricing_name: str From 11ef5eca1cb86c8e7f208778c8b21382c7599f7d Mon Sep 17 00:00:00 2001 From: Azure SDK Bot Date: Tue, 24 Sep 2019 17:25:30 +0800 Subject: [PATCH 12/13] [AutoPR security/resource-manager] Add ProtectionMode to Microsoft.Security applicationWhitelistings (#7376) * Generated from 97b167628eb4b3d4766f863302c4e0d81b12ee83 change the ProtectionMode object * Generated from a89fd1dbe6506be202e9272e4720506457ee577c add None to enforcement mode * Generated from 16c7d5f2a872e3b7cc01c7dd8af608a586776fe9 lowercase the collection types --- .../azure/mgmt/security/models/__init__.py | 3 ++ .../azure/mgmt/security/models/_models.py | 46 ++++++++++++++++- .../azure/mgmt/security/models/_models_py3.py | 50 +++++++++++++++++-- 3 files changed, 93 insertions(+), 6 deletions(-) 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 d0c40691dc6b..97856b47b9b1 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 @@ -73,6 +73,7 @@ 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 @@ -163,6 +164,7 @@ 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 @@ -300,6 +302,7 @@ 'PathRecommendation', 'Pricing', 'PricingList', + 'ProtectionMode', 'PublisherInfo', 'RecommendationConfigurationProperties', 'RegulatoryComplianceAssessment', diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py index 89600c9fb8d6..a6a826094c6f 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py @@ -636,8 +636,11 @@ class AppWhitelistingGroup(Model): :vartype type: str :ivar location: Location where the resource is stored :vartype location: str - :param enforcement_mode: Possible values include: 'Audit', 'Enforce' + :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 @@ -671,6 +674,7 @@ class AppWhitelistingGroup(Model): '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]'}, @@ -686,6 +690,7 @@ def __init__(self, **kwargs): 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) @@ -738,8 +743,14 @@ def __init__(self, **kwargs): class AppWhitelistingPutGroupData(Model): """The altered data of the recommended VM/server group policy. - :param enforcement_mode: Possible values include: 'Audit', 'Enforce' + :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] @@ -750,6 +761,7 @@ class AppWhitelistingPutGroupData(Model): _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]'}, } @@ -757,6 +769,7 @@ class AppWhitelistingPutGroupData(Model): 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) @@ -2776,6 +2789,35 @@ def __init__(self, **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. diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py index 0ec2a932124b..0fceeef55f0e 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py @@ -636,8 +636,11 @@ class AppWhitelistingGroup(Model): :vartype type: str :ivar location: Location where the resource is stored :vartype location: str - :param enforcement_mode: Possible values include: 'Audit', 'Enforce' + :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 @@ -671,6 +674,7 @@ class AppWhitelistingGroup(Model): '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]'}, @@ -679,13 +683,14 @@ class AppWhitelistingGroup(Model): 'path_recommendations': {'key': 'properties.pathRecommendations', 'type': '[PathRecommendation]'}, } - def __init__(self, *, enforcement_mode=None, configuration_status=None, recommendation_status=None, issues=None, source_system=None, vm_recommendations=None, path_recommendations=None, **kwargs) -> None: + 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 @@ -738,8 +743,14 @@ def __init__(self, *, issue=None, number_of_vms: float=None, **kwargs) -> None: class AppWhitelistingPutGroupData(Model): """The altered data of the recommended VM/server group policy. - :param enforcement_mode: Possible values include: 'Audit', 'Enforce' + :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] @@ -750,13 +761,15 @@ class AppWhitelistingPutGroupData(Model): _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, vm_recommendations=None, path_recommendations=None, **kwargs) -> None: + 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 @@ -2776,6 +2789,35 @@ def __init__(self, *, value, **kwargs) -> None: 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. From 09dcc0089170f13e9bfaa84de1a3413a582e1e41 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot Date: Fri, 27 Sep 2019 07:33:08 +0800 Subject: [PATCH 13/13] [AutoPR security/resource-manager] Jit api add justification (#7422) * Generated from 162213184e0652221884ff84f11c93fe935ec78d Merge branch 'master' into jit-api-add-justification * Generated from 162213184e0652221884ff84f11c93fe935ec78d Merge branch 'master' into jit-api-add-justification --- .../azure/mgmt/security/_security_center.py | 5 + .../azure/mgmt/security/models/__init__.py | 42 ++ .../azure/mgmt/security/models/_models.py | 495 +++++++++++++++++ .../azure/mgmt/security/models/_models_py3.py | 499 +++++++++++++++++- .../mgmt/security/models/_paged_models.py | 13 + .../security/models/_security_center_enums.py | 14 + .../mgmt/security/operations/__init__.py | 2 + ..._jit_network_access_policies_operations.py | 7 +- .../operations/_sub_assessments_operations.py | 253 +++++++++ 9 files changed, 1326 insertions(+), 4 deletions(-) create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_sub_assessments_operations.py diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/_security_center.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/_security_center.py index 03f4764ee113..6e5d20a55e1d 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 @@ -41,6 +41,7 @@ from .operations import RegulatoryComplianceControlsOperations from .operations import RegulatoryComplianceAssessmentsOperations from .operations import ServerVulnerabilityAssessmentOperations +from .operations import SubAssessmentsOperations from . import models @@ -106,6 +107,8 @@ class SecurityCenter(SDKClient): :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 :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -184,3 +187,5 @@ def __init__( 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) 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 97856b47b9b1..0bb7843b55d2 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 @@ -13,6 +13,7 @@ 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 @@ -27,6 +28,8 @@ from ._models_py3 import AtaExternalSecuritySolution from ._models_py3 import AtaSolutionProperties 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 @@ -35,7 +38,10 @@ 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 @@ -80,14 +86,19 @@ 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 TagsResource from ._models_py3 import ThresholdCustomAlertRule from ._models_py3 import TimeWindowCustomAlertRule @@ -98,12 +109,14 @@ 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 ._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 @@ -118,6 +131,8 @@ from ._models import AtaExternalSecuritySolution from ._models import AtaSolutionProperties from ._models import AutoProvisioningSetting + from ._models import AwsResourceDetails + from ._models import AzureResourceDetails from ._models import CefExternalSecuritySolution from ._models import CefSolutionProperties from ._models import Compliance @@ -126,7 +141,10 @@ 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 @@ -171,14 +189,19 @@ 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 TagsResource from ._models import ThresholdCustomAlertRule from ._models import TimeWindowCustomAlertRule @@ -189,6 +212,7 @@ 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 @@ -210,6 +234,7 @@ 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 @@ -235,6 +260,8 @@ AlertNotifications, AlertsToAdmins, State, + SubAssessmentStatusCode, + Severity, ConnectionType, ) @@ -242,6 +269,7 @@ 'AadConnectivityState1', 'AadExternalSecuritySolution', 'AadSolutionProperties', + 'AdditionalData', 'AdvancedThreatProtectionSetting', 'Alert', 'AlertConfidenceReason', @@ -256,6 +284,8 @@ 'AtaExternalSecuritySolution', 'AtaSolutionProperties', 'AutoProvisioningSetting', + 'AwsResourceDetails', + 'AzureResourceDetails', 'CefExternalSecuritySolution', 'CefSolutionProperties', 'Compliance', @@ -264,7 +294,10 @@ 'ConnectableResource', 'ConnectedResource', 'ConnectedWorkspace', + 'ContainerRegistryVulnerabilityProperties', 'CustomAlertRule', + 'CVE', + 'CVSS', 'DataExportSetting', 'DenylistCustomAlertRule', 'DeviceSecurityGroup', @@ -309,14 +342,19 @@ 'RegulatoryComplianceControl', 'RegulatoryComplianceStandard', 'Resource', + 'ResourceDetails', 'SecurityContact', + 'SecuritySubAssessment', 'SecurityTask', 'SecurityTaskParameters', 'SensitivityLabel', 'ServerVulnerabilityAssessment', 'ServerVulnerabilityAssessmentsList', + 'ServerVulnerabilityProperties', 'Setting', 'SettingResource', + 'SqlServerVulnerabilityProperties', + 'SubAssessmentStatus', 'TagsResource', 'ThresholdCustomAlertRule', 'TimeWindowCustomAlertRule', @@ -327,6 +365,7 @@ 'UpdateIotSecuritySolutionData', 'UserDefinedResourcesProperties', 'UserRecommendation', + 'VendorReference', 'VmRecommendation', 'WorkspaceSetting', 'ComplianceResultPaged', @@ -352,6 +391,7 @@ 'RegulatoryComplianceStandardPaged', 'RegulatoryComplianceControlPaged', 'RegulatoryComplianceAssessmentPaged', + 'SecuritySubAssessmentPaged', 'ResourceStatus', 'PricingTier', 'ReportedSeverity', @@ -372,5 +412,7 @@ 'AlertNotifications', 'AlertsToAdmins', 'State', + 'SubAssessmentStatusCode', + 'Severity', '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 index a6a826094c6f..9bf5f77d3cde 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py @@ -164,6 +164,36 @@ def __init__(self, **kwargs): 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. @@ -949,6 +979,100 @@ def __init__(self, **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. @@ -1277,6 +1401,125 @@ def __init__(self, **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. @@ -2315,6 +2558,8 @@ class JitNetworkAccessPolicyInitiateRequest(Model): 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 = { @@ -2323,11 +2568,13 @@ class JitNetworkAccessPolicyInitiateRequest(Model): _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): @@ -2450,6 +2697,8 @@ class JitNetworkAccessRequest(Model): :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 = { @@ -2462,6 +2711,7 @@ class JitNetworkAccessRequest(Model): '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): @@ -2469,6 +2719,7 @@ def __init__(self, **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): @@ -3149,6 +3400,83 @@ def __init__(self, **kwargs): 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. @@ -3312,6 +3640,145 @@ def __init__(self, **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 TagsResource(Model): """A container holding only the Tags for a resource, allowing the user to update the tags. @@ -3666,6 +4133,34 @@ def __init__(self, **kwargs): 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. diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py index 0fceeef55f0e..2022af70d6df 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py @@ -164,6 +164,36 @@ def __init__(self, *, device_vendor: str=None, device_type: str=None, 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. @@ -949,6 +979,100 @@ def __init__(self, *, auto_provision, **kwargs) -> None: 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. @@ -1277,6 +1401,125 @@ def __init__(self, *, id: str=None, **kwargs) -> None: 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. @@ -2315,6 +2558,8 @@ class JitNetworkAccessPolicyInitiateRequest(Model): 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 = { @@ -2323,11 +2568,13 @@ class JitNetworkAccessPolicyInitiateRequest(Model): _attribute_map = { 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessPolicyInitiateVirtualMachine]'}, + 'justification': {'key': 'justification', 'type': 'str'}, } - def __init__(self, *, virtual_machines, **kwargs) -> None: + 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): @@ -2450,6 +2697,8 @@ class JitNetworkAccessRequest(Model): :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 = { @@ -2462,13 +2711,15 @@ class JitNetworkAccessRequest(Model): '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, **kwargs) -> None: + 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): @@ -3149,6 +3400,83 @@ def __init__(self, *, email: str, alert_notifications, alerts_to_admins, phone: 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. @@ -3312,6 +3640,145 @@ def __init__(self, *, value=None, **kwargs) -> None: 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 TagsResource(Model): """A container holding only the Tags for a resource, allowing the user to update the tags. @@ -3666,6 +4133,34 @@ def __init__(self, *, username: str=None, recommendation_action=None, **kwargs) 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. diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py index f0eb60a62a7a..670bbb1a5813 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py @@ -311,3 +311,16 @@ class RegulatoryComplianceAssessmentPaged(Paged): 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) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py index 684dbfad43da..bd18b1776245 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py @@ -156,6 +156,20 @@ class State(str, Enum): 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 ConnectionType(str, Enum): internal = "Internal" 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 f4efc5f7a4c7..9fa27d57ef23 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 @@ -37,6 +37,7 @@ 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 __all__ = [ 'ComplianceResultsOperations', @@ -67,4 +68,5 @@ 'RegulatoryComplianceControlsOperations', 'RegulatoryComplianceAssessmentsOperations', 'ServerVulnerabilityAssessmentOperations', + 'SubAssessmentsOperations', ] 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 index 48df52e84dba..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 @@ -511,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. @@ -525,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 @@ -535,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'] 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}'}