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

[AutoRelease] t2-loganalytics-2022-05-19-31973(Do not merge) #24517

Closed
wants to merge 10 commits into from
Closed
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
4 changes: 4 additions & 0 deletions sdk/loganalytics/azure-mgmt-loganalytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History

## 0.0.0 (2022-05-19)



## 13.0.0b4 (2022-04-08)

**Fixes**
Expand Down
6 changes: 3 additions & 3 deletions sdk/loganalytics/azure-mgmt-loganalytics/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.7.2",
"use": [
"@autorest/python@5.12.0",
"@autorest/python@5.13.0",
"@autorest/modelerfour@4.19.3"
],
"commit": "b52f90085693d0ec65f751e30c65c3a878c340ea",
"commit": "3c18ef0c50ee228b81edf98ea1c192a70354943c",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/operationalinsights/resource-manager/readme.md --multiapi --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"autorest_command": "autorest specification/operationalinsights/resource-manager/readme.md --multiapi --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.13.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"readme": "specification/operationalinsights/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from azure.core.credentials import TokenCredential


class LogAnalyticsManagementClientConfiguration(Configuration):
class LogAnalyticsManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for LogAnalyticsManagementClient.

Note that all parameters used to create this instance are saved as instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
# --------------------------------------------------------------------------

from copy import deepcopy
from typing import Any, Optional, TYPE_CHECKING
from typing import Any, TYPE_CHECKING

from msrest import Deserializer, Serializer

from azure.core.rest import HttpRequest, HttpResponse
from azure.mgmt.core import ARMPipelineClient
from msrest import Deserializer, Serializer

from . import models
from ._configuration import LogAnalyticsManagementClientConfiguration
Expand All @@ -21,7 +22,7 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential

class LogAnalyticsManagementClient:
class LogAnalyticsManagementClient: # pylint: disable=too-many-instance-attributes
"""Operational Insights Client.

:ivar query_packs: QueryPacksOperations operations
Expand Down Expand Up @@ -75,7 +76,7 @@ class LogAnalyticsManagementClient:
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param base_url: Service URL. Default value is 'https://management.azure.com'.
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand Down Expand Up @@ -121,7 +122,7 @@ def __init__(

def _send_request(
self,
request, # type: HttpRequest
request: HttpRequest,
**kwargs: Any
) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"azure_arm": true,
"has_lro_operations": true,
"client_side_validation": false,
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"LogAnalyticsManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"LogAnalyticsManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"LogAnalyticsManagementClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"LogAnalyticsManagementClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
},
"global_parameters": {
"sync": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "13.0.0b4"
VERSION = "0.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from azure.core.credentials_async import AsyncTokenCredential


class LogAnalyticsManagementClientConfiguration(Configuration):
class LogAnalyticsManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for LogAnalyticsManagementClient.

Note that all parameters used to create this instance are saved as instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
# --------------------------------------------------------------------------

from copy import deepcopy
from typing import Any, Awaitable, Optional, TYPE_CHECKING
from typing import Any, Awaitable, TYPE_CHECKING

from msrest import Deserializer, Serializer

from azure.core.rest import AsyncHttpResponse, HttpRequest
from azure.mgmt.core import AsyncARMPipelineClient
from msrest import Deserializer, Serializer

from .. import models
from ._configuration import LogAnalyticsManagementClientConfiguration
Expand All @@ -21,7 +22,7 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential

class LogAnalyticsManagementClient:
class LogAnalyticsManagementClient: # pylint: disable=too-many-instance-attributes
"""Operational Insights Client.

:ivar query_packs: QueryPacksOperations operations
Expand Down Expand Up @@ -75,7 +76,7 @@ class LogAnalyticsManagementClient:
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param base_url: Service URL. Default value is 'https://management.azure.com'.
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# pylint: disable=too-many-lines
# 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 functools
from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar
import warnings
from typing import Any, Callable, Dict, List, Optional, TypeVar

from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
Expand Down Expand Up @@ -57,6 +56,9 @@ async def list_by_workspace(
:type resource_group_name: str
:param workspace_name: The name of the workspace.
:type workspace_name: str
:keyword api_version: Api Version. Default value is "2020-08-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: list of AvailableServiceTier, or the result of cls(response)
:rtype: list[~azure.mgmt.loganalytics.models.AvailableServiceTier]
Expand All @@ -68,17 +70,24 @@ async def list_by_workspace(
}
error_map.update(kwargs.pop('error_map', {}))

api_version = kwargs.pop('api_version', "2020-08-01") # type: str


request = build_list_by_workspace_request(
subscription_id=self._config.subscription_id,
resource_group_name=resource_group_name,
workspace_name=workspace_name,
api_version=api_version,
template_url=self.list_by_workspace.metadata['url'],
)
request = _convert_request(request)
request.url = self._client.format_url(request.url)

pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access
request,
stream=False,
**kwargs
)
response = pipeline_response.http_response

if response.status_code not in [200]:
Expand All @@ -92,5 +101,5 @@ async def list_by_workspace(

return deserialized

list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/availableServiceTiers'} # type: ignore
list_by_workspace.metadata = {'url': "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/availableServiceTiers"} # type: ignore

Loading