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-2021-11-16-55983 #21776

Merged
merged 3 commits into from
Nov 16, 2021
Merged
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
14 changes: 14 additions & 0 deletions sdk/loganalytics/azure-mgmt-loganalytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Release History

## 12.0.0 (2021-11-16)

**Features**

- Model Table has a new parameter is_troubleshooting_allowed
- Model Table has a new parameter last_troubleshoot_date
- Model Table has a new parameter is_troubleshoot_enabled
- Added operation TablesOperations.create
- Added operation ClustersOperations.begin_update

**Breaking changes**

- Removed operation ClustersOperations.update

## 11.0.0 (2021-07-12)

**Features**
Expand Down
8 changes: 4 additions & 4 deletions sdk/loganalytics/azure-mgmt-loganalytics/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.4.2",
"autorest": "3.4.5",
"use": [
"@autorest/python@5.8.1",
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
],
"commit": "313e78fa9784a6c17e8dcbb65fdf5f4b7077a184",
"commit": "1c520d5661b24e584bade4e4fe4993a39a43affd",
"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.8.1 --use=@autorest/modelerfour@4.19.2 --version=3.4.2",
"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.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
"readme": "specification/operationalinsights/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
from .operations import GatewaysOperations
from .operations import SchemaOperations
from .operations import WorkspacePurgeOperations
from .operations import Operations
from .operations import TablesOperations
from .operations import ClustersOperations
from .operations import Operations
from .operations import WorkspacesOperations
from .operations import DeletedWorkspacesOperations
from . import models
Expand Down Expand Up @@ -75,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 operations: Operations operations
:vartype operations: azure.mgmt.loganalytics.operations.Operations
: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 workspaces: WorkspacesOperations operations
:vartype workspaces: azure.mgmt.loganalytics.operations.WorkspacesOperations
:ivar deleted_workspaces: DeletedWorkspacesOperations operations
Expand Down Expand Up @@ -141,12 +141,12 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.workspace_purge = WorkspacePurgeOperations(
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.clusters = ClustersOperations(
self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize)
self.workspaces = WorkspacesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.deleted_workspaces = DeletedWorkspacesOperations(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"chosen_version": "",
"total_api_version_list": ["2020-08-01", "2020-10-01"],
"total_api_version_list": ["2020-08-01", "2020-10-01", "2021-06-01"],
"client": {
"name": "LogAnalyticsManagementClient",
"filename": "_log_analytics_management_client",
Expand Down Expand Up @@ -113,9 +113,9 @@
"gateways": "GatewaysOperations",
"schema": "SchemaOperations",
"workspace_purge": "WorkspacePurgeOperations",
"operations": "Operations",
"tables": "TablesOperations",
"clusters": "ClustersOperations",
"operations": "Operations",
"workspaces": "WorkspacesOperations",
"deleted_workspaces": "DeletedWorkspacesOperations"
}
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 = "11.0.0"
VERSION = "12.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
from .operations import GatewaysOperations
from .operations import SchemaOperations
from .operations import WorkspacePurgeOperations
from .operations import Operations
from .operations import TablesOperations
from .operations import ClustersOperations
from .operations import Operations
from .operations import WorkspacesOperations
from .operations import DeletedWorkspacesOperations
from .. import models
Expand Down Expand Up @@ -73,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 operations: Operations operations
:vartype operations: azure.mgmt.loganalytics.aio.operations.Operations
: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 workspaces: WorkspacesOperations operations
:vartype workspaces: azure.mgmt.loganalytics.aio.operations.WorkspacesOperations
:ivar deleted_workspaces: DeletedWorkspacesOperations operations
Expand Down Expand Up @@ -138,12 +138,12 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.workspace_purge = WorkspacePurgeOperations(
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.clusters = ClustersOperations(
self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize)
self.workspaces = WorkspacesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.deleted_workspaces = DeletedWorkspacesOperations(
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 ._operations import Operations
from ._tables_operations import TablesOperations
from ._clusters_operations import ClustersOperations
from ._operations import Operations
from ._workspaces_operations import WorkspacesOperations
from ._deleted_workspaces_operations import DeletedWorkspacesOperations

Expand All @@ -43,9 +43,9 @@
'GatewaysOperations',
'SchemaOperations',
'WorkspacePurgeOperations',
'Operations',
'TablesOperations',
'ClustersOperations',
'Operations',
'WorkspacesOperations',
'DeletedWorkspacesOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def list_by_resource_group(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-10-01"
api_version = "2021-06-01"
accept = "application/json"

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

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

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

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

# Construct URL
Expand Down Expand Up @@ -479,37 +479,24 @@ async def get(
return deserialized
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}'} # type: ignore

async def update(
async def _update_initial(
self,
resource_group_name: str,
cluster_name: str,
parameters: "_models.ClusterPatch",
**kwargs: Any
) -> "_models.Cluster":
"""Updates a Log Analytics cluster.

:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param cluster_name: Name of the Log Analytics Cluster.
:type cluster_name: str
:param parameters: The parameters required to patch a Log Analytics cluster.
:type parameters: ~azure.mgmt.loganalytics.models.ClusterPatch
:keyword callable cls: A custom type or function that will be passed the direct response
:return: Cluster, or the result of cls(response)
:rtype: ~azure.mgmt.loganalytics.models.Cluster
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-10-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

# Construct URL
url = self.update.metadata['url'] # type: ignore
url = self._update_initial.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
Expand Down Expand Up @@ -544,4 +531,75 @@ async def update(
return cls(pipeline_response, deserialized, {})

return deserialized
update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}'} # type: ignore
_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}'} # type: ignore

async def begin_update(
self,
resource_group_name: str,
cluster_name: str,
parameters: "_models.ClusterPatch",
**kwargs: Any
) -> AsyncLROPoller["_models.Cluster"]:
"""Updates a Log Analytics cluster.

:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param cluster_name: Name of the Log Analytics Cluster.
:type cluster_name: str
:param parameters: The parameters required to patch a Log Analytics cluster.
:type parameters: ~azure.mgmt.loganalytics.models.ClusterPatch
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be AsyncARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either Cluster or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.loganalytics.models.Cluster]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
raw_result = await self._update_initial(
resource_group_name=resource_group_name,
cluster_name=cluster_name,
parameters=parameters,
cls=lambda x,y,z: x,
**kwargs
)

kwargs.pop('error_map', None)
kwargs.pop('content_type', None)

def get_long_running_output(pipeline_response):
deserialized = self._deserialize('Cluster', pipeline_response)

if cls:
return cls(pipeline_response, deserialized, {})
return deserialized

path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
}

if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
return AsyncLROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output
)
else:
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}'} # type: ignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-10-01"
api_version = "2021-06-01"
accept = "application/json"

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

def prepare_request(next_link=None):
Expand Down
Loading