Skip to content
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
8 changes: 4 additions & 4 deletions sdk/loganalytics/azure-mgmt-loganalytics/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"autorest": "3.0.6369",
"use": "@autorest/python@5.6.2",
"commit": "f5dce125fdad97160346fe3ac32d7d0a49bb11e4",
"autorest": "3.3.0",
"use": "@autorest/python@5.6.6",
"commit": "8cd10a6eb81d314179d3189091f2e07f14fca8a0",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/operationalinsights/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.2 --version=3.0.6369",
"autorest_command": "autorest specification/operationalinsights/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.6 --version=3.3.0",
"readme": "specification/operationalinsights/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from typing import Any, Optional

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

from ._configuration import LogAnalyticsManagementClientConfiguration
from .operations import DataExportsOperations
Expand All @@ -33,9 +34,9 @@
from .operations import GatewaysOperations
from .operations import SchemaOperations
from .operations import WorkspacePurgeOperations
from .operations import TablesOperations
from .operations import ClustersOperations
from .operations import Operations
from .operations import TablesOperations
from .operations import WorkspacesOperations
from .operations import DeletedWorkspacesOperations
from . import models
Expand Down Expand Up @@ -74,12 +75,12 @@ class LogAnalyticsManagementClient(object):
:vartype schema: azure.mgmt.loganalytics.operations.SchemaOperations
:ivar workspace_purge: WorkspacePurgeOperations operations
:vartype workspace_purge: azure.mgmt.loganalytics.operations.WorkspacePurgeOperations
:ivar tables: TablesOperations operations
:vartype tables: azure.mgmt.loganalytics.operations.TablesOperations
:ivar clusters: ClustersOperations operations
:vartype clusters: azure.mgmt.loganalytics.operations.ClustersOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.loganalytics.operations.Operations
:ivar tables: TablesOperations operations
:vartype tables: azure.mgmt.loganalytics.operations.TablesOperations
:ivar workspaces: WorkspacesOperations operations
:vartype workspaces: azure.mgmt.loganalytics.operations.WorkspacesOperations
:ivar deleted_workspaces: DeletedWorkspacesOperations operations
Expand Down Expand Up @@ -140,17 +141,35 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.workspace_purge = WorkspacePurgeOperations(
self._client, self._config, self._serialize, self._deserialize)
self.tables = TablesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.clusters = ClustersOperations(
self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize)
self.tables = TablesOperations(
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)

def _send_request(self, http_request, **kwargs):
# type: (HttpRequest, Any) -> HttpResponse
"""Runs the network request through the client's chained policies.

:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.HttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

def close(self):
# type: () -> None
self._client.close()
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\"]}}, \"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\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"LogAnalyticsManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"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\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
},
"global_parameters": {
"sync": {
Expand Down Expand Up @@ -113,16 +113,10 @@
"gateways": "GatewaysOperations",
"schema": "SchemaOperations",
"workspace_purge": "WorkspacePurgeOperations",
"tables": "TablesOperations",
"clusters": "ClustersOperations",
"operations": "Operations",
"tables": "TablesOperations",
"workspaces": "WorkspacesOperations",
"deleted_workspaces": "DeletedWorkspacesOperations"
},
"operation_mixins": {
"sync_imports": "None",
"async_imports": "None",
"operations": {
}
}
}
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 = "9.0.0"
VERSION = "7.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from typing import Any, Optional, TYPE_CHECKING

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

Expand All @@ -31,9 +32,9 @@
from .operations import GatewaysOperations
from .operations import SchemaOperations
from .operations import WorkspacePurgeOperations
from .operations import TablesOperations
from .operations import ClustersOperations
from .operations import Operations
from .operations import TablesOperations
from .operations import WorkspacesOperations
from .operations import DeletedWorkspacesOperations
from .. import models
Expand Down Expand Up @@ -72,12 +73,12 @@ class LogAnalyticsManagementClient(object):
:vartype schema: azure.mgmt.loganalytics.aio.operations.SchemaOperations
:ivar workspace_purge: WorkspacePurgeOperations operations
:vartype workspace_purge: azure.mgmt.loganalytics.aio.operations.WorkspacePurgeOperations
:ivar tables: TablesOperations operations
:vartype tables: azure.mgmt.loganalytics.aio.operations.TablesOperations
:ivar clusters: ClustersOperations operations
:vartype clusters: azure.mgmt.loganalytics.aio.operations.ClustersOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.loganalytics.aio.operations.Operations
:ivar tables: TablesOperations operations
:vartype tables: azure.mgmt.loganalytics.aio.operations.TablesOperations
:ivar workspaces: WorkspacesOperations operations
:vartype workspaces: azure.mgmt.loganalytics.aio.operations.WorkspacesOperations
:ivar deleted_workspaces: DeletedWorkspacesOperations operations
Expand Down Expand Up @@ -137,17 +138,34 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.workspace_purge = WorkspacePurgeOperations(
self._client, self._config, self._serialize, self._deserialize)
self.tables = TablesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.clusters = ClustersOperations(
self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize)
self.tables = TablesOperations(
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)

async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
"""Runs the network request through the client's chained policies.

:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

async def close(self) -> None:
await self._client.close()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
from ._gateways_operations import GatewaysOperations
from ._schema_operations import SchemaOperations
from ._workspace_purge_operations import WorkspacePurgeOperations
from ._tables_operations import TablesOperations
from ._clusters_operations import ClustersOperations
from ._operations import Operations
from ._tables_operations import TablesOperations
from ._workspaces_operations import WorkspacesOperations
from ._deleted_workspaces_operations import DeletedWorkspacesOperations

Expand All @@ -43,9 +43,9 @@
'GatewaysOperations',
'SchemaOperations',
'WorkspacePurgeOperations',
'TablesOperations',
'ClustersOperations',
'Operations',
'TablesOperations',
'WorkspacesOperations',
'DeletedWorkspacesOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ async def _delete_initial(
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200, 204]:
if response.status_code not in [200, 202, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ async def _create_or_update_initial(
linked_service_name: str,
parameters: "_models.LinkedService",
**kwargs
) -> "_models.LinkedService":
cls = kwargs.pop('cls', None) # type: ClsType["_models.LinkedService"]
) -> Optional["_models.LinkedService"]:
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.LinkedService"]]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -86,10 +86,11 @@ async def _create_or_update_initial(
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200, 201]:
if response.status_code not in [200, 201, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('LinkedService', pipeline_response)

Expand Down Expand Up @@ -215,7 +216,7 @@ async def _delete_initial(
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200, 204]:
if response.status_code not in [200, 202, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def list_by_workspace(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-10-01"
api_version = "2020-08-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -144,7 +144,7 @@ async def update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-10-01"
api_version = "2020-08-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -212,7 +212,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-10-01"
api_version = "2020-08-01"
accept = "application/json"

# Construct URL
Expand Down
Loading