Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR securityinsights/resource-manager] Adding alertRuleTemplates swagger spec to securityInsight #6773

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@
from .operation_py3 import Operation
from .alert_rule_py3 import AlertRule
from .alert_rule_kind1_py3 import AlertRuleKind1
from .data_connector_status_py3 import DataConnectorStatus
from .scheduled_alert_rule_py3 import ScheduledAlertRule
from .alert_rule_template_py3 import AlertRuleTemplate
from .scheduled_alert_rule_template_py3 import ScheduledAlertRuleTemplate
from .base_alert_rule_template_properties_py3 import BaseAlertRuleTemplateProperties
from .scheduled_alert_rule_template_properties_model_py3 import ScheduledAlertRuleTemplatePropertiesModel
from .filter_alert_rule_template_py3 import FilterAlertRuleTemplate
from .filter_alert_rule_template_properties_model_py3 import FilterAlertRuleTemplatePropertiesModel
from .fusion_alert_rule_template_py3 import FusionAlertRuleTemplate
from .fusion_alert_rule_template_properties_model_py3 import FusionAlertRuleTemplatePropertiesModel
from .action_py3 import Action
from .user_info_py3 import UserInfo
from .case_py3 import Case
Expand Down Expand Up @@ -87,7 +96,16 @@
from .operation import Operation
from .alert_rule import AlertRule
from .alert_rule_kind1 import AlertRuleKind1
from .data_connector_status import DataConnectorStatus
from .scheduled_alert_rule import ScheduledAlertRule
from .alert_rule_template import AlertRuleTemplate
from .scheduled_alert_rule_template import ScheduledAlertRuleTemplate
from .base_alert_rule_template_properties import BaseAlertRuleTemplateProperties
from .scheduled_alert_rule_template_properties_model import ScheduledAlertRuleTemplatePropertiesModel
from .filter_alert_rule_template import FilterAlertRuleTemplate
from .filter_alert_rule_template_properties_model import FilterAlertRuleTemplatePropertiesModel
from .fusion_alert_rule_template import FusionAlertRuleTemplate
from .fusion_alert_rule_template_properties_model import FusionAlertRuleTemplatePropertiesModel
from .action import Action
from .user_info import UserInfo
from .case import Case
Expand Down Expand Up @@ -158,6 +176,7 @@
from .operation_paged import OperationPaged
from .alert_rule_paged import AlertRulePaged
from .action_paged import ActionPaged
from .alert_rule_template_paged import AlertRuleTemplatePaged
from .case_paged import CasePaged
from .case_comment_paged import CaseCommentPaged
from .bookmark_paged import BookmarkPaged
Expand All @@ -167,8 +186,11 @@
from .entity_query_paged import EntityQueryPaged
from .security_insights_enums import (
AlertRuleKind,
AlertSeverity,
TriggerOperator,
AttackTactic,
DataTypeStatus,
AlertSeverity,
TemplateStatus,
CaseSeverity,
CaseStatus,
CloseReason,
Expand Down Expand Up @@ -196,7 +218,16 @@
'Operation',
'AlertRule',
'AlertRuleKind1',
'DataConnectorStatus',
'ScheduledAlertRule',
'AlertRuleTemplate',
'ScheduledAlertRuleTemplate',
'BaseAlertRuleTemplateProperties',
'ScheduledAlertRuleTemplatePropertiesModel',
'FilterAlertRuleTemplate',
'FilterAlertRuleTemplatePropertiesModel',
'FusionAlertRuleTemplate',
'FusionAlertRuleTemplatePropertiesModel',
'Action',
'UserInfo',
'Case',
Expand Down Expand Up @@ -267,6 +298,7 @@
'OperationPaged',
'AlertRulePaged',
'ActionPaged',
'AlertRuleTemplatePaged',
'CasePaged',
'CaseCommentPaged',
'BookmarkPaged',
Expand All @@ -275,8 +307,11 @@
'OfficeConsentPaged',
'EntityQueryPaged',
'AlertRuleKind',
'AlertSeverity',
'TriggerOperator',
'AttackTactic',
'DataTypeStatus',
'AlertSeverity',
'TemplateStatus',
'CaseSeverity',
'CaseStatus',
'CloseReason',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AlertRuleKind1(Model):
"""Describes an Azure resource with kind.

:param kind: The kind of the alert rule. Possible values include:
'Scheduled'
'Scheduled', 'Filter', 'Fusion'
:type kind: str or ~azure.mgmt.securityinsight.models.AlertRuleKind
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AlertRuleKind1(Model):
"""Describes an Azure resource with kind.

:param kind: The kind of the alert rule. Possible values include:
'Scheduled'
'Scheduled', 'Filter', 'Fusion'
:type kind: str or ~azure.mgmt.securityinsight.models.AlertRuleKind
"""

Expand Down
Original file line number Diff line number Diff line change
@@ -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 AlertRuleTemplate(Model):
"""Alert rule template.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: ScheduledAlertRuleTemplate, FilterAlertRuleTemplate,
FusionAlertRuleTemplate

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: Azure resource Id
:vartype id: str
:ivar type: Azure resource type
:vartype type: str
:ivar name: Azure resource name
:vartype name: str
:param etag: Etag of the alert rule.
:type etag: str
:param kind: Required. Constant filled by server.
:type kind: str
"""

_validation = {
'id': {'readonly': True},
'type': {'readonly': True},
'name': {'readonly': True},
'kind': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'},
'kind': {'key': 'kind', 'type': 'str'},
}

_subtype_map = {
'kind': {'Scheduled': 'ScheduledAlertRuleTemplate', 'Filter': 'FilterAlertRuleTemplate', 'Fusion': 'FusionAlertRuleTemplate'}
}

def __init__(self, **kwargs):
super(AlertRuleTemplate, self).__init__(**kwargs)
self.id = None
self.type = None
self.name = None
self.etag = kwargs.get('etag', None)
self.kind = 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 AlertRuleTemplatePaged(Paged):
"""
A paging container for iterating over a list of :class:`AlertRuleTemplate <azure.mgmt.securityinsight.models.AlertRuleTemplate>` object
"""

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

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

super(AlertRuleTemplatePaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
@@ -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 AlertRuleTemplate(Model):
"""Alert rule template.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: ScheduledAlertRuleTemplate, FilterAlertRuleTemplate,
FusionAlertRuleTemplate

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: Azure resource Id
:vartype id: str
:ivar type: Azure resource type
:vartype type: str
:ivar name: Azure resource name
:vartype name: str
:param etag: Etag of the alert rule.
:type etag: str
:param kind: Required. Constant filled by server.
:type kind: str
"""

_validation = {
'id': {'readonly': True},
'type': {'readonly': True},
'name': {'readonly': True},
'kind': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'},
'kind': {'key': 'kind', 'type': 'str'},
}

_subtype_map = {
'kind': {'Scheduled': 'ScheduledAlertRuleTemplate', 'Filter': 'FilterAlertRuleTemplate', 'Fusion': 'FusionAlertRuleTemplate'}
}

def __init__(self, *, etag: str=None, **kwargs) -> None:
super(AlertRuleTemplate, self).__init__(**kwargs)
self.id = None
self.type = None
self.name = None
self.etag = etag
self.kind = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# 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 BaseAlertRuleTemplateProperties(Model):
"""Base alert rule template property bag.

Variables are only populated by the server, and will be ignored when
sending a request.

:param display_name: The display name for alert rule template.
:type display_name: str
:param description: The description of the alert rule template.
:type description: str
:param tactics: The tactics of the alert rule template
:type tactics: list[str or
~azure.mgmt.securityinsight.models.AttackTactic]
:ivar created_date_utc: The time that this alert rule template has been
added.
:vartype created_date_utc: str
:param status: The alert rule template status. Possible values include:
'Installed', 'Available', 'NotAvailable'
:type status: str or ~azure.mgmt.securityinsight.models.TemplateStatus
:param required_data_connectors: The required data connectors for this
template
:type required_data_connectors:
list[~azure.mgmt.securityinsight.models.DataConnectorStatus]
:param alert_rules_created_by_template_count: the number of alert rules
that were created by this template
:type alert_rules_created_by_template_count: int
"""

_validation = {
'created_date_utc': {'readonly': True},
}

_attribute_map = {
'display_name': {'key': 'displayName', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
'tactics': {'key': 'tactics', 'type': '[AttackTactic]'},
'created_date_utc': {'key': 'createdDateUTC', 'type': 'str'},
'status': {'key': 'status', 'type': 'TemplateStatus'},
'required_data_connectors': {'key': 'requiredDataConnectors', 'type': '[DataConnectorStatus]'},
'alert_rules_created_by_template_count': {'key': 'alertRulesCreatedByTemplateCount', 'type': 'int'},
}

def __init__(self, **kwargs):
super(BaseAlertRuleTemplateProperties, self).__init__(**kwargs)
self.display_name = kwargs.get('display_name', None)
self.description = kwargs.get('description', None)
self.tactics = kwargs.get('tactics', None)
self.created_date_utc = None
self.status = kwargs.get('status', None)
self.required_data_connectors = kwargs.get('required_data_connectors', None)
self.alert_rules_created_by_template_count = kwargs.get('alert_rules_created_by_template_count', None)
Loading