Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
from .operations import RegulatoryComplianceAssessmentsOperations
from .operations import ServerVulnerabilityAssessmentOperations
from .operations import SubAssessmentsOperations
from .operations import AssessmentsMetadataOperations
from .operations import AssessmentsMetadataSubscriptionOperations
from . import models


Expand Down Expand Up @@ -109,6 +111,10 @@ class SecurityCenter(SDKClient):
:vartype server_vulnerability_assessment: azure.mgmt.security.operations.ServerVulnerabilityAssessmentOperations
:ivar sub_assessments: SubAssessments operations
:vartype sub_assessments: azure.mgmt.security.operations.SubAssessmentsOperations
:ivar assessments_metadata: AssessmentsMetadata operations
:vartype assessments_metadata: azure.mgmt.security.operations.AssessmentsMetadataOperations
:ivar assessments_metadata_subscription: AssessmentsMetadataSubscription operations
:vartype assessments_metadata_subscription: azure.mgmt.security.operations.AssessmentsMetadataSubscriptionOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand Down Expand Up @@ -189,3 +195,7 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.sub_assessments = SubAssessmentsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.assessments_metadata = AssessmentsMetadataOperations(
self._client, self.config, self._serialize, self._deserialize)
self.assessments_metadata_subscription = AssessmentsMetadataSubscriptionOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
from ._models_py3 import RegulatoryComplianceStandard
from ._models_py3 import Resource
from ._models_py3 import ResourceDetails
from ._models_py3 import SecurityAssessmentMetadata
from ._models_py3 import SecurityContact
from ._models_py3 import SecuritySubAssessment
from ._models_py3 import SecurityTask
Expand Down Expand Up @@ -192,6 +193,7 @@
from ._models import RegulatoryComplianceStandard
from ._models import Resource
from ._models import ResourceDetails
from ._models import SecurityAssessmentMetadata
from ._models import SecurityContact
from ._models import SecuritySubAssessment
from ._models import SecurityTask
Expand Down Expand Up @@ -235,6 +237,7 @@
from ._paged_models import RegulatoryComplianceAssessmentPaged
from ._paged_models import RegulatoryComplianceControlPaged
from ._paged_models import RegulatoryComplianceStandardPaged
from ._paged_models import SecurityAssessmentMetadataPaged
from ._paged_models import SecurityContactPaged
from ._paged_models import SecuritySubAssessmentPaged
from ._paged_models import SecurityTaskPaged
Expand Down Expand Up @@ -265,6 +268,8 @@
State,
SubAssessmentStatusCode,
Severity,
Category,
AssessmentType,
ConnectionType,
)

Expand Down Expand Up @@ -347,6 +352,7 @@
'RegulatoryComplianceStandard',
'Resource',
'ResourceDetails',
'SecurityAssessmentMetadata',
'SecurityContact',
'SecuritySubAssessment',
'SecurityTask',
Expand Down Expand Up @@ -396,6 +402,7 @@
'RegulatoryComplianceControlPaged',
'RegulatoryComplianceAssessmentPaged',
'SecuritySubAssessmentPaged',
'SecurityAssessmentMetadataPaged',
'ResourceStatus',
'PricingTier',
'ReportedSeverity',
Expand All @@ -419,5 +426,7 @@
'State',
'SubAssessmentStatusCode',
'Severity',
'Category',
'AssessmentType',
'ConnectionType',
]
Original file line number Diff line number Diff line change
Expand Up @@ -3393,6 +3393,83 @@ def __init__(self, **kwargs):
self.unsupported_controls = None


class SecurityAssessmentMetadata(Resource):
"""Security assessment metadata.

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 display_name: User friendly display name of the assessment
:vartype display_name: str
:ivar policy_definition_id: Azure resource ID of the policy definition
that turns this assessment calculation on
:vartype policy_definition_id: str
:ivar description: Human readable description of the assessment
:vartype description: str
:ivar remediation_description: Human readable description of what you
should do to mitigate this security issue
:vartype remediation_description: str
:ivar category:
:vartype category: list[str or ~azure.mgmt.security.models.Category]
:ivar severity: The severity level of the assessment. Possible values
include: 'Low', 'Medium', 'High'
:vartype severity: str or ~azure.mgmt.security.models.Severity
:ivar preview: True if this assessment is in preview release status
:vartype preview: bool
:ivar assessment_type: BuiltIn if the assessment based on built-in Azure
Policy definition, Custom if the assessment based on custom Azure Policy
definition. Possible values include: 'BuiltIn', 'CustomPolicy',
'CustomerManaged'
:vartype assessment_type: str or
~azure.mgmt.security.models.AssessmentType
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'display_name': {'readonly': True},
'policy_definition_id': {'readonly': True},
'description': {'readonly': True},
'remediation_description': {'readonly': True},
'category': {'readonly': True},
'severity': {'readonly': True},
'preview': {'readonly': True},
'assessment_type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'display_name': {'key': 'properties.displayName', 'type': 'str'},
'policy_definition_id': {'key': 'properties.policyDefinitionId', 'type': 'str'},
'description': {'key': 'properties.description', 'type': 'str'},
'remediation_description': {'key': 'properties.remediationDescription', 'type': 'str'},
'category': {'key': 'properties.category', 'type': '[str]'},
'severity': {'key': 'properties.severity', 'type': 'str'},
'preview': {'key': 'properties.preview', 'type': 'bool'},
'assessment_type': {'key': 'properties.assessmentType', 'type': 'str'},
}

def __init__(self, **kwargs):
super(SecurityAssessmentMetadata, self).__init__(**kwargs)
self.display_name = None
self.policy_definition_id = None
self.description = None
self.remediation_description = None
self.category = None
self.severity = None
self.preview = None
self.assessment_type = None


class SecurityContact(Resource):
"""Contact details for security issues.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3393,6 +3393,83 @@ def __init__(self, *, state=None, **kwargs) -> None:
self.unsupported_controls = None


class SecurityAssessmentMetadata(Resource):
"""Security assessment metadata.

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 display_name: User friendly display name of the assessment
:vartype display_name: str
:ivar policy_definition_id: Azure resource ID of the policy definition
that turns this assessment calculation on
:vartype policy_definition_id: str
:ivar description: Human readable description of the assessment
:vartype description: str
:ivar remediation_description: Human readable description of what you
should do to mitigate this security issue
:vartype remediation_description: str
:ivar category:
:vartype category: list[str or ~azure.mgmt.security.models.Category]
:ivar severity: The severity level of the assessment. Possible values
include: 'Low', 'Medium', 'High'
:vartype severity: str or ~azure.mgmt.security.models.Severity
:ivar preview: True if this assessment is in preview release status
:vartype preview: bool
:ivar assessment_type: BuiltIn if the assessment based on built-in Azure
Policy definition, Custom if the assessment based on custom Azure Policy
definition. Possible values include: 'BuiltIn', 'CustomPolicy',
'CustomerManaged'
:vartype assessment_type: str or
~azure.mgmt.security.models.AssessmentType
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'display_name': {'readonly': True},
'policy_definition_id': {'readonly': True},
'description': {'readonly': True},
'remediation_description': {'readonly': True},
'category': {'readonly': True},
'severity': {'readonly': True},
'preview': {'readonly': True},
'assessment_type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'display_name': {'key': 'properties.displayName', 'type': 'str'},
'policy_definition_id': {'key': 'properties.policyDefinitionId', 'type': 'str'},
'description': {'key': 'properties.description', 'type': 'str'},
'remediation_description': {'key': 'properties.remediationDescription', 'type': 'str'},
'category': {'key': 'properties.category', 'type': '[str]'},
'severity': {'key': 'properties.severity', 'type': 'str'},
'preview': {'key': 'properties.preview', 'type': 'bool'},
'assessment_type': {'key': 'properties.assessmentType', 'type': 'str'},
}

def __init__(self, **kwargs) -> None:
super(SecurityAssessmentMetadata, self).__init__(**kwargs)
self.display_name = None
self.policy_definition_id = None
self.description = None
self.remediation_description = None
self.category = None
self.severity = None
self.preview = None
self.assessment_type = None


class SecurityContact(Resource):
"""Contact details for security issues.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,3 +324,16 @@ class SecuritySubAssessmentPaged(Paged):
def __init__(self, *args, **kwargs):

super(SecuritySubAssessmentPaged, self).__init__(*args, **kwargs)
class SecurityAssessmentMetadataPaged(Paged):
"""
A paging container for iterating over a list of :class:`SecurityAssessmentMetadata <azure.mgmt.security.models.SecurityAssessmentMetadata>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[SecurityAssessmentMetadata]'}
}

def __init__(self, *args, **kwargs):

super(SecurityAssessmentMetadataPaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,22 @@ class Severity(str, Enum):
high = "High"


class Category(str, Enum):

compute = "Compute"
networking = "Networking"
data = "Data"
identity_and_access = "IdentityAndAccess"
io_t = "IoT"


class AssessmentType(str, Enum):

built_in = "BuiltIn" #: Azure Security Center managed assessments
custom_policy = "CustomPolicy" #: User defined policies that are automatically ingested from Azure Policy to Azure Security Center
customer_managed = "CustomerManaged" #: User assessments pushed directly by the user or other third party to Azure Security Center


class ConnectionType(str, Enum):

internal = "Internal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
from ._regulatory_compliance_assessments_operations import RegulatoryComplianceAssessmentsOperations
from ._server_vulnerability_assessment_operations import ServerVulnerabilityAssessmentOperations
from ._sub_assessments_operations import SubAssessmentsOperations
from ._assessments_metadata_operations import AssessmentsMetadataOperations
from ._assessments_metadata_subscription_operations import AssessmentsMetadataSubscriptionOperations

__all__ = [
'ComplianceResultsOperations',
Expand Down Expand Up @@ -69,4 +71,6 @@
'RegulatoryComplianceAssessmentsOperations',
'ServerVulnerabilityAssessmentOperations',
'SubAssessmentsOperations',
'AssessmentsMetadataOperations',
'AssessmentsMetadataSubscriptionOperations',
]
Loading