Skip to content

Commit 3a375d0

Browse files
chunyu3SDK AutomationAutorestCI
authored
Loganalytics release (Azure#12460)
* Generated from 079c0df1689e378d66ae40e869363bbb8b0fc8d0 update java md * update version * Packaging update of azure-mgmt-loganalytics Co-authored-by: SDK Automation <[email protected]> Co-authored-by: Azure SDK Bot <[email protected]>
1 parent 2ba23a5 commit 3a375d0

File tree

7 files changed

+63
-87
lines changed

7 files changed

+63
-87
lines changed

sdk/loganalytics/azure-mgmt-loganalytics/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Release History
22

3+
## 0.7.0 (2020-07-09)
4+
5+
**Features**
6+
7+
- Model DataSource has a new parameter etag
8+
- Model SavedSearch has a new parameter etag
9+
10+
**Breaking changes**
11+
12+
- Model DataSource no longer has parameter e_tag
13+
- Model SavedSearch no longer has parameter e_tag
14+
315
## 0.6.0 (2020-05-28)
416

517
**Features**

sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_log_analytics_management_client_enums.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ class WorkspaceSkuNameEnum(str, Enum):
8282

8383
class DataIngestionStatus(str, Enum):
8484

85-
respect_quota = "RespectQuota"
86-
force_on = "ForceOn"
87-
force_off = "ForceOff"
88-
over_quota = "OverQuota"
89-
subscription_suspended = "SubscriptionSuspended"
90-
approaching_quota = "ApproachingQuota"
85+
respect_quota = "RespectQuota" #: Ingestion enabled following daily cap quota reset, or subscription enablement.
86+
force_on = "ForceOn" #: Ingestion started following service setting change.
87+
force_off = "ForceOff" #: Ingestion stopped following service setting change.
88+
over_quota = "OverQuota" #: Reached daily cap quota, ingestion stopped.
89+
subscription_suspended = "SubscriptionSuspended" #: Ingestion stopped following suspended subscription.
90+
approaching_quota = "ApproachingQuota" #: 80% of daily cap quota reached.
9191

9292

9393
class WorkspaceEntityStatus(str, Enum):

sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,8 @@ class DataSource(ProxyResource):
528528
:param properties: Required. The data source properties in raw json
529529
format, each kind of data source have it's own schema.
530530
:type properties: object
531-
:param e_tag: The ETag of the data source.
532-
:type e_tag: str
531+
:param etag: The ETag of the data source.
532+
:type etag: str
533533
:param kind: Required. Possible values include: 'WindowsEvent',
534534
'WindowsPerformanceCounter', 'IISLogs', 'LinuxSyslog',
535535
'LinuxSyslogCollection', 'LinuxPerformanceObject',
@@ -564,15 +564,15 @@ class DataSource(ProxyResource):
564564
'name': {'key': 'name', 'type': 'str'},
565565
'type': {'key': 'type', 'type': 'str'},
566566
'properties': {'key': 'properties', 'type': 'object'},
567-
'e_tag': {'key': 'eTag', 'type': 'str'},
567+
'etag': {'key': 'etag', 'type': 'str'},
568568
'kind': {'key': 'kind', 'type': 'str'},
569569
'tags': {'key': 'tags', 'type': '{str}'},
570570
}
571571

572572
def __init__(self, **kwargs):
573573
super(DataSource, self).__init__(**kwargs)
574574
self.properties = kwargs.get('properties', None)
575-
self.e_tag = kwargs.get('e_tag', None)
575+
self.etag = kwargs.get('etag', None)
576576
self.kind = kwargs.get('kind', None)
577577
self.tags = kwargs.get('tags', None)
578578

@@ -1086,8 +1086,8 @@ class SavedSearch(ProxyResource):
10861086
:ivar type: The type of the resource. Ex-
10871087
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
10881088
:vartype type: str
1089-
:param e_tag: The ETag of the saved search.
1090-
:type e_tag: str
1089+
:param etag: The ETag of the saved search.
1090+
:type etag: str
10911091
:param category: Required. The category of the saved search. This helps
10921092
the user to find a saved search faster.
10931093
:type category: str
@@ -1123,7 +1123,7 @@ class SavedSearch(ProxyResource):
11231123
'id': {'key': 'id', 'type': 'str'},
11241124
'name': {'key': 'name', 'type': 'str'},
11251125
'type': {'key': 'type', 'type': 'str'},
1126-
'e_tag': {'key': 'eTag', 'type': 'str'},
1126+
'etag': {'key': 'etag', 'type': 'str'},
11271127
'category': {'key': 'properties.category', 'type': 'str'},
11281128
'display_name': {'key': 'properties.displayName', 'type': 'str'},
11291129
'query': {'key': 'properties.query', 'type': 'str'},
@@ -1135,7 +1135,7 @@ class SavedSearch(ProxyResource):
11351135

11361136
def __init__(self, **kwargs):
11371137
super(SavedSearch, self).__init__(**kwargs)
1138-
self.e_tag = kwargs.get('e_tag', None)
1138+
self.etag = kwargs.get('etag', None)
11391139
self.category = kwargs.get('category', None)
11401140
self.display_name = kwargs.get('display_name', None)
11411141
self.query = kwargs.get('query', None)

sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models_py3.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,8 @@ class DataSource(ProxyResource):
528528
:param properties: Required. The data source properties in raw json
529529
format, each kind of data source have it's own schema.
530530
:type properties: object
531-
:param e_tag: The ETag of the data source.
532-
:type e_tag: str
531+
:param etag: The ETag of the data source.
532+
:type etag: str
533533
:param kind: Required. Possible values include: 'WindowsEvent',
534534
'WindowsPerformanceCounter', 'IISLogs', 'LinuxSyslog',
535535
'LinuxSyslogCollection', 'LinuxPerformanceObject',
@@ -564,15 +564,15 @@ class DataSource(ProxyResource):
564564
'name': {'key': 'name', 'type': 'str'},
565565
'type': {'key': 'type', 'type': 'str'},
566566
'properties': {'key': 'properties', 'type': 'object'},
567-
'e_tag': {'key': 'eTag', 'type': 'str'},
567+
'etag': {'key': 'etag', 'type': 'str'},
568568
'kind': {'key': 'kind', 'type': 'str'},
569569
'tags': {'key': 'tags', 'type': '{str}'},
570570
}
571571

572-
def __init__(self, *, properties, kind, e_tag: str=None, tags=None, **kwargs) -> None:
572+
def __init__(self, *, properties, kind, etag: str=None, tags=None, **kwargs) -> None:
573573
super(DataSource, self).__init__(**kwargs)
574574
self.properties = properties
575-
self.e_tag = e_tag
575+
self.etag = etag
576576
self.kind = kind
577577
self.tags = tags
578578

@@ -1086,8 +1086,8 @@ class SavedSearch(ProxyResource):
10861086
:ivar type: The type of the resource. Ex-
10871087
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
10881088
:vartype type: str
1089-
:param e_tag: The ETag of the saved search.
1090-
:type e_tag: str
1089+
:param etag: The ETag of the saved search.
1090+
:type etag: str
10911091
:param category: Required. The category of the saved search. This helps
10921092
the user to find a saved search faster.
10931093
:type category: str
@@ -1123,7 +1123,7 @@ class SavedSearch(ProxyResource):
11231123
'id': {'key': 'id', 'type': 'str'},
11241124
'name': {'key': 'name', 'type': 'str'},
11251125
'type': {'key': 'type', 'type': 'str'},
1126-
'e_tag': {'key': 'eTag', 'type': 'str'},
1126+
'etag': {'key': 'etag', 'type': 'str'},
11271127
'category': {'key': 'properties.category', 'type': 'str'},
11281128
'display_name': {'key': 'properties.displayName', 'type': 'str'},
11291129
'query': {'key': 'properties.query', 'type': 'str'},
@@ -1133,9 +1133,9 @@ class SavedSearch(ProxyResource):
11331133
'tags': {'key': 'properties.tags', 'type': '[Tag]'},
11341134
}
11351135

1136-
def __init__(self, *, category: str, display_name: str, query: str, e_tag: str=None, function_alias: str=None, function_parameters: str=None, version: int=None, tags=None, **kwargs) -> None:
1136+
def __init__(self, *, category: str, display_name: str, query: str, etag: str=None, function_alias: str=None, function_parameters: str=None, version: int=None, tags=None, **kwargs) -> None:
11371137
super(SavedSearch, self).__init__(**kwargs)
1138-
self.e_tag = e_tag
1138+
self.etag = etag
11391139
self.category = category
11401140
self.display_name = display_name
11411141
self.query = query

sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_data_exports_operations.py

Lines changed: 25 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
import uuid
1313
from msrest.pipeline import ClientRawResponse
14-
from msrest.polling import LROPoller, NoPolling
15-
from msrestazure.polling.arm_polling import ARMPolling
1614

1715
from .. import models
1816

@@ -112,9 +110,31 @@ def internal_paging(next_link=None):
112110
return deserialized
113111
list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports'}
114112

115-
116-
def _create_or_update_initial(
113+
def create_or_update(
117114
self, resource_group_name, workspace_name, data_export_name, parameters, custom_headers=None, raw=False, **operation_config):
115+
"""Create or update a data export.
116+
117+
:param resource_group_name: The name of the resource group. The name
118+
is case insensitive.
119+
:type resource_group_name: str
120+
:param workspace_name: The name of the workspace.
121+
:type workspace_name: str
122+
:param data_export_name: The data export rule name.
123+
:type data_export_name: str
124+
:param parameters: The parameters required to create or update a data
125+
export.
126+
:type parameters: ~azure.mgmt.loganalytics.models.DataExport
127+
:param dict custom_headers: headers that will be added to the request
128+
:param bool raw: returns the direct response alongside the
129+
deserialized response
130+
:param operation_config: :ref:`Operation configuration
131+
overrides<msrest:optionsforoperations>`.
132+
:return: DataExport or ClientRawResponse if raw=true
133+
:rtype: ~azure.mgmt.loganalytics.models.DataExport or
134+
~msrest.pipeline.ClientRawResponse
135+
:raises:
136+
:class:`DataExportErrorResponseException<azure.mgmt.loganalytics.models.DataExportErrorResponseException>`
137+
"""
118138
# Construct URL
119139
url = self.create_or_update.metadata['url']
120140
path_format_arguments = {
@@ -151,7 +171,6 @@ def _create_or_update_initial(
151171
raise models.DataExportErrorResponseException(self._deserialize, response)
152172

153173
deserialized = None
154-
155174
if response.status_code == 200:
156175
deserialized = self._deserialize('DataExport', response)
157176
if response.status_code == 201:
@@ -162,61 +181,6 @@ def _create_or_update_initial(
162181
return client_raw_response
163182

164183
return deserialized
165-
166-
def create_or_update(
167-
self, resource_group_name, workspace_name, data_export_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config):
168-
"""Create or update a data export.
169-
170-
:param resource_group_name: The name of the resource group. The name
171-
is case insensitive.
172-
:type resource_group_name: str
173-
:param workspace_name: The name of the workspace.
174-
:type workspace_name: str
175-
:param data_export_name: The data export rule name.
176-
:type data_export_name: str
177-
:param parameters: The parameters required to create or update a data
178-
export.
179-
:type parameters: ~azure.mgmt.loganalytics.models.DataExport
180-
:param dict custom_headers: headers that will be added to the request
181-
:param bool raw: The poller return type is ClientRawResponse, the
182-
direct response alongside the deserialized response
183-
:param polling: True for ARMPolling, False for no polling, or a
184-
polling object for personal polling strategy
185-
:return: An instance of LROPoller that returns DataExport or
186-
ClientRawResponse<DataExport> if raw==True
187-
:rtype:
188-
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.loganalytics.models.DataExport]
189-
or
190-
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.loganalytics.models.DataExport]]
191-
:raises:
192-
:class:`DataExportErrorResponseException<azure.mgmt.loganalytics.models.DataExportErrorResponseException>`
193-
"""
194-
raw_result = self._create_or_update_initial(
195-
resource_group_name=resource_group_name,
196-
workspace_name=workspace_name,
197-
data_export_name=data_export_name,
198-
parameters=parameters,
199-
custom_headers=custom_headers,
200-
raw=True,
201-
**operation_config
202-
)
203-
204-
def get_long_running_output(response):
205-
deserialized = self._deserialize('DataExport', response)
206-
207-
if raw:
208-
client_raw_response = ClientRawResponse(deserialized, response)
209-
return client_raw_response
210-
211-
return deserialized
212-
213-
lro_delay = operation_config.get(
214-
'long_running_operation_timeout',
215-
self.config.long_running_operation_timeout)
216-
if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
217-
elif polling is False: polling_method = NoPolling()
218-
else: polling_method = polling
219-
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
220184
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}'}
221185

222186
def get(
@@ -269,7 +233,7 @@ def get(
269233
request = self._client.get(url, query_parameters, header_parameters)
270234
response = self._client.send(request, stream=False, **operation_config)
271235

272-
if response.status_code not in [200, 404]:
236+
if response.status_code not in [200]:
273237
raise models.DataExportErrorResponseException(self._deserialize, response)
274238

275239
deserialized = None

sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
VERSION = "0.6.0"
12+
VERSION = "0.7.0"
1313

sdk/loganalytics/azure-mgmt-loganalytics/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
pass
3737

3838
# Version extraction inspired from 'requests'
39-
with open(os.path.join(package_folder_path, 'version.py')
39+
with open(os.path.join(package_folder_path, 'version.py')
4040
if os.path.exists(os.path.join(package_folder_path, 'version.py'))
4141
else os.path.join(package_folder_path, '_version.py'), 'r') as fd:
4242
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]',

0 commit comments

Comments
 (0)