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] Creates the "real" API for Scheduled Alert Rules #4229

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
9 changes: 9 additions & 0 deletions azure-mgmt-securityinsight/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. :changelog:
Release History
===============

0.1.0 (1970-01-01)
++++++++++++++++++

* Initial Release
4 changes: 4 additions & 0 deletions azure-mgmt-securityinsight/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

49 changes: 49 additions & 0 deletions azure-mgmt-securityinsight/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Microsoft Azure SDK for Python
==============================

This is the Microsoft Azure MyService 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.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.

For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell

pip freeze

If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell

pip uninstall azure


Usage
=====

For code examples, see `MyService Management
<https://docs.microsoft.com/python/api/overview/azure/>`__
on docs.microsoft.com.


Provide Feedback
================

If you encounter any bugs or have suggestions, please file an issue in the
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
section of the project.
1 change: 1 addition & 0 deletions azure-mgmt-securityinsight/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
1 change: 1 addition & 0 deletions azure-mgmt-securityinsight/azure/mgmt/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
18 changes: 18 additions & 0 deletions azure-mgmt-securityinsight/azure/mgmt/securityinsight/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .security_insights import SecurityInsights
from .version import VERSION

__all__ = ['SecurityInsights']

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

try:
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .alert_rule_py3 import AlertRule
from .alert_rule_kind1_py3 import AlertRuleKind1
from .scheduled_alert_rule_py3 import ScheduledAlertRule
from .resource_py3 import Resource
except (SyntaxError, ImportError):
from .operation_display import OperationDisplay
from .operation import Operation
from .alert_rule import AlertRule
from .alert_rule_kind1 import AlertRuleKind1
from .scheduled_alert_rule import ScheduledAlertRule
from .resource import Resource
from .operation_paged import OperationPaged
from .alert_rule_paged import AlertRulePaged
from .security_insights_enums import (
AlertRuleKind,
Severity,
TriggerOperator,
)

__all__ = [
'OperationDisplay',
'Operation',
'AlertRule',
'AlertRuleKind1',
'ScheduledAlertRule',
'Resource',
'OperationPaged',
'AlertRulePaged',
'AlertRuleKind',
'Severity',
'TriggerOperator',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# 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 AlertRule(Model):
"""Alert rule.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: ScheduledAlertRule

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': 'ScheduledAlertRule'}
}

def __init__(self, **kwargs):
super(AlertRule, 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,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 AlertRuleKind1(Model):
"""Describes an Azure resource with kind.

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

_attribute_map = {
'kind': {'key': 'kind', 'type': 'str'},
}

def __init__(self, **kwargs):
super(AlertRuleKind1, self).__init__(**kwargs)
self.kind = kwargs.get('kind', None)
Original file line number Diff line number Diff line change
@@ -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 AlertRuleKind1(Model):
"""Describes an Azure resource with kind.

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

_attribute_map = {
'kind': {'key': 'kind', 'type': 'str'},
}

def __init__(self, *, kind=None, **kwargs) -> None:
super(AlertRuleKind1, self).__init__(**kwargs)
self.kind = kind
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 AlertRulePaged(Paged):
"""
A paging container for iterating over a list of :class:`AlertRule <azure.mgmt.securityinsight.models.AlertRule>` object
"""

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

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

super(AlertRulePaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# 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 AlertRule(Model):
"""Alert rule.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: ScheduledAlertRule

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': 'ScheduledAlertRule'}
}

def __init__(self, *, etag: str=None, **kwargs) -> None:
super(AlertRule, 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,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 Operation(Model):
"""Operation provided by provider.

:param name: Name of the operation
:type name: str
:param display: Properties of the operation
:type display: ~azure.mgmt.securityinsight.models.OperationDisplay
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'display': {'key': 'display', 'type': 'OperationDisplay'},
}

def __init__(self, **kwargs):
super(Operation, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.display = kwargs.get('display', None)
Loading