Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions azure-mgmt-security/azure/mgmt/security/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -68,10 +69,11 @@
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
Expand Down Expand Up @@ -125,6 +127,7 @@
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
Expand All @@ -144,6 +147,7 @@
from .regulatory_compliance_control_paged import RegulatoryComplianceControlPaged
from .regulatory_compliance_assessment_paged import RegulatoryComplianceAssessmentPaged
from .security_center_enums import (
ResourceStatus,
PricingTier,
ReportedSeverity,
SettingKind,
Expand All @@ -161,10 +165,11 @@
)

__all__ = [
'Pricing',
'PricingList',
'ComplianceResult',
'AscLocation',
'Resource',
'Pricing',
'PricingList',
'AlertEntity',
'AlertConfidenceReason',
'Alert',
Expand Down Expand Up @@ -218,6 +223,7 @@
'RegulatoryComplianceStandard',
'RegulatoryComplianceControl',
'RegulatoryComplianceAssessment',
'ComplianceResultPaged',
'AlertPaged',
'SettingPaged',
'AllowedConnectionsResourcePaged',
Expand All @@ -236,6 +242,7 @@
'RegulatoryComplianceStandardPaged',
'RegulatoryComplianceControlPaged',
'RegulatoryComplianceAssessmentPaged',
'ResourceStatus',
'PricingTier',
'ReportedSeverity',
'SettingKind',
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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 <azure.mgmt.security.models.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)
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -31,6 +32,7 @@
from .regulatory_compliance_assessments_operations import RegulatoryComplianceAssessmentsOperations

__all__ = [
'ComplianceResultsOperations',
'PricingsOperations',
'AlertsOperations',
'SettingsOperations',
Expand Down
Loading