Skip to content

Commit

Permalink
Generated from 09ebd9f479b54ba0243cfe4e758f68ae7589455d
Browse files Browse the repository at this point in the history
Update SavedSearches.json
  • Loading branch information
SDK Automation committed May 19, 2020
1 parent 72a895d commit 8662875
Show file tree
Hide file tree
Showing 8 changed files with 335 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@
from .operations import SharedKeysOperations
from .operations import UsagesOperations
from .operations import WorkspacesOperations
from .operations import DeletedWorkspacesOperations
from .operations import ClustersOperations
from .operations import StorageInsightConfigsOperations
from .operations import SavedSearchesOperations
from .operations import AvailableServiceTiersOperations
from .operations import GatewaysOperations
from .operations import SchemaOperations
from .operations import WorkspacePurgeOperations
Expand Down Expand Up @@ -61,12 +63,16 @@ class LogAnalyticsManagementClient(SDKClient):
:vartype usages: azure.mgmt.loganalytics.operations.UsagesOperations
:ivar workspaces: Workspaces operations
:vartype workspaces: azure.mgmt.loganalytics.operations.WorkspacesOperations
:ivar deleted_workspaces: DeletedWorkspaces operations
:vartype deleted_workspaces: azure.mgmt.loganalytics.operations.DeletedWorkspacesOperations
:ivar clusters: Clusters operations
:vartype clusters: azure.mgmt.loganalytics.operations.ClustersOperations
:ivar storage_insight_configs: StorageInsightConfigs operations
:vartype storage_insight_configs: azure.mgmt.loganalytics.operations.StorageInsightConfigsOperations
:ivar saved_searches: SavedSearches operations
:vartype saved_searches: azure.mgmt.loganalytics.operations.SavedSearchesOperations
:ivar available_service_tiers: AvailableServiceTiers operations
:vartype available_service_tiers: azure.mgmt.loganalytics.operations.AvailableServiceTiersOperations
:ivar gateways: Gateways operations
:vartype gateways: azure.mgmt.loganalytics.operations.GatewaysOperations
:ivar schema: Schema operations
Expand Down Expand Up @@ -115,12 +121,16 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.workspaces = WorkspacesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.deleted_workspaces = DeletedWorkspacesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.clusters = ClustersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.storage_insight_configs = StorageInsightConfigsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.saved_searches = SavedSearchesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.available_service_tiers = AvailableServiceTiersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.gateways = GatewaysOperations(
self._client, self.config, self._serialize, self._deserialize)
self.schema = SchemaOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,14 @@ class SavedSearch(ProxyResource):
https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-search-reference
for reference.
:type query: str
:param function_alias: The function alias if query serves as a function.
:type function_alias: str
:param function_parameters: The optional function parameters if query
serves as a function. Value should be in the following format:
'param-name1:type1 = default_value1, param-name2:type2 = default_value2'.
For more examples and proper syntax please refer to
https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions.
:type function_parameters: str
:param version: The version number of the query language. The current
version is 2 and is the default.
:type version: long
Expand All @@ -1092,6 +1100,8 @@ class SavedSearch(ProxyResource):
'category': {'key': 'properties.category', 'type': 'str'},
'display_name': {'key': 'properties.displayName', 'type': 'str'},
'query': {'key': 'properties.query', 'type': 'str'},
'function_alias': {'key': 'properties.functionAlias', 'type': 'str'},
'function_parameters': {'key': 'properties.functionParameters', 'type': 'str'},
'version': {'key': 'properties.version', 'type': 'long'},
'tags': {'key': 'properties.tags', 'type': '[Tag]'},
}
Expand All @@ -1102,6 +1112,8 @@ def __init__(self, **kwargs):
self.category = kwargs.get('category', None)
self.display_name = kwargs.get('display_name', None)
self.query = kwargs.get('query', None)
self.function_alias = kwargs.get('function_alias', None)
self.function_parameters = kwargs.get('function_parameters', None)
self.version = kwargs.get('version', None)
self.tags = kwargs.get('tags', None)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,14 @@ class SavedSearch(ProxyResource):
https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-search-reference
for reference.
:type query: str
:param function_alias: The function alias if query serves as a function.
:type function_alias: str
:param function_parameters: The optional function parameters if query
serves as a function. Value should be in the following format:
'param-name1:type1 = default_value1, param-name2:type2 = default_value2'.
For more examples and proper syntax please refer to
https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions.
:type function_parameters: str
:param version: The version number of the query language. The current
version is 2 and is the default.
:type version: long
Expand All @@ -1092,16 +1100,20 @@ class SavedSearch(ProxyResource):
'category': {'key': 'properties.category', 'type': 'str'},
'display_name': {'key': 'properties.displayName', 'type': 'str'},
'query': {'key': 'properties.query', 'type': 'str'},
'function_alias': {'key': 'properties.functionAlias', 'type': 'str'},
'function_parameters': {'key': 'properties.functionParameters', 'type': 'str'},
'version': {'key': 'properties.version', 'type': 'long'},
'tags': {'key': 'properties.tags', 'type': '[Tag]'},
}

def __init__(self, *, category: str, display_name: str, query: str, e_tag: str=None, version: int=None, tags=None, **kwargs) -> None:
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:
super(SavedSearch, self).__init__(**kwargs)
self.e_tag = e_tag
self.category = category
self.display_name = display_name
self.query = query
self.function_alias = function_alias
self.function_parameters = function_parameters
self.version = version
self.tags = tags

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
from ._shared_keys_operations import SharedKeysOperations
from ._usages_operations import UsagesOperations
from ._workspaces_operations import WorkspacesOperations
from ._deleted_workspaces_operations import DeletedWorkspacesOperations
from ._clusters_operations import ClustersOperations
from ._storage_insight_configs_operations import StorageInsightConfigsOperations
from ._saved_searches_operations import SavedSearchesOperations
from ._available_service_tiers_operations import AvailableServiceTiersOperations
from ._gateways_operations import GatewaysOperations
from ._schema_operations import SchemaOperations
from ._workspace_purge_operations import WorkspacePurgeOperations
Expand All @@ -39,9 +41,11 @@
'SharedKeysOperations',
'UsagesOperations',
'WorkspacesOperations',
'DeletedWorkspacesOperations',
'ClustersOperations',
'StorageInsightConfigsOperations',
'SavedSearchesOperations',
'AvailableServiceTiersOperations',
'GatewaysOperations',
'SchemaOperations',
'WorkspacePurgeOperations',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# 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.
# --------------------------------------------------------------------------

import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError

from .. import models


class AvailableServiceTiersOperations(object):
"""AvailableServiceTiersOperations operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: The API version to use for this operation. Constant value: "2020-03-01-preview".
"""

models = models

def __init__(self, client, config, serializer, deserializer):

self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2020-03-01-preview"

self.config = config

def list_by_workspace(
self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config):
"""Gets the available service tiers for the workspace.
:param resource_group_name: The name of the resource group. The name
is case insensitive.
:type resource_group_name: str
:param workspace_name: The name of the workspace.
:type workspace_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: list or ClientRawResponse if raw=true
:rtype: list[~azure.mgmt.loganalytics.models.AvailableServiceTier] or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = self.list_by_workspace.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$')
}
url = self._client.format_url(url, **path_format_arguments)

# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp

deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('[AvailableServiceTier]', response)

if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response

return deserialized
list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/availableServiceTiers'}
Loading

0 comments on commit 8662875

Please sign in to comment.