Skip to content

Commit d7d7682

Browse files
msyycSDK Automation
andauthored
[T2] securityinsight 2020 11 10 (Azure#15187)
* Generated from c7190a7790235096268933e4ba2ce96bc1310877 * version,changelog Co-authored-by: SDK Automation <sdkautomation@microsoft.com>
1 parent 873435f commit d7d7682

40 files changed

+11769
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Release History
2+
3+
## 1.0.0b1 (2020-11-10)
4+
5+
* Initial Release
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
recursive-include tests *.py *.yaml
2+
include *.md
3+
include azure/__init__.py
4+
include azure/mgmt/__init__.py
5+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Microsoft Azure SDK for Python
2+
3+
This is the Microsoft Azure SecurityInsight Management Client Library.
4+
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
5+
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
6+
7+
8+
# Usage
9+
10+
11+
To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)
12+
13+
14+
15+
For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
16+
Code samples for this package can be found at [SecurityInsight Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com.
17+
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
18+
19+
20+
# Provide Feedback
21+
22+
If you encounter any bugs or have suggestions, please file an issue in the
23+
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
24+
section of the project.
25+
26+
27+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-securityinsight%2FREADME.png)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from ._security_insights import SecurityInsights
10+
from ._version import VERSION
11+
12+
__version__ = VERSION
13+
__all__ = ['SecurityInsights']
14+
15+
try:
16+
from ._patch import patch_sdk # type: ignore
17+
patch_sdk()
18+
except ImportError:
19+
pass
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from typing import TYPE_CHECKING
10+
11+
from azure.core.configuration import Configuration
12+
from azure.core.pipeline import policies
13+
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
14+
15+
from ._version import VERSION
16+
17+
if TYPE_CHECKING:
18+
# pylint: disable=unused-import,ungrouped-imports
19+
from typing import Any
20+
21+
from azure.core.credentials import TokenCredential
22+
23+
24+
class SecurityInsightsConfiguration(Configuration):
25+
"""Configuration for SecurityInsights.
26+
27+
Note that all parameters used to create this instance are saved as instance
28+
attributes.
29+
30+
:param credential: Credential needed for the client to connect to Azure.
31+
:type credential: ~azure.core.credentials.TokenCredential
32+
:param subscription_id: Azure subscription ID.
33+
:type subscription_id: str
34+
"""
35+
36+
def __init__(
37+
self,
38+
credential, # type: "TokenCredential"
39+
subscription_id, # type: str
40+
**kwargs # type: Any
41+
):
42+
# type: (...) -> None
43+
if credential is None:
44+
raise ValueError("Parameter 'credential' must not be None.")
45+
if subscription_id is None:
46+
raise ValueError("Parameter 'subscription_id' must not be None.")
47+
super(SecurityInsightsConfiguration, self).__init__(**kwargs)
48+
49+
self.credential = credential
50+
self.subscription_id = subscription_id
51+
self.api_version = "2020-01-01"
52+
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
53+
kwargs.setdefault('sdk_moniker', 'mgmt-securityinsight/{}'.format(VERSION))
54+
self._configure(**kwargs)
55+
56+
def _configure(
57+
self,
58+
**kwargs # type: Any
59+
):
60+
# type: (...) -> None
61+
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
62+
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
63+
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
64+
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
65+
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
66+
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
67+
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
68+
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
69+
self.authentication_policy = kwargs.get('authentication_policy')
70+
if self.credential and not self.authentication_policy:
71+
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"chosen_version": "2020-01-01",
3+
"total_api_version_list": ["2020-01-01"],
4+
"client": {
5+
"name": "SecurityInsights",
6+
"filename": "_security_insights",
7+
"description": "API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider.",
8+
"base_url": "\u0027https://management.azure.com\u0027",
9+
"custom_base_url": null,
10+
"azure_arm": true,
11+
"has_lro_operations": false
12+
},
13+
"global_parameters": {
14+
"sync_method": {
15+
"credential": {
16+
"method_signature": "credential, # type: \"TokenCredential\"",
17+
"description": "Credential needed for the client to connect to Azure.",
18+
"docstring_type": "~azure.core.credentials.TokenCredential",
19+
"required": true
20+
},
21+
"subscription_id": {
22+
"method_signature": "subscription_id, # type: str",
23+
"description": "Azure subscription ID.",
24+
"docstring_type": "str",
25+
"required": true
26+
}
27+
},
28+
"async_method": {
29+
"credential": {
30+
"method_signature": "credential, # type: \"AsyncTokenCredential\"",
31+
"description": "Credential needed for the client to connect to Azure.",
32+
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
33+
"required": true
34+
},
35+
"subscription_id": {
36+
"method_signature": "subscription_id, # type: str",
37+
"description": "Azure subscription ID.",
38+
"docstring_type": "str",
39+
"required": true
40+
}
41+
},
42+
"constant": {
43+
},
44+
"call": "credential, subscription_id"
45+
},
46+
"config": {
47+
"credential": true,
48+
"credential_scopes": ["https://management.azure.com/.default"],
49+
"credential_default_policy_type": "BearerTokenCredentialPolicy",
50+
"credential_default_policy_type_has_async_version": true,
51+
"credential_key_header_name": null
52+
},
53+
"operation_groups": {
54+
"operations": "Operations",
55+
"alert_rules": "AlertRulesOperations",
56+
"actions": "ActionsOperations",
57+
"alert_rule_templates": "AlertRuleTemplatesOperations",
58+
"bookmarks": "BookmarksOperations",
59+
"data_connectors": "DataConnectorsOperations",
60+
"incidents": "IncidentsOperations",
61+
"incident_comments": "IncidentCommentsOperations"
62+
},
63+
"operation_mixins": {
64+
},
65+
"sync_imports": "None",
66+
"async_imports": "None"
67+
}
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from typing import TYPE_CHECKING
10+
11+
from azure.mgmt.core import ARMPipelineClient
12+
from msrest import Deserializer, Serializer
13+
14+
if TYPE_CHECKING:
15+
# pylint: disable=unused-import,ungrouped-imports
16+
from typing import Any, Optional
17+
18+
from azure.core.credentials import TokenCredential
19+
20+
from ._configuration import SecurityInsightsConfiguration
21+
from .operations import Operations
22+
from .operations import AlertRulesOperations
23+
from .operations import ActionsOperations
24+
from .operations import AlertRuleTemplatesOperations
25+
from .operations import BookmarksOperations
26+
from .operations import DataConnectorsOperations
27+
from .operations import IncidentsOperations
28+
from .operations import IncidentCommentsOperations
29+
from . import models
30+
31+
32+
class SecurityInsights(object):
33+
"""API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider.
34+
35+
:ivar operations: Operations operations
36+
:vartype operations: azure.mgmt.securityinsight.operations.Operations
37+
:ivar alert_rules: AlertRulesOperations operations
38+
:vartype alert_rules: azure.mgmt.securityinsight.operations.AlertRulesOperations
39+
:ivar actions: ActionsOperations operations
40+
:vartype actions: azure.mgmt.securityinsight.operations.ActionsOperations
41+
:ivar alert_rule_templates: AlertRuleTemplatesOperations operations
42+
:vartype alert_rule_templates: azure.mgmt.securityinsight.operations.AlertRuleTemplatesOperations
43+
:ivar bookmarks: BookmarksOperations operations
44+
:vartype bookmarks: azure.mgmt.securityinsight.operations.BookmarksOperations
45+
:ivar data_connectors: DataConnectorsOperations operations
46+
:vartype data_connectors: azure.mgmt.securityinsight.operations.DataConnectorsOperations
47+
:ivar incidents: IncidentsOperations operations
48+
:vartype incidents: azure.mgmt.securityinsight.operations.IncidentsOperations
49+
:ivar incident_comments: IncidentCommentsOperations operations
50+
:vartype incident_comments: azure.mgmt.securityinsight.operations.IncidentCommentsOperations
51+
:param credential: Credential needed for the client to connect to Azure.
52+
:type credential: ~azure.core.credentials.TokenCredential
53+
:param subscription_id: Azure subscription ID.
54+
:type subscription_id: str
55+
:param str base_url: Service URL
56+
"""
57+
58+
def __init__(
59+
self,
60+
credential, # type: "TokenCredential"
61+
subscription_id, # type: str
62+
base_url=None, # type: Optional[str]
63+
**kwargs # type: Any
64+
):
65+
# type: (...) -> None
66+
if not base_url:
67+
base_url = 'https://management.azure.com'
68+
self._config = SecurityInsightsConfiguration(credential, subscription_id, **kwargs)
69+
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
70+
71+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
72+
self._serialize = Serializer(client_models)
73+
self._deserialize = Deserializer(client_models)
74+
75+
self.operations = Operations(
76+
self._client, self._config, self._serialize, self._deserialize)
77+
self.alert_rules = AlertRulesOperations(
78+
self._client, self._config, self._serialize, self._deserialize)
79+
self.actions = ActionsOperations(
80+
self._client, self._config, self._serialize, self._deserialize)
81+
self.alert_rule_templates = AlertRuleTemplatesOperations(
82+
self._client, self._config, self._serialize, self._deserialize)
83+
self.bookmarks = BookmarksOperations(
84+
self._client, self._config, self._serialize, self._deserialize)
85+
self.data_connectors = DataConnectorsOperations(
86+
self._client, self._config, self._serialize, self._deserialize)
87+
self.incidents = IncidentsOperations(
88+
self._client, self._config, self._serialize, self._deserialize)
89+
self.incident_comments = IncidentCommentsOperations(
90+
self._client, self._config, self._serialize, self._deserialize)
91+
92+
def close(self):
93+
# type: () -> None
94+
self._client.close()
95+
96+
def __enter__(self):
97+
# type: () -> SecurityInsights
98+
self._client.__enter__()
99+
return self
100+
101+
def __exit__(self, *exc_details):
102+
# type: (Any) -> None
103+
self._client.__exit__(*exc_details)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
VERSION = "1.0.0b1"

0 commit comments

Comments
 (0)