Skip to content

Commit 40d7677

Browse files
author
SDKAuto
committed
CodeGen from PR 21267 in Azure/azure-rest-api-specs
Merge 0f7b70bce5bc146455374ff676340f77287d4f19 into 8c7e7b16ac90afb4b661b05d05c3d37cbc007135
1 parent f4c0572 commit 40d7677

File tree

254 files changed

+11677
-567
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

254 files changed

+11677
-567
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.8.4",
2+
"commit": "9302eab75404db6ff546221a3ea07da46fe74410",
3+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4+
"autorest": "3.9.2",
35
"use": [
4-
"@autorest/python@6.1.6",
5-
"@autorest/modelerfour@4.23.5"
6+
"@autorest/python@6.2.1",
7+
"@autorest/modelerfour@4.24.3"
68
],
7-
"commit": "e24bbf6a66cb0a19c072c6f15cee163acbd7acf7",
8-
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/securityinsights/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.1.6 --use=@autorest/modelerfour@4.23.5 --version=3.8.4 --version-tolerant=False",
9+
"autorest_command": "autorest specification/securityinsights/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.2.1 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/securityinsights/resource-manager/readme.md"
1111
}

sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
_patch_all = []
1919
from ._patch import patch_sdk as _patch_sdk
2020

21-
__all__ = ["SecurityInsights"]
21+
__all__ = [
22+
"SecurityInsights",
23+
]
2224
__all__.extend([p for p in _patch_all if p not in __all__])
2325

2426
_patch_sdk()

sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_configuration.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9+
import sys
910
from typing import Any, TYPE_CHECKING
1011

1112
from azure.core.configuration import Configuration
@@ -14,6 +15,11 @@
1415

1516
from ._version import VERSION
1617

18+
if sys.version_info >= (3, 8):
19+
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20+
else:
21+
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22+
1723
if TYPE_CHECKING:
1824
# pylint: disable=unused-import,ungrouped-imports
1925
from azure.core.credentials import TokenCredential
@@ -29,14 +35,14 @@ class SecurityInsightsConfiguration(Configuration): # pylint: disable=too-many-
2935
:type credential: ~azure.core.credentials.TokenCredential
3036
:param subscription_id: The ID of the target subscription. Required.
3137
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2022-09-01-preview". Note that overriding
38+
:keyword api_version: Api Version. Default value is "2022-11-01-preview". Note that overriding
3339
this default value may result in unsupported behavior.
3440
:paramtype api_version: str
3541
"""
3642

3743
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
3844
super(SecurityInsightsConfiguration, self).__init__(**kwargs)
39-
api_version = kwargs.pop("api_version", "2022-09-01-preview") # type: str
45+
api_version = kwargs.pop("api_version", "2022-11-01-preview") # type: Literal["2022-11-01-preview"]
4046

4147
if credential is None:
4248
raise ValueError("Parameter 'credential' must not be None.")

sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_security_insights.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
EntityQueryTemplatesOperations,
3434
EntityRelationsOperations,
3535
FileImportsOperations,
36+
GetOperations,
37+
GetRecommendationsOperations,
3638
IPGeodataOperations,
3739
IncidentCommentsOperations,
3840
IncidentRelationsOperations,
@@ -48,6 +50,7 @@
4850
ThreatIntelligenceIndicatorMetricsOperations,
4951
ThreatIntelligenceIndicatorOperations,
5052
ThreatIntelligenceIndicatorsOperations,
53+
UpdateOperations,
5154
WatchlistItemsOperations,
5255
WatchlistsOperations,
5356
)
@@ -117,6 +120,13 @@ class SecurityInsights: # pylint: disable=client-accepts-api-version-keyword,to
117120
:vartype source_control: azure.mgmt.securityinsight.operations.SourceControlOperations
118121
:ivar source_controls: SourceControlsOperations operations
119122
:vartype source_controls: azure.mgmt.securityinsight.operations.SourceControlsOperations
123+
:ivar get_recommendations: GetRecommendationsOperations operations
124+
:vartype get_recommendations:
125+
azure.mgmt.securityinsight.operations.GetRecommendationsOperations
126+
:ivar get: GetOperations operations
127+
:vartype get: azure.mgmt.securityinsight.operations.GetOperations
128+
:ivar update: UpdateOperations operations
129+
:vartype update: azure.mgmt.securityinsight.operations.UpdateOperations
120130
:ivar threat_intelligence_indicator: ThreatIntelligenceIndicatorOperations operations
121131
:vartype threat_intelligence_indicator:
122132
azure.mgmt.securityinsight.operations.ThreatIntelligenceIndicatorOperations
@@ -144,7 +154,7 @@ class SecurityInsights: # pylint: disable=client-accepts-api-version-keyword,to
144154
:type subscription_id: str
145155
:param base_url: Service URL. Default value is "https://management.azure.com".
146156
:type base_url: str
147-
:keyword api_version: Api Version. Default value is "2022-09-01-preview". Note that overriding
157+
:keyword api_version: Api Version. Default value is "2022-11-01-preview". Note that overriding
148158
this default value may result in unsupported behavior.
149159
:paramtype api_version: str
150160
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -215,6 +225,11 @@ def __init__(
215225
)
216226
self.source_control = SourceControlOperations(self._client, self._config, self._serialize, self._deserialize)
217227
self.source_controls = SourceControlsOperations(self._client, self._config, self._serialize, self._deserialize)
228+
self.get_recommendations = GetRecommendationsOperations(
229+
self._client, self._config, self._serialize, self._deserialize
230+
)
231+
self.get = GetOperations(self._client, self._config, self._serialize, self._deserialize)
232+
self.update = UpdateOperations(self._client, self._config, self._serialize, self._deserialize)
218233
self.threat_intelligence_indicator = ThreatIntelligenceIndicatorOperations(
219234
self._client, self._config, self._serialize, self._deserialize
220235
)

sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "2.0.0b1"
9+
VERSION = "1.0.0b1"

sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
_patch_all = []
1616
from ._patch import patch_sdk as _patch_sdk
1717

18-
__all__ = ["SecurityInsights"]
18+
__all__ = [
19+
"SecurityInsights",
20+
]
1921
__all__.extend([p for p in _patch_all if p not in __all__])
2022

2123
_patch_sdk()

sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/_configuration.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9+
import sys
910
from typing import Any, TYPE_CHECKING
1011

1112
from azure.core.configuration import Configuration
@@ -14,6 +15,11 @@
1415

1516
from .._version import VERSION
1617

18+
if sys.version_info >= (3, 8):
19+
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20+
else:
21+
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22+
1723
if TYPE_CHECKING:
1824
# pylint: disable=unused-import,ungrouped-imports
1925
from azure.core.credentials_async import AsyncTokenCredential
@@ -29,14 +35,14 @@ class SecurityInsightsConfiguration(Configuration): # pylint: disable=too-many-
2935
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
3036
:param subscription_id: The ID of the target subscription. Required.
3137
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2022-09-01-preview". Note that overriding
38+
:keyword api_version: Api Version. Default value is "2022-11-01-preview". Note that overriding
3339
this default value may result in unsupported behavior.
3440
:paramtype api_version: str
3541
"""
3642

3743
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
3844
super(SecurityInsightsConfiguration, self).__init__(**kwargs)
39-
api_version = kwargs.pop("api_version", "2022-09-01-preview") # type: str
45+
api_version = kwargs.pop("api_version", "2022-11-01-preview") # type: Literal["2022-11-01-preview"]
4046

4147
if credential is None:
4248
raise ValueError("Parameter 'credential' must not be None.")

sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/_security_insights.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
EntityQueryTemplatesOperations,
3434
EntityRelationsOperations,
3535
FileImportsOperations,
36+
GetOperations,
37+
GetRecommendationsOperations,
3638
IPGeodataOperations,
3739
IncidentCommentsOperations,
3840
IncidentRelationsOperations,
@@ -48,6 +50,7 @@
4850
ThreatIntelligenceIndicatorMetricsOperations,
4951
ThreatIntelligenceIndicatorOperations,
5052
ThreatIntelligenceIndicatorsOperations,
53+
UpdateOperations,
5154
WatchlistItemsOperations,
5255
WatchlistsOperations,
5356
)
@@ -121,6 +124,13 @@ class SecurityInsights: # pylint: disable=client-accepts-api-version-keyword,to
121124
:vartype source_control: azure.mgmt.securityinsight.aio.operations.SourceControlOperations
122125
:ivar source_controls: SourceControlsOperations operations
123126
:vartype source_controls: azure.mgmt.securityinsight.aio.operations.SourceControlsOperations
127+
:ivar get_recommendations: GetRecommendationsOperations operations
128+
:vartype get_recommendations:
129+
azure.mgmt.securityinsight.aio.operations.GetRecommendationsOperations
130+
:ivar get: GetOperations operations
131+
:vartype get: azure.mgmt.securityinsight.aio.operations.GetOperations
132+
:ivar update: UpdateOperations operations
133+
:vartype update: azure.mgmt.securityinsight.aio.operations.UpdateOperations
124134
:ivar threat_intelligence_indicator: ThreatIntelligenceIndicatorOperations operations
125135
:vartype threat_intelligence_indicator:
126136
azure.mgmt.securityinsight.aio.operations.ThreatIntelligenceIndicatorOperations
@@ -148,7 +158,7 @@ class SecurityInsights: # pylint: disable=client-accepts-api-version-keyword,to
148158
:type subscription_id: str
149159
:param base_url: Service URL. Default value is "https://management.azure.com".
150160
:type base_url: str
151-
:keyword api_version: Api Version. Default value is "2022-09-01-preview". Note that overriding
161+
:keyword api_version: Api Version. Default value is "2022-11-01-preview". Note that overriding
152162
this default value may result in unsupported behavior.
153163
:paramtype api_version: str
154164
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -219,6 +229,11 @@ def __init__(
219229
)
220230
self.source_control = SourceControlOperations(self._client, self._config, self._serialize, self._deserialize)
221231
self.source_controls = SourceControlsOperations(self._client, self._config, self._serialize, self._deserialize)
232+
self.get_recommendations = GetRecommendationsOperations(
233+
self._client, self._config, self._serialize, self._deserialize
234+
)
235+
self.get = GetOperations(self._client, self._config, self._serialize, self._deserialize)
236+
self.update = UpdateOperations(self._client, self._config, self._serialize, self._deserialize)
222237
self.threat_intelligence_indicator = ThreatIntelligenceIndicatorOperations(
223238
self._client, self._config, self._serialize, self._deserialize
224239
)

sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/operations/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
from ._product_settings_operations import ProductSettingsOperations
3333
from ._source_control_operations import SourceControlOperations
3434
from ._source_controls_operations import SourceControlsOperations
35+
from ._get_recommendations_operations import GetRecommendationsOperations
36+
from ._get_operations import GetOperations
37+
from ._update_operations import UpdateOperations
3538
from ._threat_intelligence_indicator_operations import ThreatIntelligenceIndicatorOperations
3639
from ._threat_intelligence_indicators_operations import ThreatIntelligenceIndicatorsOperations
3740
from ._threat_intelligence_indicator_metrics_operations import ThreatIntelligenceIndicatorMetricsOperations
@@ -72,6 +75,9 @@
7275
"ProductSettingsOperations",
7376
"SourceControlOperations",
7477
"SourceControlsOperations",
78+
"GetRecommendationsOperations",
79+
"GetOperations",
80+
"UpdateOperations",
7581
"ThreatIntelligenceIndicatorOperations",
7682
"ThreatIntelligenceIndicatorsOperations",
7783
"ThreatIntelligenceIndicatorMetricsOperations",

sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/operations/_actions_operations.py

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
# Code generated by Microsoft (R) AutoRest Code Generator.
77
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
88
# --------------------------------------------------------------------------
9+
import sys
910
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
10-
from urllib.parse import parse_qs, urljoin, urlparse
11+
import urllib.parse
1112

1213
from azure.core.async_paging import AsyncItemPaged, AsyncList
1314
from azure.core.exceptions import (
@@ -35,6 +36,10 @@
3536
build_list_by_alert_rule_request,
3637
)
3738

39+
if sys.version_info >= (3, 8):
40+
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
41+
else:
42+
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
3843
T = TypeVar("T")
3944
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
4045

@@ -80,7 +85,9 @@ def list_by_alert_rule(
8085
_headers = kwargs.pop("headers", {}) or {}
8186
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
8287

83-
api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
88+
api_version = kwargs.pop(
89+
"api_version", _params.pop("api-version", self._config.api_version)
90+
) # type: Literal["2022-11-01-preview"]
8491
cls = kwargs.pop("cls", None) # type: ClsType[_models.ActionsList]
8592

8693
error_map = {
@@ -109,10 +116,17 @@ def prepare_request(next_link=None):
109116

110117
else:
111118
# make call to next link with the client's api-version
112-
_parsed_next_link = urlparse(next_link)
113-
_next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query))
119+
_parsed_next_link = urllib.parse.urlparse(next_link)
120+
_next_request_params = case_insensitive_dict(
121+
{
122+
key: [urllib.parse.quote(v) for v in value]
123+
for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
124+
}
125+
)
114126
_next_request_params["api-version"] = self._config.api_version
115-
request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params)
127+
request = HttpRequest(
128+
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
129+
)
116130
request = _convert_request(request)
117131
request.url = self._client.format_url(request.url) # type: ignore
118132
request.method = "GET"
@@ -174,7 +188,9 @@ async def get(
174188
_headers = kwargs.pop("headers", {}) or {}
175189
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
176190

177-
api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
191+
api_version = kwargs.pop(
192+
"api_version", _params.pop("api-version", self._config.api_version)
193+
) # type: Literal["2022-11-01-preview"]
178194
cls = kwargs.pop("cls", None) # type: ClsType[_models.ActionResponse]
179195

180196
request = build_get_request(
@@ -320,7 +336,9 @@ async def create_or_update(
320336
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
321337
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
322338

323-
api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
339+
api_version = kwargs.pop(
340+
"api_version", _params.pop("api-version", self._config.api_version)
341+
) # type: Literal["2022-11-01-preview"]
324342
content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str]
325343
cls = kwargs.pop("cls", None) # type: ClsType[_models.ActionResponse]
326344

@@ -403,7 +421,9 @@ async def delete( # pylint: disable=inconsistent-return-statements
403421
_headers = kwargs.pop("headers", {}) or {}
404422
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
405423

406-
api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
424+
api_version = kwargs.pop(
425+
"api_version", _params.pop("api-version", self._config.api_version)
426+
) # type: Literal["2022-11-01-preview"]
407427
cls = kwargs.pop("cls", None) # type: ClsType[None]
408428

409429
request = build_delete_request(

0 commit comments

Comments
 (0)